mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
U_I Phase 2.0: Code cleanup
Removing calls to update_icons_layers and the like, stubbing them to help track down future calls.
This commit is contained in:
@@ -80,29 +80,33 @@
|
||||
#define BLOCKHEADHAIR 0x20 // Hides the user's hair overlay. Leaves facial hair.
|
||||
#define BLOCKHAIR 0x40 // Hides the user's hair, facial and otherwise.
|
||||
|
||||
// Slots.
|
||||
#define slot_back 1
|
||||
#define slot_wear_mask 2
|
||||
#define slot_handcuffed 3
|
||||
#define slot_l_hand 4
|
||||
#define slot_r_hand 5
|
||||
#define slot_belt 6
|
||||
#define slot_wear_id 7
|
||||
#define slot_l_ear 8
|
||||
#define slot_glasses 9
|
||||
// Slots as numbers //
|
||||
//Hands
|
||||
#define slot_l_hand 1
|
||||
#define slot_r_hand 2 //Some things may reference this, try to keep it here
|
||||
//Shown unless F12 pressed
|
||||
#define slot_back 3
|
||||
#define slot_belt 4
|
||||
#define slot_wear_id 5
|
||||
#define slot_l_store 6
|
||||
#define slot_r_store 7 //Some things may reference this, try to keep it here
|
||||
//Shown when inventory unhidden
|
||||
#define slot_glasses 8
|
||||
#define slot_wear_mask 9
|
||||
#define slot_gloves 10
|
||||
#define slot_head 11
|
||||
#define slot_shoes 12
|
||||
#define slot_wear_suit 13
|
||||
#define slot_w_uniform 14
|
||||
#define slot_l_store 15
|
||||
#define slot_r_store 16
|
||||
#define slot_s_store 17
|
||||
#define slot_in_backpack 18
|
||||
#define slot_legcuffed 19
|
||||
#define slot_r_ear 20
|
||||
#define slot_legs 21
|
||||
#define slot_tie 22
|
||||
#define slot_s_store 15
|
||||
#define slot_l_ear 16
|
||||
#define slot_r_ear 17
|
||||
//Secret slots
|
||||
#define slot_legs 18
|
||||
#define slot_tie 19
|
||||
#define slot_handcuffed 20
|
||||
#define slot_legcuffed 21
|
||||
#define slot_in_backpack 22
|
||||
|
||||
// Inventory slot strings.
|
||||
// since numbers cannot be used as associative list keys.
|
||||
@@ -120,7 +124,7 @@
|
||||
#define slot_head_str "slot_head"
|
||||
#define slot_wear_mask_str "slot_wear_mask"
|
||||
#define slot_handcuffed_str "slot_handcuffed"
|
||||
#define slot_legcuffed_str "slot_legcuffed"
|
||||
#define slot_legcuffed_str "slot_legcuffed"
|
||||
#define slot_wear_mask_str "slot_wear_mask"
|
||||
#define slot_wear_id_str "slot_wear_id"
|
||||
#define slot_gloves_str "slot_gloves"
|
||||
|
||||
@@ -267,5 +267,3 @@
|
||||
|
||||
//Some mob icon layering defines
|
||||
#define BODY_LAYER -100
|
||||
#define BACKPLANE_LAYER -101
|
||||
#define HUD_LAYER -105
|
||||
|
||||
@@ -922,8 +922,8 @@ proc/sort_atoms_by_layer(var/list/atoms)
|
||||
/proc/gen_hud_image(var/file, var/person, var/state, var/plane)
|
||||
var/image/img = image(file, person, state)
|
||||
img.plane = plane //Thanks Byond.
|
||||
img.layer = HUD_LAYER
|
||||
img.appearance_flags = APPEARANCE_UI|KEEP_APART
|
||||
img.layer = MOB_LAYER-0.02
|
||||
img.appearance_flags = APPEARANCE_UI
|
||||
return img
|
||||
|
||||
/**
|
||||
|
||||
@@ -164,6 +164,7 @@ var/list/global_huds = list(
|
||||
|
||||
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
|
||||
var/action_buttons_hidden = 0
|
||||
var/list/slot_info
|
||||
|
||||
datum/hud/New(mob/owner)
|
||||
mymob = owner
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
src.hotkeybuttons = list() //These can be disabled for hotkey users
|
||||
src.slot_info = list()
|
||||
|
||||
var/list/hud_elements = list()
|
||||
var/obj/screen/using
|
||||
@@ -33,6 +34,7 @@
|
||||
inv_box.screen_loc = slot_data["loc"]
|
||||
inv_box.slot_id = slot_data["slot"]
|
||||
inv_box.icon_state = slot_data["state"]
|
||||
slot_info["[inv_box.slot_id]"] = inv_box.screen_loc
|
||||
|
||||
if(slot_data["dir"])
|
||||
inv_box.set_dir(slot_data["dir"])
|
||||
@@ -164,9 +166,9 @@
|
||||
inv_box.slot_id = slot_r_hand
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
|
||||
src.r_hand_hud_object = inv_box
|
||||
src.adding += inv_box
|
||||
slot_info["[slot_r_hand]"] = inv_box.screen_loc
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.hud = src
|
||||
@@ -181,6 +183,7 @@
|
||||
inv_box.alpha = ui_alpha
|
||||
src.l_hand_hud_object = inv_box
|
||||
src.adding += inv_box
|
||||
slot_info["[slot_l_hand]"] = inv_box.screen_loc
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
|
||||
@@ -50,8 +50,6 @@ var/datum/antagonist/mercenary/mercs
|
||||
var/obj/item/device/radio/uplink/U = new(player.loc, player.mind, DEFAULT_TELECRYSTAL_AMOUNT)
|
||||
player.put_in_hands(U)
|
||||
|
||||
player.update_icons_layers()
|
||||
|
||||
create_id("Mercenary", player)
|
||||
create_radio(SYND_FREQ, player)
|
||||
return 1
|
||||
|
||||
@@ -47,7 +47,6 @@ var/datum/antagonist/technomancer/technomancers
|
||||
technomancer_mob.equip_to_slot_or_del(new /obj/item/device/flashlight(technomancer_mob), slot_belt)
|
||||
technomancer_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(technomancer_mob), slot_shoes)
|
||||
technomancer_mob.equip_to_slot_or_del(new /obj/item/clothing/head/technomancer/master(technomancer_mob), slot_head)
|
||||
technomancer_mob.update_icons_layers()
|
||||
return 1
|
||||
|
||||
/datum/antagonist/technomancer/proc/equip_apprentice(var/mob/living/carbon/human/technomancer_mob)
|
||||
@@ -67,7 +66,6 @@ var/datum/antagonist/technomancer/technomancers
|
||||
technomancer_mob.equip_to_slot_or_del(new /obj/item/device/flashlight(technomancer_mob), slot_belt)
|
||||
technomancer_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(technomancer_mob), slot_shoes)
|
||||
technomancer_mob.equip_to_slot_or_del(new /obj/item/clothing/head/technomancer/apprentice(technomancer_mob), slot_head)
|
||||
technomancer_mob.update_icons()
|
||||
return 1
|
||||
|
||||
/datum/antagonist/technomancer/check_victory()
|
||||
|
||||
@@ -87,7 +87,6 @@ var/datum/antagonist/wizard/wizards
|
||||
wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/box(wizard_mob), slot_in_backpack)
|
||||
wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(wizard_mob), slot_r_store)
|
||||
wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/spellbook(wizard_mob), slot_r_hand)
|
||||
wizard_mob.update_icons_layers()
|
||||
return 1
|
||||
|
||||
/datum/antagonist/wizard/check_victory()
|
||||
|
||||
@@ -122,7 +122,6 @@
|
||||
playsound(src, 'sound/effects/splat.ogg', 30, 1)
|
||||
visible_message("<span class='warning'>[src] pulls on their clothes, peeling it off along with parts of their skin attached!</span>",
|
||||
"<span class='notice'>We remove and deform our equipment.</span>")
|
||||
M.update_icons_layers()
|
||||
M.mind.changeling.armor_deployed = 0
|
||||
return success
|
||||
|
||||
@@ -138,7 +137,6 @@
|
||||
M.equip_to_slot_or_del(I, slot_head)
|
||||
grown_items_list.Add("a helmet")
|
||||
playsound(src, 'sound/effects/blobattack.ogg', 30, 1)
|
||||
M.update_icons_layers()
|
||||
success = 1
|
||||
sleep(1 SECOND)
|
||||
|
||||
@@ -148,7 +146,6 @@
|
||||
M.equip_to_slot_or_del(I, slot_w_uniform)
|
||||
grown_items_list.Add("a uniform")
|
||||
playsound(src, 'sound/effects/blobattack.ogg', 30, 1)
|
||||
M.update_icons_layers()
|
||||
success = 1
|
||||
sleep(1 SECOND)
|
||||
|
||||
@@ -158,7 +155,6 @@
|
||||
M.equip_to_slot_or_del(I, slot_gloves)
|
||||
grown_items_list.Add("some gloves")
|
||||
playsound(src, 'sound/effects/splat.ogg', 30, 1)
|
||||
M.update_icons_layers()
|
||||
success = 1
|
||||
sleep(1 SECOND)
|
||||
|
||||
@@ -168,7 +164,6 @@
|
||||
M.equip_to_slot_or_del(I, slot_shoes)
|
||||
grown_items_list.Add("shoes")
|
||||
playsound(src, 'sound/effects/splat.ogg', 30, 1)
|
||||
M.update_icons_layers()
|
||||
success = 1
|
||||
sleep(1 SECOND)
|
||||
|
||||
@@ -178,7 +173,6 @@
|
||||
M.equip_to_slot_or_del(I, slot_belt)
|
||||
grown_items_list.Add("a belt")
|
||||
playsound(src, 'sound/effects/splat.ogg', 30, 1)
|
||||
M.update_icons_layers()
|
||||
success = 1
|
||||
sleep(1 SECOND)
|
||||
|
||||
@@ -188,7 +182,6 @@
|
||||
M.equip_to_slot_or_del(I, slot_glasses)
|
||||
grown_items_list.Add("some glasses")
|
||||
playsound(src, 'sound/effects/splat.ogg', 30, 1)
|
||||
M.update_icons_layers()
|
||||
success = 1
|
||||
sleep(1 SECOND)
|
||||
|
||||
@@ -198,7 +191,6 @@
|
||||
M.equip_to_slot_or_del(I, slot_wear_mask)
|
||||
grown_items_list.Add("a mask")
|
||||
playsound(src, 'sound/effects/splat.ogg', 30, 1)
|
||||
M.update_icons_layers()
|
||||
success = 1
|
||||
sleep(1 SECOND)
|
||||
|
||||
@@ -208,7 +200,6 @@
|
||||
M.equip_to_slot_or_del(I, slot_back)
|
||||
grown_items_list.Add("a backpack")
|
||||
playsound(src, 'sound/effects/blobattack.ogg', 30, 1)
|
||||
M.update_icons_layers()
|
||||
success = 1
|
||||
sleep(1 SECOND)
|
||||
|
||||
@@ -218,7 +209,6 @@
|
||||
M.equip_to_slot_or_del(I, slot_wear_suit)
|
||||
grown_items_list.Add("an exosuit")
|
||||
playsound(src, 'sound/effects/blobattack.ogg', 30, 1)
|
||||
M.update_icons_layers()
|
||||
success = 1
|
||||
sleep(1 SECOND)
|
||||
|
||||
@@ -228,20 +218,13 @@
|
||||
M.equip_to_slot_or_del(I, slot_wear_id)
|
||||
grown_items_list.Add("an ID card")
|
||||
playsound(src, 'sound/effects/splat.ogg', 30, 1)
|
||||
M.update_icons_layers()
|
||||
success = 1
|
||||
sleep(1 SECOND)
|
||||
|
||||
var/feedback = english_list(grown_items_list, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
|
||||
|
||||
M << "<span class='notice'>We have grown [feedback].</span>"
|
||||
/*
|
||||
for(var/I in stuff_to_equip)
|
||||
world << I
|
||||
world << stuff_to_equip
|
||||
world << "Proc ended."
|
||||
*/
|
||||
M.update_icons()
|
||||
|
||||
if(success)
|
||||
M.mind.changeling.armor_deployed = 1
|
||||
M.mind.changeling.chem_charges -= 10
|
||||
|
||||
@@ -56,7 +56,6 @@ var/global/list/changeling_fabricated_clothing = list(
|
||||
visible_message("<span class='warning'>[H] tears off [src]!</span>",
|
||||
"<span class='notice'>We remove [src].</span>")
|
||||
qdel(src)
|
||||
H.update_icons_layers()
|
||||
|
||||
/obj/item/clothing/head/chameleon/changeling
|
||||
name = "malformed head"
|
||||
@@ -78,7 +77,6 @@ var/global/list/changeling_fabricated_clothing = list(
|
||||
visible_message("<span class='warning'>[H] tears off [src]!</span>",
|
||||
"<span class='notice'>We remove [src].</span>")
|
||||
qdel(src)
|
||||
H.update_icons_layers()
|
||||
|
||||
/obj/item/clothing/suit/chameleon/changeling
|
||||
name = "chitinous chest"
|
||||
@@ -104,7 +102,6 @@ var/global/list/changeling_fabricated_clothing = list(
|
||||
visible_message("<span class='warning'>[H] tears off [src]!</span>",
|
||||
"<span class='notice'>We remove [src].</span>")
|
||||
qdel(src)
|
||||
H.update_icons_layers()
|
||||
|
||||
/obj/item/clothing/shoes/chameleon/changeling
|
||||
name = "malformed feet"
|
||||
@@ -130,7 +127,6 @@ var/global/list/changeling_fabricated_clothing = list(
|
||||
visible_message("<span class='warning'>[H] tears off [src]!</span>",
|
||||
"<span class='notice'>We remove [src].</span>")
|
||||
qdel(src)
|
||||
H.update_icons_layers()
|
||||
|
||||
/obj/item/weapon/storage/backpack/chameleon/changeling
|
||||
name = "backpack"
|
||||
@@ -158,7 +154,6 @@ var/global/list/changeling_fabricated_clothing = list(
|
||||
for(var/atom/movable/AM in src.contents) //Dump whatever's in the bag before deleting.
|
||||
AM.forceMove(get_turf(loc))
|
||||
qdel(src)
|
||||
H.update_icons_layers()
|
||||
|
||||
/obj/item/clothing/gloves/chameleon/changeling
|
||||
name = "malformed hands"
|
||||
@@ -185,8 +180,6 @@ var/global/list/changeling_fabricated_clothing = list(
|
||||
visible_message("<span class='warning'>[H] tears off [src]!</span>",
|
||||
"<span class='notice'>We remove [src].</span>")
|
||||
qdel(src)
|
||||
H.update_icons_layers()
|
||||
|
||||
|
||||
/obj/item/clothing/mask/chameleon/changeling
|
||||
name = "chitin visor"
|
||||
@@ -213,7 +206,6 @@ var/global/list/changeling_fabricated_clothing = list(
|
||||
visible_message("<span class='warning'>[H] tears off [src]!</span>",
|
||||
"<span class='notice'>We remove [src].</span>")
|
||||
qdel(src)
|
||||
H.update_icons_layers()
|
||||
|
||||
/obj/item/clothing/glasses/chameleon/changeling
|
||||
name = "chitin goggles"
|
||||
@@ -235,7 +227,6 @@ var/global/list/changeling_fabricated_clothing = list(
|
||||
visible_message("<span class='warning'>[H] tears off [src]!</span>",
|
||||
"<span class='notice'>We remove [src].</span>")
|
||||
qdel(src)
|
||||
H.update_icons_layers()
|
||||
|
||||
/obj/item/weapon/storage/belt/chameleon/changeling
|
||||
name = "waist pouch"
|
||||
@@ -261,7 +252,6 @@ var/global/list/changeling_fabricated_clothing = list(
|
||||
visible_message("<span class='warning'>[H] tears off [src]!</span>",
|
||||
"<span class='notice'>We remove [src].</span>")
|
||||
qdel(src)
|
||||
H.update_icons_layers()
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/changeling
|
||||
name = "chitinous card"
|
||||
@@ -291,8 +281,6 @@ var/global/list/changeling_fabricated_clothing = list(
|
||||
visible_message("<span class='warning'>[H] tears off [src]!</span>",
|
||||
"<span class='notice'>We remove [src].</span>")
|
||||
qdel(src)
|
||||
H.update_icons_layers()
|
||||
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/changeling/Click() //Since we can't hold it in our hands, and attack_hand() doesn't work if it in inventory...
|
||||
if(!registered_user)
|
||||
|
||||
@@ -155,7 +155,6 @@
|
||||
var/mob/M = obj.loc
|
||||
if(ismob(M))
|
||||
M.remove_from_mob(obj)
|
||||
M.update_icons_layers() //so their overlays update
|
||||
|
||||
if(!silent)
|
||||
var/obj/oldobj = obj
|
||||
|
||||
@@ -283,6 +283,7 @@
|
||||
// note this isn't called during the initial dressing of a player
|
||||
/obj/item/proc/equipped(var/mob/user, var/slot)
|
||||
hud_layerise()
|
||||
user.position_hud_item(src,slot)
|
||||
if(user.client) user.client.screen |= src
|
||||
if(user.pulling == src) user.stop_pulling()
|
||||
return
|
||||
@@ -698,7 +699,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
if(slot_l_hand_str)
|
||||
state2use += "_l"
|
||||
|
||||
testing("[src] (\ref[src]) - Worn Icon:[icon2use], Worn State:[state2use], Worn Layer:[layer2use]")
|
||||
// testing("[src] (\ref[src]) - Slot: [slot_name], Inhands: [inhands], Worn Icon:[icon2use], Worn State:[state2use], Worn Layer:[layer2use]")
|
||||
|
||||
//Generate the base onmob icon
|
||||
var/icon/standing_icon = icon(icon = icon2use, icon_state = state2use)
|
||||
|
||||
@@ -487,7 +487,6 @@
|
||||
|
||||
M.timeofdeath = 0
|
||||
M.stat = UNCONSCIOUS //Life() can bring them back to consciousness if it needs to.
|
||||
M.regenerate_icons()
|
||||
M.failed_last_breath = 0 //So mobs that died of oxyloss don't revive and have perpetual out of breath.
|
||||
M.reload_fullscreen()
|
||||
|
||||
|
||||
@@ -103,6 +103,13 @@
|
||||
target.update_inv_handcuffed()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/handcuffs/equipped(var/mob/living/user,var/slot)
|
||||
. = ..()
|
||||
if(slot == slot_handcuffed)
|
||||
user.drop_r_hand()
|
||||
user.drop_l_hand()
|
||||
user.stop_pulling()
|
||||
|
||||
var/last_chew = 0
|
||||
/mob/living/carbon/human/RestrainedClickOn(var/atom/A)
|
||||
if (A != src) return ..()
|
||||
@@ -315,3 +322,11 @@ var/last_chew = 0
|
||||
target.legcuffed = lcuffs
|
||||
target.update_inv_legcuffed()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/handcuffs/legcuffs/equipped(var/mob/living/user,var/slot)
|
||||
. = ..()
|
||||
if(slot == slot_legcuffed)
|
||||
if(user.m_intent != "walk")
|
||||
user.m_intent = "walk"
|
||||
if(user.hud_used && user.hud_used.move_intent)
|
||||
user.hud_used.move_intent.icon_state = "walking"
|
||||
|
||||
@@ -1001,11 +1001,6 @@
|
||||
//strip their stuff and stick it in the crate
|
||||
for(var/obj/item/I in M)
|
||||
M.drop_from_inventory(I, locker)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.update_icons_layers() //Cheaper
|
||||
else
|
||||
M.update_icons()
|
||||
|
||||
//so they black out before warping
|
||||
M.Paralyse(5)
|
||||
@@ -1188,10 +1183,8 @@
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
var/block=text2num(href_list["block"])
|
||||
//testing("togmutate([href_list["block"]] -> [block])")
|
||||
usr.client.cmd_admin_toggle_block(H,block)
|
||||
show_player_panel(H)
|
||||
//H.regenerate_icons()
|
||||
|
||||
else if(href_list["adminplayeropts"])
|
||||
var/mob/M = locate(href_list["adminplayeropts"])
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.name = H.get_visible_name()
|
||||
// usr.regenerate_icons() //So the name is updated properly
|
||||
|
||||
usr.loc = O.loc // Appear where the object you were controlling is -- TLE
|
||||
usr.client.eye = usr
|
||||
|
||||
@@ -287,10 +287,10 @@ datum/preferences
|
||||
|
||||
if(icon_updates)
|
||||
character.force_update_limbs()
|
||||
character.update_mutations(0)
|
||||
character.update_underwear(0)
|
||||
character.update_hair(0)
|
||||
character.update_icons_all()
|
||||
character.update_icons_body()
|
||||
character.update_mutations()
|
||||
character.update_underwear()
|
||||
character.update_hair()
|
||||
|
||||
/datum/preferences/proc/open_load_dialog(mob/user)
|
||||
var/dat = "<body>"
|
||||
|
||||
@@ -265,6 +265,15 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/straight_jacket/equipped(var/mob/living/user,var/slot)
|
||||
. = ..()
|
||||
if(slot == slot_wear_suit)
|
||||
user.drop_l_hand()
|
||||
user.drop_r_hand()
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.drop_from_inventory(H.handcuffed)
|
||||
|
||||
/obj/item/clothing/suit/ianshirt
|
||||
name = "worn shirt"
|
||||
desc = "A worn out, curiously comfortable t-shirt with a picture of Ian. You wouldn't go so far as to say it feels like being hugged when you wear it but it's pretty close. Good for sleeping in."
|
||||
|
||||
@@ -247,7 +247,6 @@
|
||||
var/mob/M = obj.loc
|
||||
if(ismob(M))
|
||||
M.remove_from_mob(obj)
|
||||
M.update_icons_layers() //so their overlays update
|
||||
|
||||
if(!silent)
|
||||
var/obj/oldobj = obj
|
||||
|
||||
@@ -103,7 +103,6 @@
|
||||
if (ishuman(body))
|
||||
var/mob/living/carbon/human/H = body
|
||||
icon = H.icon
|
||||
LAZYCLEARLIST(H.list_huds)
|
||||
H.update_icons()
|
||||
overlays = H.overlays
|
||||
else
|
||||
|
||||
@@ -83,8 +83,6 @@ var/list/holder_mob_icon_cache = list()
|
||||
H.update_inv_l_hand()
|
||||
else if(H.r_hand == src)
|
||||
H.update_inv_r_hand()
|
||||
//else
|
||||
//H.regenerate_icons() //Basically just too expensive. Probably also not necessary.
|
||||
|
||||
//Mob specific holders.
|
||||
/obj/item/weapon/holder/diona
|
||||
|
||||
@@ -138,7 +138,6 @@ var/list/slot_equipment_priority = list( \
|
||||
remove_from_mob(W, target)
|
||||
if(!(W && W.loc))
|
||||
return 1 // self destroying objects (tk, grabs)
|
||||
update_icons_layers()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -290,10 +290,8 @@
|
||||
H.bloody_hands = 0
|
||||
H.update_inv_gloves(0)
|
||||
H.germ_level = 0
|
||||
update_icons_layers(FALSE) //apply the now updated overlays to the mob
|
||||
update_icons_body()
|
||||
|
||||
|
||||
/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
var/temp_inc = max(min(BODYTEMP_HEATING_MAX*(1-get_heat_protection()), exposed_temperature - bodytemperature), 0)
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
icon = 'icons/effects/effects.dmi' //We have an ultra-complex update icons that overlays everything, don't load some stupid random male human
|
||||
icon_state = "nothing"
|
||||
|
||||
var/list/hud_list[TOTAL_HUDS]
|
||||
has_huds = TRUE //We do have HUDs (like health, wanted, status, not inventory slots)
|
||||
|
||||
var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us.
|
||||
var/obj/item/weapon/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call.
|
||||
var/last_push_time //For human_attackhand.dm, keeps track of the last use of disarm
|
||||
@@ -40,9 +41,8 @@
|
||||
|
||||
nutrition = rand(200,400)
|
||||
|
||||
make_hud_overlays()
|
||||
|
||||
human_mob_list |= src
|
||||
|
||||
..()
|
||||
|
||||
hide_underwear.Cut()
|
||||
@@ -59,13 +59,6 @@
|
||||
for(var/organ in organs)
|
||||
qdel(organ)
|
||||
|
||||
LAZYCLEARLIST(list_layers)
|
||||
list_layers = null //Be free!
|
||||
LAZYCLEARLIST(list_body)
|
||||
list_body = null
|
||||
LAZYCLEARLIST(list_huds)
|
||||
list_huds = null
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/Stat()
|
||||
|
||||
@@ -102,8 +102,6 @@
|
||||
|
||||
can_be_antagged = TRUE
|
||||
|
||||
var/has_huds = TRUE //Do they have all the fancy life huds? Not for mannequins.
|
||||
|
||||
// Used by mobs in virtual reality to point back to the "real" mob the client belongs to.
|
||||
var/mob/living/carbon/human/vr_holder = null
|
||||
// Used by "real" mobs after they leave a VR session
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
return FBP_NONE
|
||||
|
||||
/mob/living/carbon/human/proc/make_hud_overlays()
|
||||
/mob/living/carbon/human/make_hud_overlays()
|
||||
hud_list[HEALTH_HUD] = gen_hud_image(ingame_hud_med, src, "100", plane = PLANE_CH_HEALTH)
|
||||
if(isSynthetic())
|
||||
hud_list[STATUS_HUD] = gen_hud_image(ingame_hud, src, "hudrobo", plane = PLANE_CH_STATUS)
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
var/obj/item/organ/internal/eyes/eyes = internal_organs_by_name[O_EYES]
|
||||
if(eyes)
|
||||
eyes.update_colour()
|
||||
regenerate_icons()
|
||||
update_icons_body() //Body handles eyes
|
||||
update_eyes() //For floating eyes only
|
||||
|
||||
/mob/living/carbon/var/list/internal_organs = list()
|
||||
/mob/living/carbon/human/var/list/organs = list()
|
||||
|
||||
@@ -152,12 +152,14 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
else if (W == wear_id)
|
||||
wear_id = null
|
||||
update_inv_wear_id()
|
||||
BITSET(hud_updateflag, ID_HUD)
|
||||
BITSET(hud_updateflag, WANTED_HUD)
|
||||
else if (W == r_store)
|
||||
r_store = null
|
||||
update_inv_pockets()
|
||||
//update_inv_pockets() //Doesn't do anything.
|
||||
else if (W == l_store)
|
||||
l_store = null
|
||||
update_inv_pockets()
|
||||
//update_inv_pockets() //Doesn't do anything.
|
||||
else if (W == s_store)
|
||||
s_store = null
|
||||
update_inv_s_store()
|
||||
@@ -195,8 +197,7 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
|
||||
|
||||
//This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible()
|
||||
//set redraw_mob to 0 if you don't wish the hud to be updated - if you're doing it manually in your own proc.
|
||||
/mob/living/carbon/human/equip_to_slot(obj/item/W as obj, slot, redraw_mob = 1)
|
||||
/mob/living/carbon/human/equip_to_slot(obj/item/W as obj, slot)
|
||||
|
||||
if(!slot)
|
||||
return
|
||||
@@ -213,39 +214,41 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
src.back = W
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += back
|
||||
update_inv_back(redraw_mob)
|
||||
update_inv_back()
|
||||
if(slot_wear_mask)
|
||||
src.wear_mask = W
|
||||
if(wear_mask.flags_inv & (BLOCKHAIR|BLOCKHEADHAIR))
|
||||
update_hair(redraw_mob) //rebuild hair
|
||||
update_inv_ears(0)
|
||||
update_hair() //rebuild hair
|
||||
update_inv_ears()
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += wear_mask
|
||||
update_inv_wear_mask(redraw_mob)
|
||||
update_inv_wear_mask()
|
||||
if(slot_handcuffed)
|
||||
src.handcuffed = W
|
||||
update_inv_handcuffed(redraw_mob)
|
||||
update_inv_handcuffed()
|
||||
if(slot_legcuffed)
|
||||
src.legcuffed = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_legcuffed(redraw_mob)
|
||||
update_inv_legcuffed()
|
||||
if(slot_l_hand)
|
||||
src.l_hand = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_l_hand(redraw_mob)
|
||||
update_inv_l_hand()
|
||||
if(slot_r_hand)
|
||||
src.r_hand = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_r_hand(redraw_mob)
|
||||
update_inv_r_hand()
|
||||
if(slot_belt)
|
||||
src.belt = W
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += belt
|
||||
update_inv_belt(redraw_mob)
|
||||
update_inv_belt()
|
||||
if(slot_wear_id)
|
||||
src.wear_id = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_wear_id(redraw_mob)
|
||||
update_inv_wear_id()
|
||||
BITSET(hud_updateflag, ID_HUD)
|
||||
BITSET(hud_updateflag, WANTED_HUD)
|
||||
if(slot_l_ear)
|
||||
src.l_ear = W
|
||||
if(l_ear.slot_flags & SLOT_TWOEARS)
|
||||
@@ -254,7 +257,7 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
src.r_ear = O
|
||||
O.hud_layerise()
|
||||
W.equipped(src, slot)
|
||||
update_inv_ears(redraw_mob)
|
||||
update_inv_ears()
|
||||
if(slot_r_ear)
|
||||
src.r_ear = W
|
||||
if(r_ear.slot_flags & SLOT_TWOEARS)
|
||||
@@ -263,54 +266,54 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
src.l_ear = O
|
||||
O.hud_layerise()
|
||||
W.equipped(src, slot)
|
||||
update_inv_ears(redraw_mob)
|
||||
update_inv_ears()
|
||||
if(slot_glasses)
|
||||
src.glasses = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_glasses(redraw_mob)
|
||||
update_inv_glasses()
|
||||
if(slot_gloves)
|
||||
src.gloves = W
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += glasses
|
||||
update_inv_gloves(redraw_mob)
|
||||
update_inv_gloves()
|
||||
if(slot_head)
|
||||
src.head = W
|
||||
if(head.flags_inv & (BLOCKHAIR|BLOCKHEADHAIR|HIDEMASK))
|
||||
update_hair(redraw_mob) //rebuild hair
|
||||
update_hair() //rebuild hair
|
||||
update_inv_ears(0)
|
||||
update_inv_wear_mask(0)
|
||||
if(istype(W,/obj/item/clothing/head/kitty))
|
||||
W.update_icon(src)
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += head
|
||||
update_inv_head(redraw_mob)
|
||||
update_inv_head()
|
||||
if(slot_shoes)
|
||||
src.shoes = W
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += shoes
|
||||
update_inv_shoes(redraw_mob)
|
||||
update_inv_shoes()
|
||||
if(slot_wear_suit)
|
||||
src.wear_suit = W
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += wear_suit
|
||||
update_inv_wear_suit(redraw_mob)
|
||||
update_inv_wear_suit()
|
||||
if(slot_w_uniform)
|
||||
src.w_uniform = W
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += w_uniform
|
||||
update_inv_w_uniform(redraw_mob)
|
||||
update_inv_w_uniform()
|
||||
if(slot_l_store)
|
||||
src.l_store = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_pockets(redraw_mob)
|
||||
//update_inv_pockets() //Doesn't do anything
|
||||
if(slot_r_store)
|
||||
src.r_store = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_pockets(redraw_mob)
|
||||
//update_inv_pockets() //Doesn't do anything
|
||||
if(slot_s_store)
|
||||
src.s_store = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_s_store(redraw_mob)
|
||||
update_inv_s_store()
|
||||
if(slot_in_backpack)
|
||||
if(src.get_active_hand() == W)
|
||||
src.remove_from_mob(W)
|
||||
|
||||
@@ -1582,26 +1582,24 @@
|
||||
we only set those statuses and icons upon changes. Then those HUD items will simply add those pre-made images.
|
||||
This proc below is only called when those HUD elements need to change as determined by the mobs hud_updateflag.
|
||||
*/
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/handle_hud_list()
|
||||
if (BITTEST(hud_updateflag, HEALTH_HUD))
|
||||
var/image/holder = hud_list[HEALTH_HUD]
|
||||
var/image/holder = grab_hud(HEALTH_HUD)
|
||||
if(stat == DEAD)
|
||||
holder.icon_state = "-100" // X_X
|
||||
else
|
||||
holder.icon_state = RoundHealth((health-config.health_threshold_crit)/(getMaxHealth()-config.health_threshold_crit)*100)
|
||||
hud_list[HEALTH_HUD] = holder
|
||||
apply_hud(HEALTH_HUD, holder)
|
||||
|
||||
if (BITTEST(hud_updateflag, LIFE_HUD))
|
||||
var/image/holder = hud_list[LIFE_HUD]
|
||||
var/image/holder = grab_hud(LIFE_HUD)
|
||||
if(isSynthetic())
|
||||
holder.icon_state = "hudrobo"
|
||||
else if(stat == DEAD)
|
||||
holder.icon_state = "huddead"
|
||||
else
|
||||
holder.icon_state = "hudhealthy"
|
||||
hud_list[LIFE_HUD] = holder
|
||||
apply_hud(LIFE_HUD, holder)
|
||||
|
||||
if (BITTEST(hud_updateflag, STATUS_HUD))
|
||||
var/foundVirus = 0
|
||||
@@ -1610,8 +1608,8 @@
|
||||
foundVirus = 1
|
||||
break
|
||||
|
||||
var/image/holder = hud_list[STATUS_HUD]
|
||||
var/image/holder2 = hud_list[STATUS_HUD_OOC]
|
||||
var/image/holder = grab_hud(STATUS_HUD)
|
||||
var/image/holder2 = grab_hud(STATUS_HUD_OOC)
|
||||
if (isSynthetic())
|
||||
holder.icon_state = "hudrobo"
|
||||
else if(stat == DEAD)
|
||||
@@ -1633,11 +1631,11 @@
|
||||
else
|
||||
holder2.icon_state = "hudhealthy"
|
||||
|
||||
hud_list[STATUS_HUD] = holder
|
||||
hud_list[STATUS_HUD_OOC] = holder2
|
||||
apply_hud(STATUS_HUD, holder)
|
||||
apply_hud(STATUS_HUD_OOC, holder2)
|
||||
|
||||
if (BITTEST(hud_updateflag, ID_HUD))
|
||||
var/image/holder = hud_list[ID_HUD]
|
||||
var/image/holder = grab_hud(ID_HUD)
|
||||
if(wear_id)
|
||||
var/obj/item/weapon/card/id/I = wear_id.GetID()
|
||||
if(I)
|
||||
@@ -1647,11 +1645,10 @@
|
||||
else
|
||||
holder.icon_state = "hudunknown"
|
||||
|
||||
|
||||
hud_list[ID_HUD] = holder
|
||||
apply_hud(ID_HUD, holder)
|
||||
|
||||
if (BITTEST(hud_updateflag, WANTED_HUD))
|
||||
var/image/holder = hud_list[WANTED_HUD]
|
||||
var/image/holder = grab_hud(WANTED_HUD)
|
||||
holder.icon_state = "hudblank"
|
||||
var/perpname = name
|
||||
if(wear_id)
|
||||
@@ -1674,15 +1671,16 @@
|
||||
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Released"))
|
||||
holder.icon_state = "hudreleased"
|
||||
break
|
||||
hud_list[WANTED_HUD] = holder
|
||||
|
||||
apply_hud(WANTED_HUD, holder)
|
||||
|
||||
if ( BITTEST(hud_updateflag, IMPLOYAL_HUD) \
|
||||
|| BITTEST(hud_updateflag, IMPCHEM_HUD) \
|
||||
|| BITTEST(hud_updateflag, IMPTRACK_HUD))
|
||||
|
||||
var/image/holder1 = hud_list[IMPTRACK_HUD]
|
||||
var/image/holder2 = hud_list[IMPLOYAL_HUD]
|
||||
var/image/holder3 = hud_list[IMPCHEM_HUD]
|
||||
var/image/holder1 = grab_hud(IMPTRACK_HUD)
|
||||
var/image/holder2 = grab_hud(IMPLOYAL_HUD)
|
||||
var/image/holder3 = grab_hud(IMPCHEM_HUD)
|
||||
|
||||
holder1.icon_state = "hudblank"
|
||||
holder2.icon_state = "hudblank"
|
||||
@@ -1698,21 +1696,21 @@
|
||||
if(istype(I,/obj/item/weapon/implant/chem))
|
||||
holder3.icon_state = "hud_imp_chem"
|
||||
|
||||
hud_list[IMPTRACK_HUD] = holder1
|
||||
hud_list[IMPLOYAL_HUD] = holder2
|
||||
hud_list[IMPCHEM_HUD] = holder3
|
||||
apply_hud(IMPTRACK_HUD, holder1)
|
||||
apply_hud(IMPLOYAL_HUD, holder2)
|
||||
apply_hud(IMPCHEM_HUD, holder3)
|
||||
|
||||
if (BITTEST(hud_updateflag, SPECIALROLE_HUD))
|
||||
var/image/holder = hud_list[SPECIALROLE_HUD]
|
||||
var/image/holder = grab_hud(SPECIALROLE_HUD)
|
||||
holder.icon_state = "hudblank"
|
||||
if(mind && mind.special_role)
|
||||
if(hud_icon_reference[mind.special_role])
|
||||
holder.icon_state = hud_icon_reference[mind.special_role]
|
||||
else
|
||||
holder.icon_state = "hudsyndicate"
|
||||
hud_list[SPECIALROLE_HUD] = holder
|
||||
apply_hud(SPECIALROLE_HUD, holder)
|
||||
|
||||
hud_updateflag = 0
|
||||
update_icons_huds()
|
||||
|
||||
/mob/living/carbon/human/handle_stunned()
|
||||
if(!can_feel_pain())
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -72,16 +72,16 @@
|
||||
/mob/living/u_equip(obj/W as obj)
|
||||
if (W == r_hand)
|
||||
r_hand = null
|
||||
update_inv_r_hand(0)
|
||||
update_inv_r_hand()
|
||||
else if (W == l_hand)
|
||||
l_hand = null
|
||||
update_inv_l_hand(0)
|
||||
update_inv_l_hand()
|
||||
else if (W == back)
|
||||
back = null
|
||||
update_inv_back(0)
|
||||
update_inv_back()
|
||||
else if (W == wear_mask)
|
||||
wear_mask = null
|
||||
update_inv_wear_mask(0)
|
||||
update_inv_wear_mask()
|
||||
return
|
||||
|
||||
/mob/living/get_equipped_item(var/slot)
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
/mob/living/New()
|
||||
..()
|
||||
|
||||
//Prime this list if we need it.
|
||||
if(has_huds)
|
||||
add_overlay(backplane,TRUE) //Strap this on here, to block HUDs from appearing in rightclick menus: http://www.byond.com/forum/?post=2336679
|
||||
hud_list = list()
|
||||
hud_list.len = TOTAL_HUDS
|
||||
make_hud_overlays()
|
||||
|
||||
//I'll just hang my coat up over here
|
||||
dsoverlay = image('icons/mob/darksight.dmi',global_hud.darksight) //This is a secret overlay! Go look at the file, you'll see.
|
||||
var/mutable_appearance/dsma = new(dsoverlay) //Changing like ten things, might as well.
|
||||
@@ -855,6 +862,7 @@ default behaviour is:
|
||||
|
||||
resting = !resting
|
||||
to_chat(src, "<span class='notice'>You are now [resting ? "resting" : "getting up"]</span>")
|
||||
update_canmove()
|
||||
|
||||
/mob/living/proc/cannot_use_vents()
|
||||
if(mob_size > MOB_SMALL)
|
||||
@@ -1003,6 +1011,7 @@ default behaviour is:
|
||||
break
|
||||
|
||||
if(lying != lying_prev)
|
||||
lying_prev = lying
|
||||
update_transform()
|
||||
|
||||
return canmove
|
||||
@@ -1157,3 +1166,22 @@ default behaviour is:
|
||||
|
||||
|
||||
item.throw_at(target, throw_range, item.throw_speed, src)
|
||||
|
||||
//Add an entry to overlays, assuming it exists
|
||||
/mob/living/proc/apply_hud(cache_index, var/image/I)
|
||||
hud_list[cache_index] = I
|
||||
if((. = hud_list[cache_index]))
|
||||
//underlays += .
|
||||
add_overlay(.)
|
||||
|
||||
//Remove an entry from overlays, and from the list
|
||||
/mob/living/proc/grab_hud(cache_index)
|
||||
var/I = hud_list[cache_index]
|
||||
if(I)
|
||||
//underlays -= I
|
||||
cut_overlay(I)
|
||||
hud_list[cache_index] = null
|
||||
return I
|
||||
|
||||
/mob/living/proc/make_hud_overlays()
|
||||
return
|
||||
@@ -54,3 +54,6 @@
|
||||
var/glow_range = 2
|
||||
var/glow_intensity = null
|
||||
var/glow_color = "#FFFFFF" // The color they're glowing!
|
||||
|
||||
var/list/hud_list //Holder for health hud, status hud, wanted hud, etc (not like inventory slots)
|
||||
var/has_huds = FALSE //Whether or not we should bother initializing the above list
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/list/stating_laws = list()// Channels laws are currently being stated on
|
||||
var/obj/item/device/radio/common_radio
|
||||
|
||||
var/list/hud_list[10]
|
||||
has_huds = TRUE
|
||||
var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer
|
||||
|
||||
//Used in say.dm.
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
var/list/adding = list()
|
||||
var/list/other = list()
|
||||
var/list/hotkeybuttons = list()
|
||||
var/list/slot_info = list()
|
||||
|
||||
hud.adding = adding
|
||||
hud.other = other
|
||||
@@ -34,6 +35,7 @@
|
||||
inv_box.screen_loc = slot_data["loc"]
|
||||
inv_box.slot_id = slot_data["slot"]
|
||||
inv_box.icon_state = slot_data["state"]
|
||||
slot_info["[inv_box.slot_id]"] = inv_box.screen_loc
|
||||
|
||||
if(slot_data["dir"])
|
||||
inv_box.set_dir(slot_data["dir"])
|
||||
@@ -249,9 +251,9 @@
|
||||
inv_box.slot_id = slot_r_hand
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
|
||||
hud.r_hand_hud_object = inv_box
|
||||
hud.adding += inv_box
|
||||
slot_info["[slot_r_hand]"] = inv_box.screen_loc
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.hud = src
|
||||
@@ -266,6 +268,7 @@
|
||||
inv_box.alpha = ui_alpha
|
||||
hud.l_hand_hud_object = inv_box
|
||||
hud.adding += inv_box
|
||||
slot_info["[slot_l_hand]"] = inv_box.screen_loc
|
||||
|
||||
//Swaphand titlebar
|
||||
using = new /obj/screen/inventory()
|
||||
|
||||
@@ -858,14 +858,17 @@
|
||||
/mob/proc/Resting(amount)
|
||||
facing_dir = null
|
||||
resting = max(max(resting,amount),0)
|
||||
update_canmove()
|
||||
return
|
||||
|
||||
/mob/proc/SetResting(amount)
|
||||
resting = max(amount,0)
|
||||
update_canmove()
|
||||
return
|
||||
|
||||
/mob/proc/AdjustResting(amount)
|
||||
resting = max(resting + amount,0)
|
||||
update_canmove()
|
||||
return
|
||||
|
||||
/mob/proc/AdjustLosebreath(amount)
|
||||
|
||||
@@ -624,7 +624,28 @@ var/global/image/backplane
|
||||
backplane = image('icons/misc/win32.dmi')
|
||||
backplane.alpha = 0
|
||||
backplane.plane = -100
|
||||
backplane.layer = BACKPLANE_LAYER
|
||||
backplane.layer = MOB_LAYER-0.01
|
||||
backplane.mouse_opacity = 0
|
||||
|
||||
return TRUE
|
||||
|
||||
/mob/proc/position_hud_item(var/obj/item/item, var/slot)
|
||||
if(!istype(hud_used) || !slot || !LAZYLEN(hud_used.slot_info))
|
||||
return
|
||||
|
||||
//They may have hidden their entire hud but the hands
|
||||
if(!hud_used.hud_shown && slot > slot_r_hand)
|
||||
item.screen_loc = null
|
||||
return
|
||||
|
||||
//They may have hidden the icons in the bottom left with the hide button
|
||||
if(!hud_used.inventory_shown && slot > slot_r_store)
|
||||
item.screen_loc = null
|
||||
return
|
||||
|
||||
var/screen_place = hud_used.slot_info["[slot]"]
|
||||
if(!screen_place)
|
||||
item.screen_loc = null
|
||||
return
|
||||
|
||||
item.screen_loc = screen_place
|
||||
|
||||
@@ -247,8 +247,6 @@
|
||||
mannequin.job = previewJob.title
|
||||
previewJob.equip_preview(mannequin, player_alt_titles[previewJob.title])
|
||||
|
||||
mannequin.regenerate_icons()
|
||||
|
||||
/datum/preferences/proc/update_preview_icon()
|
||||
var/mob/living/carbon/human/dummy/mannequin/mannequin = get_mannequin(client_ckey)
|
||||
mannequin.delete_inventory(TRUE)
|
||||
@@ -266,4 +264,4 @@
|
||||
stamp = getFlatIcon(mannequin, defdir=SOUTH)
|
||||
preview_icon.Blend(stamp, ICON_OVERLAY, 49, 1)
|
||||
|
||||
preview_icon.Scale(preview_icon.Width() * 2, preview_icon.Height() * 2) // Scaling here to prevent blurring in the browser.
|
||||
preview_icon.Scale(preview_icon.Width() * 2, preview_icon.Height() * 2) // Scaling here to prevent blurring in the browser.
|
||||
|
||||
@@ -1,31 +1,26 @@
|
||||
//Most of these are defined at this level to reduce on checks elsewhere in the code.
|
||||
//Having them here also makes for a nice reference list of the various overlay-updating procs available
|
||||
|
||||
/mob/proc/regenerate_icons() //TODO: phase this out completely if possible
|
||||
/mob/proc/regenerate_icons() //Update every aspect of the mob's icons (expensive, resist the urge to use unless you need it)
|
||||
return
|
||||
|
||||
/mob/proc/update_icons()
|
||||
update_icon() //Ugh.
|
||||
return
|
||||
|
||||
/mob/proc/update_icons_layers(var/update_icons = TRUE)
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
// Obsolete
|
||||
/mob/proc/update_icons_layers()
|
||||
return
|
||||
|
||||
/mob/proc/update_icons_huds(var/update_icons = TRUE)
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
/mob/proc/update_icons_huds()
|
||||
return
|
||||
|
||||
/mob/proc/update_icons_body(var/update_icons = TRUE)
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
/mob/proc/update_icons_body()
|
||||
return
|
||||
|
||||
/mob/proc/update_icons_all()
|
||||
update_icons_huds(FALSE)
|
||||
update_icons_body(FALSE)
|
||||
update_icons_layers(FALSE)
|
||||
|
||||
update_icons()
|
||||
return
|
||||
// End obsolete
|
||||
|
||||
/mob/proc/update_hud()
|
||||
return
|
||||
|
||||
@@ -873,7 +873,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
spawn(1)
|
||||
victim.updatehealth()
|
||||
victim.UpdateDamageIcon()
|
||||
victim.regenerate_icons()
|
||||
victim.update_icons_body()
|
||||
dir = 2
|
||||
|
||||
switch(disintegrate)
|
||||
|
||||
@@ -499,13 +499,13 @@
|
||||
B.loc = h_user
|
||||
B.hud_layerise()
|
||||
h_user.l_store = B
|
||||
h_user.update_inv_pockets()
|
||||
//h_user.update_inv_pockets() //Doesn't do anything
|
||||
else if (h_user.r_store == src)
|
||||
h_user.drop_from_inventory(src)
|
||||
B.loc = h_user
|
||||
B.hud_layerise()
|
||||
h_user.r_store = B
|
||||
h_user.update_inv_pockets()
|
||||
//h_user.update_inv_pockets() //Doesn't do anything
|
||||
else if (h_user.head == src)
|
||||
h_user.u_equip(src)
|
||||
h_user.put_in_hands(B)
|
||||
|
||||
Reference in New Issue
Block a user