New opendream pragmas (#20260)

Enabled new opendream pragmas
Fixed some runtime access check operators (`:`) around the codebase (not
all, some are unfixable as they're used in macros)

No player facing changes (hopefully)
This commit is contained in:
Fluffy
2024-12-29 11:12:09 +00:00
committed by GitHub
parent f55072cc42
commit 1ba0b35838
60 changed files with 324 additions and 813 deletions
+3 -2
View File
@@ -262,9 +262,10 @@
if((isskeleton(H)) && (!H.w_uniform) && (!H.wear_suit))
H.play_xylophone()
else
if (istype(src,/mob/living/carbon/human) && src:w_uniform)
if (istype(src,/mob/living/carbon/human))
var/mob/living/carbon/human/H = src
H.w_uniform.add_fingerprint(M)
if(H.w_uniform)
H.w_uniform.add_fingerprint(M)
var/show_ssd
var/mob/living/carbon/human/H
@@ -506,7 +506,9 @@ This saves us from having to call add_fingerprint() any time something is put in
if (lying || !shoes || !istype(shoes, /obj/item/clothing/shoes))
return
if (shoes:silent)
var/obj/item/clothing/shoes/clothing_shoes = shoes
if (clothing_shoes.silent)
return
is_noisy = TRUE
+6 -4
View File
@@ -163,10 +163,12 @@ default behaviour is:
return
step(AM, t)
if(ishuman(AM) && AM:grabbed_by)
for(var/obj/item/grab/G in AM:grabbed_by)
step(G:assailant, get_dir(G:assailant, AM))
G.adjust_position()
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
if(H.grabbed_by)
for(var/obj/item/grab/G in H.grabbed_by)
step(G.assailant, get_dir(G.assailant, H))
G.adjust_position()
now_pushing = FALSE
+1 -1
View File
@@ -119,7 +119,7 @@
switch(PRP)
if (1) to_chat(src, "Unable to locate APC!")
else to_chat(src, "Lost connection with the APC!")
src:ai_restore_power_routine = 2
ai_restore_power_routine = 2
return
if (current_area.power_equip)
if (!istype(T, /turf/space))
+2 -2
View File
@@ -69,7 +69,7 @@
m_type = 1
if("law")
if (src:secHUD)
if (secHUD)
message = "<B>[src]</B> flashes its legal authorization barcode."
playsound(src.loc, 'sound/voice/biamthelaw.ogg', 50, 0)
m_type = 2
@@ -102,7 +102,7 @@
m_type = 1
if("halt")
if (src:secHUD)
if (secHUD)
message = "<B>[src]</B>'s speakers skreech, \"Halt! Security!\"."
playsound(src.loc, 'sound/voice/halt.ogg', 50, 0)
@@ -276,11 +276,11 @@
if(I && !(istype(I, /obj/item/cell) || istype(I, /obj/item/device/radio) || istype(I, /obj/machinery/camera) || istype(I, /obj/item/device/mmi)))
client.screen += I
if(module_state_1)
module_state_1:screen_loc = ui_inv1
module_state_1.screen_loc = ui_inv1
if(module_state_2)
module_state_2:screen_loc = ui_inv2
module_state_2.screen_loc = ui_inv2
if(module_state_3)
module_state_3:screen_loc = ui_inv3
module_state_3.screen_loc = ui_inv3
update_icon()
/mob/living/silicon/robot/proc/process_killswitch()
@@ -929,19 +929,22 @@
O.hud_layerise()
contents += O
if(istype(module_state_1,/obj/item/borg/sight))
sight_mode |= module_state_1:sight_mode
var/obj/item/borg/sight/sight_module = module_state_3
sight_mode |= sight_module.sight_mode
else if(!module_state_2)
module_state_2 = O
O.hud_layerise()
contents += O
if(istype(module_state_2,/obj/item/borg/sight))
sight_mode |= module_state_2:sight_mode
var/obj/item/borg/sight/sight_module = module_state_3
sight_mode |= sight_module.sight_mode
else if(!module_state_3)
module_state_3 = O
O.hud_layerise()
contents += O
if(istype(module_state_3,/obj/item/borg/sight))
sight_mode |= module_state_3:sight_mode
var/obj/item/borg/sight/sight_module = module_state_3
sight_mode |= sight_module.sight_mode
else
to_chat(src, SPAN_WARNING("You need to disable a module first!"))
installed_modules()
+18 -10
View File
@@ -41,9 +41,11 @@
/proc/ishuman_species(A)
if(istype(A, /mob/living/carbon/human) && (A:get_species() == SPECIES_HUMAN))
return 1
return 0
if(istype(A, /mob/living/carbon/human))
var/mob/living/carbon/human/H = A
if(H.get_species() == SPECIES_HUMAN)
return TRUE
return FALSE
/proc/isoffworlder(A)
if(ishuman(A))
@@ -71,7 +73,8 @@
/proc/istajara(A)
if(istype(A, /mob/living/carbon/human))
switch(A:get_species())
var/mob/living/carbon/human/H = A
switch(H.get_species())
if (SPECIES_TAJARA)
return 1
if(SPECIES_TAJARA_ZHAN)
@@ -86,7 +89,8 @@
/proc/isskrell(A)
if(istype(A, /mob/living/carbon/human))
switch(A:get_species())
var/mob/living/carbon/human/H = A
switch(H.get_species())
if (SPECIES_SKRELL)
return 1
if (SPECIES_SKRELL_AXIORI)
@@ -97,7 +101,8 @@
/proc/isvaurca(A, var/isbreeder = FALSE)
if(istype(A, /mob/living/carbon/human))
switch(A:get_species())
var/mob/living/carbon/human/H = A
switch(H.get_species())
if(SPECIES_VAURCA_WORKER)
if(isbreeder)
return FALSE
@@ -151,9 +156,11 @@
return FALSE
/proc/isskeleton(A)
if(istype(A, /mob/living/carbon/human) && (A:get_species() == SPECIES_SKELETON))
return 1
return 0
if(istype(A, /mob/living/carbon/human))
var/mob/living/carbon/human/H = A
if(H.get_species() == SPECIES_SKELETON)
return TRUE
return FALSE
/proc/iszombie(A)
if(ishuman(A))
@@ -188,7 +195,8 @@
/proc/islesserform(A)
if(istype(A, /mob/living/carbon/human))
switch(A:get_species())
var/mob/living/carbon/human/H = A
switch(H.get_species())
if (SPECIES_MONKEY)
return 1
if (SPECIES_MONKEY_TAJARA)
+7 -3
View File
@@ -93,7 +93,8 @@
/client/verb/swap_hand()
set hidden = 1
if(istype(mob, /mob/living/carbon))
mob:swap_hand()
var/mob/living/carbon/C = mob
C.swap_hand()
if(istype(mob,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = mob
R.cycle_modules()
@@ -112,8 +113,11 @@
set hidden = 1
if(!istype(mob, /mob/living/carbon))
return
if (!mob.stat && isturf(mob.loc) && !mob.restrained())
mob:toggle_throw_mode()
var/mob/living/carbon/C = mob
if (!C.stat && isturf(C.loc) && !C.restrained())
C.toggle_throw_mode()
else
return