Merge pull request #4112 from Fox-McCloud/xenobio-overhaul

Xenobio Refactor/Changes
This commit is contained in:
TheDZD
2016-04-07 17:54:33 -04:00
15 changed files with 868 additions and 700 deletions
+1 -1
View File
@@ -20,7 +20,7 @@
var/sheet_per_ore = 1
var/point_upgrade = 1
var/list/ore_values = list(("sand" = 1), ("iron" = 1), ("plasma" = 15), ("silver" = 16), ("gold" = 18), ("uranium" = 30), ("diamond" = 50), ("bananium" = 60), ("tranquillite" = 60))
var/list/supply_consoles = list("Science", "Robotics", "Research Director's Desk", "Mechanic", "Engineering" = list("metal", "glass", "plasma"), "Chief Engineer's Desk" = list("metal", "glass", "plasma"), "Atmospherics" = list("metal", "glass", "plasma"), "Bar" = list("uranium", "plasma"), "Virology" = list("uranium", "gold"))
var/list/supply_consoles = list("Science", "Robotics", "Research Director's Desk", "Mechanic", "Engineering" = list("metal", "glass", "plasma"), "Chief Engineer's Desk" = list("metal", "glass", "plasma"), "Atmospherics" = list("metal", "glass", "plasma"), "Bar" = list("uranium", "plasma"), "Virology" = list("plasma", "uranium", "gold"))
/obj/machinery/mineral/ore_redemption/New()
..()
+2 -7
View File
@@ -151,13 +151,8 @@
/mob/living/carbon/slime/handle_chemicals_in_body()
if(reagents) reagents.metabolize(src)
if (reagents.get_reagent_amount("plasma")>=5)
mutation_chance = min(mutation_chance + 5,50) //Prevents mutation chance going >50%
reagents.remove_reagent("plasma", 5)
if (reagents.get_reagent_amount("epinephrine")>=5)
mutation_chance = max(mutation_chance - 5,0) //Prevents muation chance going <0%
reagents.remove_reagent("epinephrine", 5)
if(reagents)
reagents.metabolize(src)
src.updatehealth()
return //TODO: DEFERRED
@@ -207,15 +207,20 @@
var/new_powerlevel = round(powerlevel / 4)
for(var/i=1,i<=4,i++)
var/mob/living/carbon/slime/M = new /mob/living/carbon/slime/(loc)
if(prob(mutation_chance))
if(mutation_chance >= 100)
M.colour = "rainbow"
else if(prob(mutation_chance))
M.colour = slime_mutation[rand(1,4)]
else
M.colour = colour
if(ckey) M.nutrition = new_nutrition //Player slimes are more robust at spliting. Once an oversight of poor copypasta, now a feature!
if(ckey)
M.nutrition = new_nutrition //Player slimes are more robust at spliting. Once an oversight of poor copypasta, now a feature!
M.powerlevel = new_powerlevel
if(i != 1) step_away(M,src)
if(i != 1)
step_away(M,src)
M.Friends = Friends.Copy()
babies += M
M.mutation_chance = Clamp(mutation_chance+(rand(5,-5)),0,100)
feedback_add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]")
var/mob/living/carbon/slime/new_slime = pick(babies)
@@ -46,6 +46,7 @@
var/is_adult = 0
var/core_removal_stage = 0 //For removing cores.
var/mutator_used = FALSE //So you can't shove a dozen mutators into a single slime
///////////TIME FOR SUBSPECIES
@@ -61,7 +62,6 @@
icon_state = "[colour] [is_adult ? "adult" : "baby"] slime"
real_name = name
slime_mutation = mutation_table(colour)
mutation_chance = rand(25, 35)
var/sanitizedcolour = replacetext(colour, " ", "")
coretype = text2path("/obj/item/slime_extract/[sanitizedcolour]")
..()
+1 -1
View File
@@ -817,7 +817,7 @@
var/list/blend_items = list (
//Sheets
/obj/item/stack/sheet/mineral/plasma = list("plasma" = 20),
/obj/item/stack/sheet/mineral/plasma = list("plasma_dust" = 20),
/obj/item/stack/sheet/mineral/uranium = list("uranium" = 20),
/obj/item/stack/sheet/mineral/bananium = list("banana" = 20),
/obj/item/stack/sheet/mineral/tranquillite = list("nothing" = 20),
+4 -4
View File
@@ -106,13 +106,13 @@
description = "mutates blood"
color = "#D18AA5" // rgb: 209,138,165
/datum/reagent/plasma/plasmavirusfood
/datum/reagent/plasma_dust/plasmavirusfood
name = "virus plasma"
id = "plasmavirusfood"
description = "mutates blood"
color = "#A69DA9" // rgb: 166,157,169
/datum/reagent/plasma/plasmavirusfood/weak
/datum/reagent/plasma_dust/plasmavirusfood/weak
name = "weakened virus plasma"
id = "weakplasmavirusfood"
color = "#CEC3C6" // rgb: 206,195,198
@@ -143,7 +143,7 @@
name = "virus plasma"
id = "plasmavirusfood"
result = "plasmavirusfood"
required_reagents = list("plasma" = 1, "virusfood" = 1)
required_reagents = list("plasma_dust" = 1, "virusfood" = 1)
result_amount = 1
/datum/chemical_reaction/virus_food_plasma_diphenhydramine
@@ -195,7 +195,7 @@
/datum/chemical_reaction/mix_virus/mix_virus_3
name = "Mix Virus 3"
id = "mixvirus3"
required_reagents = list("plasma" = 1)
required_reagents = list("plasma_dust" = 1)
level_min = 4
level_max = 6
+30
View File
@@ -626,3 +626,33 @@ datum/reagent/firefighting_foam/reaction_obj(var/obj/O, var/volume)
holder.del_reagent("teslium") //Clear all remaining Teslium and Uranium, but leave all other reagents untouched.
holder.del_reagent("uranium")
return
/datum/reagent/plasma_dust
name = "Plasma Dust"
id = "plasma_dust"
description = "A fine dust of plasma. This chemical has unusual mutagenic properties for viruses and slimes alike."
color = "#500064" // rgb: 80, 0, 100
/datum/reagent/plasma_dust/on_mob_life(mob/living/M)
M.adjustToxLoss(3)
if(iscarbon(M))
var/mob/living/carbon/C = M
C.adjustPlasma(20)
..()
/datum/reagent/plasma_dust/reaction_obj(obj/O, volume)
if((!O) || (!volume))
return 0
O.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume)
/datum/reagent/plasma_dust/reaction_turf(turf/simulated/T, volume)
if(istype(T))
T.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume)
/datum/reagent/plasma_dust/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma dust is stronger than fuel!
if(!istype(M, /mob/living))
return
if(method == TOUCH)
M.adjust_fire_stacks(volume / 5)
return
..()
File diff suppressed because it is too large Load Diff
@@ -48,7 +48,7 @@
holder.remove_reagent("epinephrine", 2)
if(iscarbon(M))
var/mob/living/carbon/C = M
C.adjustPlasma(20)
C.adjustPlasma(10)
..()
return
@@ -303,10 +303,10 @@
/obj/item/weapon/reagent_containers/glass/bottle/plasma
name = "liquid plasma bottle"
desc = "A small bottle of liquid plasma. Extremely toxic and reacts with micro-organisms inside blood."
name = "plasma dust bottle"
desc = "A small bottle of plasma in dust form. Extremely toxic and reacts with micro-organisms inside blood."
icon_state = "bottle8"
list_reagents = list("plasma" = 30)
list_reagents = list("plasma_dust" = 30)
/obj/item/weapon/reagent_containers/glass/bottle/diphenhydramine
name = "diphenhydramine bottle"
+208 -196
View File
@@ -6,120 +6,95 @@
desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
icon = 'icons/mob/slimes.dmi'
icon_state = "grey slime extract"
force = 1.0
w_class = 1.0
force = 1
w_class = 1
throwforce = 0
throw_speed = 3
throw_range = 6
origin_tech = "biotech=4"
item_color = "grey"
origin_tech = "biotech=3"
var/Uses = 1 // uses before it goes inert
var/enhanced = 0 //has it been enhanced before?
attackby(obj/item/O as obj, mob/user as mob, params)
if(istype(O, /obj/item/weapon/slimesteroid2))
if(enhanced == 1)
to_chat(user, "<span class='warning'> This extract has already been enhanced!</span>")
return ..()
if(Uses == 0)
to_chat(user, "<span class='warning'> You can't enhance a used extract!</span>")
return ..()
to_chat(user, "You apply the enhancer. It now has triple the amount of uses.")
Uses = 3
enhanced = 1
qdel(O)
if(istype(O,/obj/item/weapon/storage/bag))
..()
/obj/item/slime_extract/attackby(obj/item/O, mob/user)
if(istype(O, /obj/item/slimepotion/enhancer))
if(Uses >= 5)
to_chat(user, "<span class='warning'>You cannot enhance this extract further!</span>")
return ..()
to_chat(user, "<span class='notice'>You apply the enhancer to the slime extract. It may now be reused one more time.</span>")
Uses++
qdel(O)
..()
/obj/item/slime_extract/New()
..()
create_reagents(100)
/obj/item/slime_extract/grey
name = "grey slime extract"
icon_state = "grey slime extract"
item_color = "grey"
/obj/item/slime_extract/gold
name = "gold slime extract"
icon_state = "gold slime extract"
item_color = "gold"
/obj/item/slime_extract/silver
name = "silver slime extract"
icon_state = "silver slime extract"
item_color = "silver"
/obj/item/slime_extract/metal
name = "metal slime extract"
icon_state = "metal slime extract"
item_color = "metal"
/obj/item/slime_extract/purple
name = "purple slime extract"
icon_state = "purple slime extract"
item_color = "purple"
/obj/item/slime_extract/darkpurple
name = "dark purple slime extract"
icon_state = "dark purple slime extract"
item_color = "darkpurple"
/obj/item/slime_extract/orange
name = "orange slime extract"
icon_state = "orange slime extract"
item_color = "orange"
/obj/item/slime_extract/yellow
name = "yellow slime extract"
icon_state = "yellow slime extract"
item_color = "yellow"
/obj/item/slime_extract/red
name = "red slime extract"
icon_state = "red slime extract"
item_color = "red"
/obj/item/slime_extract/blue
name = "blue slime extract"
icon_state = "blue slime extract"
item_color = "blue"
/obj/item/slime_extract/darkblue
name = "dark blue slime extract"
icon_state = "dark blue slime extract"
item_color = "darkblue"
/obj/item/slime_extract/pink
name = "pink slime extract"
icon_state = "pink slime extract"
item_color = "pink"
/obj/item/slime_extract/green
name = "green slime extract"
icon_state = "green slime extract"
item_color = "green"
/obj/item/slime_extract/lightpink
name = "light pink slime extract"
icon_state = "light pink slime extract"
item_color = "lightpink"
/obj/item/slime_extract/black
name = "black slime extract"
icon_state = "black slime extract"
item_color = "black"
/obj/item/slime_extract/oil
name = "oil slime extract"
icon_state = "oil slime extract"
item_color = "oil"
/obj/item/slime_extract/adamantine
name = "adamantine slime extract"
icon_state = "adamantine slime extract"
item_color = "adamantine"
/obj/item/slime_extract/bluespace
name = "bluespace slime extract"
@@ -141,57 +116,66 @@
name = "rainbow slime extract"
icon_state = "rainbow slime extract"
////Pet Slime Creation///
////Slime-derived potions///
/obj/item/weapon/slimepotion
name = "docility potion"
desc = "A potent chemical mix that will nullify a slime's powers, causing it to become docile and tame."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle19"
/obj/item/slimepotion
name = "slime potion"
desc = "A hard yet gelatinous capsule excreted by a slime, containing mysterious substances."
w_class = 1
origin_tech = "biotech=4"
attack(mob/living/carbon/slime/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
to_chat(user, "<span class='warning'> The potion only works on slimes!</span>")
return ..()
if(M.stat)
to_chat(user, "<span class='warning'> The slime is dead!</span>")
return..()
if(M.mind)
to_chat(user, "<span class='warning'> The slime resists!</span>")
return ..()
if(M.is_adult)
var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc)
pet.icon_state = "[M.colour] adult slime"
pet.icon_living = "[M.colour] adult slime"
pet.icon_dead = "[M.colour] baby slime dead"
pet.colour = "[M.colour]"
qdel(M)
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
/obj/item/slimepotion/afterattack(obj/item/weapon/reagent_containers/target, mob/user , proximity)
if (istype(target))
to_chat(user, "<span class='notice'>You cannot transfer [src] to [target]! It appears the potion must be given directly to a slime to absorb.</span>") // le fluff faec
return
if (!newname)
newname = "pet slime"
pet.name = newname
pet.real_name = newname
qdel(src)
else
var/mob/living/simple_animal/slime/pet = new /mob/living/simple_animal/slime(M.loc)
pet.icon_state = "[M.colour] baby slime"
pet.icon_living = "[M.colour] baby slime"
pet.icon_dead = "[M.colour] baby slime dead"
pet.colour = "[M.colour]"
qdel(M)
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
/obj/item/slimepotion/docility
name = "docility potion"
desc = "A potent chemical mix that nullifies a slime's hunger, causing it to become docile and tame."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle19"
if (!newname)
newname = "pet slime"
pet.name = newname
pet.real_name = newname
qdel(src)
to_chat(user, "You feed the slime the potion, removing it's powers and calming it.")
/obj/item/slimepotion/docility/attack(mob/living/carbon/slime/M, mob/user)
if(!isslime(M))
to_chat(user, "<span class='warning'> The potion only works on slimes!</span>")
return ..()
if(M.stat)
to_chat(user, "<span class='warning'> The slime is dead!</span>")
return..()
if(M.mind)
to_chat(user, "<span class='warning'> The slime resists!</span>")
return ..()
if(M.is_adult)
var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc)
pet.icon_state = "[M.colour] adult slime"
pet.icon_living = "[M.colour] adult slime"
pet.icon_dead = "[M.colour] baby slime dead"
pet.colour = "[M.colour]"
qdel(M)
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
/obj/item/weapon/sentience_potion
if (!newname)
newname = "pet slime"
pet.name = newname
pet.real_name = newname
qdel(src)
else
var/mob/living/simple_animal/slime/pet = new /mob/living/simple_animal/slime(M.loc)
pet.icon_state = "[M.colour] baby slime"
pet.icon_living = "[M.colour] baby slime"
pet.icon_dead = "[M.colour] baby slime dead"
pet.colour = "[M.colour]"
qdel(M)
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
if (!newname)
newname = "pet slime"
pet.name = newname
pet.real_name = newname
qdel(src)
to_chat(user, "You feed the slime the potion, removing it's powers and calming it.")
/obj/item/slimepotion/sentience
name = "sentience potion"
desc = "A miraculous chemical mix that can raise the intelligence of creatures to human levels. Unlike normal slime potions, it can be absorbed by any nonsentient being."
icon = 'icons/obj/chemical.dmi'
@@ -199,11 +183,9 @@
origin_tech = "biotech=5"
var/list/not_interested = list()
var/being_used = 0
w_class = 1
var/sentience_type = SENTIENCE_ORGANIC
/obj/item/weapon/sentience_potion/afterattack(mob/living/M, mob/user)
/obj/item/slimepotion/sentience/afterattack(mob/living/M, mob/user)
if(being_used || !ismob(M))
return
if(!isanimal(M) || M.ckey) //only works on animals that aren't player controlled
@@ -242,51 +224,89 @@
..()
/obj/item/weapon/slimesteroid
/obj/item/slimepotion/steroid
name = "slime steroid"
desc = "A potent chemical mix that will cause a slime to generate more extract."
desc = "A potent chemical mix that will cause a baby slime to generate more extract."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
w_class = 1
origin_tech = "biotech=4"
/obj/item/slimepotion/steroid/attack(mob/living/carbon/slime/M, mob/user)
if(!isslime(M))//If target is not a slime.
to_chat(user, "<span class='warning'>The steroid only works on baby slimes!</span>")
return ..()
if(M.is_adult) //Can't steroidify adults
to_chat(user, "<span class='warning'>Only baby slimes can use the steroid!</span>")
return ..()
if(M.stat)
to_chat(user, "<span class='warning'>The slime is dead!</span>")
return ..()
if(M.cores >= 5)
to_chat(user, "<span class='warning'>The slime already has the maximum amount of extract!</span>")
return ..()
attack(mob/living/carbon/slime/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
to_chat(user, "<span class='warning'> The steroid only works on baby slimes!</span>")
return ..()
if(M.is_adult) //Can't tame adults
to_chat(user, "<span class='warning'> Only baby slimes can use the steroid!</span>")
return..()
if(M.stat)
to_chat(user, "<span class='warning'> The slime is dead!</span>")
return..()
if(M.cores == 3)
to_chat(user, "<span class='warning'> The slime already has the maximum amount of extract!</span>")
return..()
to_chat(user, "<span class='notice'>You feed the slime the steroid. It will now produce one more extract.</span>")
M.cores++
qdel(src)
to_chat(user, "You feed the slime the steroid. It now has triple the amount of extract.")
M.cores = 3
qdel(src)
/obj/item/weapon/slimesteroid2
/obj/item/slimepotion/enhancer
name = "extract enhancer"
desc = "A potent chemical mix that will give a slime extract three uses."
desc = "A potent chemical mix that will give a slime extract an additional use."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle17"
w_class = 1
origin_tech = "biotech=4"
/obj/item/slimepotion/stabilizer
name = "slime stabilizer"
desc = "A potent chemical mix that will reduce the chance of a slime mutating."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle15"
/obj/item/weapon/slimespeed
/obj/item/slimepotion/stabilizer/attack(mob/living/carbon/slime/M, mob/user)
if(!isslime(M))
to_chat(user, "<span class='warning'>The stabilizer only works on slimes!</span>")
return ..()
if(M.stat)
to_chat(user, "<span class='warning'>The slime is dead!</span>")
return ..()
if(M.mutation_chance == 0)
to_chat(user, "<span class='warning'>The slime already has no chance of mutating!</span>")
return ..()
to_chat(user, "<span class='notice'>You feed the slime the stabilizer. It is now less likely to mutate.</span>")
M.mutation_chance = Clamp(M.mutation_chance-15,0,100)
qdel(src)
/obj/item/slimepotion/mutator
name = "slime mutator"
desc = "A potent chemical mix that will increase the chance of a slime mutating."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle3"
/obj/item/slimepotion/mutator/attack(mob/living/carbon/slime/M, mob/user)
if(!isslime(M))
to_chat(user, "<span class='warning'>The mutator only works on slimes!</span>")
return ..()
if(M.stat)
to_chat(user, "<span class='warning'>The slime is dead!</span>")
return ..()
if(M.mutator_used)
to_chat(user, "<span class='warning'>This slime has already consumed a mutator, any more would be far too unstable!</span>")
return ..()
if(M.mutation_chance == 100)
to_chat(user, "<span class='warning'>The slime is already guaranteed to mutate!</span>")
return ..()
to_chat(user, "<span class='notice'>You feed the slime the mutator. It is now more likely to mutate.</span>")
M.mutation_chance = Clamp(M.mutation_chance+12,0,100)
M.mutator_used = TRUE
qdel(src)
/obj/item/slimepotion/speed
name = "slime speed potion"
desc = "A potent chemical mix that will remove the slowdown from any item."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle3"
w_class = 1
origin_tech = "biotech=4"
/obj/item/weapon/slimespeed/afterattack(obj/item/C, mob/user)
/obj/item/slimepotion/speed/afterattack(obj/item/C, mob/user)
..()
if(!istype(C))
to_chat(user, "<span class='warning'>The potion can only be used on items!</span>")
@@ -299,17 +319,14 @@
C.slowdown = 0
qdel(src)
/obj/item/weapon/slimefireproof
/obj/item/slimepotion/fireproof
name = "slime chill potion"
desc = "A potent chemical mix that will fireproof any article of clothing. Has three uses."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle17"
var/uses = 3
w_class = 1
origin_tech = "biotech=4"
/obj/item/weapon/slimefireproof/afterattack(obj/item/clothing/C, mob/user)
/obj/item/slimepotion/fireproof/afterattack(obj/item/clothing/C, mob/user)
..()
if(!uses)
qdel(src)
@@ -319,7 +336,7 @@
return
if(C.max_heat_protection_temperature == FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT)
to_chat(user, "<span class='warning'>The [C] is already fireproof!</span>")
return..()
return ..()
to_chat(user, "<span class='notice'>You slather the blue gunk over the [C], fireproofing it.</span>")
C.name = "fireproofed [C.name]"
C.color = "#000080"
@@ -329,6 +346,78 @@
if(!uses)
qdel(src)
////////Adamantine Golem stuff I dunno where else to put it
/obj/effect/golemrune
anchored = 1
desc = "a strange rune used to create golems. It glows when spirits are nearby."
name = "rune"
icon = 'icons/obj/rune.dmi'
icon_state = "golem"
unacidable = 1
layer = TURF_LAYER
var/list/mob/dead/observer/ghosts[0]
/obj/effect/golemrune/New()
..()
processing_objects.Add(src)
/obj/effect/golemrune/process()
if(ghosts.len>0)
icon_state = "golem2"
else
icon_state = "golem"
/obj/effect/golemrune/attack_hand(mob/living/user as mob)
var/mob/dead/observer/ghost
for(var/mob/dead/observer/O in src.loc)
if(!check_observer(O))
to_chat(O, "\red You are not eligible to become a golem.")
continue
ghost = O
break
if(!ghost)
to_chat(user, "The rune fizzles uselessly. There is no spirit nearby.")
return
var/mob/living/carbon/human/golem/G = new /mob/living/carbon/human/golem
G.change_gender(pick(MALE,FEMALE))
G.loc = src.loc
G.key = ghost.key
to_chat(G, "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve [user], and assist them in completing their goals at any cost.")
qdel(src)
/obj/effect/golemrune/Topic(href,href_list)
if("signup" in href_list)
var/mob/dead/observer/O = locate(href_list["signup"])
volunteer(O)
/obj/effect/golemrune/attack_ghost(var/mob/dead/observer/O)
if(!O) return
volunteer(O)
/obj/effect/golemrune/proc/check_observer(var/mob/dead/observer/O)
if(!O)
return 0
if(!O.client)
return 0
if(O.mind && O.mind.current && O.mind.current.stat != DEAD)
return 0
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
return 0
return 1
/obj/effect/golemrune/proc/volunteer(var/mob/dead/observer/O)
if(O in ghosts)
ghosts.Remove(O)
to_chat(O, "\red You are no longer signed up to be a golem.")
else
if(!check_observer(O))
to_chat(O, "\red You are not eligible to become a golem.")
return
ghosts.Add(O)
to_chat(O, "\blue You are signed up to be a golem.")
/obj/effect/timestop
@@ -460,80 +549,3 @@
icon_state = "sepia"
desc = "Time seems to flow very slowly around these tiles."
floor_tile = /obj/item/stack/tile/sepia
/obj/effect/goleRUNe
anchored = 1
desc = "a strange rune used to create golems. It glows when spirits are nearby."
name = "rune"
icon = 'icons/obj/rune.dmi'
icon_state = "golem"
unacidable = 1
layer = TURF_LAYER
var/list/mob/dead/observer/ghosts[0]
New()
..()
processing_objects.Add(src)
process()
if(ghosts.len>0)
icon_state = "golem2"
else
icon_state = "golem"
attack_hand(mob/living/user as mob)
var/mob/dead/observer/ghost
for(var/mob/dead/observer/O in src.loc)
if(!check_observer(O))
to_chat(O, "\red You are not eligible to become a golem.")
continue
ghost = O
break
if(!ghost)
to_chat(user, "The rune fizzles uselessly. There is no spirit nearby.")
return
var/mob/living/carbon/human/golem/G = new /mob/living/carbon/human/golem
G.change_gender(pick(MALE,FEMALE))
G.loc = src.loc
G.key = ghost.key
to_chat(G, "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve [user], and assist them in completing their goals at any cost.")
qdel(src)
proc/announce_to_ghosts()
for(var/mob/dead/observer/O in player_list)
if(O.client)
var/area/A = get_area(src)
if(A)
to_chat(O, "\blue <b>Golem rune created in [A.name]. (<a href='?src=\ref[O];jump=\ref[src]'>Teleport</a> | <a href='?src=\ref[src];signup=\ref[O]'>Sign Up</a>)</b>")
Topic(href,href_list)
if("signup" in href_list)
var/mob/dead/observer/O = locate(href_list["signup"])
volunteer(O)
attack_ghost(var/mob/dead/observer/O)
if(!O) return
volunteer(O)
proc/check_observer(var/mob/dead/observer/O)
if(!O)
return 0
if(!O.client)
return 0
if(O.mind && O.mind.current && O.mind.current.stat != DEAD)
return 0
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
return 0
return 1
proc/volunteer(var/mob/dead/observer/O)
if(O in ghosts)
ghosts.Remove(O)
to_chat(O, "\red You are no longer signed up to be a golem.")
else
if(!check_observer(O))
to_chat(O, "\red You are not eligible to become a golem.")
return
ghosts.Add(O)
to_chat(O, "\blue You are signed up to be a golem.")