-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathrust_transmutations.dm
111 lines (95 loc) · 3.53 KB
/
rust_transmutations.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/datum/eldritch_transmutation/rust_blade
name = "Rusty Blade"
required_atoms = list(/obj/item/kitchen/knife,/obj/item/trash)
result_atoms = list(/obj/item/melee/sickly_blade/rust)
required_shit_list = "A piece of trash and a knife."
/datum/eldritch_transmutation/armor
name = "Eldritch Armor"
required_atoms = list(/obj/structure/table,/obj/item/clothing/mask/gas)
result_atoms = list(/obj/item/clothing/suit/hooded/cultrobes/eldritch)
required_shit_list = "A table and a gas mask."
/datum/eldritch_transmutation/armor/upgrade
name = "Enhanced Eldritch Armor"
required_atoms = list(/obj/item/clothing/suit/hooded/cultrobes/eldritch,/obj/item/stack/sheet/mineral/diamond)
result_atoms = list(/obj/item/clothing/suit/hooded/cultrobes/eldritch/upgraded)
required_shit_list = "An existing ominous armor, and a diamond."
/datum/eldritch_transmutation/water
name = "Eldritch Essence"
required_atoms = list(/obj/structure/reagent_dispensers/watertank)
result_atoms = list(/obj/item/reagent_containers/glass/beaker/eldritch)
required_shit_list = "A tank of water."
/datum/eldritch_transmutation/final/rust_final
name = "Fallen Empress' Pathology"
required_atoms = list(/mob/living/carbon/human)
required_shit_list = "Three dead bodies."
/datum/eldritch_transmutation/final/rust_final/on_finished_recipe(mob/living/user, list/atoms, loc)
var/mob/living/carbon/human/H = user
H.physiology.brute_mod *= 0.5
H.physiology.burn_mod *= 0.5
H.physiology.stamina_mod = 0
H.physiology.stun_mod = 0
priority_announce(
text = "[generate_heretic_text()] Fear the decay, for the Rustbringer, [user.real_name] has ascended! None shall escape the corrosion! [generate_heretic_text()]",
title = "[generate_heretic_text()]",
sound = 'sound/ambience/antag/heretic/ascend_rust.ogg',
color_override = "pink",
)
new /datum/rust_spread(loc)
var/datum/antagonist/heretic/ascension = H.mind.has_antag_datum(/datum/antagonist/heretic)
ascension.ascended = TRUE
return ..()
/datum/eldritch_transmutation/final/rust_final/on_life(mob/user)
. = ..()
if(!finished)
return
var/mob/living/carbon/human/human_user = user
human_user.adjustBruteLoss(-3, FALSE)
human_user.adjustFireLoss(-3, FALSE)
human_user.adjustToxLoss(-3, FALSE)
human_user.adjustOxyLoss(-1, FALSE)
human_user.adjustStaminaLoss(-10)
/**
* #Rust spread datum
*
* Simple datum that automatically spreads rust around it
*
* Simple implementation of automatically growing entity
*/
/datum/rust_spread
var/list/edge_turfs = list()
var/list/turfs = list()
var/static/list/blacklisted_turfs = typecacheof(list(/turf/open/indestructible,/turf/closed/indestructible,/turf/open/space,/turf/open/lava,/turf/open/chasm))
var/spread_per_tick = 6
/datum/rust_spread/New(loc)
. = ..()
var/turf/turf_loc = get_turf(loc)
turf_loc.rust_heretic_act()
turfs += turf_loc
START_PROCESSING(SSprocessing,src)
/datum/rust_spread/Destroy(force, ...)
STOP_PROCESSING(SSprocessing,src)
return ..()
/datum/rust_spread/process()
compile_turfs()
var/turf/T
for(var/i in 0 to spread_per_tick)
T = pick(edge_turfs)
T.rust_heretic_act()
turfs += get_turf(T)
/**
* Compile turfs
*
* Recreates all edge_turfs as well as normal turfs.
*/
/datum/rust_spread/proc/compile_turfs()
edge_turfs = list()
for(var/X in turfs)
if(!istype(X,/turf/closed/wall/rust) && !istype(X,/turf/closed/wall/r_wall/rust) && !istype(X,/turf/open/floor/plating/rust))
turfs -=X
continue
for(var/turf/T in range(1,X))
if(T in turfs)
continue
if(is_type_in_typecache(T,blacklisted_turfs))
continue
edge_turfs += T