mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-28 11:02:41 +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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user