Adds CI to forbid some istype(src) checks. (#26980)

* first set of changes

* the last checks

* actually builds

* Update code/modules/surgery/organs/subtypes/standard_organs.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* Update tools/ci/check_grep2.py

Signed-off-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* 1 fix (cigarettes) and better encapsulation in files

* yeeep

---------

Signed-off-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
Contrabang
2024-11-06 12:56:36 +00:00
committed by GitHub
co-authored by Luc
parent 5ac9a04796
commit 0f717d660a
33 changed files with 178 additions and 149 deletions
+5 -1
View File
@@ -9,6 +9,7 @@
flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2
blocks_emissive = EMISSIVE_BLOCK_GENERIC
var/does_emissive = FALSE
var/removable = TRUE
/obj/structure/sign/Initialize(mapload)
. = ..()
@@ -36,7 +37,7 @@
playsound(loc, 'sound/items/welder.ogg', 80, TRUE)
/obj/structure/sign/screwdriver_act(mob/user, obj/item/I)
if(istype(src, /obj/structure/sign/double))
if(!removable)
return
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
@@ -85,6 +86,9 @@
to_chat(user, "<span class='notice'>You fasten [S] with your [I].</span>")
qdel(src)
/obj/structure/sign/double
removable = FALSE
/obj/structure/sign/double/map
name = "station map"
desc = "A framed picture of the station."
+8 -14
View File
@@ -43,6 +43,7 @@
var/minimum_env_smash = ENVIRONMENT_SMASH_WALLS
/// Can this table be flipped?
var/can_be_flipped = TRUE
var/flipped_table_icon_base = "table"
/obj/structure/table/Initialize(mapload)
. = ..()
@@ -78,19 +79,7 @@
type++
if(type == 1)
subtype = direction == turn(dir,90) ? "-" : "+"
var/base = "table"
if(istype(src, /obj/structure/table/wood))
base = "wood"
if(istype(src, /obj/structure/table/reinforced))
base = "rtable"
if(istype(src, /obj/structure/table/wood/poker))
base = "poker"
if(istype(src, /obj/structure/table/wood/fancy))
base = "fancy"
if(istype(src, /obj/structure/table/wood/fancy/black))
base = "fancyblack"
icon_state = "[base]flip[type][type == 1 ? subtype : ""]"
icon_state = "[flipped_table_icon_base]flip[type][type == 1 ? subtype : ""]"
/obj/structure/table/proc/update_smoothing()
if((smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) && !flipped)
@@ -101,7 +90,7 @@
clear_smooth_overlays()
// Need to override this to allow flipped tables to be mapped in without the smoothing subsystem resetting the icon_state
/obj/structure/table/set_smoothed_icon_state(new_junction)
/obj/structure/table/set_smoothed_icon_state(new_junction)
if(flipped)
return
..()
@@ -650,6 +639,7 @@
icon = 'icons/obj/smooth_structures/tables/wood_table.dmi'
icon_state = "wood_table-0"
base_icon_state = "wood_table"
flipped_table_icon_base = "wood"
frame = /obj/structure/table_frame/wood
framestack = /obj/item/stack/sheet/wood
buildstack = /obj/item/stack/sheet/wood
@@ -669,6 +659,7 @@
icon = 'icons/obj/smooth_structures/tables/poker_table.dmi'
icon_state = "poker_table-0"
base_icon_state = "poker_table"
flipped_table_icon_base = "poker"
buildstack = /obj/item/stack/tile/carpet
/obj/structure/table/wood/poker/narsie_act()
@@ -684,6 +675,7 @@
icon = 'icons/obj/smooth_structures/tables/fancy/fancy_table.dmi'
icon_state = "fancy_table-0"
base_icon_state = "fancy_table"
flipped_table_icon_base = "fancy"
frame = /obj/structure/table_frame
framestack = /obj/item/stack/rods
buildstack = /obj/item/stack/tile/carpet
@@ -700,6 +692,7 @@
/obj/structure/table/wood/fancy/black
icon_state = "fancy_table_black-0"
base_icon_state = "fancy_table_black"
flipped_table_icon_base = "fancyblack"
buildstack = /obj/item/stack/tile/carpet/black
icon = 'icons/obj/smooth_structures/tables/fancy/fancy_table_black.dmi'
@@ -762,6 +755,7 @@
icon = 'icons/obj/smooth_structures/tables/reinforced_table.dmi'
icon_state = "reinforced_table-0"
base_icon_state = "reinforced_table"
flipped_table_icon_base = "rtables"
deconstruction_ready = FALSE
buildstack = /obj/item/stack/sheet/plasteel
smoothing_groups = list(SMOOTH_GROUP_REINFORCED_TABLES)