Skip to content

Commit

Permalink
Missing icons unit test expansion (#7659)
Browse files Browse the repository at this point in the history
# About the pull request

This PR is an experimental change to the missing icons unit test where
it now instantiates all items to check their items (meaning they will do
whatever they do to their icon_state in Initialize). This ended up
causing several new hard deletes that I had to fix too. The create and
destroy unit test shares exclusions now with missing icons. I originally
started this because #7021 is likely going to need help sorting out lots
of missing icons at runtime that weren't caught with the old unit test.

~~No actual pixel changes in sprites: Just renames, removals, or
addition of blank states.~~
Added unlocked overlay to `/obj/item/storage/backpack/satchel/lockable`

![image](https://github.com/user-attachments/assets/d4a47ee9-6033-4667-b001-2169a68ec2c6)
Restored the spike overlays to `/obj/item/weapon/gun/launcher/spike`
removed some reason in #7361

![image](https://github.com/user-attachments/assets/4711b856-598d-44f2-8ff3-ff60447254c5)
Tweaked transparency and edges on old alien samples:

![image](https://github.com/user-attachments/assets/ea30a8d0-491a-4b97-8584-247c67176d52)

Currently there are 847 warnings for missing mob icons (could be more if
blanket testing slots that allow equipping the item), but these are only
mentioned in the warnings section (nor annotated currently though I
would like warnings to eventually be annotated once there isn't so much
noise).

# Explain why it's good for the game

More robust testing for hard deletes and missing icons.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

https://youtu.be/uB8Z4yNjfDA

</details>

# Changelog
:cl: Drathek
code: Missing Icons unit test now instantiates items and generally tests
more icon_states
code: Unit tests can now log warnings that appear as a separate
collapsed list but do not fail checks
fix: Fixed various hardrefs and missing icons
fix: Pipes retain their dir when picked up, no longer go invisible when
re-anchored, and reconnect when re-anchored.
fix: Disabled various admin only pistols from being equipped in pistol
belts since they only honk their underlay
refactor: Giant lizards and parent types now use weakrefs
refactor: Removed has_gamemode_skin and renamed NO_SNOW_TYPE to
NO_GAMEMODE_SKIN
refactor: Removed uses_skin_color in favor of the existing flag
HAS_SKIN_COLOR
maptweak: Fixed droppod floors on trijent elevator, lifeboats, corsat,
and bigred
imageadd: Added missing unlocked overlay to lockable satchel
imageadd: Restored the missing overlays to spike launcher
imageadd: Tweaked the old sample jars and samples
admin: Admin spawned predators now have random skin color
/:cl:
  • Loading branch information
Drulikar authored Nov 29, 2024
1 parent 5fc9da3 commit 7d096e8
Show file tree
Hide file tree
Showing 165 changed files with 1,267 additions and 931 deletions.
4 changes: 2 additions & 2 deletions code/__DEFINES/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#define ITEM_UNCATCHABLE (1<<9)
/// Used for nonstandard marine clothing to ignore 'specialty' var.
#define NO_NAME_OVERRIDE (1<<10)
/// Used for armors or uniforms that don't have a snow/desert/etc icon state set via select_gamemode_skin (not all item types currently perform this test though).
#define NO_SNOW_TYPE (1<<11)
/// Used for armors or uniforms that don't have a snow/desert/etc icon state set via select_gamemode_skin.
#define NO_GAMEMODE_SKIN (1<<11)

#define INVULNERABLE (1<<12)

Expand Down
2 changes: 1 addition & 1 deletion code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ DEFINE_BITFIELD(flags_atom, list(
"RELAY_CLICK" = RELAY_CLICK,
"ITEM_UNCATCHABLE" = ITEM_UNCATCHABLE,
"NO_NAME_OVERRIDE" = NO_NAME_OVERRIDE,
"NO_SNOW_TYPE" = NO_SNOW_TYPE,
"NO_GAMEMODE_SKIN" = NO_GAMEMODE_SKIN,
"INVULNERABLE" = INVULNERABLE,
"CAN_BE_SYRINGED" = CAN_BE_SYRINGED,
"CAN_BE_DISPENSED_INTO" = CAN_BE_DISPENSED_INTO,
Expand Down
3 changes: 3 additions & 0 deletions code/_onclick/hud/yautja.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
pred_power_icon.screen_loc = ui_predator_power
infodisplay += pred_power_icon

/mob/living/carbon/human/yautja
skin_color = "tan"
body_type = "pred"

/mob/living/carbon/human/yautja/create_hud()
if(client && !hud_used)
Expand Down
5 changes: 3 additions & 2 deletions code/datums/effects/xeno_strains/prae_acid_stacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@
if (!ishuman(affected_atom))
return ..()

var/mob/living/carbon/human/H = affected_atom
addtimer(CALLBACK(H, TYPE_PROC_REF(/mob/living/carbon/human, update_xeno_hostile_hud)), 3)
var/mob/living/carbon/human/human = affected_atom
if(!QDELETED(human))
addtimer(CALLBACK(human, TYPE_PROC_REF(/mob/living/carbon/human, update_xeno_hostile_hud)), 3)

return ..()

Expand Down
7 changes: 7 additions & 0 deletions code/game/machinery/camera/presets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@
status = FALSE
kick_viewers()

/obj/structure/machinery/camera/vehicle/update_icon()
. = ..()
if(stat & EMPED)
icon_state = "vehicle_cameraemp"
else
icon_state = "vehicle_camera"

// AUTONAME

/obj/structure/machinery/camera/autoname
Expand Down
1 change: 0 additions & 1 deletion code/game/machinery/doors/door.dm
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@

operating = TRUE
do_animate("opening")
icon_state = "door0"
set_opacity(FALSE)
if(length(filler_turfs))
change_filler_opacity(opacity)
Expand Down
10 changes: 0 additions & 10 deletions code/game/machinery/doors/multi_tile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,6 @@
req_access = null
req_one_access = list(ACCESS_CIVILIAN_PUBLIC)

/obj/structure/machinery/door/airlock/multi_tile/shuttle
name = "Shuttle Podlock"
icon = 'icons/obj/structures/doors/1x2blast_vert.dmi'
icon_state = "pdoor1"
opacity = TRUE
openspeed = 12
req_access = null
not_weldable = 1


// ALMAYER

/obj/structure/machinery/door/airlock/multi_tile/almayer
Expand Down
4 changes: 4 additions & 0 deletions code/game/machinery/kitchen/juicer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
. = ..()
beaker = new /obj/item/reagent_container/glass/beaker/large(src)

/obj/structure/machinery/juicer/Destroy()
QDEL_NULL(beaker)
return ..()

/obj/structure/machinery/juicer/update_icon()
icon_state = "juicer"+num2text(!QDELETED(beaker))
return
Expand Down
Loading

0 comments on commit 7d096e8

Please sign in to comment.