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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user