Merge pull request #8530 from Spookerton/cerebulon/ssoverlay

alt of 8336
This commit is contained in:
Atermonera
2022-04-24 18:57:19 -08:00
committed by GitHub
228 changed files with 1028 additions and 1144 deletions
+3 -3
View File
@@ -904,7 +904,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(choice)
icon = 'icons/mob/ghost.dmi'
overlays.Cut()
cut_overlays()
if(icon_state && icon)
previous_state = icon_state
@@ -934,9 +934,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/obj/item/paicard/PP = p
if(PP.pai == null)
count++
PP.overlays += "pai-ghostalert"
PP.add_overlay("pai-ghostalert")
spawn(54)
PP.overlays.Cut()
PP.cut_overlays()
to_chat(usr,"<span class='notice'>Flashing the displays of [count] unoccupied PAIs.</span>")
else
to_chat(usr,"<span class='warning'>You have 'Be pAI' disabled in your character prefs, so we can't help you.</span>")
+1 -1
View File
@@ -93,7 +93,7 @@
drop_l_hand()
if(healths)
healths.overlays = null // This is specific to humans but the relevant code is here; shouldn't mess with other mobs.
healths.cut_overlays()
healths.icon_state = "health6"
timeofdeath = world.time
+2 -2
View File
@@ -87,14 +87,14 @@ var/list/holder_mob_icon_cache = list()
/obj/item/holder/proc/sync(var/mob/living/M)
dir = 2
overlays.Cut()
overlays.Cut() // Not using SSoverlays for this due to performance
icon = M.icon
icon_state = M.icon_state
item_state = M.item_state
color = M.color
name = M.name
desc = M.desc
overlays |= M.overlays
overlays |= M.overlays // Not using SSoverlays for this due to performance
var/mob/living/carbon/human/H = loc
if(istype(H))
if(H.l_hand == src)
+4 -4
View File
@@ -186,9 +186,9 @@
update_icons()
/mob/living/bot/medbot/update_icons()
overlays.Cut()
cut_overlays()
if(skin)
overlays += image('icons/obj/aibots.dmi', "medskin_[skin]")
add_overlay("medskin_[skin]")
if(busy)
icon_state = "medibots"
else
@@ -529,7 +529,7 @@
/obj/item/firstaid_arm_assembly/Initialize()
. = ..()
if(skin)
overlays += image('icons/obj/aibots.dmi', "kit_skin_[src.skin]")
add_overlay("kit_skin_[src.skin]")
/obj/item/firstaid_arm_assembly/attackby(obj/item/W as obj, mob/user as mob)
..()
@@ -549,7 +549,7 @@
build_step++
to_chat(user, "<span class='notice'>You add the health sensor to [src].</span>")
name = "First aid/robot arm/health analyzer assembly"
overlays += image('icons/obj/aibots.dmi', "na_scanner")
add_overlay("na_scanner")
if(1)
if(isprox(W))
+2 -2
View File
@@ -303,7 +303,7 @@
C.pixel_y += 9
if(C.layer < layer)
C.layer = layer + 0.1
overlays += C
add_overlay(C)
busy = 0
@@ -312,7 +312,7 @@
return
busy = 1
overlays.Cut()
cut_overlays()
load.forceMove(loc)
load.pixel_y -= 9
+4 -4
View File
@@ -353,7 +353,7 @@
var/obj/item/secbot_assembly/Sa = new /obj/item/secbot_assembly(Tsec)
Sa.build_step = 1
Sa.overlays += image('icons/obj/aibots.dmi', "hs_hole")
Sa.add_overlay("hs_hole")
Sa.created_name = name
new /obj/item/assembly/prox_sensor(Tsec)
new used_weapon(Tsec)
@@ -425,14 +425,14 @@
var/obj/item/weldingtool/WT = W
if(WT.remove_fuel(0, user))
build_step = 1
overlays += image('icons/obj/aibots.dmi', "hs_hole")
add_overlay("hs_hole")
to_chat(user, "You weld a hole in \the [src].")
else if(isprox(W) && (build_step == 1))
user.drop_item()
build_step = 2
to_chat(user, "You add \the [W] to [src].")
overlays += image('icons/obj/aibots.dmi', "hs_eye")
add_overlay("hs_eye")
name = "helmet/signaler/prox sensor assembly"
qdel(W)
@@ -441,7 +441,7 @@
build_step = 3
to_chat(user, "You add \the [W] to [src].")
name = "helmet/signaler/prox sensor/robot arm assembly"
overlays += image('icons/obj/aibots.dmi', "hs_arm")
add_overlay(image('icons/obj/aibots.dmi', "hs_arm"))
qdel(W)
else if(istype(W, /obj/item/melee/baton) && build_step == 3)
@@ -7,6 +7,6 @@
else
icon_state = "[initial(icon_state)]"
overlays.Cut()
cut_overlays()
if(hat)
overlays |= get_hat_icon(hat, 0, -8)
add_overlay(get_hat_icon(hat, 0, -8))
@@ -1,5 +1,5 @@
/mob/living/carbon/alien/regenerate_icons()
overlays = list()
cut_overlays()
update_icons()
/mob/living/carbon/alien/update_icons()
+1 -1
View File
@@ -1314,7 +1314,7 @@
else if(no_damage)
health_images += image('icons/mob/screen1_health.dmi',"fullhealth")
healths_ma.overlays += health_images
healths_ma.add_overlay(health_images)
healths.appearance = healths_ma
@@ -195,7 +195,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
else
DI = damage_icon_parts[cache_index]
standing_image.overlays += DI
standing_image.add_overlay(DI)
overlays_standing[MOB_DAM_LAYER] = standing_image
apply_layer(MOB_DAM_LAYER)
@@ -537,7 +537,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
for(var/mut in mutations)
if(mut == LASER)
standing.overlays += "lasereyes_s" //TODO
standing.add_overlay("lasereyes_s")
overlays_standing[MUTATIONS_LAYER] = standing
apply_layer(MUTATIONS_LAYER)
@@ -1038,7 +1038,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
for(var/datum/modifier/M in modifiers)
if(M.mob_overlay_state)
var/image/I = image(icon = 'icons/mob/modifier_effects.dmi', icon_state = M.mob_overlay_state)
effects.overlays += I //TODO, this compositing is annoying.
effects.add_overlay(I)
overlays_standing[MODIFIER_EFFECTS_LAYER] = effects
@@ -1084,7 +1084,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
for(var/obj/item/organ/external/E in organs)
if(E.open)
var/image/I = image(icon = 'icons/mob/surgery.dmi', icon_state = "[E.icon_name][round(E.open)]", layer = BODY_LAYER+SURGERY_LAYER)
total.overlays += I //TODO: This compositing is annoying
total.add_overlay(I)
if(total.overlays.len)
overlays_standing[SURGERY_LAYER] = total
@@ -70,7 +70,7 @@
M.Scale(x_scale, y_scale)
M.Translate(x_off, y_off)
dir.transform = M
overlays += dir
add_overlay(dir)
/obj/screen/movable/pic_in_pic/ai/set_view_size(width, height, do_refresh = TRUE)
if(!aiEye) // Exploit fix
@@ -102,7 +102,7 @@
qdel(src)
return
highlighted = TRUE
overlays.Cut()
cut_overlays()
add_background()
add_buttons()
@@ -113,7 +113,7 @@
qdel(src)
return
highlighted = FALSE
overlays.Cut()
cut_overlays()
add_background()
add_buttons()
@@ -142,13 +142,13 @@ var/list/mob_hat_cache = list()
/mob/living/silicon/robot/drone/updateicon()
overlays.Cut()
cut_overlays()
if(stat == 0)
overlays += "eyes-[icon_state]"
add_overlay("eyes-[icon_state]")
else
overlays -= "eyes"
cut_overlay("eyes")
if(hat) // Let the drones wear hats.
overlays |= get_hat_icon(hat, hat_x_offset, hat_y_offset)
add_overlay(get_hat_icon(hat, hat_x_offset, hat_y_offset))
/mob/living/silicon/robot/drone/choose_icon()
return
@@ -359,9 +359,9 @@
return canmove
/mob/living/silicon/robot/update_fire()
overlays -= image("icon"='icons/mob/OnFire.dmi', "icon_state" = get_fire_icon_state())
cut_overlay(image(icon = 'icons/mob/OnFire.dmi', icon_state = get_fire_icon_state()))
if(on_fire)
overlays += image("icon"='icons/mob/OnFire.dmi', "icon_state" = get_fire_icon_state())
add_overlay(image(icon = 'icons/mob/OnFire.dmi', icon_state = get_fire_icon_state()))
/mob/living/silicon/robot/fire_act()
if(!on_fire) //Silicons don't gain stacks from hotspots, but hotspots can ignite them
@@ -211,7 +211,7 @@
I.loc = src
carrying.Add(I)
overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = 30 + I.layer)
add_overlay(image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = 30 + I.layer))
addedSomething = 1
if ( addedSomething )
user.visible_message("<font color='blue'>[user] loads some items onto their service tray.</font>")
@@ -237,7 +237,7 @@
dropspot = target.loc
overlays = null
cut_overlays()
var droppedSomething = 0
@@ -12,9 +12,9 @@
/mob/living/silicon/robot/gravekeeper/init()
aiCamera = new/obj/item/camera/siliconcam/robot_camera(src)
mmi = new /obj/item/mmi/digital/robot(src) // Explicitly a drone.
mmi = new /obj/item/mmi/digital/robot(src)
module = new /obj/item/robot_module/robot/gravekeeper(src)
overlays.Cut()
cut_overlays()
init_id()
updatename("Gravekeeper")
@@ -11,9 +11,9 @@
/mob/living/silicon/robot/lost/init()
aiCamera = new/obj/item/camera/siliconcam/robot_camera(src)
mmi = new /obj/item/mmi/digital/robot(src) // Explicitly a drone.
mmi = new /obj/item/mmi/digital/robot(src)
module = new /obj/item/robot_module/robot/lost(src)
overlays.Cut()
cut_overlays()
init_id()
updatename("Lost")
@@ -134,4 +134,4 @@
return
return
@@ -11,8 +11,8 @@
/mob/living/silicon/robot/syndicate/init()
aiCamera = new/obj/item/camera/siliconcam/robot_camera(src)
mmi = new /obj/item/mmi/digital/robot(src) // Explicitly a drone.
overlays.Cut()
mmi = new /obj/item/mmi/digital/robot(src)
cut_overlays()
init_id()
updatename("Syndicate")
@@ -43,4 +43,4 @@
updatename("Combat Medic")
/mob/living/silicon/robot/syndicate/speech_bubble_appearance()
return "synthetic_evil"
return "synthetic_evil"
@@ -17,7 +17,7 @@
aiCamera = new/obj/item/camera/siliconcam/robot_camera(src)
laws = new /datum/ai_laws/syndicate_override
overlays.Cut()
cut_overlays()
init_id()
new /obj/item/robot_module/robot/syndicate(src)
@@ -164,8 +164,8 @@
zone_sel.icon = ui_style
zone_sel.color = ui_color
zone_sel.alpha = ui_alpha
zone_sel.overlays.Cut()
zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[zone_sel.selecting]")
zone_sel.cut_overlays()
zone_sel.add_overlay(image('icons/mob/zone_sel.dmi', "[zone_sel.selecting]"))
hud_elements |= zone_sel
//Hand things
@@ -182,7 +182,7 @@
update_icon()
/mob/living/simple_mob/animal/passive/fish/icebass/update_icon()
overlays.Cut()
cut_overlays()
..()
if(!dorsal_image)
@@ -255,7 +255,7 @@
update_icon()
/mob/living/simple_mob/animal/passive/fish/rockfish/update_icon()
overlays.Cut()
cut_overlays()
..()
if(!head_image)
head_image = image(icon, "[icon_state]_mask")
@@ -41,7 +41,7 @@
..()
/mob/living/simple_mob/animal/passive/dog/regenerate_icons()
overlays = list()
cut_overlays()
if(inventory_head)
var/head_icon_state = inventory_head.icon_state
@@ -50,7 +50,7 @@
var/icon/head_icon = image('icons/mob/corgi_head.dmi',head_icon_state)
if(head_icon)
overlays += head_icon
add_overlay(head_icon)
if(inventory_back)
var/back_icon_state = inventory_back.icon_state
@@ -59,7 +59,7 @@
var/icon/back_icon = image('icons/mob/corgi_back.dmi',back_icon_state)
if(back_icon)
overlays += back_icon
add_overlay(back_icon)
return
@@ -140,7 +140,7 @@
..()
/mob/living/simple_mob/animal/sif/sakimm/update_icon()
overlays.Cut()
cut_overlays()
..()
if(hat)
var/hat_state = hat.item_state ? hat.item_state : hat.icon_state
+1 -1
View File
@@ -22,7 +22,7 @@
if(ismob(speaker))
icon = speaker.icon
icon_state = speaker.icon_state
overlays = speaker.overlays
copy_overlays(speaker, TRUE)
timeofdeath = speaker.timeofdeath
alpha = 127 //Maybe we'll have hologram calls later.
@@ -259,7 +259,7 @@
mannequin.toggle_tail(setting = TRUE)
mannequin.toggle_wing(setting = TRUE)
mannequin.update_tail_showing()
COMPILE_OVERLAYS(mannequin)
mannequin.ImmediateOverlayUpdate()
update_character_previews(new /mutable_appearance(mannequin))