mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
[MIRROR] Miscellaneous appearance fixes. (#3771)
* Miscellaneous appearance fixes. (#57133) * Fixes modular computer runtimes - Adds a proc to eat the source arg of the update icon signal. * Fixes a couple things not passing the right args - Fixes the alien leap hallucination passing a string as the first arg to updat_icon - Fixes the roulette machine passing the payout as the first arg to update_icon. * Miscellaneous appearance fixes. Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
This commit is contained in:
@@ -207,7 +207,7 @@
|
||||
audible_message("<span class='notice'>The result is: [result]</span>")
|
||||
|
||||
playing = FALSE
|
||||
update_icon(potential_payout, color, rolled_number, is_winner)
|
||||
update_icon(ALL, potential_payout, color, rolled_number, is_winner)
|
||||
handle_color_light(color)
|
||||
|
||||
if(!is_winner)
|
||||
|
||||
@@ -903,7 +903,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
SIGNAL_HANDLER
|
||||
set_light_on(FALSE)
|
||||
set_light_range(0) //We won't be turning on again.
|
||||
update_icon()
|
||||
update_appearance()
|
||||
visible_message("<span class='danger'>The light in [src] shorts out!</span>")
|
||||
return COMPONENT_BLOCK_LIGHT_EATER
|
||||
|
||||
|
||||
@@ -410,8 +410,8 @@
|
||||
. += "<span class='boldnotice'>Ask your CMO if mind magnification is right for you.</span>"
|
||||
|
||||
/obj/item/clothing/head/helmet/monkey_sentience/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][light_colors][magnification ? "up" : ""]"
|
||||
return ..()
|
||||
. = ..()
|
||||
icon_state = "[initial(icon_state)][light_colors][magnification ? "up" : null]"
|
||||
|
||||
/obj/item/clothing/head/helmet/monkey_sentience/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
|
||||
@@ -119,58 +119,67 @@
|
||||
/mob/living/carbon/human/dummy/update_sensor_list()
|
||||
return
|
||||
|
||||
/obj/item/clothing/under/proc/attach_accessory(obj/item/I, mob/user, notifyAttach = 1)
|
||||
/obj/item/clothing/under/proc/attach_accessory(obj/item/tool, mob/user, notifyAttach = 1)
|
||||
. = FALSE
|
||||
if(istype(I, /obj/item/clothing/accessory))
|
||||
var/obj/item/clothing/accessory/A = I
|
||||
if(!istype(tool, /obj/item/clothing/accessory))
|
||||
return
|
||||
var/obj/item/clothing/accessory/accessory = tool
|
||||
if(attached_accessory)
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>[src] already has an accessory.</span>")
|
||||
return
|
||||
else
|
||||
|
||||
if(!A.can_attach_accessory(src, user)) //Make sure the suit has a place to put the accessory.
|
||||
if(!accessory.can_attach_accessory(src, user)) //Make sure the suit has a place to put the accessory.
|
||||
return
|
||||
if(user && !user.temporarilyRemoveItemFromInventory(I))
|
||||
if(user && !user.temporarilyRemoveItemFromInventory(accessory))
|
||||
return
|
||||
if(!A.attach(src, user))
|
||||
if(!accessory.attach(src, user))
|
||||
return
|
||||
|
||||
. = TRUE
|
||||
if(user && notifyAttach)
|
||||
to_chat(user, "<span class='notice'>You attach [I] to [src].</span>")
|
||||
to_chat(user, "<span class='notice'>You attach [accessory] to [src].</span>")
|
||||
|
||||
var/accessory_color = attached_accessory.icon_state
|
||||
accessory_overlay = mutable_appearance('icons/mob/clothing/accessories.dmi', "[accessory_color]")
|
||||
accessory_overlay.alpha = attached_accessory.alpha
|
||||
accessory_overlay.color = attached_accessory.color
|
||||
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
H.update_inv_w_uniform()
|
||||
H.update_inv_wear_suit()
|
||||
H.fan_hud_set_fandom()
|
||||
update_appearance()
|
||||
if(!ishuman(loc))
|
||||
return
|
||||
|
||||
return TRUE
|
||||
var/mob/living/carbon/human/holder = loc
|
||||
holder.update_inv_w_uniform()
|
||||
holder.update_inv_wear_suit()
|
||||
holder.fan_hud_set_fandom()
|
||||
|
||||
/obj/item/clothing/under/proc/remove_accessory(mob/user)
|
||||
. = FALSE
|
||||
if(!isliving(user))
|
||||
return
|
||||
if(!can_use(user))
|
||||
return
|
||||
|
||||
if(attached_accessory)
|
||||
var/obj/item/clothing/accessory/A = attached_accessory
|
||||
attached_accessory.detach(src, user)
|
||||
if(user.put_in_hands(A))
|
||||
to_chat(user, "<span class='notice'>You detach [A] from [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You detach [A] from [src] and it falls on the floor.</span>")
|
||||
if(!attached_accessory)
|
||||
return
|
||||
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
H.update_inv_w_uniform()
|
||||
H.update_inv_wear_suit()
|
||||
H.fan_hud_set_fandom()
|
||||
. = TRUE
|
||||
var/obj/item/clothing/accessory/accessory = attached_accessory
|
||||
attached_accessory.detach(src, user)
|
||||
if(user.put_in_hands(accessory))
|
||||
to_chat(user, "<span class='notice'>You detach [accessory] from [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You detach [accessory] from [src] and it falls on the floor.</span>")
|
||||
|
||||
update_appearance()
|
||||
if(!ishuman(loc))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/holder = loc
|
||||
holder.update_inv_w_uniform()
|
||||
holder.update_inv_wear_suit()
|
||||
holder.fan_hud_set_fandom()
|
||||
|
||||
|
||||
/obj/item/clothing/under/examine(mob/user)
|
||||
|
||||
@@ -6,9 +6,13 @@
|
||||
inhand_icon_state = "" //no inhands
|
||||
slot_flags = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
/// Whether or not the accessory displays through suits and the like.
|
||||
var/above_suit = FALSE
|
||||
var/minimize_when_attached = TRUE // TRUE if shown as a small icon in corner, FALSE if overlayed
|
||||
/// TRUE if shown as a small icon in corner, FALSE if overlayed
|
||||
var/minimize_when_attached = TRUE
|
||||
/// Whether the accessory has any storage to apply to the clothing it's attached to.
|
||||
var/datum/component/storage/detached_pockets
|
||||
/// What equipment slot the accessory attaches to.
|
||||
var/attachment_slot = CHEST
|
||||
|
||||
/obj/item/clothing/accessory/proc/can_attach_accessory(obj/item/clothing/U, mob/user)
|
||||
|
||||
@@ -293,11 +293,11 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
to_chat(target, "<span class='notice'>[xeno.name] begins climbing into the ventilation system...</span>")
|
||||
stage = XENO_ATTACK_STAGE_FINISH
|
||||
if (XENO_ATTACK_STAGE_LEAP_AT_PUMP to XENO_ATTACK_STAGE_CLIMB)
|
||||
xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi', -32, -32)
|
||||
xeno.update_icon(ALL, "alienh_leap", 'icons/mob/alienleap.dmi', -32, -32)
|
||||
xeno.throw_at(pump_location, 7, 1, spin = FALSE, diagonals_first = TRUE)
|
||||
stage = XENO_ATTACK_STAGE_CLIMB
|
||||
if (XENO_ATTACK_STAGE_LEAP_AT_TARGET to XENO_ATTACK_STAGE_LEAP_AT_PUMP)
|
||||
xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi', -32, -32)
|
||||
xeno.update_icon(ALL, "alienh_leap", 'icons/mob/alienleap.dmi', -32, -32)
|
||||
xeno.throw_at(target, 7, 1, spin = FALSE, diagonals_first = TRUE)
|
||||
stage = XENO_ATTACK_STAGE_LEAP_AT_PUMP
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ There are several things that need to be remembered:
|
||||
var/atom/movable/screen/inventory/inv = hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_GLOVES) + 1]
|
||||
inv.update_appearance()
|
||||
|
||||
if(!gloves && blood_in_hands && !(NOBLOODOVERLAY in dna.species.species_traits))
|
||||
if(!gloves && blood_in_hands && (num_hands > 0) && !(NOBLOODOVERLAY in dna.species.species_traits))
|
||||
var/mutable_appearance/bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyhands", -GLOVES_LAYER)
|
||||
if(num_hands < 2)
|
||||
if(has_left_hand(FALSE))
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
integrity_failure = machinery_computer.integrity_failure
|
||||
base_active_power_usage = machinery_computer.base_active_power_usage
|
||||
base_idle_power_usage = machinery_computer.base_idle_power_usage
|
||||
machinery_computer.RegisterSignal(src, COMSIG_ATOM_UPDATED_ICON, /atom/proc/update_icon) //when we update_icon, also update the computer
|
||||
machinery_computer.RegisterSignal(src, COMSIG_ATOM_UPDATED_ICON, /obj/machinery/modular_computer/proc/relay_icon_update) //when we update_icon, also update the computer
|
||||
|
||||
/obj/item/modular_computer/processor/relay_qdel()
|
||||
qdel(machinery_computer)
|
||||
|
||||
@@ -73,6 +73,11 @@
|
||||
. += "bsod"
|
||||
. += "broken"
|
||||
|
||||
/// Eats the "source" arg because update_icon actually expects args now.
|
||||
/obj/machinery/modular_computer/proc/relay_icon_update(datum/source, updates, updated)
|
||||
SIGNAL_HANDLER
|
||||
return update_icon(updates)
|
||||
|
||||
/obj/machinery/modular_computer/AltClick(mob/user)
|
||||
if(cpu)
|
||||
cpu.AltClick(user)
|
||||
|
||||
Reference in New Issue
Block a user