Cleans up Vars

This commit is contained in:
Fox-McCloud
2016-07-21 01:43:16 -04:00
parent 220b4294c6
commit 1ac09a962c
30 changed files with 161 additions and 285 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
verbs += /mob/dead/observer/proc/dead_tele
// Our new boo spell.
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/boo(src))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/boo(null))
can_reenter_corpse = flags & GHOST_CAN_REENTER
started_as_observer = flags & GHOST_IS_OBSERVER
@@ -59,7 +59,7 @@
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
if(health < config.health_threshold_dead || !get_int_organ(/obj/item/organ/internal/brain))
death()
blinded = 1
stat = DEAD
@@ -88,37 +88,4 @@
icon_state = "queen_s"
for(var/image/I in overlays_standing)
overlays += I
/*
/mob/living/carbon/alien/humanoid/queen/verb/evolve() // -- TLE
set name = "Evolve (1000)"
set desc = "The ultimate transformation. Become an alien Empress. Only one empress can exist at a time."
set category = "Alien"
if(powerc(1000))
// Queen check
var/no_queen = 1
for(var/mob/living/carbon/alien/humanoid/empress/E in living_mob_list)
if(!E.key && E.brain_op_stage != 4)
continue
no_queen = 0
if(no_queen)
adjustToxLoss(-1000)
to_chat(src, "<span class='noticealien'>You begin to evolve!</span>")
for(var/mob/O in viewers(src, null))
O.show_message(text("<span class='alertalien'>[src] begins to twist and contort!</span>"), 1)
var/mob/living/carbon/alien/humanoid/empress/new_xeno = new(loc)
if(mind)
mind.transfer_to(new_xeno)
else
new_xeno.key = key
new_xeno.mind.name = new_xeno.name
qdel(src)
else
to_chat(src, "<span class='notice'>We already have an alive empress.</span>")
return
*/
overlays += I
@@ -19,7 +19,7 @@
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
if(health < -25 || brain_op_stage == 4.0)
if(health < -25 || !get_int_organ(/obj/item/organ/internal/brain))
death()
blinded = 1
silent = 0
@@ -183,7 +183,6 @@
src.brainmob.container = src
src.brainmob.stat = 0
src.brainmob.silent = 0
src.brainmob.brain_op_stage = 4.0
dead_mob_list -= src.brainmob
..()
@@ -1,15 +1,12 @@
/mob/living/carbon/
/mob/living/carbon
gender = MALE
hud_possible = list(HEALTH_HUD,STATUS_HUD,SPECIALROLE_HUD)
var/list/stomach_contents = list()
var/list/internal_organs = list()
var/brain_op_stage = 0.0
var/antibodies = 0
var/last_eating = 0 //Not sure what this does... I found it hidden in food.dm
var/life_tick = 0 // The amount of life ticks that have processed on this mob.
var/analgesic = 0 // when this is set, the mob isn't affected by shock or pain
// life should decrease this by 1 every tick
// total amount of wounds on mob, used to spread out healing and the like over all wounds
var/number_wounds = 0
var/obj/item/handcuffed = null //Whether or not the mob is handcuffed
+4 -5
View File
@@ -816,9 +816,6 @@
handle_organs()
handle_blood()
//the analgesic effect wears off slowly
analgesic = max(0, analgesic - 1)
if(paralysis)
blinded = 1
stat = UNCONSCIOUS
@@ -987,8 +984,10 @@
/mob/living/carbon/human/handle_shock()
..()
if(status_flags & GODMODE) return 0 //godmode
if(analgesic || (species && species.flags & NO_PAIN)) return // analgesic avoids all traumatic shock temporarily
if(status_flags & GODMODE)
return 0 //godmode
if(species && species.flags & NO_PAIN)
return
if(health <= config.health_threshold_softcrit)// health 0 makes you immediately collapse
shock_stage = max(shock_stage, 61)
@@ -615,25 +615,22 @@
/datum/species/proc/handle_hud_icons(mob/living/carbon/human/H)
if(H.healths)
if(H.analgesic)
H.healths.icon_state = "health_health_numb"
if(H.stat == DEAD)
H.healths.icon_state = "health7"
else
if(H.stat == DEAD)
H.healths.icon_state = "health7"
else
switch(H.hal_screwyhud)
if(1) H.healths.icon_state = "health6"
if(2) H.healths.icon_state = "health7"
if(5) H.healths.icon_state = "health0"
else
switch(100 - ((flags & NO_PAIN) ? 0 : H.traumatic_shock) - H.staminaloss)
if(100 to INFINITY) H.healths.icon_state = "health0"
if(80 to 100) H.healths.icon_state = "health1"
if(60 to 80) H.healths.icon_state = "health2"
if(40 to 60) H.healths.icon_state = "health3"
if(20 to 40) H.healths.icon_state = "health4"
if(0 to 20) H.healths.icon_state = "health5"
else H.healths.icon_state = "health6"
switch(H.hal_screwyhud)
if(1) H.healths.icon_state = "health6"
if(2) H.healths.icon_state = "health7"
if(5) H.healths.icon_state = "health0"
else
switch(100 - ((flags & NO_PAIN) ? 0 : H.traumatic_shock) - H.staminaloss)
if(100 to INFINITY) H.healths.icon_state = "health0"
if(80 to 100) H.healths.icon_state = "health1"
if(60 to 80) H.healths.icon_state = "health2"
if(40 to 60) H.healths.icon_state = "health3"
if(20 to 40) H.healths.icon_state = "health4"
if(0 to 20) H.healths.icon_state = "health5"
else H.healths.icon_state = "health6"
if(H.healthdoll)
H.healthdoll.overlays.Cut()
-2
View File
@@ -16,8 +16,6 @@
src.traumatic_shock -= R.shock_reduction // now you too can varedit cyanide to reduce shock by 1000 - Iamgoofball
if(src.slurring)
src.traumatic_shock -= 10
if(src.analgesic)
src.traumatic_shock = 0
// broken or ripped off organs will add quite a bit of pain
if(istype(src,/mob/living/carbon/human))
@@ -33,8 +33,9 @@
if(default_spells.len)
for(var/spell in default_spells)
var/obj/effect/proc_holder/spell/S = spell
if(!S) return
H.AddSpell(new S)
if(!S)
return
H.mind.AddSpell(new S(null))
/datum/superheroes/proc/assign_id(var/mob/living/carbon/human/H)
var/obj/item/weapon/card/id/syndicate/W = new(H)
+5 -11
View File
@@ -7,10 +7,10 @@
//Damage related vars, NOTE: THESE SHOULD ONLY BE MODIFIED BY PROCS
var/bruteloss = 0.0 //Brutal damage caused by brute force (punching, being clubbed by a toolbox ect... this also accounts for pressure damage)
var/oxyloss = 0.0 //Oxygen depravation damage (no air in lungs)
var/toxloss = 0.0 //Toxic damage caused by being poisoned or radiated
var/fireloss = 0.0 //Burn damage caused by being way too hot, too cold or burnt.
var/bruteloss = 0 //Brutal damage caused by brute force (punching, being clubbed by a toolbox ect... this also accounts for pressure damage)
var/oxyloss = 0 //Oxygen depravation damage (no air in lungs)
var/toxloss = 0 //Toxic damage caused by being poisoned or radiated
var/fireloss = 0 //Burn damage caused by being way too hot, too cold or burnt.
var/cloneloss = 0 //Damage caused by being cloned or ejected from the cloner early. slimes also deal cloneloss damage to victims
var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot.
var/staminaloss = 0 //Stamina damage, or exhaustion. You recover it slowly naturally, and are stunned if it gets too high. Holodeck and hallucinations deal this.
@@ -23,11 +23,6 @@
//Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects.
var/incorporeal_move = 0 //0 is off, 1 is normal, 2 is for ninjas.
var/t_plasma = null
var/t_oxygen = null
var/t_sl_gas = null
var/t_n2 = null
var/now_pushing = null
var/atom/movable/cameraFollow = null
@@ -36,9 +31,8 @@
var/fire_stacks = 0 //Tracks how many stacks of fire we have on, max is usually 20
var/update_slimes = 1
var/specialsauce = 0 //Has this person consumed enough special sauce? IF so they're a ticking time bomb of death.
var/implanting = 0 //Used for the mind-slave implant
var/silent = null //Can't talk. Value goes down every life proc.
var/silent = 0 //Can't talk. Value goes down every life proc. //NOTE TO FUTURE CODERS: DO NOT INITIALIZE NUMERICAL VARS AS NULL OR I WILL MURDER YOU.
var/floating = 0
var/nightvision = 0
@@ -27,7 +27,7 @@
name = text("[initial(name)] ([rand(1, 1000)])")
real_name = name
for(var/spell in construct_spells)
AddSpell(new spell(src))
AddSpell(new spell(null))
updateglow()
/mob/living/simple_animal/construct/death()
@@ -52,9 +52,9 @@
/mob/living/simple_animal/hostile/statue/New(loc, var/mob/living/creator)
..()
// Give spells
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/flicker_lights(src))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/blindness(src))
AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision(src))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/flicker_lights(null))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/blindness(null))
AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision(null))
// Give nightvision
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
+15 -18
View File
@@ -6,6 +6,7 @@
hud_used = null
if(mind && mind.current == src)
spellremove(src)
mobspellremove(src)
for(var/infection in viruses)
qdel(infection)
ghostize()
@@ -158,8 +159,6 @@
/mob/proc/Life()
// handle_typing_indicator()
// if(organStructure)
// organStructure.ProcessOrgans()
return
@@ -960,8 +959,8 @@ var/list/slot_equipment_priority = list( \
if(mind && mind.changeling)
add_stings_to_statpanel(mind.changeling.purchasedpowers)
if(spell_list && spell_list.len)
for(var/obj/effect/proc_holder/spell/S in spell_list)
if(mob_spell_list && mob_spell_list.len)
for(var/obj/effect/proc_holder/spell/S in mob_spell_list)
add_spell_to_statpanel(S)
if(mind && istype(src, /mob/living) && mind.spell_list && mind.spell_list.len)
for(var/obj/effect/proc_holder/spell/S in mind.spell_list)
@@ -994,6 +993,7 @@ var/list/slot_equipment_priority = list( \
for(var/obj/effect/proc_holder/changeling/S in stings)
if(S.chemical_cost >=0 && S.can_be_used_by(src))
statpanel("[S.panel]",((S.chemical_cost > 0) ? "[S.chemical_cost]" : ""),S)
/mob/proc/add_spell_to_statpanel(var/obj/effect/proc_holder/spell/S)
switch(S.charge_type)
if("recharge")
@@ -1002,17 +1002,6 @@ var/list/slot_equipment_priority = list( \
statpanel(S.panel,"[S.charge_counter]/[S.charge_max]",S)
if("holdervar")
statpanel(S.panel,"[S.holder_var_type] [S.holder_var_amount]",S)
/* // Why have a duplicate set of turfs in the stat panel?
if(listed_turf)
if(get_dist(listed_turf,src) > 1)
listed_turf = null
else
statpanel(listed_turf.name,listed_turf.name,listed_turf)
for(var/atom/A in listed_turf)
if(A.invisibility > see_invisible)
continue
statpanel(listed_turf.name,A.name,A)
*/
// facing verbs
@@ -1366,9 +1355,17 @@ mob/proc/yank_out_object()
/mob/proc/setEarDamage()
return
/mob/proc/AddSpell(var/obj/effect/proc_holder/spell/spell)
spell_list += spell
spell.action.Grant(src)
/mob/proc/AddSpell(obj/effect/proc_holder/spell/S)
mob_spell_list += S
S.action.Grant(src)
/mob/proc/RemoveSpell(obj/effect/proc_holder/spell/spell) //To remove a specific spell from a mind
if(!spell)
return
for(var/obj/effect/proc_holder/spell/S in mob_spell_list)
if(istype(S, spell))
qdel(S)
mob_spell_list -= S
//override to avoid rotating pixel_xy on mobs
/mob/shuttleRotate(rotation)
+23 -41
View File
@@ -2,15 +2,11 @@
density = 1
layer = 4.0
animate_movement = 2
// flags = NOREACT
pressure_resistance = 8
var/datum/mind/mind
var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak
//Not in use yet
var/obj/effect/organstructure/organStructure = null
var/obj/screen/hands = null
var/obj/screen/pullin = null
var/obj/screen/i_select = null
@@ -34,11 +30,9 @@
var/lastattacker = null
var/lastattacked = null
var/attack_log = list( )
var/already_placed = 0.0
var/obj/machinery/machine = null
var/other_mobs = null
var/memory = ""
var/poll_answer = 0.0
var/sdisabilities = 0 //Carbon
var/disabilities = 0 //Carbon
var/atom/movable/pulling = null
@@ -46,12 +40,12 @@
var/notransform = null //Carbon
var/other = 0.0
var/hand = null
var/eye_blind = null //Carbon
var/eye_blurry = null //Carbon
var/ear_deaf = null //Carbon
var/ear_damage = null //Carbon
var/stuttering = null //Carbon
var/slurring = null //Carbon
var/eye_blind = 0 //Carbon
var/eye_blurry = 0 //Carbon
var/ear_deaf = 0 //Carbon
var/ear_damage = 0 //Carbon
var/stuttering = 0 //Carbon
var/slurring = 0 //Carbon
var/real_name = null
var/flavor_text = ""
var/med_record = ""
@@ -63,8 +57,6 @@
var/druggy = 0 //Carbon
var/confused = 0 //Carbon
var/drunk = 0
var/antitoxs = null
var/plasma = null
var/sleeping = 0 //Carbon
var/resting = 0 //Carbon
var/lying = 0
@@ -95,11 +87,11 @@
var/nutrition = 400.0//Carbon
var/overeatduration = 0 // How long this guy is overeating //Carbon
var/paralysis = 0.0
var/stunned = 0.0
var/weakened = 0.0
var/paralysis = 0
var/stunned = 0
var/weakened = 0
var/slowed = 0
var/losebreath = 0.0//Carbon
var/losebreath = 0 //Carbon
var/intent = null//Living
var/shakecamera = 0
var/a_intent = I_HELP//Living
@@ -123,8 +115,8 @@
var/research_scanner = 0 //For research scanner equipped mobs. Enable to show research data when examining.
var/list/grabbed_by = list( )
var/list/requests = list( )
var/list/grabbed_by = list()
var/list/requests = list()
var/list/mapobjs = list()
@@ -134,17 +126,10 @@
var/emote_cd = 0 // Used to supress emote spamming. 1 if on CD, 2 if disabled by admin (manually set), else 0
var/music_lastplayed = "null"
var/job = null//Living
var/const/blindness = 1//Carbon
var/const/deafness = 2//Carbon
var/const/muteness = 4//Carbon
var/datum/dna/dna = null//Carbon
var/radiation = 0.0//Carbon
var/radiation = 0 //Carbon
var/list/mutations = list() //Carbon -- Doohl
//see: setup.dm for list of mutations
@@ -157,24 +142,24 @@
var/has_enabled_antagHUD = 0
var/antagHUD = 0
//Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed.
var/proc_holder_list[] = list()//Right now unused.
//Also unlike the spell list, this would only store the object in contents, not an object in itself.
/* Add this line to whatever stat module you need in order to use the proc holder list.
//Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed.
var/proc_holder_list[] = list()
/* //Also unlike the spell list, this would only store the object in contents, not an object in itself.
Add this line to whatever stat module you need in order to use the proc holder list.
Unlike the object spell system, it's also possible to attach verb procs from these objects to right-click menus.
This requires creating a verb for the object proc holder.
if(proc_holder_list.len)//Generic list for proc_holder objects.
for(var/obj/effect/proc_holder/P in proc_holder_list)
statpanel("[P.panel]","",P)
*/
statpanel("[P.panel]","",P)*/
//The last mob/living/carbon to push/drag/grab this mob (mostly used by slimes friend recognition)
var/mob/living/carbon/LAssailant = null
//Wizard mode, but can be used in other modes thanks to the brand new "Give Spell" badmin button
var/obj/effect/proc_holder/spell/list/spell_list = list()
var/list/mob_spell_list = list() //construct spells and mime spells. Spells that do not transfer from one mob to another and can not be lost in mindswap.
//Changlings, but can be used in other modes
// var/obj/effect/proc_holder/changpower/list/power_list = list()
@@ -195,9 +180,6 @@
var/has_unlimited_silicon_privilege = 0 // Can they interact with station electronics
var/list/radar_blips = list() // list of screen objects, radar blips
var/radar_open = 0 // nonzero is radar is open
var/atom/movable/remote_control //Calls relaymove() to whatever it is
var/remote_view = 0 // Set to 1 to prevent view resets on Life
@@ -219,11 +201,11 @@
var/turf/listed_turf = null //the current turf being examined in the stat panel
var/list/shouldnt_see = list(/atom/movable/lighting_overlay) //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes
var/kills=0
var/kills = 0
var/stance_damage = 0 //Whether this mob's ability to stand has been affected
var/list/active_genes=list()
var/list/active_genes = list()
var/last_movement = -100 // Last world.time the mob actually moved of its own accord.
+3 -3
View File
@@ -4,9 +4,9 @@
/mob/spirit/mask/New()
..()
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/create_talisman(src))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/blood_speech(src))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/shatter_lights(src))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/create_talisman(null))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/blood_speech(null))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/shatter_lights(null))
/mob/spirit/mask/verb/go_to_follower()
-6
View File
@@ -12,8 +12,6 @@ mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0
return
if(reagents.has_reagent("hydrocodone"))
return
if(analgesic)
return
if(world.time < next_pain_time && !force)
return
if(amount > 10 && istype(src,/mob/living/carbon/human))
@@ -55,8 +53,6 @@ mob/living/carbon/human/proc/custom_pain(var/message, var/flash_strength)
return
if(reagents.has_reagent("hydrocodone"))
return
if(analgesic)
return
var/msg = "\red <b>[message]</b>"
if(flash_strength >= 1)
msg = "\red <font size=3><b>[message]</b></font>"
@@ -94,8 +90,6 @@ mob/living/carbon/human/proc/handle_pain()
return
if(reagents.has_reagent("hydrocodone"))
return
if(analgesic)
return
var/maxdam = 0
var/obj/item/organ/external/damaged_organ = null
for(var/obj/item/organ/external/E in organs)