Malfunctioning AIs: Fix Overload Machine not working on some machines (#27848)

* blcaklist, add intercom

* fix

* re-rework into a proc

* add these
This commit is contained in:
gurfan
2020-10-04 14:11:52 -05:00
committed by GitHub
parent 951489315c
commit 0534fe5aa3
12 changed files with 36 additions and 1 deletions

View File

@@ -395,6 +395,9 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/is_airtight() //Technically, smoke would be able to pop up from a vent, but enabling ventcrawling mobs to do that still doesn't sound like a good idea
return 1
/obj/machinery/atmospherics/can_overload()
return 0
// Tiny helper to see if the object is "exposed".
// Basically whether it's partially covered up by a floor tile or not.
/obj/machinery/atmospherics/proc/exposed()

View File

@@ -125,6 +125,8 @@ rcd light flash thingy on matter drain
override_base = "malf"
/spell/targeted/overload_machine/is_valid_target(var/atom/target)
if(istype(target, /obj/item/device/radio/intercom))
return 1
if (istype(target, /obj/machinery))
var/obj/machinery/M = target
return M.can_overload()

View File

@@ -160,6 +160,9 @@
return
//user.drop_item(W, src.loc) why?
/obj/machinery/optable/can_overload()
return 0
/obj/machinery/optable/npc_tamper_act(mob/living/user)
//Messages are overridden for this proc
. = NPC_TAMPER_ACT_NOMSG

View File

@@ -491,6 +491,9 @@ var/list/apiaries_list = list()
consume.reagents.clear_reagents()
/obj/machinery/apiary/can_overload()
return 0
///////////////////////////WILD BEEHIVES////////////////////////////
/obj/structure/wild_apiary

View File

@@ -445,6 +445,9 @@ var/list/all_doors = list()
update_nearby_tiles()
/obj/machinery/door/can_overload()
return 0
// Flash denied and such.
/obj/machinery/door/proc/denied()
playsound(loc, 'sound/machines/denied.ogg', 50, 1)
@@ -455,3 +458,5 @@ var/list/all_doors = list()
icon = 'icons/obj/doors/morgue.dmi'
animation_delay = 15
penetration_dampening = 15

View File

@@ -221,3 +221,6 @@
to_chat(user, "<span class='info'>Attached is \an empty [beaker].</span>")
else
to_chat(user, "<span class='info'>No chemicals are attached.</span>")
/obj/machinery/iv_drip/can_overload()
return 0

View File

@@ -648,7 +648,7 @@ Class Procs:
return 1
/obj/machinery/proc/can_overload(mob/user) //used for AI machine overload
return(src in machines)
return 1
/obj/machinery/proc/shock(mob/user, prb, var/siemenspassed = -1)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock

View File

@@ -541,6 +541,9 @@
/obj/machinery/shieldwall/acidable()
return 0
/obj/machinery/shieldwall/can_overload()
return 0
/obj/machinery/shieldwall/New(var/obj/machinery/shieldwallgen/A, var/obj/machinery/shieldwallgen/B)
..()
src.gen_primary = A

View File

@@ -1043,6 +1043,8 @@
for(var/obj/item/weapon/pinpointer/point in pinpointer_list)
point.target = null //the pinpointer will go back to pointing at the nuke disc.
/obj/machinery/power/apc/can_overload()
return 1
/obj/machinery/power/apc/proc/ion_act()
//intended to be exactly the same as an AI malf attack

View File

@@ -83,6 +83,9 @@
H.do_attack_animation(src, H)
return SPECIAL_ATTACK_FAILED
/obj/machinery/light_construct/can_overload()
return 0
/obj/machinery/light_construct/small
name = "small light fixture frame"
@@ -174,6 +177,9 @@ var/global/list/obj/machinery/light/alllights = list()
H.apply_damage(rand(1,2), BRUTE, pick(LIMB_RIGHT_LEG, LIMB_LEFT_LEG, LIMB_RIGHT_FOOT, LIMB_LEFT_FOOT))
return SPECIAL_ATTACK_FAILED
/obj/machinery/light/can_overload()
return 0
/obj/machinery/light/broken
icon_state = "ltube-broken" //for the mapper
spawn_with_bulb = /obj/item/weapon/light/tube/broken

View File

@@ -172,6 +172,8 @@
return
set_light(0)
/obj/machinery/power/can_overload()
return 0
// connect the machine to a powernet if a node cable is present on the turf
/obj/machinery/power/proc/connect_to_network()

View File

@@ -245,3 +245,6 @@ var/list/razed_large_artifacts = list()//destroyed while still inside a rock wal
if(prob(50))
M.Stun(5)
M.apply_radiation(25, RAD_EXTERNAL)
/obj/machinery/artifact/can_overload()
return 0