/// Slime Extracts ///
/obj/item/slime_extract
name = "slime extract"
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
w_class = 1
throwforce = 0
throw_speed = 3
throw_range = 6
origin_tech = "biotech=3"
var/Uses = 1 // uses before it goes inert
/obj/item/slime_extract/attackby(obj/item/O, mob/user)
if(istype(O, /obj/item/slimepotion/enhancer))
if(Uses >= 5)
user << "You cannot enhance this extract further!"
return ..()
user <<"You apply the enhancer to the slime extract. It may now be reused one more time."
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"
/obj/item/slime_extract/gold
name = "gold slime extract"
icon_state = "gold slime extract"
/obj/item/slime_extract/silver
name = "silver slime extract"
icon_state = "silver slime extract"
/obj/item/slime_extract/metal
name = "metal slime extract"
icon_state = "metal slime extract"
/obj/item/slime_extract/purple
name = "purple slime extract"
icon_state = "purple slime extract"
/obj/item/slime_extract/darkpurple
name = "dark purple slime extract"
icon_state = "dark purple slime extract"
/obj/item/slime_extract/orange
name = "orange slime extract"
icon_state = "orange slime extract"
/obj/item/slime_extract/yellow
name = "yellow slime extract"
icon_state = "yellow slime extract"
/obj/item/slime_extract/red
name = "red slime extract"
icon_state = "red slime extract"
/obj/item/slime_extract/blue
name = "blue slime extract"
icon_state = "blue slime extract"
/obj/item/slime_extract/darkblue
name = "dark blue slime extract"
icon_state = "dark blue slime extract"
/obj/item/slime_extract/pink
name = "pink slime extract"
icon_state = "pink slime extract"
/obj/item/slime_extract/green
name = "green slime extract"
icon_state = "green slime extract"
/obj/item/slime_extract/lightpink
name = "light pink slime extract"
icon_state = "light pink slime extract"
/obj/item/slime_extract/black
name = "black slime extract"
icon_state = "black slime extract"
/obj/item/slime_extract/oil
name = "oil slime extract"
icon_state = "oil slime extract"
/obj/item/slime_extract/adamantine
name = "adamantine slime extract"
icon_state = "adamantine slime extract"
/obj/item/slime_extract/bluespace
name = "bluespace slime extract"
icon_state = "bluespace slime extract"
/obj/item/slime_extract/pyrite
name = "pyrite slime extract"
icon_state = "pyrite slime extract"
/obj/item/slime_extract/cerulean
name = "cerulean slime extract"
icon_state = "cerulean slime extract"
/obj/item/slime_extract/sepia
name = "sepia slime extract"
icon_state = "sepia slime extract"
/obj/item/slime_extract/rainbow
name = "rainbow slime extract"
icon_state = "rainbow slime extract"
////Slime-derived potions///
/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"
/obj/item/slimepotion/afterattack(obj/item/weapon/reagent_containers/target, mob/user , proximity)
if (istype(target))
user << "You cannot transfer [src] to [target]! It appears the potion must be given directly to a slime to absorb." // le fluff faec
return
/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 = "potsilver"
/obj/item/slimepotion/docility/attack(mob/living/simple_animal/slime/M, mob/user)
if(!isslime(M))
user << "The potion only works on slimes!"
return ..()
if(M.stat)
user << "The slime is dead!"
return ..()
M.docile = 1
M.nutrition = 700
M <<"You absorb the potion and feel your intense desire to feed melt away."
user <<"You feed the slime the potion, removing its hunger and calming it."
var/newname = copytext(sanitize(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"
M.name = newname
M.real_name = newname
qdel(src)
/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'
icon_state = "potpink"
origin_tech = "biotech=6"
var/list/not_interested = list()
var/being_used = 0
var/sentience_type = SENTIENCE_ORGANIC
/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
user << "[M] is already too intelligent for this to work!"
return ..()
if(M.stat)
user << "[M] is dead!"
return ..()
var/mob/living/simple_animal/SM = M
if(SM.sentience_type != sentience_type)
user << "The potion won't work on [SM]."
return ..()
user << "You offer the sentience potion to [SM]..."
being_used = 1
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [SM.name]?", ROLE_ALIEN, null, ROLE_ALIEN, 50, POLL_IGNORE_SENTIENCE_POTION, SM) // see poll_ignore.dm
var/mob/dead/observer/theghost = null
if(candidates.len)
theghost = pick(candidates)
SM.key = theghost.key
SM.languages_spoken |= HUMAN
SM.languages_understood |= HUMAN
SM.mind.enslave_mind_to_creator(user)
SM.sentience_act()
SM << "All at once it makes sense: you know what you are and who you are! Self awareness is yours!"
SM << "You are grateful to be self aware and owe [user] a great debt. Serve [user], and assist [user.p_them()] in completing [user.p_their()] goals at any cost."
user << "[SM] accepts the potion and suddenly becomes attentive and aware. It worked!"
qdel(src)
else
user << "[SM] looks interested for a moment, but then looks back down. Maybe you should try again later."
being_used = 0
..()
/obj/item/slimepotion/transference
name = "consciousness transference potion"
desc = "A strange slime-based chemical that, when used, allows the user to transfer their consciousness to a lesser being."
icon = 'icons/obj/chemical.dmi'
icon_state = "potorange"
origin_tech = "biotech=6"
var/prompted = 0
var/animal_type = SENTIENCE_ORGANIC
/obj/item/slimepotion/transference/afterattack(mob/living/M, mob/user)
if(prompted || !ismob(M))
return
if(!isanimal(M) || M.ckey) //much like sentience, these will not work on something that is already player controlled
user << "[M] already has a higher consciousness!"
return ..()
if(M.stat)
user << "[M] is dead!"
return ..()
var/mob/living/simple_animal/SM = M
if(SM.sentience_type != animal_type)
user << "You cannot transfer your consciousness to [SM]." //no controlling machines
return ..()
if(jobban_isbanned(user, ROLE_ALIEN)) //ideally sentience and trasnference potions should be their own unique role.
user << "Your mind goes blank as you attempt to use the potion."
return
prompted = 1
if(alert("This will permanently transfer your consciousness to [SM]. Are you sure you want to do this?",,"Yes","No")=="No")
prompted = 0
return
user << "You drink the potion then place your hands on [SM]..."
user.mind.transfer_to(SM)
SM.languages_spoken = user.languages_spoken
SM.languages_understood = user.languages_understood
SM.faction = user.faction.Copy()
SM.sentience_act() //Same deal here as with sentience
user.death()
SM << "In a quick flash, you feel your consciousness flow into [SM]!"
SM << "You are now [SM]. Your allegiances, alliances, and role is still the same as it was prior to consciousness transfer!"
SM.name = "[SM.name] as [user.real_name]"
qdel(src)
/obj/item/slimepotion/steroid
name = "slime steroid"
desc = "A potent chemical mix that will cause a baby slime to generate more extract."
icon = 'icons/obj/chemical.dmi'
icon_state = "potred"
/obj/item/slimepotion/steroid/attack(mob/living/simple_animal/slime/M, mob/user)
if(!isslime(M))//If target is not a slime.
user << "The steroid only works on baby slimes!"
return ..()
if(M.is_adult) //Can't steroidify adults
user << "Only baby slimes can use the steroid!"
return ..()
if(M.stat)
user << "The slime is dead!"
return ..()
if(M.cores >= 5)
user <<"The slime already has the maximum amount of extract!"
return ..()
user <<"You feed the slime the steroid. It will now produce one more extract."
M.cores++
qdel(src)
/obj/item/slimepotion/enhancer
name = "extract enhancer"
desc = "A potent chemical mix that will give a slime extract an additional use."
icon = 'icons/obj/chemical.dmi'
icon_state = "potpurple"
/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 = "potcyan"
/obj/item/slimepotion/stabilizer/attack(mob/living/simple_animal/slime/M, mob/user)
if(!isslime(M))
user << "The stabilizer only works on slimes!"
return ..()
if(M.stat)
user << "The slime is dead!"
return ..()
if(M.mutation_chance == 0)
user <<"The slime already has no chance of mutating!"
return ..()
user <<"You feed the slime the stabilizer. It is now less likely to mutate."
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 = "potgreen"
/obj/item/slimepotion/mutator/attack(mob/living/simple_animal/slime/M, mob/user)
if(!isslime(M))
user << "The mutator only works on slimes!"
return ..()
if(M.stat)
user << "The slime is dead!"
return ..()
if(M.mutator_used)
user << "This slime has already consumed a mutator, any more would be far too unstable!"
return ..()
if(M.mutation_chance == 100)
user <<"The slime is already guaranteed to mutate!"
return ..()
user <<"You feed the slime the mutator. It is now more likely to mutate."
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 = "potyellow"
origin_tech = "biotech=5"
/obj/item/slimepotion/speed/afterattack(obj/C, mob/user)
..()
if(!istype(C))
user << "The potion can only be used on items or vehicles!"
return
if(istype(C, /obj/item))
var/obj/item/I = C
if(I.slowdown <= 0)
user << "The [C] can't be made any faster!"
return ..()
I.slowdown = 0
if(istype(C, /obj/vehicle))
var/obj/vehicle/V = C
if(V.vehicle_move_delay <= 0)
user << "The [C] can't be made any faster!"
return ..()
V.vehicle_move_delay = 0
user <<"You slather the red gunk over the [C], making it faster."
C.color = "#FF0000"
qdel(src)
/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 = "potblue"
origin_tech = "biotech=5"
var/uses = 3
/obj/item/slimepotion/fireproof/afterattack(obj/item/clothing/C, mob/user)
..()
if(!uses)
qdel(src)
return
if(!istype(C))
user << "The potion can only be used on clothing!"
return
if(C.max_heat_protection_temperature == FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT)
user << "The [C] is already fireproof!"
return ..()
user <<"You slather the blue gunk over the [C], fireproofing it."
C.name = "fireproofed [C.name]"
C.color = "#000080"
C.max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
C.heat_protection = C.body_parts_covered
C.resistance_flags |= FIRE_PROOF
uses --
if(!uses)
qdel(src)
/obj/item/slimepotion/genderchange
name = "gender change potion"
desc = "An interesting chemical mix that changes the biological gender of what its applied to. Cannot be used on things that lack gender entirely."
icon = 'icons/obj/chemical.dmi'
icon_state = "potlightpink"
/obj/item/slimepotion/genderchange/attack(mob/living/L, mob/user)
if(!istype(L) || L.stat == DEAD)
user << "The potion can only be used on living things!"
return
if(L.gender != MALE && L.gender != FEMALE)
user << "The potion can only be used on gendered things!"
return
if(L.gender == MALE)
L.gender = FEMALE
L.visible_message("[L] suddenly looks more feminine!")
else
L.gender = MALE
L.visible_message("[L] suddenly looks more masculine!")
L.regenerate_icons()
qdel(src)
////////Adamantine Golem stuff I dunno where else to put it
// This will eventually be removed.
/obj/item/clothing/under/golem
name = "adamantine skin"
desc = "a golem's skin"
icon_state = "golem"
item_state = "golem"
item_color = "golem"
flags = ABSTRACT | NODROP
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
has_sensor = 0
/obj/item/clothing/suit/golem
name = "adamantine shell"
desc = "a golem's thick outter shell"
icon_state = "golem"
item_state = "golem"
w_class = 4//bulky item
gas_transfer_coefficient = 0.90
permeability_coefficient = 0.50
body_parts_covered = FULL_BODY
flags_inv = HIDEGLOVES | HIDESHOES | HIDEJUMPSUIT
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
flags = ABSTRACT | NODROP
/obj/item/clothing/shoes/golem
name = "golem's feet"
desc = "sturdy adamantine feet"
icon_state = "golem"
item_state = null
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
flags = NOSLIP | ABSTRACT | NODROP
/obj/item/clothing/mask/breath/golem
name = "golem's face"
desc = "the imposing face of an adamantine golem"
icon_state = "golem"
item_state = "golem"
siemens_coefficient = 0
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
flags = ABSTRACT | NODROP
/obj/item/clothing/gloves/golem
name = "golem's hands"
desc = "strong adamantine hands"
icon_state = "golem"
item_state = null
siemens_coefficient = 0
flags = ABSTRACT | NODROP
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
/obj/item/clothing/head/space/golem
icon_state = "golem"
item_state = "dermal"
item_color = "dermal"
name = "golem's head"
desc = "a golem's head"
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
flags = ABSTRACT | NODROP
/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"
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
layer = TURF_LAYER
/obj/effect/golemrune/New()
..()
START_PROCESSING(SSobj, src)
/obj/effect/golemrune/process()
var/mob/dead/observer/ghost
for(var/mob/dead/observer/O in src.loc)
if(!O.client)
continue
if(O.mind && O.mind.current && O.mind.current.stat != DEAD)
continue
if (O.orbiting)
continue
ghost = O
break
if(ghost)
icon_state = "golem2"
else
icon_state = "golem"
/obj/effect/golemrune/attack_hand(mob/living/user)
var/mob/dead/observer/ghost
for(var/mob/dead/observer/O in src.loc)
if(!O.client)
continue
if(O.mind && O.mind.current && O.mind.current.stat != DEAD)
continue
if (O.orbiting)
continue
ghost = O
break
if(!ghost)
user << "The rune fizzles uselessly! There is no spirit nearby."
return
var/mob/living/carbon/human/G = new /mob/living/carbon/human
G.set_species(/datum/species/golem/adamantine)
G.set_cloned_appearance()
G.real_name = "Adamantine Golem ([rand(1, 1000)])"
G.name = G.real_name
G.dna.unique_enzymes = G.dna.generate_unique_enzymes()
G.dna.species.auto_equip(G)
G.loc = src.loc
G.key = ghost.key
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."
G.mind.store_memory("Serve [user.real_name], your creator.")
G.mind.enslave_mind_to_creator(user)
log_game("[key_name(G)] was made a golem by [key_name(user)].")
log_admin("[key_name(G)] was made a golem by [key_name(user)].")
qdel(src)
/obj/effect/timestop
anchored = 1
name = "chronofield"
desc = "ZA WARUDO"
icon = 'icons/effects/160x160.dmi'
icon_state = "time"
layer = FLY_LAYER
pixel_x = -64
pixel_y = -64
mouse_opacity = 0
var/mob/living/immune = list() // the one who creates the timestop is immune
var/list/stopped_atoms = list()
var/freezerange = 2
var/duration = 140
alpha = 125
/obj/effect/timestop/New()
..()
for(var/mob/living/M in player_list)
for(var/obj/effect/proc_holder/spell/aoe_turf/conjure/timestop/T in M.mind.spell_list) //People who can stop time are immune to timestop
immune |= M
timestop()
/obj/effect/timestop/proc/timestop()
playsound(get_turf(src), 'sound/magic/TIMEPARADOX2.ogg', 100, 1, -1)
for(var/i in 1 to duration-1)
for(var/atom/A in orange (freezerange, src.loc))
if(isliving(A))
var/mob/living/M = A
if(M in immune)
continue
M.Stun(10, 1, 1)
M.anchored = 1
if(ishostile(M))
var/mob/living/simple_animal/hostile/H = M
H.AIStatus = AI_OFF
H.LoseTarget()
stopped_atoms |= M
else if(istype(A, /obj/item/projectile))
var/obj/item/projectile/P = A
P.paused = TRUE
stopped_atoms |= P
for(var/mob/living/M in stopped_atoms)
if(get_dist(get_turf(M),get_turf(src)) > freezerange) //If they lagged/ran past the timestop somehow, just ignore them
unfreeze_mob(M)
stopped_atoms -= M
stoplag()
//End
for(var/mob/living/M in stopped_atoms)
unfreeze_mob(M)
for(var/obj/item/projectile/P in stopped_atoms)
P.paused = FALSE
qdel(src)
return
/obj/effect/timestop/proc/unfreeze_mob(mob/living/M)
M.AdjustStunned(-10, 1, 1)
M.anchored = 0
if(ishostile(M))
var/mob/living/simple_animal/hostile/H = M
H.AIStatus = initial(H.AIStatus)
/obj/effect/timestop/wizard
duration = 100
/obj/item/stack/tile/bluespace
name = "bluespace floor tile"
singular_name = "floor tile"
desc = "Through a series of micro-teleports these tiles let people move at incredible speeds"
icon_state = "tile-bluespace"
w_class = 3
force = 6
materials = list(MAT_METAL=500)
throwforce = 10
throw_speed = 3
throw_range = 7
flags = CONDUCT
max_amount = 60
turf_type = /turf/open/floor/bluespace
/turf/open/floor/bluespace
slowdown = -1
icon_state = "bluespace"
desc = "Through a series of micro-teleports these tiles let people move at incredible speeds"
floor_tile = /obj/item/stack/tile/bluespace
/obj/item/stack/tile/sepia
name = "sepia floor tile"
singular_name = "floor tile"
desc = "Time seems to flow very slowly around these tiles"
icon_state = "tile-sepia"
w_class = 3
force = 6
materials = list(MAT_METAL=500)
throwforce = 10
throw_speed = 3
throw_range = 7
flags = CONDUCT
max_amount = 60
turf_type = /turf/open/floor/sepia
/turf/open/floor/sepia
slowdown = 2
icon_state = "sepia"
desc = "Time seems to flow very slowly around these tiles"
floor_tile = /obj/item/stack/tile/sepia
/obj/item/areaeditor/blueprints/slime
name = "cerulean prints"
desc = "A one use yet of blueprints made of jelly like organic material. Renaming an area to 'Xenobiology Lab' will extend the reach of the management console."
color = "#2956B2"
/obj/item/areaeditor/blueprints/slime/edit_area()
var/success = ..()
var/area/A = get_area(src)
if(success)
for(var/turf/T in A)
T.color = "#2956B2"
qdel(src)