mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Moves mob/var/datum/changeling/changeling to datum/mind/var/datum/changeling (changeling datums are now held by minds rather than mobs)
As such, changelings can now be reported at round-end, even after gibbing. Resolves Issue 251 Changeling power proc_holders are now datums rather than objects. Condensed all those changeling stings down a bit. This will make fixing issue 351 easier to fix Replaced changeling fakedeath and a number of checks for the zombiepowder reagent with a bitflag: mob/var/status_flags & FAKEDEATH setting the FAKEDEATH flag will make the mob appear dead in exactly the same way changeling parasting and parapens worked. I've updated changelings and zombiepowder to work with this flag. Bug fixes for the staff of change. There was a type mismatch and I typo'd "alien" as "xeno" so xenos were not being randomly picked. TODO: changeling purchased verbs could probably be moved to mind/special_verbs. Likewise, other modular antag proc-holders can be merged with the changeling system using the same type of datum. (namely wizards) git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4377 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -48,7 +48,8 @@ datum/mind
|
||||
|
||||
var/has_been_rev = 0//Tracks if this mind has been a rev or not
|
||||
|
||||
var/datum/faction/faction // associated faction
|
||||
var/datum/faction/faction //associated faction
|
||||
var/datum/changeling/changeling //changeling holder
|
||||
|
||||
New(var/key)
|
||||
src.key = key
|
||||
@@ -58,6 +59,8 @@ datum/mind
|
||||
if(!istype(new_character))
|
||||
world.log << "## DEBUG: transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob. Please inform Carn"
|
||||
if(current) //remove ourself from our old body's mind variable
|
||||
if(changeling)
|
||||
current.remove_changeling_powers()
|
||||
current.mind = null
|
||||
if(new_character.mind) //remove any mind currently in our new body's mind variable
|
||||
new_character.mind.current = null
|
||||
@@ -65,6 +68,9 @@ datum/mind
|
||||
current = new_character //link ourself to our new body
|
||||
new_character.mind = src //and link our new body to ourself
|
||||
|
||||
if(changeling)
|
||||
new_character.make_changeling()
|
||||
|
||||
if(active)
|
||||
new_character.key = key //now transfer the key to link the client to our new body
|
||||
|
||||
@@ -183,7 +189,7 @@ datum/mind
|
||||
text += "<b>YES</b>|<a href='?src=\ref[src];changeling=clear'>no</a>"
|
||||
if (objectives.len==0)
|
||||
text += "<br>Objectives are empty! <a href='?src=\ref[src];changeling=autoobjectives'>Randomize!</a>"
|
||||
if (current.changeling && (current.changeling.absorbed_dna.len>0 && current.real_name != current.changeling.absorbed_dna[1]))
|
||||
if( changeling && changeling.absorbed_dna.len && (current.real_name != changeling.absorbed_dna[1]) )
|
||||
text += "<br><a href='?src=\ref[src];changeling=initialdna'>Transform to initial appearance.</a>"
|
||||
else
|
||||
text += "<a href='?src=\ref[src];changeling=changeling'>yes</a>|<b>NO</b>"
|
||||
@@ -630,25 +636,24 @@ datum/mind
|
||||
ticker.mode.changelings -= src
|
||||
special_role = null
|
||||
current.remove_changeling_powers()
|
||||
if(current.changeling)
|
||||
del(current.changeling)
|
||||
current << "\red <FONT size = 3><B>You have been brainwashed! You are no longer a changeling!</B></FONT>"
|
||||
if(changeling) del(changeling)
|
||||
current << "<FONT color='red' size = 3><B>You grow weak and lose your powers! You are no longer a changeling and are stuck in your current form!</B></FONT>"
|
||||
if("changeling")
|
||||
if(!(src in ticker.mode.changelings))
|
||||
ticker.mode.changelings += src
|
||||
ticker.mode.grant_changeling_powers(current)
|
||||
special_role = "Changeling"
|
||||
current << "<B>\red You are a changeling!</B>"
|
||||
current << "<B><font color='red'>Your powers are awoken. A flash of memory returns to us...we are a changeling!</font></B>"
|
||||
if("autoobjectives")
|
||||
ticker.mode.forge_changeling_objectives(src)
|
||||
usr << "\blue The objectives for changeling [key] have been generated. You can edit them and anounce manually."
|
||||
|
||||
if("initialdna")
|
||||
if (!usr.changeling || !usr.changeling.absorbed_dna[1])
|
||||
if( !changeling || !changeling.absorbed_dna.len )
|
||||
usr << "\red Resetting DNA failed!"
|
||||
else
|
||||
usr.dna = usr.changeling.absorbed_dna[usr.changeling.absorbed_dna[1]]
|
||||
usr.real_name = usr.changeling.absorbed_dna[1]
|
||||
usr.dna = changeling.absorbed_dna[changeling.absorbed_dna[1]]
|
||||
usr.real_name = changeling.absorbed_dna[1]
|
||||
updateappearance(usr, usr.dna.uni_identity)
|
||||
domutcheck(usr, null)
|
||||
|
||||
|
||||
@@ -168,15 +168,12 @@
|
||||
var/atom/this = src//detach proc from src
|
||||
src = null
|
||||
|
||||
if (!usr || !isturf(usr.loc))
|
||||
if(!usr || !isturf(usr.loc))
|
||||
return
|
||||
else if (usr.stat != 0 || usr.restrained())
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
if(usr.status_flags & FAKEDEATH)
|
||||
return
|
||||
else
|
||||
if(usr.reagents)
|
||||
for(var/datum/reagent/R in usr.reagents.reagent_list) //I'm trying to avoid using canmove() because there are times where it would return 0 when you should still be able to point
|
||||
if(R.id == "zombiepowder") //This is to counter people spamming point-to when hit by a para-pen or changling's parasting. -Nodrak..
|
||||
return
|
||||
|
||||
var/tile = get_turf(this)
|
||||
if (!tile)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega")
|
||||
|
||||
/datum/game_mode
|
||||
var/list/datum/mind/changelings = list()
|
||||
|
||||
@@ -150,9 +152,8 @@
|
||||
return ..()
|
||||
return 0*/
|
||||
|
||||
/datum/game_mode/proc/grant_changeling_powers(mob/living/carbon/human/changeling_mob)
|
||||
if (!istype(changeling_mob))
|
||||
return
|
||||
/datum/game_mode/proc/grant_changeling_powers(mob/living/carbon/changeling_mob)
|
||||
if(!istype(changeling_mob)) return
|
||||
changeling_mob.make_changeling()
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_changeling()
|
||||
@@ -162,7 +163,7 @@
|
||||
var/changelingwin = 1
|
||||
|
||||
text += "<br>[changeling.key] was [changeling.name] ("
|
||||
if(changeling.current && changeling.current.changeling)
|
||||
if(changeling.current)
|
||||
if(changeling.current.stat == DEAD)
|
||||
text += "died"
|
||||
else
|
||||
@@ -174,9 +175,9 @@
|
||||
changelingwin = 0
|
||||
text += ")"
|
||||
|
||||
if(changeling.current && changeling.current.changeling)
|
||||
text += "<br><b>changeling ID:</b> [changeling.current.gender==MALE?"Mr.":"Ms."] [changeling.current.changeling.changelingID]."
|
||||
text += "<br><b>Genomes absorbed:</b> [changeling.current.changeling.absorbedcount]"
|
||||
//Removed sanity if(changeling) because we -want- a runtime to inform us that the changelings list is incorrect and needs to be fixed.
|
||||
text += "<br><b>Changeling ID:</b> [changeling.changeling.changelingID]."
|
||||
text += "<br><b>Genomes Absorbed:</b> [changeling.changeling.absorbedcount]"
|
||||
|
||||
if(changeling.objectives.len)
|
||||
var/count = 1
|
||||
@@ -203,32 +204,30 @@
|
||||
return 1
|
||||
|
||||
/datum/changeling //stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind)
|
||||
var/changeling_level = 0
|
||||
var/list/absorbed_dna = list()
|
||||
var/changeling_fakedeath = 0
|
||||
var/chem_charges = 20.00
|
||||
var/chem_recharge_multiplier = 1
|
||||
var/absorbedcount = 0
|
||||
var/chem_charges = 20
|
||||
var/chem_recharge_rate = 0.5
|
||||
var/chem_storage = 50
|
||||
var/sting_range = 1
|
||||
var/changelingID = "none"
|
||||
var/mob/living/host = null
|
||||
var/geneticdamage = 0.0
|
||||
var/changelingID = "Changeling"
|
||||
var/geneticdamage = 0
|
||||
var/isabsorbing = 0
|
||||
var/geneticpoints = 5
|
||||
var/purchasedpowers = list()
|
||||
var/absorbedcount = 0
|
||||
|
||||
|
||||
|
||||
/datum/changeling/New()
|
||||
/datum/changeling/New(var/gender=FEMALE)
|
||||
..()
|
||||
var/list/possibleIDs = list("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega")
|
||||
|
||||
for(var/mob/living/carbon/aChangeling in player_list)
|
||||
if(aChangeling.changeling)
|
||||
possibleIDs -= aChangeling.changeling.changelingID
|
||||
|
||||
if(possibleIDs.len)
|
||||
changelingID = pick(possibleIDs)
|
||||
var/honorific
|
||||
if(gender == FEMALE) honorific = "Ms."
|
||||
else honorific = "Mr."
|
||||
if(possible_changeling_IDs.len)
|
||||
changelingID = pick(possible_changeling_IDs)
|
||||
possible_changeling_IDs -= changelingID
|
||||
changelingID = "[honorific] [changelingID]"
|
||||
else
|
||||
changelingID = "[rand(1,1000)]"
|
||||
changelingID = "[honorific] [rand(1,999)]"
|
||||
|
||||
/datum/changeling/proc/regenerate()
|
||||
chem_charges = min(max(0, chem_charges+chem_recharge_rate), chem_storage)
|
||||
geneticdamage = max(0, geneticdamage-1)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,226 +1,161 @@
|
||||
|
||||
var/list/powers = typesof(/obj/effect/proc_holder/power) //needed for the badmin verb for now
|
||||
var/list/obj/effect/proc_holder/power/powerinstances = list()
|
||||
|
||||
/obj/effect/proc_holder/power
|
||||
name = "Power"
|
||||
desc = "Placeholder"
|
||||
density = 0
|
||||
opacity = 0
|
||||
var/list/powers = typesof(/datum/power/changeling) - /datum/power/changeling //needed for the badmin verb for now
|
||||
var/list/datum/power/changeling/powerinstances = list()
|
||||
|
||||
/datum/power //Could be used by other antags too
|
||||
var/name = "Power"
|
||||
var/desc = "Placeholder"
|
||||
var/helptext = ""
|
||||
var/isVerb = 1 // Is it an active power, or passive?
|
||||
var/verbpath // Path to a verb that contains the effects.
|
||||
|
||||
/datum/power/changeling
|
||||
var/allowduringlesserform = 0
|
||||
var/isVerb = 1 // Is it an active power, or passive?
|
||||
var/verbpath = null // Path to a verb that contains the effects.
|
||||
var/genomecost = 500000 // Cost for the changling to evolve this power.
|
||||
|
||||
/obj/effect/proc_holder/power/absorb_dna
|
||||
/datum/power/changeling/absorb_dna
|
||||
name = "Absorb DNA"
|
||||
desc = "Permits us to syphon the DNA from a human. They become one with us, and we become stronger."
|
||||
desc = "Permits us to syphon the DNA from a human. They become one with us, and we become stronger."
|
||||
genomecost = 0
|
||||
verbpath = /mob/proc/changeling_absorb_dna
|
||||
|
||||
verbpath = /client/proc/changeling_absorb_dna
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/transform
|
||||
/datum/power/changeling/transform
|
||||
name = "Transform"
|
||||
desc = "We take on the apperance and voice of one we have absorbed."
|
||||
genomecost = 0
|
||||
verbpath = /mob/proc/changeling_transform
|
||||
|
||||
verbpath = /client/proc/changeling_transform
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/fakedeath
|
||||
/datum/power/changeling/fakedeath
|
||||
name = "Regenerative Stasis"
|
||||
desc = "We fake our death while we regenerate our form, even through death."
|
||||
genomecost = 0
|
||||
allowduringlesserform = 1
|
||||
verbpath = /mob/proc/changeling_fakedeath
|
||||
|
||||
verbpath = /client/proc/changeling_fakedeath
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/lesser_form
|
||||
/datum/power/changeling/lesser_form
|
||||
name = "Lesser Form"
|
||||
desc = "We debase ourselves and become lesser. We become a monkey."
|
||||
genomecost = 1
|
||||
verbpath = /mob/proc/changeling_lesser_form
|
||||
|
||||
verbpath = /client/proc/changeling_lesser_form
|
||||
|
||||
|
||||
/*
|
||||
/obj/effect/proc_holder/power/changeling_greater_form
|
||||
name = "Greater Form"
|
||||
desc = "We become the pinnicle of evolution. We will show the humans what happens when they leave their isle of ignorance."
|
||||
genomecost = 250
|
||||
|
||||
verbpath = /client/proc/changeling_greater_form
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/deaf_sting
|
||||
/datum/power/changeling/deaf_sting
|
||||
name = "Deaf Sting"
|
||||
desc = "We silently sting a human, completely deafening them for a short time."
|
||||
genomecost = 1
|
||||
allowduringlesserform = 1
|
||||
verbpath = /mob/proc/changeling_deaf_sting
|
||||
|
||||
verbpath = /client/proc/changeling_deaf_sting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/blind_sting
|
||||
/datum/power/changeling/blind_sting
|
||||
name = "Blind Sting"
|
||||
desc = "We silently sting a human, completely blinding them for a short time."
|
||||
genomecost = 2
|
||||
allowduringlesserform = 1
|
||||
verbpath = /mob/proc/changeling_blind_sting
|
||||
|
||||
verbpath = /client/proc/changeling_blind_sting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/silence_sting
|
||||
/datum/power/changeling/silence_sting
|
||||
name = "Silence Sting"
|
||||
desc = "We silently sting a human, completely silencing them for a short time."
|
||||
helptext = "Does not provide a warning to a victim that they have been stung, until they try to speak and can not."
|
||||
genomecost = 2
|
||||
allowduringlesserform = 1
|
||||
verbpath = /mob/proc/changeling_silence_sting
|
||||
|
||||
verbpath = /client/proc/changeling_silence_sting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/transformation_sting
|
||||
/datum/power/changeling/transformation_sting
|
||||
name = "Transformation Sting"
|
||||
desc = "We silently sting a human, injecting a retrovirus that forces them to transform into another."
|
||||
genomecost = 3
|
||||
verbpath = /mob/proc/changeling_transformation_sting
|
||||
|
||||
verbpath = /client/proc/changeling_transformation_sting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/paralysis_sting
|
||||
/datum/power/changeling/paralysis_sting
|
||||
name = "Paralysis Sting"
|
||||
desc = "We silently sting a human, paralyzing them for a short time."
|
||||
genomecost = 3
|
||||
verbpath = /mob/proc/changeling_paralysis_sting
|
||||
|
||||
|
||||
verbpath = /client/proc/changeling_paralysis_sting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/LSDSting
|
||||
/datum/power/changeling/LSDSting
|
||||
name = "Hallucination Sting"
|
||||
desc = "We evolve the ability to sting a target with a powerful hallunicationary chemical."
|
||||
helptext = "The target does not notice they have been stung. The effect occurs after 30 to 60 seconds."
|
||||
genomecost = 3
|
||||
verbpath = /mob/proc/changeling_lsdsting
|
||||
|
||||
verbpath = /client/proc/changeling_lsdsting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/DeathSting
|
||||
/datum/power/changeling/DeathSting
|
||||
name = "Death Sting"
|
||||
desc = "We silently sting a human, filling him with potent chemicals. His rapid death is all but assured."
|
||||
genomecost = 10
|
||||
verbpath = /mob/proc/changeling_DEATHsting
|
||||
|
||||
verbpath = /client/proc/changeling_DEATHsting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/unfat_sting
|
||||
/datum/power/changeling/unfat_sting
|
||||
name = "Unfat Sting"
|
||||
desc = "We silently sting a human, forcing them to rapidly metobolize their fat."
|
||||
genomecost = 1
|
||||
verbpath = /mob/proc/changeling_unfat_sting
|
||||
|
||||
|
||||
verbpath = /client/proc/changeling_unfat_sting
|
||||
|
||||
/obj/effect/proc_holder/power/boost_range
|
||||
/datum/power/changeling/boost_range
|
||||
name = "Boost Range"
|
||||
desc = "We evolve the ability to shoot our stingers at humans, with some preperation."
|
||||
genomecost = 2
|
||||
allowduringlesserform = 1
|
||||
verbpath = /mob/proc/changeling_boost_range
|
||||
|
||||
verbpath = /client/proc/changeling_boost_range
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/Epinephrine
|
||||
/datum/power/changeling/Epinephrine
|
||||
name = "Epinephrine sacs"
|
||||
desc = "We evolve additional sacs of adrenaline throughout our body."
|
||||
helptext = "Gives the ability to instantly recover from stuns. High chemical cost."
|
||||
genomecost = 4
|
||||
verbpath = /mob/proc/changeling_unstun
|
||||
|
||||
verbpath = /client/proc/changeling_unstun
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/ChemicalSynth
|
||||
name = "Rapid Chemical Synthesis"
|
||||
/datum/power/changeling/ChemicalSynth
|
||||
name = "Rapid Chemical-Synthesis"
|
||||
desc = "We evolve new pathways for producing our necessary chemicals, permitting us to naturally create them faster."
|
||||
helptext = "Doubles the rate at which we naturally recharge chemicals."
|
||||
genomecost = 4
|
||||
isVerb = 0
|
||||
|
||||
verbpath = /client/proc/changeling_fastchemical
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/EngorgedGlands
|
||||
verbpath = /mob/proc/changeling_fastchemical
|
||||
/*
|
||||
/datum/power/changeling/AdvChemicalSynth
|
||||
name = "Advanced Chemical-Synthesis"
|
||||
desc = "We evolve new pathways for producing our necessary chemicals, permitting us to naturally create them faster."
|
||||
helptext = "Doubles the rate at which we naturally recharge chemicals."
|
||||
genomecost = 8
|
||||
isVerb = 0
|
||||
verbpath = /mob/proc/changeling_fastchemical
|
||||
*/
|
||||
/datum/power/changeling/EngorgedGlands
|
||||
name = "Engorged Chemical Glands"
|
||||
desc = "Our chemical glands swell, permitting us to store more chemicals inside of them."
|
||||
helptext = "Allows us to store an extra 25 units of chemicals."
|
||||
genomecost = 4
|
||||
isVerb = 0
|
||||
verbpath = /mob/proc/changeling_engorgedglands
|
||||
|
||||
|
||||
verbpath = /client/proc/changeling_engorgedglands
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/DigitalCamoflague
|
||||
/datum/power/changeling/DigitalCamoflague
|
||||
name = "Digital Camoflauge"
|
||||
desc = "We evolve the ability to distort our form and proprtions, defeating common altgorthms used to detect lifeforms on cameras."
|
||||
helptext = "We cannot be tracked by camera while using this skill. However, humans looking at us will find us.. uncanny. We must constantly expend chemicals to maintain our form like this."
|
||||
genomecost = 4
|
||||
allowduringlesserform = 1
|
||||
verbpath = /mob/proc/changeling_digitalcamo
|
||||
|
||||
verbpath = /client/proc/changeling_digitalcamo
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/rapidregeneration
|
||||
/datum/power/changeling/rapidregeneration
|
||||
name = "Rapid Regeneration"
|
||||
desc = "We evolve the ability to rapidly regenerate, negating the need for stasis."
|
||||
helptext = "Heals a moderate amount of damage every tick."
|
||||
genomecost = 8
|
||||
|
||||
verbpath = /client/proc/changeling_rapidregen
|
||||
|
||||
|
||||
|
||||
|
||||
verbpath = /mob/proc/changeling_rapidregen
|
||||
|
||||
|
||||
// Modularchangling, totally stolen from the new player panel. YAYY
|
||||
/datum/changeling/proc/EvolutionMenu()//The new one
|
||||
set category = "Changeling"
|
||||
set desc = "Level up!"
|
||||
if (!usr.changeling)
|
||||
return
|
||||
|
||||
src = usr.changeling
|
||||
if(!usr || !usr.mind || !usr.mind.changeling) return
|
||||
src = usr.mind.changeling
|
||||
|
||||
if(!powerinstances.len)
|
||||
for(var/P in powers)
|
||||
var/obj/effect/proc_holder/power/nP = new P
|
||||
if (nP.desc == "Placeholder")
|
||||
del(nP)
|
||||
continue
|
||||
powerinstances += nP
|
||||
powerinstances += new P()
|
||||
|
||||
var/dat = "<html><head><title>Changling Evolution Menu</title></head>"
|
||||
|
||||
@@ -412,7 +347,7 @@ var/list/obj/effect/proc_holder/power/powerinstances = list()
|
||||
<td align='center'>
|
||||
<font size='5'><b>Changling Evolution Menu</b></font><br>
|
||||
Hover over a power to see more information<br>
|
||||
Current evolution points left to evolve with: [usr.changeling.geneticpoints]<br>
|
||||
Current evolution points left to evolve with: [geneticpoints]<br>
|
||||
Absorb genomes to acquire more evolution points
|
||||
<p>
|
||||
</td>
|
||||
@@ -432,10 +367,10 @@ var/list/obj/effect/proc_holder/power/powerinstances = list()
|
||||
<table width='560' align='center' cellspacing='0' cellpadding='5' id='maintable_data'>"}
|
||||
|
||||
var/i = 1
|
||||
for(var/obj/effect/proc_holder/power/P in powerinstances)
|
||||
for(var/datum/power/changeling/P in powerinstances)
|
||||
var/ownsthis = 0
|
||||
|
||||
if(P in usr.changeling.purchasedpowers)
|
||||
if(P in purchasedpowers)
|
||||
ownsthis = 1
|
||||
|
||||
|
||||
@@ -482,18 +417,19 @@ var/list/obj/effect/proc_holder/power/powerinstances = list()
|
||||
..()
|
||||
|
||||
if(href_list["P"])
|
||||
usr.changeling.purchasePower(href_list["P"])
|
||||
purchasePower(href_list["P"])
|
||||
call(/datum/changeling/proc/EvolutionMenu)()
|
||||
|
||||
|
||||
|
||||
/datum/changeling/proc/purchasePower(var/obj/effect/proc_holder/power/Pname)
|
||||
if (!usr.changeling)
|
||||
/datum/changeling/proc/purchasePower(var/datum/power/changeling/Pname)
|
||||
if(!usr.mind || !usr.mind.changeling)
|
||||
return
|
||||
// src = usr.mind.changeling
|
||||
|
||||
var/obj/effect/proc_holder/power/Thepower = null
|
||||
var/datum/power/changeling/Thepower = null
|
||||
|
||||
for (var/obj/effect/proc_holder/power/P in powerinstances)
|
||||
for (var/datum/power/changeling/P in powerinstances)
|
||||
if(P.name == Pname)
|
||||
Thepower = P
|
||||
break
|
||||
@@ -502,25 +438,21 @@ var/list/obj/effect/proc_holder/power/powerinstances = list()
|
||||
usr << "This is awkward. Changeling power purchase failed, please report this bug to a coder!"
|
||||
return
|
||||
|
||||
if(Thepower in usr.changeling.purchasedpowers)
|
||||
if(Thepower in purchasedpowers)
|
||||
usr << "We have already evolved this ability!"
|
||||
return
|
||||
|
||||
|
||||
if(usr.changeling.geneticpoints < Thepower.genomecost)
|
||||
if(geneticpoints < Thepower.genomecost)
|
||||
usr << "We cannot evolve this... yet. We must acquire more DNA."
|
||||
return
|
||||
|
||||
usr.changeling.geneticpoints -= Thepower.genomecost
|
||||
geneticpoints -= Thepower.genomecost
|
||||
|
||||
usr.changeling.purchasedpowers += Thepower
|
||||
purchasedpowers += Thepower
|
||||
|
||||
if(!Thepower.isVerb)
|
||||
if(!Thepower.isVerb && Thepower.verbpath)
|
||||
call(Thepower.verbpath)()
|
||||
|
||||
else
|
||||
if(usr.changeling.changeling_level == 1)
|
||||
usr.make_lesser_changeling()
|
||||
else
|
||||
usr.make_changeling()
|
||||
usr.make_changeling()
|
||||
|
||||
|
||||
@@ -445,7 +445,7 @@ datum/objective/absorb
|
||||
return target_amount
|
||||
|
||||
check_completion()
|
||||
if(owner && owner.current && owner.current.changeling && owner.current.changeling.absorbed_dna && ((owner.current.changeling.absorbedcount) >= target_amount))
|
||||
if(owner && owner.changeling && owner.changeling.absorbed_dna && (owner.changeling.absorbedcount >= target_amount))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
//Clonepod
|
||||
|
||||
//Start growing a human clone in the pod!
|
||||
/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/mrace, var/UI, var/datum/changeling/changelingClone)
|
||||
/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/mrace, var/UI)
|
||||
if(mess || attempting)
|
||||
return 0
|
||||
var/datum/mind/clonemind = locate(mindref)
|
||||
@@ -177,10 +177,6 @@
|
||||
ticker.mode.add_cultist(src.occupant.mind)
|
||||
ticker.mode.update_all_cult_icons() //So the icon actually appears
|
||||
|
||||
if (changelingClone && H.mind in ticker.mode.changelings)
|
||||
H.changeling = changelingClone
|
||||
H.make_changeling()
|
||||
|
||||
// -- End mode specific stuff
|
||||
|
||||
if(!H.dna)
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
temp = "Error: Clonepod malfunction."
|
||||
else if(!config.revival_cloning)
|
||||
temp = "Error: Unable to initiate cloning cycle."
|
||||
else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["interface"],C.fields["changeling"]))
|
||||
else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["interface"]))
|
||||
temp = "Initiating cloning cycle..."
|
||||
records.Remove(C)
|
||||
del(C)
|
||||
@@ -425,7 +425,6 @@
|
||||
R.fields["id"] = copytext(md5(subject.real_name), 2, 6)
|
||||
R.fields["UI"] = subject.dna.uni_identity
|
||||
R.fields["SE"] = subject.dna.struc_enzymes
|
||||
R.fields["changeling"] = subject.changeling
|
||||
|
||||
// Preferences stuff
|
||||
R.fields["interface"] = subject.UI
|
||||
|
||||
@@ -906,13 +906,9 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if (podman.mind in ticker.mode:cult)
|
||||
ticker.mode:add_cultist(podman.mind)
|
||||
ticker.mode:update_all_cult_icons() //So the icon actually appears
|
||||
if ("changeling")
|
||||
if (podman.mind in ticker.mode:changelings)
|
||||
podman.make_changeling()
|
||||
|
||||
// -- End mode specific stuff
|
||||
|
||||
|
||||
podman.gender = gender
|
||||
|
||||
if(!podman.dna)
|
||||
|
||||
@@ -895,7 +895,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
user.show_message("\blue \t Damage Specifics: [C.getOxyLoss() > 50 ? "\red" : "\blue"][C.getOxyLoss()]-[C.getToxLoss() > 50 ? "\red" : "\blue"][C.getToxLoss()]-[C.getFireLoss() > 50 ? "\red" : "\blue"][C.getFireLoss()]-[C.getBruteLoss() > 50 ? "\red" : "\blue"][C.getBruteLoss()]", 1)
|
||||
user.show_message("\blue \t Key: Suffocation/Toxin/Burns/Brute", 1)
|
||||
user.show_message("\blue \t Body Temperature: [C.bodytemperature-T0C]°C ([C.bodytemperature*1.8-459.67]°F)", 1)
|
||||
if(!isnull(C.tod) && (C.stat == 2 || (C.reagents && C.reagents.has_reagent("zombiepowder")) || (C.changeling && C.changeling.changeling_fakedeath)))
|
||||
if(C.tod && (C.stat == DEAD || (C.status_flags & FAKEDEATH)))
|
||||
user.show_message("\blue \t Time of Death: [C.tod]")
|
||||
if(istype(C, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = C
|
||||
|
||||
@@ -93,7 +93,7 @@ MASS SPECTROMETER
|
||||
O.show_message(text("\red [] has analyzed []'s vitals!", user, M), 1)
|
||||
//Foreach goto(67)
|
||||
var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss())))
|
||||
if((M.reagents && M.reagents.has_reagent("zombiepowder")) || (M.changeling && M.changeling.changeling_fakedeath))
|
||||
if(M.status_flags & FAKEDEATH)
|
||||
user.show_message(text("\blue Analyzing Results for []:\n\t Overall Status: []", M, "dead"), 1)
|
||||
user.show_message(text("\blue \t Damage Specifics: []-[]-[]-[]", fake_oxy < 50 ? "\red [fake_oxy]" : fake_oxy , M.getToxLoss() > 50 ? "\red [M.getToxLoss()]" : M.getToxLoss(), M.getFireLoss() > 50 ? "\red[M.getFireLoss()]" : M.getFireLoss(), M.getBruteLoss() > 50 ? "\red[M.getBruteLoss()]" : M.getBruteLoss()), 1)
|
||||
else
|
||||
@@ -101,7 +101,7 @@ MASS SPECTROMETER
|
||||
user.show_message(text("\blue \t Damage Specifics: []-[]-[]-[]", M.getOxyLoss() > 50 ? "\red [M.getOxyLoss()]" : M.getOxyLoss(), M.getToxLoss() > 50 ? "\red [M.getToxLoss()]" : M.getToxLoss(), M.getFireLoss() > 50 ? "\red[M.getFireLoss()]" : M.getFireLoss(), M.getBruteLoss() > 50 ? "\red[M.getBruteLoss()]" : M.getBruteLoss()), 1)
|
||||
user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1)
|
||||
user.show_message("\blue Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1)
|
||||
if(!isnull(M.tod) && (M.stat == 2 || (M.reagents && M.reagents.has_reagent("zombiepowder")) || (M.changeling && M.changeling.changeling_fakedeath)))
|
||||
if(M.tod && (M.stat == DEAD || (M.status_flags & FAKEDEATH)))
|
||||
user.show_message("\blue Time of Death: [M.tod]")
|
||||
if(istype(M, /mob/living/carbon/human) && mode == 1)
|
||||
var/mob/living/carbon/human/H = M
|
||||
@@ -113,7 +113,7 @@ MASS SPECTROMETER
|
||||
else
|
||||
user.show_message("\blue \t Limbs are OK.",1)
|
||||
|
||||
if((M.changeling && M.changeling.changeling_fakedeath) || (M.reagents && M.reagents.has_reagent("zombiepowder")))
|
||||
if(M.status_flags & FAKEDEATH)
|
||||
user.show_message(text("\blue [] | [] | [] | []", fake_oxy > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1)
|
||||
else
|
||||
user.show_message(text("\blue [] | [] | [] | []", M.getOxyLoss() > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1)
|
||||
|
||||
@@ -539,7 +539,7 @@ CIRCULAR SAW
|
||||
return
|
||||
|
||||
if(3.0)
|
||||
if(M.changeling && M.changeling.changeling_fakedeath)
|
||||
if(M.mind && M.mind.changeling)
|
||||
user << "\red The neural tissue regrows before your eyes as you cut it."
|
||||
return
|
||||
|
||||
|
||||
@@ -393,9 +393,6 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
//Now for special roles and equipment.
|
||||
switch(new_character.mind.special_role)
|
||||
if("Changeling")
|
||||
job_master.EquipRank(new_character, new_character.mind.assigned_role, 1)
|
||||
new_character.make_changeling()
|
||||
if("traitor")
|
||||
job_master.EquipRank(new_character, new_character.mind.assigned_role, 1)
|
||||
ticker.mode.equip_traitor(new_character)
|
||||
|
||||
@@ -1472,6 +1472,7 @@ datum
|
||||
|
||||
on_mob_life(var/mob/living/carbon/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
M.status_flags |= FAKEDEATH
|
||||
M.adjustOxyLoss(0.5)
|
||||
M.adjustToxLoss(0.5)
|
||||
M.Weaken(10)
|
||||
@@ -1480,6 +1481,11 @@ datum
|
||||
..()
|
||||
return
|
||||
|
||||
Del()
|
||||
if(holder && ismob(holder.my_atom))
|
||||
var/mob/M = holder.my_atom
|
||||
M.status_flags &= ~FAKEDEATH
|
||||
|
||||
LSD
|
||||
name = "LSD"
|
||||
id = "LSD"
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
if(suiciding)
|
||||
msg += "<span class='warning'>[t_He] [t_has] bitten off [t_his] own tongue and [t_has] suffered major bloodloss!</span>\n"
|
||||
|
||||
if(stat == DEAD || (changeling && (changeling.changeling_fakedeath == 1)))
|
||||
if(stat == DEAD || (status_flags & FAKEDEATH))
|
||||
msg += "<span class='deadsay'>[t_He] [t_is] limp and unresponsive; there are no signs of life"
|
||||
|
||||
if(!key)
|
||||
|
||||
@@ -153,10 +153,10 @@
|
||||
stat("Internal Atmosphere Info", internal.name)
|
||||
stat("Tank Pressure", internal.air_contents.return_pressure())
|
||||
stat("Distribution Pressure", internal.distribute_pressure)
|
||||
if (mind)
|
||||
if (mind.special_role == "Changeling" && changeling)
|
||||
stat("Chemical Storage", changeling.chem_charges)
|
||||
stat("Genetic Damage Time", changeling.geneticdamage)
|
||||
if(mind)
|
||||
if(mind.changeling)
|
||||
stat("Chemical Storage", mind.changeling.chem_charges)
|
||||
stat("Genetic Damage Time", mind.changeling.geneticdamage)
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized)
|
||||
stat("Energy Charge", round(wear_suit:cell:charge/100))
|
||||
|
||||
|
||||
@@ -1060,11 +1060,8 @@
|
||||
nutrition += 10
|
||||
|
||||
proc/handle_changeling()
|
||||
if (mind)
|
||||
if (mind.special_role == "Changeling" && changeling)
|
||||
changeling.chem_charges = between(0, ((max((0.9 - (changeling.chem_charges / 50)), 0.1)*changeling.chem_recharge_multiplier) + changeling.chem_charges), changeling.chem_storage)
|
||||
if ((changeling.geneticdamage > 0))
|
||||
changeling.geneticdamage = changeling.geneticdamage-1
|
||||
if(mind && mind.changeling)
|
||||
mind.changeling.regenerate()
|
||||
|
||||
#undef HUMAN_MAX_OXYLOSS
|
||||
#undef HUMAN_CRIT_MAX_OXYLOSS
|
||||
@@ -4,9 +4,9 @@
|
||||
return
|
||||
|
||||
//Mimes dont speak! Changeling hivemind and emotes are allowed.
|
||||
if (miming)
|
||||
if(miming)
|
||||
if(length(message) >= 2)
|
||||
if(src.changeling)
|
||||
if(mind && mind.changeling)
|
||||
if(copytext(message, 1, 2) != "*" && copytext(message, 1, 3) != ":g" && copytext(message, 1, 3) != ":G" && copytext(message, 1, 3) != ":<3A>")
|
||||
return
|
||||
else
|
||||
|
||||
@@ -585,7 +585,8 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
/mob/living/carbon/human/update_hud() //TODO: do away with this if possible
|
||||
if(client)
|
||||
client.screen |= contents
|
||||
hud_used.hidden_inventory_update() //Updates the screenloc of the items on the 'other' inventory bar
|
||||
if(hud_used)
|
||||
hud_used.hidden_inventory_update() //Updates the screenloc of the items on the 'other' inventory bar
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_handcuffed(var/update_icons=1)
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
src.blinded = 1
|
||||
|
||||
else
|
||||
if (src.paralysis || src.stunned || src.weakened || (changeling && changeling.changeling_fakedeath)) //Stunned etc.
|
||||
if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc.
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
src.stat = 0
|
||||
|
||||
@@ -581,8 +581,5 @@
|
||||
return
|
||||
|
||||
proc/handle_changeling()
|
||||
if (mind)
|
||||
if (mind.special_role == "Changeling" && changeling)
|
||||
changeling.chem_charges = between(0, ((max((0.9 - (changeling.chem_charges / 50)), 0.1)*changeling.chem_recharge_multiplier) + changeling.chem_charges), changeling.chem_storage)
|
||||
if ((changeling.geneticdamage > 0))
|
||||
changeling.geneticdamage = changeling.geneticdamage-1
|
||||
if(mind && mind.changeling)
|
||||
mind.changeling.regenerate()
|
||||
|
||||
@@ -392,9 +392,9 @@
|
||||
stat(null, text("Move Mode: []", m_intent))
|
||||
if(client && mind)
|
||||
if (client.statpanel == "Status")
|
||||
if (mind.special_role == "Changeling" && changeling)
|
||||
stat("Chemical Storage", changeling.chem_charges)
|
||||
stat("Genetic Damage Time", changeling.geneticdamage)
|
||||
if(mind.changeling)
|
||||
stat("Chemical Storage", mind.changeling.chem_charges)
|
||||
stat("Genetic Damage Time", mind.changeling.geneticdamage)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -246,10 +246,10 @@ var/list/department_radio_keys = list(
|
||||
italics = 1
|
||||
|
||||
if("changeling")
|
||||
if(src.changeling)
|
||||
for(var/mob/aChangeling in mob_list)
|
||||
if(aChangeling.changeling || istype(aChangeling, /mob/dead/observer))
|
||||
aChangeling << "<i><font color=#800080><b>[gender=="male"?"Mr.":"Mrs."] [changeling.changelingID]:</b> [message]</font></i>"
|
||||
if(mind && mind.changeling)
|
||||
for(var/mob/Changeling in mob_list)
|
||||
if((Changeling.mind && Changeling.mind.changeling) || istype(Changeling, /mob/dead/observer))
|
||||
Changeling << "<i><font color=#800080><b>[mind.changeling.changelingID]:</b> [message]</font></i>"
|
||||
return
|
||||
////SPECIAL HEADSETS START
|
||||
else
|
||||
|
||||
@@ -699,7 +699,7 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
lying = 0
|
||||
else
|
||||
lying = 1
|
||||
else if( stat || weakened || paralysis || resting || sleeping || (changeling && changeling.changeling_fakedeath) )
|
||||
else if( stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH) )
|
||||
lying = 1
|
||||
canmove = 0
|
||||
else if( stunned )
|
||||
|
||||
@@ -214,9 +214,6 @@
|
||||
var/radar_open = 0 // nonzero is radar is open
|
||||
|
||||
|
||||
//Datum holding changeling stuff
|
||||
var/datum/changeling/changeling = null //TODO: Move this to living or carbon -Nodrak
|
||||
|
||||
var/obj/control_object //Used by admins to possess objects. All mobs should have this var
|
||||
|
||||
//Whether or not mobs can understand other mobtypes. These stay in /mob so that ghosts can hear everything.
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
del(W)
|
||||
W.layer = initial(W.layer)
|
||||
W.loc = M.loc
|
||||
W.dropped(src)
|
||||
W.dropped(M)
|
||||
|
||||
var/mob/living/new_mob
|
||||
|
||||
@@ -54,18 +54,16 @@
|
||||
Robot.mmi = new /obj/item/device/mmi(new_mob)
|
||||
Robot.mmi.transfer_identity(M) //Does not transfer key/client.
|
||||
if("metroid")
|
||||
if(prob(50))
|
||||
new_mob = new /mob/living/carbon/metroid/adult(M.loc)
|
||||
else
|
||||
new_mob = new /mob/living/carbon/metroid(M.loc)
|
||||
if(prob(50)) new_mob = new /mob/living/carbon/metroid/adult(M.loc)
|
||||
else new_mob = new /mob/living/carbon/metroid(M.loc)
|
||||
new_mob.universal_speak = 1
|
||||
if("alien")
|
||||
if("xeno")
|
||||
var/alien_caste = pick("Hunter","Sentinel","Drone","Larva")
|
||||
switch(alien_caste)
|
||||
if("Hunter") new_mob = new /mob/living/carbon/alien/humanoid/hunter(M.loc)
|
||||
if("Sentinel") new_mob = new /mob/living/carbon/alien/humanoid/sentinel(M.loc)
|
||||
if("Drone") new_mob = new /mob/living/carbon/alien/humanoid/drone(M.loc)
|
||||
if("Larva") new_mob = new /mob/living/carbon/alien/larva(M.loc)
|
||||
else new_mob = new /mob/living/carbon/alien/larva(M.loc)
|
||||
new_mob.universal_speak = 1
|
||||
if("human")
|
||||
new_mob = new /mob/living/carbon/human(M.loc)
|
||||
@@ -83,6 +81,8 @@
|
||||
|
||||
var/mob/living/carbon/human/Human = new_mob
|
||||
Human.mutantrace = pick("lizard","golem","metroid","plant",4;"")
|
||||
else
|
||||
return
|
||||
|
||||
new_mob.a_intent = "hurt"
|
||||
if(M.mind)
|
||||
|
||||
@@ -348,6 +348,7 @@ var/list/global_mutations = list() // list of hidden mutation things
|
||||
#define CANSTUN 1
|
||||
#define CANWEAKEN 2
|
||||
#define CANPARALYSE 4
|
||||
#define FAKEDEATH 8192 //Replaces stuff like changeling.changeling_fakedeath
|
||||
#define DISFIGURED 16384 //I'll probably move this elsewhere if I ever get wround to writing a bitflag mob-damage system
|
||||
#define XENO_HOST 32768 //Tracks whether we're gonna be a baby alien's mummy.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user