|
|
|
@@ -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.")
|
|
|
|
|