mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 12:04:48 +01:00
Cleanup of all the update_clothing() calls.
Mostly I replaced them with rebuild_appearance() or update_body_appearance() where suitable. I also reorganized the new update_clothing() code a bit.
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
O.update_body()
|
||||
O.update_face()
|
||||
spawn(1)
|
||||
O.update_clothing()
|
||||
O.rebuild_appearance()
|
||||
O << "<B>You are now a Tajara.</B>"
|
||||
spawn(0)//To prevent the proc from returning null.
|
||||
del(src)
|
||||
|
||||
@@ -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!"
|
||||
|
||||
..()
|
||||
|
||||
@@ -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)
|
||||
|
||||
+6
-12
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()]\] <font color='orange'>Has been smashed on a table by [G.assailant.name] ([G.assailant.ckey])</font>")
|
||||
@@ -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
|
||||
|
||||
@@ -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!")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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!"
|
||||
|
||||
|
||||
|
||||
@@ -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!"
|
||||
|
||||
|
||||
|
||||
@@ -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!"
|
||||
..()
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/carbon/alien/humanoid/Login()
|
||||
..()
|
||||
|
||||
update_clothing()
|
||||
rebuild_appearance()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
|
||||
@@ -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!"
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
..()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/carbon/alien/larva/Login()
|
||||
..()
|
||||
|
||||
update_clothing()
|
||||
rebuild_appearance()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
remove_special_verbs()
|
||||
|
||||
update_clothing()
|
||||
rebuild_appearance()
|
||||
|
||||
death(gibbed)
|
||||
..()
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -70,5 +70,4 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has tried to disarm []!</B>", M, src), 1)
|
||||
update_clothing()
|
||||
return
|
||||
@@ -211,7 +211,6 @@
|
||||
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("\red <B>[M] attempted to disarm [src]!</B>")
|
||||
update_clothing()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params)
|
||||
|
||||
@@ -20,5 +20,4 @@
|
||||
src = null
|
||||
src = H.monkeyize()
|
||||
contract_disease(D,1,0)
|
||||
update_clothing()
|
||||
return
|
||||
|
||||
@@ -68,5 +68,4 @@
|
||||
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
update_clothing()
|
||||
return 1
|
||||
@@ -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()
|
||||
UpdateDamageIcon()
|
||||
@@ -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 << "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!")
|
||||
else if(shock_stage == 80)
|
||||
src << "<font color='red'><b>"+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.")
|
||||
src << "<font color='red'><b>"+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()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/carbon/human/Login()
|
||||
..()
|
||||
|
||||
update_clothing()
|
||||
rebuild_appearance()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/carbon/metroid/Login()
|
||||
..()
|
||||
|
||||
update_clothing()
|
||||
rebuild_appearance()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
real_name = name
|
||||
spawn (1)
|
||||
update_clothing()
|
||||
rebuild_appearance()
|
||||
src << "\blue Your icons have been generated!"
|
||||
..()
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/carbon/monkey/Login()
|
||||
..()
|
||||
|
||||
update_clothing()
|
||||
rebuild_appearance()
|
||||
/*
|
||||
if (!( src.primary ))
|
||||
var/t1 = rand(1000, 1500)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/silicon/robot/Login()
|
||||
..()
|
||||
|
||||
update_clothing()
|
||||
rebuild_appearance()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
|
||||
+23
-4
@@ -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
|
||||
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.
|
||||
..()
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user