diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/tajara_transformation.dm b/code/WorkInProgress/Cael_Aislinn/Tajara/tajara_transformation.dm
index c8906cf31df..bc1c6750dab 100644
--- a/code/WorkInProgress/Cael_Aislinn/Tajara/tajara_transformation.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Tajara/tajara_transformation.dm
@@ -55,7 +55,7 @@
O.update_body()
O.update_face()
spawn(1)
- O.update_clothing()
+ O.rebuild_appearance()
O << "You are now a Tajara."
spawn(0)//To prevent the proc from returning null.
del(src)
diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm
index 1f80c190dd1..20162ef639d 100644
--- a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm
@@ -22,7 +22,7 @@
if(!lying_icon)
lying_icon = new /icon('tajaran.dmi', "body_[g]_l")
icon = stand_icon
- update_clothing()
+ rebuild_appearance()
src << "\blue Your icons have been generated!"
..()
diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm
index d06540f18e2..be85dacac69 100644
--- a/code/game/atom_procs.dm
+++ b/code/game/atom_procs.dm
@@ -338,7 +338,7 @@
del(fingerprints)
if(istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/M = src
- M.update_clothing()
+ M.rebuild_appearance() // both clothes and hands need to be cleaned, so just rebuild all
return
/atom/MouseDrop(atom/over_object as mob|obj|turf|area)
diff --git a/code/game/dna.dm b/code/game/dna.dm
index f10a2f50ced..b5b1b96f979 100644
--- a/code/game/dna.dm
+++ b/code/game/dna.dm
@@ -547,7 +547,7 @@
if (W==H.w_uniform) // will be teared
continue
H.drop_from_slot(W)
- M.update_clothing()
+ M.rebuild_appearance()
M.monkeyizing = 1
M.canmove = 0
M.icon = null
@@ -604,7 +604,7 @@
O.a_intent = "hurt"
O.flavor_text = M.flavor_text
O.warn_flavor_changed()
- O.update_clothing()
+ O.rebuild_appearance()
del(M)
return
@@ -615,7 +615,7 @@
if(!connected)
for(var/obj/item/W in (Mo.contents))
Mo.drop_from_slot(W)
- M.update_clothing()
+ M.rebuild_appearance()
M.monkeyizing = 1
M.canmove = 0
M.icon = null
@@ -681,12 +681,12 @@
O.stat = M.stat
O.flavor_text = M.flavor_text
O.warn_flavor_changed()
- O.update_clothing()
+ O.rebuild_appearance()
del(M)
return
//////////////////////////////////////////////////////////// Monkey Block
if (M)
- M.update_clothing()
+ M.rebuild_appearance()
return null
/////////////////////////// DNA MISC-PROCS
@@ -790,13 +790,7 @@
/obj/machinery/dna_scannernew/proc/go_out()
if ((!( src.occupant ) || src.locked))
return
-/*
-// it's like this was -just- here to break constructed dna scanners -Pete
-// if that's not the case, slap my shit and uncomment this.
-// for(var/obj/O in src)
-// O.loc = src.loc
-*/
- //Foreach goto(30)
+
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm
index 0d0bea60a79..a843cb12441 100644
--- a/code/game/gamemodes/changeling/changeling_powers.dm
+++ b/code/game/gamemodes/changeling/changeling_powers.dm
@@ -260,7 +260,7 @@
if (istype(W, /obj/item/weapon/implant))
implants += W
- usr.update_clothing()
+ usr.rebuild_appearance()
usr.monkeyizing = 1
usr.canmove = 0
usr.icon = null
@@ -346,7 +346,7 @@
for (var/obj/item/weapon/implant/I in usr) //Still preserving implants
implants += I
- usr.update_clothing()
+ usr.rebuild_appearance()
usr.monkeyizing = 1
usr.canmove = 0
usr.icon = null
@@ -414,7 +414,7 @@
return
for(var/obj/item/W in src)
usr.drop_from_slot(W)
- usr.update_clothing()
+ usr.rebuild_appearance()
usr.monkeyizing = 1
usr.canmove = 0
usr.icon = null
diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm
index 429fe4be8d2..f519b02625d 100644
--- a/code/game/machinery/OpTable.dm
+++ b/code/game/machinery/OpTable.dm
@@ -105,7 +105,7 @@
icon_state = "table2-active"
return 1
if(victim)
- victim.update_clothing()
+ victim.update_lying()
victim = null
if(updatesicon)
icon_state = "table2-idle"
@@ -134,7 +134,7 @@
if(updatesicon)
icon_state = "table2-active"
src.victim = M
- M.update_clothing()
+ M.update_lying()
processing_objects.Add(src)
del(W)
return
diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm
index ff74b59b712..f0cb70659c3 100644
--- a/code/game/machinery/computer/HolodeckControl.dm
+++ b/code/game/machinery/computer/HolodeckControl.dm
@@ -371,7 +371,6 @@
"\red You hear a whine as \the [src]'s is hit by something dense.")
H.UpdateDamageIcon()
H.updatehealth()
- H.update_clothing()
playsound(src.loc, 'tablehit1.ogg', 50, 1, -3)
else //Lets do REAL DAMAGE, YEAH!
G.affecting.attack_log += text("\[[time_stamp()]\] Has been smashed on a table by [G.assailant.name] ([G.assailant.ckey])")
@@ -410,7 +409,6 @@
"\red You hear the nauseating crunch of bone and gristle on solid metal.")
H.UpdateDamageIcon()
H.updatehealth()
- H.update_clothing()
playsound(src.loc, 'tablehit1.ogg', 50, 1, -3)
return
G.affecting.loc = src.loc
diff --git a/code/game/magic/cultist/runes.dm b/code/game/magic/cultist/runes.dm
index fda0744c647..715c8db6489 100644
--- a/code/game/magic/cultist/runes.dm
+++ b/code/game/magic/cultist/runes.dm
@@ -795,7 +795,7 @@ var/list/sacrificed = list()
return fizzle()
cultist.loc = src.loc
cultist.lying = 1
- cultist.update_clothing()
+ cultist.update_lying()
for(var/mob/living/carbon/human/C in orange(1,src))
if(iscultist(C))
C.say("N'ath reth sh'yro eth d'rekkathnor!")
diff --git a/code/game/objects/alien/facehugger.dm b/code/game/objects/alien/facehugger.dm
index 3c35491fa39..1d8dac0c224 100644
--- a/code/game/objects/alien/facehugger.dm
+++ b/code/game/objects/alien/facehugger.dm
@@ -150,7 +150,7 @@ var/const
layer = 20
target.wear_mask = src
- target.update_clothing()
+ target.rebuild_appearance()
GoIdle() //so it doesn't jump the people that tear it off
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 2065a50acd7..51a56b40af1 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -8,7 +8,6 @@
/obj/item/weapon/bedsheet/attack_self(mob/user as mob)
user.drop_item()
src.layer = 5
- user.update_clothing()
add_fingerprint(user)
return
diff --git a/code/game/objects/stool.dm b/code/game/objects/stool.dm
index 00849d24d2c..6a4a9b1caeb 100644
--- a/code/game/objects/stool.dm
+++ b/code/game/objects/stool.dm
@@ -184,7 +184,7 @@
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat || M.buckled || istype(usr, /mob/living/silicon/pai)))
return
M.pixel_y = 6
- M.update_clothing()
+ M.update_lying()
density = 1
icon_state = "up"
..()
diff --git a/code/game/objects/tables_racks.dm b/code/game/objects/tables_racks.dm
index fef13487454..451208b164f 100644
--- a/code/game/objects/tables_racks.dm
+++ b/code/game/objects/tables_racks.dm
@@ -111,16 +111,6 @@ TABLE AND RACK OBJECT INTERATIONS
new /obj/item/weapon/table_parts( src.loc )
src.density = 0
del(src)
-/* if (user.mutations2 & mSmallsize)
- step(user, get_dir(user, src))
- if (user.loc == src.loc)
- user.layer = TURF_LAYER
- user.update_clothing()
- for(var/mob/M in viewers(user, null))
- M.show_message("[user] hides under the table!", 1)
- //Foreach goto(69)
- */
-//Googol never tested this shit.
return
@@ -189,7 +179,6 @@ TABLE AND RACK OBJECT INTERATIONS
"\red You hear the nauseating crunch of bone and gristle on solid metal.")
H.UpdateDamageIcon()
H.updatehealth()
- H.update_clothing()
playsound(src.loc, 'tablehit1.ogg', 50, 1, -3)
return
G.affecting.loc = src.loc
diff --git a/code/game/response_team.dm b/code/game/response_team.dm
index 2ab9c5416c9..848cc1a6c3a 100644
--- a/code/game/response_team.dm
+++ b/code/game/response_team.dm
@@ -170,9 +170,7 @@ proc/trigger_armed_response_team(var/force = 0)
M.gender = MALE
else
M.gender = FEMALE
- M.update_body()
- M.update_face()
- M.update_clothing()
+ M.rebuild_appearance()
M.real_name = commando_name
M.name = commando_name
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 186fadd0ee8..2052684c922 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -863,8 +863,7 @@
return
src.admin_invis =! src.admin_invis
if(src.mob)
- var/mob/m = src.mob//probably don't need this cast, but I'm too lazy to check if /client.mob is of type /mob or not
- m.update_clothing()
+ mob.rebuild_appearance()
log_admin("[key_name(usr)] has turned their invisibility [src.admin_invis ? "ON" : "OFF"]")
message_admins("[key_name_admin(usr)] has turned their invisibility [src.admin_invis ? "ON" : "OFF"]", 1)
@@ -971,9 +970,7 @@
M.gender = MALE
else
M.gender = FEMALE
- M.update_body()
- M.update_face()
- M.update_clothing()
+ M.rebuild_appearance()
M.check_dna(M)
diff --git a/code/modules/chemical/Chemistry-Tools.dm b/code/modules/chemical/Chemistry-Tools.dm
index 5135238bab6..176486c01f7 100644
--- a/code/modules/chemical/Chemistry-Tools.dm
+++ b/code/modules/chemical/Chemistry-Tools.dm
@@ -1583,6 +1583,7 @@
del(src)
spawn(5)
user.update_clothing()
+
playsound(M.loc,'eatfood.ogg', rand(10,50), 1)
return 1
else if(istype(M, /mob/living/simple_animal/livestock))
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
index 64274d21912..ceb8536feab 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
@@ -13,7 +13,7 @@
src.resting_icon = new /icon('alien.dmi', "aliend_sleep")
src.running_icon = new /icon('alien.dmi', "aliend_running")
src.icon = src.stand_icon
- update_clothing()
+ rebuild_appearance()
src << "\blue Your icons have been generated!"
//Drones use the same base as generic humanoids.
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
index 0c156b04320..953dd4a9814 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
@@ -12,7 +12,7 @@
src.resting_icon = new /icon('alien.dmi', "alienh_sleep")
src.running_icon = new /icon('alien.dmi', "alienh_running")
src.icon = src.stand_icon
- update_clothing()
+ rebuild_appearance()
src << "\blue Your icons have been generated!"
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm
index 3c4e0a5a17d..b0222d60c9e 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm
@@ -12,7 +12,7 @@
src.resting_icon = new /icon('alien.dmi', "aliens_sleep")
src.running_icon = new /icon('alien.dmi', "aliens_running")
src.icon = src.stand_icon
- update_clothing()
+ rebuild_appearance()
src << "\blue Your icons have been generated!"
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
index bd1da4e2990..ebd92e8a867 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
@@ -13,7 +13,7 @@
resting_icon = new /icon('alien.dmi', "alienh_sleep")
running_icon = new /icon('alien.dmi', "alienh_running")
icon = stand_icon
- update_clothing()
+ rebuild_appearance()
src << "\blue Your icons have been generated!"
..()
diff --git a/code/modules/mob/living/carbon/alien/humanoid/login.dm b/code/modules/mob/living/carbon/alien/humanoid/login.dm
index 52359b7e59b..188785a9bbe 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/login.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/login.dm
@@ -1,7 +1,7 @@
/mob/living/carbon/alien/humanoid/Login()
..()
- update_clothing()
+ rebuild_appearance()
if (!isturf(src.loc))
src.client.eye = src.loc
diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
index 2924f5b9b89..a4a620eb91b 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
@@ -15,7 +15,7 @@
src.resting_icon = new /icon('alien.dmi', "queen_sleep")
src.running_icon = new /icon('alien.dmi', "queen_running")
src.icon = src.stand_icon
- update_clothing()
+ rebuild_appearance()
src << "\blue Your icons have been generated!"
diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm
index 5e0a8156a7b..f2825bde7a6 100644
--- a/code/modules/mob/living/carbon/alien/larva/larva.dm
+++ b/code/modules/mob/living/carbon/alien/larva/larva.dm
@@ -7,7 +7,7 @@
name = text("alien larva ([rand(1, 1000)])")
real_name = name
spawn (1)
- update_clothing()
+ rebuild_appearance()
src << "\blue Your icons have been generated!"
// spawn(1200) grow() Grow after 120 seconds -- TLE Commented out because life.dm has better version -- Urist
..()
diff --git a/code/modules/mob/living/carbon/alien/larva/login.dm b/code/modules/mob/living/carbon/alien/larva/login.dm
index e23cb0c122e..132915a70fa 100644
--- a/code/modules/mob/living/carbon/alien/larva/login.dm
+++ b/code/modules/mob/living/carbon/alien/larva/login.dm
@@ -1,7 +1,7 @@
/mob/living/carbon/alien/larva/Login()
..()
- update_clothing()
+ rebuild_appearance()
if (!isturf(src.loc))
src.client.eye = src.loc
diff --git a/code/modules/mob/living/carbon/alien/special/_main.dm b/code/modules/mob/living/carbon/alien/special/_main.dm
index 3d06fe82ac3..eb5594f3c9e 100644
--- a/code/modules/mob/living/carbon/alien/special/_main.dm
+++ b/code/modules/mob/living/carbon/alien/special/_main.dm
@@ -25,7 +25,7 @@
remove_special_verbs()
- update_clothing()
+ rebuild_appearance()
death(gibbed)
..()
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 06ca0bdd5e5..7d66c71ddbe 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -133,14 +133,13 @@
stand_icon = new /icon('human.dmi', "body_[g]_s")
lying_icon = new /icon('human.dmi', "body_[g]_l")
icon = stand_icon
- update_clothing()
+ rebuild_appearance()
src << "\blue Your icons have been generated!"
spawn(10) // Failsafe for.. weirdness.
- update_clothing()
- update_body()
+ rebuild_appearance()
vessel = new/datum/reagents(600)
vessel.my_atom = src
@@ -151,8 +150,7 @@
..()
spawn(5) // Failsafe for.. weirdness.
- update_clothing()
- update_body()
+ rebuild_appearance()
/*var/known_languages = list()
known_languages.Add("english")*/
@@ -918,6 +916,10 @@
body_overlays_lying += body_lying
body_overlays_standing += body_standing
+ // face_lying and face_standing are the face icons, not a flag
+ body_overlays_lying += face_standing // yes, the vars are named wrong, I didn't do it -- CIB
+ body_overlays_standing += face_lying
+
/mob/living/carbon/human/proc/rebuild_clothing_overlays()
@@ -1158,58 +1160,6 @@
last_b_state = stat
-
-/mob/living/carbon/human/proc/handle_clothing()
- // Non-visual stuff that was in update_clothing()
-
- if(buckled)
- if(istype(buckled, /obj/structure/stool/bed/chair))
- lying = 0
- else
- lying = 1
-
- if(!w_uniform)
- // Automatically drop anything in store / id / belt if you're not wearing a uniform.
- for (var/obj/item/thing in list(r_store, l_store, wear_id, belt))
- if (thing)
- u_equip(thing)
- if (client)
- client.screen -= thing
- if (thing)
- thing.loc = loc
- thing.dropped(src)
- thing.layer = initial(thing.layer)
-
- // Why this stuff was in handle_clothing() is beyond me
- var/shielded = 0
- for (var/obj/item/weapon/cloaking_device/S in src)
- if (S.active)
- shielded = 2
- break
-
- if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_active)
- shielded = 3
- switch(shielded)
- if(1)
- if(2)
- invisibility = 2
- //New stealth. Hopefully doesn't lag too much. /N
- if(istype(loc, /turf))//If they are standing on a turf.
- AddCamoOverlay(loc)//Overlay camo.
- if(3)
- if(istype(loc, /turf))
- //Ninjas may flick into view once in a while if they are stealthed.
- if(prob(90))
- NinjaStealthActive(loc)
- else
- NinjaStealthMalf()
- else
- invisibility = 0
-
- // WHY IS THIS IN UPDATE_CLOTHING?!?!
- name = get_visible_name()
-
-
/mob/living/carbon/human/proc/misc_clothing_updates()
// Temporary proc to shove stuff in that was put into update_clothing()
// for questionable reasons
@@ -1268,20 +1218,11 @@
icon = lying_icon
overlays += body_overlays_standing
- // What is this for?
- if (face_lying)
- overlays += face_lying
-
-
if(!lying)
icon = stand_icon
overlays += body_overlays_lying
- // What is this for?
- if (face_standing)
- overlays += face_standing
-
overlays += clothing_overlays
@@ -2739,9 +2680,7 @@ It can still be worn/put on as normal.
gender = MALE
else
gender = FEMALE
- update_body()
- update_face()
- update_clothing()
+ rebuild_appearance()
check_dna()
for(var/mob/M in view())
diff --git a/code/modules/mob/living/carbon/human/human_attackalien.dm b/code/modules/mob/living/carbon/human/human_attackalien.dm
index 1f82eb28591..09cb279b540 100644
--- a/code/modules/mob/living/carbon/human/human_attackalien.dm
+++ b/code/modules/mob/living/carbon/human/human_attackalien.dm
@@ -70,5 +70,4 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has tried to disarm []!", M, src), 1)
- update_clothing()
return
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm
index 0e4eef42825..51ed7966208 100644
--- a/code/modules/mob/living/carbon/human/human_attackhand.dm
+++ b/code/modules/mob/living/carbon/human/human_attackhand.dm
@@ -211,7 +211,6 @@
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
visible_message("\red [M] attempted to disarm [src]!")
- update_clothing()
return
/mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params)
diff --git a/code/modules/mob/living/carbon/human/human_attackpaw.dm b/code/modules/mob/living/carbon/human/human_attackpaw.dm
index 568ca9969d5..8d01ca3e8f2 100644
--- a/code/modules/mob/living/carbon/human/human_attackpaw.dm
+++ b/code/modules/mob/living/carbon/human/human_attackpaw.dm
@@ -20,5 +20,4 @@
src = null
src = H.monkeyize()
contract_disease(D,1,0)
- update_clothing()
return
diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm
index bfa163f82e6..528dc9028f3 100644
--- a/code/modules/mob/living/carbon/human/human_damage.dm
+++ b/code/modules/mob/living/carbon/human/human_damage.dm
@@ -68,5 +68,4 @@
UpdateDamageIcon()
updatehealth()
- update_clothing()
return 1
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index df20678c13d..83aa059fb88 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -197,5 +197,4 @@ emp_act
if(src.wear_suit) src.wear_suit.add_blood(src)
if(src.w_uniform) src.w_uniform.add_blood(src)
- UpdateDamageIcon()
- update_clothing()
\ No newline at end of file
+ UpdateDamageIcon()
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 4e705911348..209837df96a 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -29,18 +29,18 @@
//Being buckled to a chair or bed
check_if_buckled()
+ handle_clothing()
- // Update clothing
-// update_clothing()
+ // TODO: this check and the lyingcheck variable should probably be removed in favor of the visual_lying check
if((lyingcheck != lying) || (buckle_check != (buckled ? 1 : 0))) //This is a fix for falling down / standing up not updating icons. Instead of going through and changing every
spawn(5)
- update_clothing() //instance in the code where lying is modified, I've just added a new variable "lyingcheck" which will be compared
+ update_lying() //instance in the code where lying is modified, I've just added a new variable "lyingcheck" which will be compared
lyingcheck = lying //to lying, so if lying ever changes, update_clothing() will run like normal.
if(stat == 2)
- if((!lying || !lyingcheck) && !buckled)
+ if(!lying && !buckled)
lying = 1
- update_clothing()
+ update_lying()
return
life_tick++
@@ -137,7 +137,7 @@
if (stat != 0)
if(!lying)
lying = 1 //Seriously, stay down :x
- update_clothing()
+ update_lying()
@@ -1489,4 +1489,54 @@
else if(shock_stage == 40)
src << ""+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!")
else if(shock_stage == 80)
- src << ""+pick("You see a light at the end of the tunnel!", "You feel like you could die any moment now.", "You're about to lose consciousness.")
\ No newline at end of file
+ src << ""+pick("You see a light at the end of the tunnel!", "You feel like you could die any moment now.", "You're about to lose consciousness.")
+
+
+/mob/living/carbon/human/proc/handle_clothing()
+ // Non-visual stuff that was in update_clothing()
+
+ if(buckled)
+ if(istype(buckled, /obj/structure/stool/bed/chair))
+ lying = 0
+ else
+ lying = 1
+
+ if(!w_uniform)
+ // Automatically drop anything in store / id / belt if you're not wearing a uniform.
+ for (var/obj/item/thing in list(r_store, l_store, wear_id, belt))
+ if (thing)
+ u_equip(thing)
+ if (client)
+ client.screen -= thing
+ if (thing)
+ thing.loc = loc
+ thing.dropped(src)
+ thing.layer = initial(thing.layer)
+
+ // Why this stuff was in handle_clothing() is beyond me
+ var/shielded = 0
+ for (var/obj/item/weapon/cloaking_device/S in src)
+ if (S.active)
+ shielded = 2
+ break
+
+ if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_active)
+ shielded = 3
+ switch(shielded)
+ if(1)
+ if(2)
+ invisibility = 2
+ //New stealth. Hopefully doesn't lag too much. /N
+ if(istype(loc, /turf))//If they are standing on a turf.
+ AddCamoOverlay(loc)//Overlay camo.
+ if(3)
+ if(istype(loc, /turf))
+ //Ninjas may flick into view once in a while if they are stealthed.
+ if(prob(90))
+ NinjaStealthActive(loc)
+ else
+ NinjaStealthMalf()
+ else
+ invisibility = 0
+
+ name = get_visible_name()
diff --git a/code/modules/mob/living/carbon/human/login.dm b/code/modules/mob/living/carbon/human/login.dm
index 6bbbc532d27..78cf259a7cd 100644
--- a/code/modules/mob/living/carbon/human/login.dm
+++ b/code/modules/mob/living/carbon/human/login.dm
@@ -1,7 +1,7 @@
/mob/living/carbon/human/Login()
..()
- update_clothing()
+ rebuild_appearance()
if (!isturf(src.loc))
src.client.eye = src.loc
diff --git a/code/modules/mob/living/carbon/metroid/login.dm b/code/modules/mob/living/carbon/metroid/login.dm
index 6b696c8a516..e954e353e76 100644
--- a/code/modules/mob/living/carbon/metroid/login.dm
+++ b/code/modules/mob/living/carbon/metroid/login.dm
@@ -1,7 +1,7 @@
/mob/living/carbon/metroid/Login()
..()
- update_clothing()
+ rebuild_appearance()
if (!isturf(src.loc))
src.client.eye = src.loc
diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm
index 912b88aa8c4..3e4a0c3b0b4 100644
--- a/code/modules/mob/living/carbon/metroid/metroid.dm
+++ b/code/modules/mob/living/carbon/metroid/metroid.dm
@@ -9,7 +9,7 @@
real_name = name
spawn (1)
- update_clothing()
+ rebuild_appearance()
src << "\blue Your icons have been generated!"
..()
diff --git a/code/modules/mob/living/carbon/monkey/login.dm b/code/modules/mob/living/carbon/monkey/login.dm
index 9f24a42fec6..1fb31db3874 100644
--- a/code/modules/mob/living/carbon/monkey/login.dm
+++ b/code/modules/mob/living/carbon/monkey/login.dm
@@ -1,7 +1,7 @@
/mob/living/carbon/monkey/Login()
..()
- update_clothing()
+ rebuild_appearance()
/*
if (!( src.primary ))
var/t1 = rand(1000, 1500)
diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm
index 688ad10eafc..6ac4b83c0b4 100644
--- a/code/modules/mob/living/carbon/monkey/monkey.dm
+++ b/code/modules/mob/living/carbon/monkey/monkey.dm
@@ -69,7 +69,7 @@
if(!lying_icon)
lying_icon = new /icon('monkey.dmi', "monkey0")
icon = stand_icon
- update_clothing()
+ rebuild_appearance()
src << "\blue Your icons have been generated!"
..()
@@ -928,7 +928,6 @@
UpdateDamageIcon()
updatehealth()
- update_clothing()
return 1
/*/mob/living/carbon/monkey/UpdateDamageIcon()
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 94cdf647bdf..aa829b0930e 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -29,22 +29,6 @@
src.health = 100
src.stat = 0
-/mob/living/proc/rebuild_appearance()
- // Rebuild the entire mob appearance completely, this should ONLY be called in rare cases,
- // e.g. when the mob spawns.
-
-/mob/living/proc/update_body_appearance()
- // Call this proc whenever something about the appearance of the body itself changes.
- // For example, this must be called when you add a wound to a mob.
-
-/mob/living/proc/update_lying()
- // Call this whenever the lying status of a mob changes.
-
-/mob/living/update_clothing()
- // Call this proc whenever something about the clothing of a mob changes. Normally, you
- // don't need to call this by hand, as the equip procs will do it for you.
- ..()
-
//sort of a legacy burn method for /electrocute, /shock, and the e_chair
/mob/living/proc/burn_skin(burn_amount, used_weapon = null)
diff --git a/code/modules/mob/living/parasite/meme.dm b/code/modules/mob/living/parasite/meme.dm
index e3d7b53d467..c3c65b9911f 100644
--- a/code/modules/mob/living/parasite/meme.dm
+++ b/code/modules/mob/living/parasite/meme.dm
@@ -498,7 +498,6 @@ mob/living/parasite/meme/verb/Analgesic()
mob/proc/clearHUD()
- update_clothing()
if(client) client.screen.Cut()
// Take control of the mob
diff --git a/code/modules/mob/living/silicon/ai/login.dm b/code/modules/mob/living/silicon/ai/login.dm
index 959a83abcf3..7a294615bf3 100644
--- a/code/modules/mob/living/silicon/ai/login.dm
+++ b/code/modules/mob/living/silicon/ai/login.dm
@@ -1,6 +1,6 @@
/mob/living/silicon/ai/Login()
..()
- update_clothing()
+ rebuild_appearance()
for(var/S in src.client.screen)
del(S)
src.flash = new /obj/screen( null )
diff --git a/code/modules/mob/living/silicon/robot/login.dm b/code/modules/mob/living/silicon/robot/login.dm
index 1127d6bebb7..728112e394e 100644
--- a/code/modules/mob/living/silicon/robot/login.dm
+++ b/code/modules/mob/living/silicon/robot/login.dm
@@ -1,7 +1,7 @@
/mob/living/silicon/robot/Login()
..()
- update_clothing()
+ rebuild_appearance()
if (!isturf(src.loc))
src.client.eye = src.loc
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 13e461c7569..3ff2d4bb1da 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -177,9 +177,6 @@
item.loc = null
item.layer = initial(item.layer)
u_equip(item)
- //if (client)
- // client.screen -= item
- //update_clothing()
return
/mob/proc/get_active_hand()
@@ -1151,4 +1148,26 @@ note dizziness decrements automatically in the mob's Life() proc.
for(var/file in args)
src << browse_rsc(file)
return 1
- return 0
\ No newline at end of file
+ return 0
+
+
+/** The stuff below here really should be in /mob/living, but due to tons of procs that should only
+ take /mob/living only taking /mob(or, indeed, some silly procs relying on usr.. yes, *procs*, not verbs..),
+ I'm putting this stuff into /mob for now
+**/
+/mob/proc/rebuild_appearance()
+ // Rebuild the entire mob appearance completely, this should ONLY be called in rare cases,
+ // e.g. when the mob spawns.
+ return update_clothing() // most mobs still implement update_clothing() by simply rebuilding the entire appearance
+
+/mob/proc/update_body_appearance()
+ // Call this proc whenever something about the appearance of the body itself changes.
+ // For example, this must be called when you add a wound to a mob.
+
+/mob/proc/update_lying()
+ // Call this whenever the lying status of a mob changes.
+
+/mob/update_clothing()
+ // Call this proc whenever something about the clothing of a mob changes. Normally, you
+ // don't need to call this by hand, as the equip procs will do it for you.
+ ..()
\ No newline at end of file
diff --git a/code/modules/mob/organ/organ.dm b/code/modules/mob/organ/organ.dm
index 4070542e6c7..bd2d15bfc9d 100644
--- a/code/modules/mob/organ/organ.dm
+++ b/code/modules/mob/organ/organ.dm
@@ -235,7 +235,8 @@
var/datum/autopsy_data/W = autopsy_data[V]
del W
autopsy_data = list()
- return update_icon()
+ var/result = update_icon()
+ return result
proc/add_wound(var/used_weapon, var/damage)
var/datum/autopsy_data/W = autopsy_data[used_weapon]
@@ -248,6 +249,7 @@
W.damage += damage
W.time_inflicted = world.time
+ owner.update_body_appearance()
proc/get_damage() //returns total damage
@@ -314,6 +316,7 @@
var/n_is = damage_state_text()
if (n_is != damage_state)
damage_state = n_is
+ owner.update_body_appearance() // I'm not sure about this, Sky probably knows better where to put it
return 1
return 0
@@ -412,7 +415,7 @@
for(var/datum/organ/wound/W in wounds)
W.update_health()
del(W)
- owner.update_body()
+ owner.update_body_appearance()
owner.update_clothing()
proc/createwound(var/size = 1, var/type = 0, var/damage)
diff --git a/code/modules/mob/simple_animal/corgi.dm b/code/modules/mob/simple_animal/corgi.dm
index 2461e55f6e6..504c81d8faa 100644
--- a/code/modules/mob/simple_animal/corgi.dm
+++ b/code/modules/mob/simple_animal/corgi.dm
@@ -47,7 +47,7 @@
/mob/living/simple_animal/corgi/Life()
..()
- update_clothing()
+ rebuild_appearance()
/mob/living/simple_animal/corgi/show_inv(mob/user as mob)
/*
@@ -182,7 +182,6 @@
usr.drop_item()
item_to_add.loc = src
src.inventory_head = item_to_add
- update_clothing()
//Various hats and items (worn on his head) change Ian's behaviour. His attributes are reset when a HAT is removed.
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index d5575e28ae5..a1e940182ab 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -5,7 +5,7 @@
if (W==w_uniform) // will be teared
continue
drop_from_slot(W)
- update_clothing()
+ rebuild_appearance()
monkeyizing = 1
canmove = 0
stunned = 1
@@ -69,7 +69,7 @@
return
for(var/obj/item/W in src)
drop_from_slot(W)
- update_clothing()
+ rebuild_appearance()
monkeyizing = 1
canmove = 0
icon = null
@@ -156,7 +156,7 @@
return
for(var/obj/item/W in src)
drop_from_slot(W)
- update_clothing()
+ rebuild_appearance()
monkeyizing = 1
canmove = 0
icon = null
@@ -222,7 +222,7 @@
return
for(var/obj/item/W in src)
drop_from_slot(W)
- update_clothing()
+ rebuild_appearance()
monkeyizing = 1
canmove = 0
icon = null
@@ -262,7 +262,7 @@
return
for(var/obj/item/W in src)
drop_from_slot(W)
- update_clothing()
+ rebuild_appearance()
monkeyizing = 1
canmove = 0
icon = null
@@ -313,7 +313,7 @@
return
for(var/obj/item/W in src)
drop_from_slot(W)
- update_clothing()
+ rebuild_appearance()
monkeyizing = 1
canmove = 0
icon = null
@@ -347,7 +347,7 @@
return
for(var/obj/item/W in src)
drop_from_slot(W)
- update_clothing()
+ rebuild_appearance()
monkeyizing = 1
canmove = 0
icon = null
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index e1c1f79d9f8..e6e80ae43de 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -385,7 +385,7 @@ mob/proc
spawn(0) //Make it show the 2 states properly
if(target_locked)
target_locked.icon_state = "locking"
- update_clothing()
+ update_clothing() // update_clothing clears overlays, so this might break stuff
sleep(20)
if(target_locked)
target_locked.icon_state = "locked"
diff --git a/code/modules/projectiles/projectile/change.dm b/code/modules/projectiles/projectile/change.dm
index d6ebe8d9591..ed458e7bbd6 100644
--- a/code/modules/projectiles/projectile/change.dm
+++ b/code/modules/projectiles/projectile/change.dm
@@ -29,23 +29,22 @@
if("monkey")
if (M.monkeyizing)
return
- if(istype(M,/mob/carbon/living/human))
+ if(istype(M,/mob/living/carbon/human))
M:monkeyize()
if("robot")
if (M.monkeyizing)
return
- if(istype(M,/mob/carbon/living/human))
+ if(istype(M,/mob/living/carbon/human))
M:Robotize()
if("metroid")
if (M.monkeyizing)
return
- if(istype(M,/mob/carbon/living/human))
+ if(istype(M,/mob/living/carbon/human))
M:Metroidize()
if("alien")
if (M.monkeyizing)
return
- Alienize
- if(istype(M,/mob/carbon/living/human))
+ if(istype(M,/mob/living/carbon/human))
M:Alienize()
if("human")
if (M.monkeyizing)