mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Semi-final stage of Xenobio2 Initial Implementation
Adds UIs to Core Extractor, Slime Replicator Adds Slimified Monkey Cubes as separate item type Adds Docility Toxin Replaces amutationtoxin references with docilitytoxin references Adds resistances to simple_mob damage handling, to allow for simple mobs to have resistances to different kinds of damage Moves a return to it's proper position to allow for hostile mobs to properly handle targets.
This commit is contained in:
@@ -400,7 +400,7 @@
|
||||
"potassium",
|
||||
"plasticide",
|
||||
"mutationtoxin",
|
||||
"amutationtoxin",
|
||||
"docilitytoxin",
|
||||
"inaprovaline",
|
||||
"space_drugs",
|
||||
"paroxetine",
|
||||
|
||||
@@ -82,6 +82,15 @@
|
||||
var/shuttletarget = null
|
||||
var/enroute = 0
|
||||
|
||||
var/list/resistances = list(
|
||||
HALLOSS = 0,
|
||||
BRUTE = 1,
|
||||
BURN = 1,
|
||||
TOX = 1,
|
||||
OXY = 0,
|
||||
CLONE = 0
|
||||
)
|
||||
|
||||
var/hostile = 0
|
||||
|
||||
/mob/living/simple_animal/New()
|
||||
@@ -222,7 +231,6 @@
|
||||
|
||||
if(!atmos_suitable)
|
||||
adjustBruteLoss(unsuitable_atoms_damage)
|
||||
return 1
|
||||
|
||||
//Hostility
|
||||
if(!stat && !client && hostile)
|
||||
@@ -239,6 +247,8 @@
|
||||
if(destroy_surroundings)
|
||||
DestroySurroundings()
|
||||
AttackTarget()
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/proc/handle_supernatural()
|
||||
if(purge)
|
||||
@@ -331,9 +341,7 @@
|
||||
return
|
||||
|
||||
if(O.force > resistance)
|
||||
var/damage = O.force
|
||||
if (O.damtype == HALLOSS)
|
||||
damage = 0
|
||||
var/damage = O.force * resistances[O.damtype]
|
||||
if(supernatural && istype(O,/obj/item/weapon/nullrod))
|
||||
damage *= 2
|
||||
purge = 3
|
||||
|
||||
@@ -474,42 +474,46 @@
|
||||
color = "#13BC5E"
|
||||
|
||||
/datum/reagent/slimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.name != "Promethean")
|
||||
M << "<span class='danger'>Your flesh rapidly mutates!</span>"
|
||||
H.set_species("Promethean")
|
||||
H.shapeshifter_set_colour("#05FF9B")
|
||||
H.verbs -= /mob/living/carbon/human/proc/shapeshifter_select_colour
|
||||
if(M.isSynthetic())
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H) && (H.species.flags & NO_SCAN))
|
||||
return
|
||||
|
||||
if(M.dna)
|
||||
if(prob(removed * 0.1))
|
||||
randmuti(M)
|
||||
if(prob(98))
|
||||
randmutb(M)
|
||||
else
|
||||
randmutg(M)
|
||||
domutcheck(M, null)
|
||||
M.UpdateAppearance()
|
||||
M.apply_effect(16 * removed, IRRADIATE, 0)
|
||||
|
||||
/datum/reagent/aslimetoxin
|
||||
name = "Advanced Mutation Toxin"
|
||||
id = "amutationtoxin"
|
||||
description = "An advanced corruptive toxin produced by slimes."
|
||||
name = "Docility Toxin"
|
||||
id = "docilitytoxin"
|
||||
description = "A corruptive toxin produced by slimes."
|
||||
reagent_state = LIQUID
|
||||
color = "#13BC5E"
|
||||
color = "#FF69B4"
|
||||
|
||||
/datum/reagent/aslimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) // TODO: check if there's similar code anywhere else
|
||||
if(M.transforming)
|
||||
if(M.isSynthetic())
|
||||
return
|
||||
M << "<span class='danger'>Your flesh rapidly mutates!</span>"
|
||||
M.transforming = 1
|
||||
M.canmove = 0
|
||||
M.icon = null
|
||||
M.overlays.Cut()
|
||||
M.invisibility = 101
|
||||
for(var/obj/item/W in M)
|
||||
if(istype(W, /obj/item/weapon/implant)) //TODO: Carn. give implants a dropped() or something
|
||||
qdel(W)
|
||||
continue
|
||||
W.layer = initial(W.layer)
|
||||
W.loc = M.loc
|
||||
W.dropped(M)
|
||||
var/mob/living/carbon/slime/new_mob = new /mob/living/carbon/slime(M.loc)
|
||||
new_mob.a_intent = "hurt"
|
||||
new_mob.universal_speak = 1
|
||||
if(M.mind)
|
||||
M.mind.transfer_to(new_mob)
|
||||
else
|
||||
new_mob.key = M.key
|
||||
qdel(M)
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H) && (H.species.flags & NO_SCAN))
|
||||
return
|
||||
|
||||
if(M.dna)
|
||||
if(prob(removed * 0.1))
|
||||
randmuti(M)
|
||||
if(prob(98))
|
||||
randmutb(M)
|
||||
else
|
||||
randmutg(M)
|
||||
domutcheck(M, null)
|
||||
M.UpdateAppearance()
|
||||
M.apply_effect(6 * removed, IRRADIATE, 0)
|
||||
|
||||
@@ -998,333 +998,25 @@
|
||||
/datum/chemical_reaction/slime
|
||||
var/required = null
|
||||
|
||||
//Slimed monkeys
|
||||
/datum/chemical_reaction/slime/can_happen(var/datum/reagents/holder)
|
||||
if(holder.my_atom && istype(holder.my_atom, required))
|
||||
var/obj/item/slime_extract/T = holder.my_atom
|
||||
if(T.Uses > 0)
|
||||
return ..()
|
||||
return ..()
|
||||
return 0
|
||||
|
||||
/datum/chemical_reaction/slime/on_reaction(var/datum/reagents/holder)
|
||||
var/obj/item/slime_extract/T = holder.my_atom
|
||||
T.Uses--
|
||||
if(T.Uses <= 0)
|
||||
T.visible_message("\icon[T]<span class='notice'>\The [T]'s power is consumed in the reaction.</span>")
|
||||
T.name = "used slime extract"
|
||||
T.desc = "This extract has been used up."
|
||||
|
||||
//Grey
|
||||
/datum/chemical_reaction/slime/spawn
|
||||
name = "Slime Spawn"
|
||||
id = "m_spawn"
|
||||
result = null
|
||||
required_reagents = list("phoron" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/grey
|
||||
|
||||
/datum/chemical_reaction/slime/spawn/on_reaction(var/datum/reagents/holder)
|
||||
holder.my_atom.visible_message("<span class='warning'>Infused with phoron, the core begins to quiver and grow, and soon a new baby slime emerges from it!</span>")
|
||||
var/mob/living/carbon/slime/S = new /mob/living/carbon/slime
|
||||
S.loc = get_turf(holder.my_atom)
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/monkey
|
||||
name = "Slime Monkey"
|
||||
id = "m_monkey"
|
||||
result = null
|
||||
required_reagents = list("blood" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/grey
|
||||
|
||||
/datum/chemical_reaction/slime/monkey/on_reaction(var/datum/reagents/holder)
|
||||
for(var/i = 1, i <= 3, i++)
|
||||
var /obj/item/weapon/reagent_containers/food/snacks/monkeycube/M = new /obj/item/weapon/reagent_containers/food/snacks/monkeycube
|
||||
M.loc = get_turf(holder.my_atom)
|
||||
..()
|
||||
|
||||
//Green
|
||||
/datum/chemical_reaction/slime/mutate
|
||||
name = "Mutation Toxin"
|
||||
id = "mutationtoxin"
|
||||
result = "mutationtoxin"
|
||||
required_reagents = list("phoron" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/green
|
||||
|
||||
//Metal
|
||||
/datum/chemical_reaction/slime/metal
|
||||
name = "Slime Metal"
|
||||
id = "m_metal"
|
||||
result = null
|
||||
required_reagents = list("phoron" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/metal
|
||||
|
||||
/datum/chemical_reaction/slime/metal/on_reaction(var/datum/reagents/holder)
|
||||
var/obj/item/stack/material/steel/M = new /obj/item/stack/material/steel
|
||||
M.amount = 15
|
||||
M.loc = get_turf(holder.my_atom)
|
||||
var/obj/item/stack/material/plasteel/P = new /obj/item/stack/material/plasteel
|
||||
P.amount = 5
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
..()
|
||||
|
||||
//Gold - removed
|
||||
/datum/chemical_reaction/slime/crit
|
||||
name = "Slime Crit"
|
||||
id = "m_tele"
|
||||
result = null
|
||||
required_reagents = list("phoron" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/gold
|
||||
mix_message = "The slime core fizzles disappointingly."
|
||||
|
||||
//Silver
|
||||
/datum/chemical_reaction/slime/bork
|
||||
name = "Slime Bork"
|
||||
id = "m_tele2"
|
||||
result = null
|
||||
required_reagents = list("phoron" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/silver
|
||||
|
||||
/datum/chemical_reaction/slime/bork/on_reaction(var/datum/reagents/holder)
|
||||
var/list/borks = typesof(/obj/item/weapon/reagent_containers/food/snacks) - /obj/item/weapon/reagent_containers/food/snacks
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
|
||||
if(M.eyecheck() <= 0)
|
||||
flick("e_flash", M.flash)
|
||||
|
||||
for(var/i = 1, i <= 4 + rand(1,2), i++)
|
||||
var/chosen = pick(borks)
|
||||
var/obj/B = new chosen
|
||||
if(B)
|
||||
B.loc = get_turf(holder.my_atom)
|
||||
if(prob(50))
|
||||
for(var/j = 1, j <= rand(1, 3), j++)
|
||||
step(B, pick(NORTH, SOUTH, EAST, WEST))
|
||||
..()
|
||||
|
||||
//Blue
|
||||
/datum/chemical_reaction/slime/frost
|
||||
name = "Slime Frost Oil"
|
||||
id = "m_frostoil"
|
||||
result = "frostoil"
|
||||
required_reagents = list("phoron" = 1)
|
||||
result_amount = 10
|
||||
required = /obj/item/slime_extract/blue
|
||||
|
||||
//Dark Blue
|
||||
/datum/chemical_reaction/slime/freeze
|
||||
name = "Slime Freeze"
|
||||
id = "m_freeze"
|
||||
result = null
|
||||
required_reagents = list("phoron" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/darkblue
|
||||
mix_message = "The slime extract begins to vibrate violently!"
|
||||
|
||||
/datum/chemical_reaction/slime/freeze/on_reaction(var/datum/reagents/holder)
|
||||
..()
|
||||
sleep(50)
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
for(var/mob/living/M in range (get_turf(holder.my_atom), 7))
|
||||
M.bodytemperature -= 140
|
||||
M << "<span class='warning'>You feel a chill!</span>"
|
||||
|
||||
//Orange
|
||||
/datum/chemical_reaction/slime/casp
|
||||
name = "Slime Capsaicin Oil"
|
||||
id = "m_capsaicinoil"
|
||||
result = "capsaicin"
|
||||
required_reagents = list("blood" = 1)
|
||||
result_amount = 10
|
||||
required = /obj/item/slime_extract/orange
|
||||
|
||||
/datum/chemical_reaction/slime/fire
|
||||
name = "Slime fire"
|
||||
id = "m_fire"
|
||||
result = null
|
||||
required_reagents = list("phoron" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/orange
|
||||
mix_message = "The slime extract begins to vibrate violently!"
|
||||
|
||||
/datum/chemical_reaction/slime/fire/on_reaction(var/datum/reagents/holder)
|
||||
..()
|
||||
sleep(50)
|
||||
var/turf/location = get_turf(holder.my_atom.loc)
|
||||
for(var/turf/simulated/floor/target_tile in range(0, location))
|
||||
target_tile.assume_gas("phoron", 25, 1400)
|
||||
spawn (0)
|
||||
target_tile.hotspot_expose(700, 400)
|
||||
|
||||
//Yellow
|
||||
/datum/chemical_reaction/slime/overload
|
||||
name = "Slime EMP"
|
||||
id = "m_emp"
|
||||
result = null
|
||||
required_reagents = list("blood" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/yellow
|
||||
|
||||
/datum/chemical_reaction/slime/overload/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
..()
|
||||
empulse(get_turf(holder.my_atom), 3, 7)
|
||||
|
||||
/datum/chemical_reaction/slime/cell
|
||||
name = "Slime Powercell"
|
||||
id = "m_cell"
|
||||
result = null
|
||||
required_reagents = list("phoron" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/yellow
|
||||
|
||||
/datum/chemical_reaction/slime/cell/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/obj/item/weapon/cell/slime/P = new /obj/item/weapon/cell/slime
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
|
||||
/datum/chemical_reaction/slime/glow
|
||||
name = "Slime Glow"
|
||||
id = "m_glow"
|
||||
result = null
|
||||
required_reagents = list("water" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/yellow
|
||||
mix_message = "The contents of the slime core harden and begin to emit a warm, bright light."
|
||||
|
||||
/datum/chemical_reaction/slime/glow/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
..()
|
||||
var/obj/item/device/flashlight/slime/F = new /obj/item/device/flashlight/slime
|
||||
F.loc = get_turf(holder.my_atom)
|
||||
|
||||
//Purple
|
||||
/datum/chemical_reaction/slime/psteroid
|
||||
name = "Slime Steroid"
|
||||
id = "m_steroid"
|
||||
result = null
|
||||
required_reagents = list("phoron" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/purple
|
||||
|
||||
/datum/chemical_reaction/slime/psteroid/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
..()
|
||||
var/obj/item/weapon/slimesteroid/P = new /obj/item/weapon/slimesteroid
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
|
||||
/datum/chemical_reaction/slime/jam
|
||||
name = "Slime Jam"
|
||||
id = "m_jam"
|
||||
result = "slimejelly"
|
||||
required_reagents = list("sugar" = 1)
|
||||
result_amount = 10
|
||||
required = /obj/item/slime_extract/purple
|
||||
|
||||
//Dark Purple
|
||||
/datum/chemical_reaction/slime/plasma
|
||||
name = "Slime Plasma"
|
||||
id = "m_plasma"
|
||||
result = null
|
||||
required_reagents = list("phoron" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/darkpurple
|
||||
|
||||
/datum/chemical_reaction/slime/plasma/on_reaction(var/datum/reagents/holder)
|
||||
..()
|
||||
var/obj/item/stack/material/phoron/P = new /obj/item/stack/material/phoron
|
||||
P.amount = 10
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
|
||||
//Red
|
||||
/datum/chemical_reaction/slime/glycerol
|
||||
name = "Slime Glycerol"
|
||||
id = "m_glycerol"
|
||||
result = "glycerol"
|
||||
required_reagents = list("phoron" = 1)
|
||||
result_amount = 8
|
||||
required = /obj/item/slime_extract/red
|
||||
|
||||
/datum/chemical_reaction/slime/bloodlust
|
||||
name = "Bloodlust"
|
||||
id = "m_bloodlust"
|
||||
result = null
|
||||
required_reagents = list("blood" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/red
|
||||
|
||||
/datum/chemical_reaction/slime/bloodlust/on_reaction(var/datum/reagents/holder)
|
||||
..()
|
||||
for(var/mob/living/carbon/slime/slime in viewers(get_turf(holder.my_atom), null))
|
||||
slime.rabid = 1
|
||||
slime.visible_message("<span class='warning'>The [slime] is driven into a frenzy!</span>")
|
||||
|
||||
//Pink
|
||||
/datum/chemical_reaction/slime/ppotion
|
||||
name = "Slime Potion"
|
||||
id = "m_potion"
|
||||
result = null
|
||||
required_reagents = list("phoron" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/pink
|
||||
|
||||
/datum/chemical_reaction/slime/ppotion/on_reaction(var/datum/reagents/holder)
|
||||
..()
|
||||
var/obj/item/weapon/slimepotion/P = new /obj/item/weapon/slimepotion
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
|
||||
//Black
|
||||
/datum/chemical_reaction/slime/mutate2
|
||||
name = "Advanced Mutation Toxin"
|
||||
id = "mutationtoxin2"
|
||||
result = "amutationtoxin"
|
||||
required_reagents = list("phoron" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/black
|
||||
|
||||
//Oil
|
||||
/datum/chemical_reaction/slime/explosion
|
||||
name = "Slime Explosion"
|
||||
id = "m_explosion"
|
||||
result = null
|
||||
required_reagents = list("phoron" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/oil
|
||||
mix_message = "The slime extract begins to vibrate violently!"
|
||||
|
||||
/datum/chemical_reaction/slime/explosion/on_reaction(var/datum/reagents/holder)
|
||||
..()
|
||||
sleep(50)
|
||||
explosion(get_turf(holder.my_atom), 1, 3, 6)
|
||||
|
||||
//Light Pink
|
||||
/datum/chemical_reaction/slime/potion2
|
||||
name = "Slime Potion 2"
|
||||
id = "m_potion2"
|
||||
result = null
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/lightpink
|
||||
required_reagents = list("phoron" = 1)
|
||||
|
||||
/datum/chemical_reaction/slime/potion2/on_reaction(var/datum/reagents/holder)
|
||||
..()
|
||||
var/obj/item/weapon/slimepotion2/P = new /obj/item/weapon/slimepotion2
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
|
||||
//Adamantine
|
||||
|
||||
/datum/chemical_reaction/slime/golem
|
||||
name = "Slime Golem"
|
||||
id = "m_golem"
|
||||
name = "Prometheans"
|
||||
id = "m_promethean"
|
||||
result = null
|
||||
required_reagents = list("phoron" = 1)
|
||||
required_reagents = list("mutationtoxin" = 1)
|
||||
result_amount = 1
|
||||
required = /obj/item/slime_extract/adamantine
|
||||
required = /obj/item/weapon/reagent_containers/food/snacks/monkeycube
|
||||
|
||||
/datum/chemical_reaction/slime/golem/on_reaction(var/datum/reagents/holder)
|
||||
..()
|
||||
var/obj/effect/golemrune/Z = new /obj/effect/golemrune
|
||||
Z.loc = get_turf(holder.my_atom)
|
||||
Z.announce_to_ghosts()
|
||||
|
||||
var/location = get_turf(holder.my_atom)
|
||||
new /obj/item/slime_cube(location)
|
||||
qdel(holder.my_atom)
|
||||
|
||||
/* Food */
|
||||
|
||||
/datum/chemical_reaction/tofu
|
||||
|
||||
@@ -52,8 +52,7 @@ var/global/list/xenoChemList = list("mutationtoxin",
|
||||
"psilocybin",
|
||||
"mindbreaker",
|
||||
"impedrezene",
|
||||
"cryptobiolin",
|
||||
"serotronium",
|
||||
"cryptobiolin",
|
||||
"space_drugs",
|
||||
"chloralhydrate",
|
||||
"stoxin",
|
||||
@@ -76,12 +75,14 @@ var/global/list/xenoChemList = list("mutationtoxin",
|
||||
"alkysine",
|
||||
"imidazoline",
|
||||
"peridaxon",
|
||||
"rezadone")
|
||||
"rezadone",
|
||||
"mutationtoxin",
|
||||
"docilitytoxin")
|
||||
|
||||
/datum/xeno/traits
|
||||
var/list/traits = list()
|
||||
var/list/chemlist = list()
|
||||
var/obj/chems
|
||||
var/list/chems = list()
|
||||
var/source = "unknown"
|
||||
|
||||
/datum/xeno/traits/proc/set_trait(var/trait, var/newval)
|
||||
@@ -115,8 +116,6 @@ var/global/list/xenoChemList = list("mutationtoxin",
|
||||
set_trait(TRAIT_XENO_CANSPEAK, 1)
|
||||
set_trait(TRAIT_XENO_STRENGTH, 0)
|
||||
set_trait(TRAIT_XENO_STR_RANGE, 0)
|
||||
chems = new()
|
||||
chems.create_reagents(traits[TRAIT_XENO_CHEMVOL])
|
||||
|
||||
/datum/xeno/traits/proc/get_gene(var/genetype)
|
||||
|
||||
@@ -167,10 +166,8 @@ var/global/list/xenoChemList = list("mutationtoxin",
|
||||
switch(genes.genetype)
|
||||
if(GENE_XENO_BIOCHEMISTRY)
|
||||
set_trait(TRAIT_XENO_CHEMVOL, genes.values["[TRAIT_XENO_CHEMVOL]"])
|
||||
chems.reagents.maximum_volume = genes.values["[TRAIT_XENO_CHEMVOL]"]
|
||||
for(var/reagent in genes.chems.reagents)
|
||||
var/amount = genes.chems.reagents[reagent]
|
||||
chems.reagents.add_reagent(reagent, amount)
|
||||
for(var/reagent in genes.chems)
|
||||
chems[reagent] = genes[reagent]
|
||||
|
||||
if(GENE_XENO_HEALTH)
|
||||
set_trait(TRAIT_XENO_HEALTH, genes.values["[TRAIT_XENO_HEALTH]"])
|
||||
@@ -206,10 +203,7 @@ var/global/list/xenoChemList = list("mutationtoxin",
|
||||
/datum/xeno/genes
|
||||
var/genetype //Label for specifying what gene is used.
|
||||
var/list/values //What's going to be put into specific traits
|
||||
var/obj/chems
|
||||
var/list/chems
|
||||
|
||||
/datum/xeno/genes/New()
|
||||
..()
|
||||
chems = new()
|
||||
chems.create_reagents(20)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Here lives the slime core extractor
|
||||
This machine extracts slime cores at the cost of the slime itself.
|
||||
To create more of these slimes, stick the slime core in the replicator.
|
||||
To create more of these slimes, stick the slime core in the extractor.
|
||||
*/
|
||||
/obj/machinery/slime/extractor
|
||||
name = "Slime extractor"
|
||||
@@ -60,7 +60,7 @@
|
||||
user << "<span class='danger'>The core extractor is full, empty it first!</span>"
|
||||
return
|
||||
|
||||
if(in_use)
|
||||
if(inuse)
|
||||
user << "<span class='danger'>The core extractor is locked and running, wait for it to finish.</span>"
|
||||
return
|
||||
|
||||
@@ -81,11 +81,11 @@
|
||||
|
||||
/obj/machinery/slime/extractor/proc/update_light_color()
|
||||
if(src.occupant && !(inuse))
|
||||
set_light(4, 4, occupiedcolor)
|
||||
set_light(1, 1, occupiedcolor)
|
||||
else if(src.occupant)
|
||||
set_light(4, 4, operatingcolor)
|
||||
set_light(1, 1, operatingcolor)
|
||||
else
|
||||
set_light(4, 4, emptycolor)
|
||||
set_light(1, 1, emptycolor)
|
||||
|
||||
/obj/machinery/slime/extractor/proc/extract_cores()
|
||||
if(!src.occupant)
|
||||
@@ -102,11 +102,12 @@
|
||||
C.traits = occupant.traitdat
|
||||
|
||||
C.create_reagents(C.traits.traits[TRAIT_XENO_CHEMVOL])
|
||||
for(var/reagent in occupant.traitdat.chems.reagents)
|
||||
var/amount = occupant.traitdat.chems.reagents[reagent]
|
||||
C.reagents.add_reagent(reagent, amount)
|
||||
for(var/reagent in occupant.traitdat.chems)
|
||||
C.reagents.add_reagent(reagent, occupant.traitdat.chems[reagent])
|
||||
|
||||
C.color = C.traits.traits[TRAIT_XENO_COLOR]
|
||||
if(occupant.traitdat.get_trait(TRAIT_XENO_BIOLUMESCENT))
|
||||
C.set_light(occupant.traitdat.get_trait(TRAIT_XENO_GLOW_STRENGTH),occupant.traitdat.get_trait(TRAIT_XENO_GLOW_RANGE), occupant.traitdat.get_trait(TRAIT_XENO_BIO_COLOR))
|
||||
|
||||
spawn(30)
|
||||
icon_state = "scanner_0old"
|
||||
@@ -115,13 +116,55 @@
|
||||
eject_contents()
|
||||
update_light_color()
|
||||
|
||||
/obj/machinery/slime/extractor/proc/eject_contents()
|
||||
for(var/obj/thing in (contents - component_parts - circuit))
|
||||
thing.forceMove(loc)
|
||||
/obj/machinery/slime/extractor/proc/eject_slime()
|
||||
if(occupant)
|
||||
occupant.forceMove(loc)
|
||||
occupant = null
|
||||
|
||||
/obj/machinery/slime/extractor/proc/eject_core()
|
||||
for(var/obj/thing in (contents - component_parts - circuit))
|
||||
thing.forceMove(loc)
|
||||
|
||||
/obj/machinery/slime/extractor/proc/eject_contents()
|
||||
eject_core()
|
||||
eject_slime()
|
||||
|
||||
//Here lies the UI
|
||||
/obj/machinery/slime/extractor/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/slime/extractor/interact(mob/user as mob)
|
||||
var/dat = ""
|
||||
if(!inuse)
|
||||
dat = {"
|
||||
<b>Slime held:</b><br>
|
||||
[occupant]<br>
|
||||
"}
|
||||
if (occupant && !(stat & (NOPOWER|BROKEN)))
|
||||
dat += "<A href='?src=\ref[src];action=extract'>Start the core extraction.</a><BR>"
|
||||
if(occupant)
|
||||
dat += "<A href='?src=\ref[src];action=eject'>Eject the slime</a><BR>"
|
||||
else
|
||||
dat += "Please wait..."
|
||||
var/datum/browser/popup = new(user, "Slime Extractor", "Slime Extractor", src)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/slime/extractor/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
switch(href_list["action"])
|
||||
if ("extract")
|
||||
extract_cores()
|
||||
if("eject")
|
||||
eject_slime()
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
//Circuit board below,
|
||||
/obj/item/weapon/circuitboard/slimeextractor
|
||||
name = T_BOARD("Slime extractor")
|
||||
|
||||
@@ -56,9 +56,11 @@
|
||||
|
||||
data["activity"] = active
|
||||
data["beaker"] = injector.beaker
|
||||
if(injector.occupant)
|
||||
data["occupied"] = 1
|
||||
if(isxeno(injector.occupant))
|
||||
var/mob/living/simple_animal/xeno/X = injector.occupant
|
||||
data["instability"] = (X.mut_level / X.mut_max)
|
||||
data["instability"] = (X.mut_level / X.mut_max) * 100
|
||||
else
|
||||
data["instability"] = null
|
||||
|
||||
|
||||
@@ -39,21 +39,22 @@
|
||||
return ..()
|
||||
|
||||
if(core)
|
||||
user << "<span class='warning'>The [src] is already filled!</span>"
|
||||
user << "<span class='warning'>[src] is already filled!</span>"
|
||||
return
|
||||
if(panel_open)
|
||||
user << "<span class='warning'>Close the panel first!</span>"
|
||||
core = G
|
||||
user.drop_from_inventory(G)
|
||||
G.forceMove(src)
|
||||
update_light_color()
|
||||
|
||||
/obj/machinery/slime/replicator/proc/update_light_color()
|
||||
if(src.core && !(inuse))
|
||||
set_light(4, 4, occupiedcolor)
|
||||
set_light(1, 1, occupiedcolor)
|
||||
else if(src.core)
|
||||
set_light(4, 4, operatingcolor)
|
||||
set_light(1, 1, operatingcolor)
|
||||
else
|
||||
set_light(4, 4, emptycolor)
|
||||
set_light(1, 1, emptycolor)
|
||||
|
||||
/obj/machinery/slime/replicator/proc/replicate_slime()
|
||||
if(!src.core)
|
||||
@@ -67,22 +68,63 @@
|
||||
spawn(30)
|
||||
var/mob/living/simple_animal/xeno/slime/S = new(src)
|
||||
S.traitdat = core.traits
|
||||
S.ProcessTraits()
|
||||
qdel(core)
|
||||
spawn(30)
|
||||
inuse = 0
|
||||
eject_contents()
|
||||
eject_slime()
|
||||
icon_state = "restruct_0"
|
||||
update_light_color()
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/slime/replicator/proc/eject_contents()
|
||||
/obj/machinery/slime/replicator/proc/eject_slime()
|
||||
for(var/mob/thing in contents)
|
||||
thing.forceMove(loc)
|
||||
|
||||
/obj/machinery/slime/replicator/proc/eject_core()
|
||||
if(core)
|
||||
core.forceMove(loc)
|
||||
core = null
|
||||
|
||||
/obj/machinery/slime/replicator/proc/eject_contents()
|
||||
eject_slime()
|
||||
eject_core()
|
||||
|
||||
//Here lies the UI
|
||||
/obj/machinery/slime/replicator/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/slime/replicator/interact(mob/user as mob)
|
||||
var/dat = ""
|
||||
if(!inuse)
|
||||
dat = {"
|
||||
<b>Slime core container holds:</b><br>
|
||||
[core]<br>
|
||||
"}
|
||||
if (core && !(stat & (NOPOWER|BROKEN)))
|
||||
dat += "<A href='?src=\ref[src];action=replicate'>Start the replication process</a><BR>"
|
||||
if(core)
|
||||
dat += "<A href='?src=\ref[src];action=eject'>Eject the core</a><BR>"
|
||||
else
|
||||
dat += "Please wait..."
|
||||
var/datum/browser/popup = new(user, "Slime Replicator", "Slime Replicator", src)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/slime/replicator/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
switch(href_list["action"])
|
||||
if ("replicate")
|
||||
replicate_slime()
|
||||
if("eject")
|
||||
eject_core()
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
//Circuit board below,
|
||||
/obj/item/weapon/circuitboard/slimereplicator
|
||||
|
||||
@@ -50,6 +50,6 @@ Slime specific life events go here.
|
||||
icon_state = "slime adult dead"
|
||||
color = traitdat.traits[TRAIT_XENO_COLOR]
|
||||
|
||||
return 1 //Everything worked okay
|
||||
return 0 //Everything worked okay
|
||||
|
||||
return 0 //xeno/Life() returned 0.
|
||||
return //xeno/Life() returned 0.
|
||||
@@ -18,14 +18,13 @@ Slime specific procs go here.
|
||||
traitdat.traits[TRAIT_XENO_HOSTILE] = 0
|
||||
else
|
||||
traitdat.traits[TRAIT_XENO_HOSTILE] = prob(30)
|
||||
traitdat.traits[TRAIT_XENO_GLOW_STRENGTH] = round(rand(1,6))
|
||||
traitdat.traits[TRAIT_XENO_GLOW_RANGE] = round(rand(1,6))
|
||||
traitdat.traits[TRAIT_XENO_GLOW_STRENGTH] = round(rand(1,3))
|
||||
traitdat.traits[TRAIT_XENO_GLOW_RANGE] = round(rand(1,3))
|
||||
traitdat.traits[TRAIT_XENO_STRENGTH] = round(rand(4,9))
|
||||
traitdat.traits[TRAIT_XENO_STR_RANGE] =round(rand(0,2))
|
||||
traitdat.traits[TRAIT_XENO_CANLEARN] = prob(68)
|
||||
traitdat.traits[TRAIT_XENO_SPEED] = round(rand(-10,10))
|
||||
|
||||
//RandomChemicals()
|
||||
|
||||
|
||||
/mob/living/simple_animal/xeno/slime/proc/GrowUp()
|
||||
@@ -101,7 +100,7 @@ Slime specific procs go here.
|
||||
return
|
||||
if(reagents.total_volume <= 0)
|
||||
return
|
||||
/*if(reagents.has_reagent("docilitytoxin")) //Toxin that makes them docile? Good for quelling angry mobs.
|
||||
if(reagents.has_reagent("docilitytoxin")) //Toxin that makes them docile? Good for quelling angry mobs.
|
||||
hostile = 0
|
||||
traitdat.traits[TRAIT_XENO_HOSTILE] = 0*/
|
||||
traitdat.traits[TRAIT_XENO_HOSTILE] = 0
|
||||
..()
|
||||
@@ -22,6 +22,9 @@ Slime definitions, Life and New live here.
|
||||
move_to_delay = 17 //Slimes shouldn't be able to go faster than humans.
|
||||
default_chems = list("slimejelly" = 5)
|
||||
attacktext = "absorbed some of"
|
||||
response_help = "pats"
|
||||
response_disarm = "tries to stop"
|
||||
response_harm = "hits"
|
||||
|
||||
var/emote_on = null
|
||||
|
||||
@@ -80,6 +83,9 @@ Slime definitions, Life and New live here.
|
||||
for(var/datum/language/L in (typesof(/datum/language) - /datum/language))
|
||||
languages += L
|
||||
speak += "[station_name()]?"
|
||||
resistances[BURN] = 4
|
||||
resistances[BRUTE] = 0.2
|
||||
resistances[TOX] = 1.5
|
||||
GenerateChild()
|
||||
return 1
|
||||
|
||||
@@ -8,10 +8,5 @@ Slime core lives here.
|
||||
icon_state = "slime extract"
|
||||
source = "Slime"
|
||||
product = "core"
|
||||
|
||||
/obj/item/xenoproduct/slime/core/New()
|
||||
..()
|
||||
color = traits.get_trait(TRAIT_XENO_COLOR)
|
||||
if(traits.get_trait(TRAIT_XENO_BIOLUMESCENT))
|
||||
set_light(traits.get_trait(TRAIT_XENO_GLOW_STRENGTH),traits.get_trait(TRAIT_XENO_GLOW_RANGE),traits.get_trait(TRAIT_XENO_BIO_COLOR))
|
||||
|
||||
|
||||
65
code/modules/xenobio2/mob/slime/slime_monkey.dm
Normal file
65
code/modules/xenobio2/mob/slime/slime_monkey.dm
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
Slime cube lives here.
|
||||
*/
|
||||
/obj/item/slime_cube
|
||||
name = "slimy monkey cube"
|
||||
desc = "Wonder what might come out of this."
|
||||
icon = 'icons/mob/slime2.dmi'
|
||||
icon_state = "slime cube"
|
||||
var/searching = 0
|
||||
|
||||
/obj/item/slime_cube/attack_self(mob/user as mob)
|
||||
if(!searching)
|
||||
user << "<span class='warning'>You stare at the slimy cube, watching as some activity occurs.</span>"
|
||||
icon_state = "slime cube active"
|
||||
searching = 1
|
||||
request_player()
|
||||
spawn(600) reset_search()
|
||||
|
||||
/obj/item/slime_cube/proc/request_player()
|
||||
for(var/mob/observer/dead/O in player_list)
|
||||
if(!O.MayRespawn())
|
||||
continue
|
||||
if(O.client)
|
||||
if(O.client.prefs.be_special & BE_ALIEN)
|
||||
question(O.client)
|
||||
|
||||
/obj/item/slime_cube/proc/question(var/client/C)
|
||||
spawn(0)
|
||||
if(!C) return
|
||||
var/response = alert(C, "Someone is requesting a soul for a promethean. Would you like to play as one?", "Promethean request", "Yes", "No", "Never for this round")
|
||||
if(response == "Yes")
|
||||
response = alert(C, "Are you sure you want to play as a promethean?", "Promethean request", "Yes", "No")
|
||||
if(!C || 2 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
|
||||
if(response == "Yes")
|
||||
transfer_personality(C.mob)
|
||||
else if (response == "Never for this round")
|
||||
C.prefs.be_special ^= BE_ALIEN
|
||||
|
||||
/obj/item/slime_cube/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
|
||||
icon_state = "slime cube"
|
||||
if(searching == 1)
|
||||
searching = 0
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("<span class='warning'>The activity in the cube dies down. Maybe it will spark another time.</span>")
|
||||
|
||||
/obj/item/slime_cube/proc/transfer_personality(var/mob/candidate)
|
||||
announce_ghost_joinleave(candidate, 0, "They are a promethean now.")
|
||||
src.searching = 2
|
||||
var/mob/living/carbon/human/S = new(get_turf(src))
|
||||
S. << "<b>You are a promethean, brought into existence on [station_name()].</b>"
|
||||
S.mind.assigned_role = "Promethean"
|
||||
S.set_species("Promethean")
|
||||
S.shapeshifter_set_colour("#05FF9B")
|
||||
var/newname = sanitize(input(S, "You are a Promethean. Would you like to change your name to something else?", "Name change") as null|text, MAX_NAME_LEN)
|
||||
if (newname)
|
||||
S.real_name = newname
|
||||
S.name = S.real_name
|
||||
S.dna.real_name = newname
|
||||
if(S.mind) S.mind.name = S.name
|
||||
|
||||
for(var/mob/M in viewers(get_turf_or_move(loc)))
|
||||
M.show_message("<span class='warning'>The monkey cube suddenly takes the shape of a man!</span>")
|
||||
qdel(src)
|
||||
|
||||
@@ -93,13 +93,7 @@ Procs for targeting
|
||||
for(var/i=0, i<6, i++)
|
||||
traitdat.traits[TRAIT_XENO_COLOR] += pick(hexNums)
|
||||
|
||||
traitdat.chems.reagents.clear_reagents()
|
||||
for(var/R in default_chems)
|
||||
traitdat.chems.reagents.add_reagent("[R]", default_chems[R])
|
||||
var/amount_of_chems = rand(1,6)
|
||||
for(var/i = 0,i <= amount_of_chems, i++)
|
||||
var/datum/reagent/R = pick(xenoChemList)
|
||||
traitdat.chems.reagents.add_reagent(R, round(rand(1,10)))
|
||||
RandomChemicals()
|
||||
//if(SPECIESMUT & mutable)
|
||||
//Placeholder, currently no xenos that have species mutations.
|
||||
RandomizeTraits()
|
||||
@@ -132,8 +126,9 @@ Procs for targeting
|
||||
if(prob(traitdat.get_trait(TRAIT_XENO_LEARNCHANCE)) && traitdat.get_trait(TRAIT_XENO_CANLEARN))
|
||||
var/chosen = pick(speech_buffer)
|
||||
speak.Add(chosen)
|
||||
/* Uncoment for logging of speech list.
|
||||
log_debug("Added [chosen] to speak list.")
|
||||
log_debug("Speechlist cut.")
|
||||
log_debug("Speechlist cut.") */
|
||||
speech_buffer.Cut()
|
||||
//
|
||||
/mob/living/simple_animal/xeno/proc/BuildReagentLists()
|
||||
@@ -156,7 +151,7 @@ Procs for targeting
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/xeno/proc/RandomChemicals()
|
||||
traitdat.chemlist.Cut() //Clear the amount first.
|
||||
traitdat.chems.Cut() //Clear the amount first.
|
||||
|
||||
var/num_chems = round(rand(1,4))
|
||||
var/list/chemchoices = xenoChemList
|
||||
@@ -165,6 +160,6 @@ Procs for targeting
|
||||
var/chemtype = pick(chemchoices)
|
||||
chemchoices -= chemtype
|
||||
var/chemamount = rand(1,5)
|
||||
traitdat.chemlist[chemtype] = chemamount
|
||||
traitdat.chems[chemtype] = chemamount
|
||||
|
||||
traitdat.chemlist += default_chems
|
||||
traitdat.chems += default_chems
|
||||
|
||||
@@ -58,6 +58,7 @@ Also includes Life and New
|
||||
handle_reagents()
|
||||
if((mut_level >= mut_max) && !(mutable & NOMUT))
|
||||
Mutate()
|
||||
mut_level -= mut_max
|
||||
|
||||
ProcessSpeechBuffer()
|
||||
|
||||
@@ -87,7 +88,7 @@ Also includes Life and New
|
||||
temp_chem_holder.create_reagents(20)
|
||||
nutrition = 350
|
||||
for(var/R in default_chems)
|
||||
traitdat.chems.reagents.add_reagent("[R]", default_chems[R])
|
||||
traitdat.chems[R] = default_chems[R]
|
||||
|
||||
traitdat.source = name
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 6.1 KiB |
@@ -17,26 +17,33 @@ Used In File(s): \code\modules\xenobio2\machines\injector_computer.dm
|
||||
</div>
|
||||
<div style="padding-left: 110px;">
|
||||
<h3 style="clear: none;">Sensor Readings:</h3>
|
||||
<div class="itemGroup floatLeft" style="clear: none;">
|
||||
<div class="itemLabel">
|
||||
Instability:
|
||||
{{if data.occupied}}
|
||||
<div class="itemGroup floatLeft" style="clear: none;">
|
||||
<div class="itemLabel">
|
||||
Instability:
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{if data.instability}}
|
||||
{{:data.instability}}%
|
||||
{{else}}
|
||||
<span class='bad'><b>ERRR%</b></span> Please contact your local technician for assistance.
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="itemLabel">
|
||||
Occupant Health:
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{if data.occupantHealth}}
|
||||
{{:data.occupantHealth}}/{{:data.occupantHealthMax}}
|
||||
{{else}}
|
||||
<span class='bad'><b>ERRR%</b></span> Please contact your local technician for assistance.
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<div class="itemGroup floatLeft" style="clear: none;">
|
||||
<div class="itemLabel">
|
||||
<span class='bad'>Injector is not occupied.</span>
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{if data.instability}}
|
||||
{{:data.instability}}%
|
||||
{{else}}
|
||||
<span class='bad'><b>ERRR%</b></span> Please contact your local technician for assistance.
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="itemLabel">
|
||||
Occupant Health:
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{if data.occupantHealth}}
|
||||
{{:data.occupantHealth}}/{{:data.occupantHealthMax}}
|
||||
{{else}}
|
||||
<span class='bad'><b>ERRR%</b></span> Please contact your local technician for assistance.
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1904,6 +1904,7 @@
|
||||
#include "code\modules\xenobio2\mob\slime\slime procs.dm"
|
||||
#include "code\modules\xenobio2\mob\slime\slime.dm"
|
||||
#include "code\modules\xenobio2\mob\slime\slime_core.dm"
|
||||
#include "code\modules\xenobio2\mob\slime\slime_monkey.dm"
|
||||
#include "code\modules\xenobio2\tools\slime_handling_tools.dm"
|
||||
#include "code\modules\xgm\xgm_gas_data.dm"
|
||||
#include "code\modules\xgm\xgm_gas_mixture.dm"
|
||||
|
||||
Reference in New Issue
Block a user