Further runtime fixes by AnturK.
This commit is contained in:
@@ -527,7 +527,7 @@ GLOBAL_LIST_EMPTY(possible_items)
|
||||
else if(targetinfo.check_special_completion(I))//Returns 1 by default. Items with special checks will return 1 if the conditions are fulfilled.
|
||||
return TRUE
|
||||
|
||||
if(targetinfo && I.type in targetinfo.altitems) //Ok, so you don't have the item. Do you have an alternative, at least?
|
||||
if(targetinfo && (I.type in targetinfo.altitems)) //Ok, so you don't have the item. Do you have an alternative, at least?
|
||||
if(targetinfo.check_special_completion(I))//Yeah, we do! Don't return 0 if we don't though - then you could fail if you had 1 item that didn't pass and got checked first!
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -319,7 +319,8 @@
|
||||
if(status)
|
||||
change_msg = "reactivates"
|
||||
triggerCameraAlarm()
|
||||
addtimer(CALLBACK(src, .proc/cancelCameraAlarm), 100)
|
||||
if(!QDELETED(src)) //We'll be doing it anyway in destroy
|
||||
addtimer(CALLBACK(src, .proc/cancelCameraAlarm), 100)
|
||||
if(displaymessage)
|
||||
if(user)
|
||||
visible_message("<span class='danger'>[user] [change_msg] [src]!</span>")
|
||||
|
||||
@@ -119,6 +119,9 @@
|
||||
|
||||
if(istype(P, /obj/item/circuitboard/machine))
|
||||
var/obj/item/circuitboard/machine/B = P
|
||||
if(!B.build_path)
|
||||
to_chat(user, "<span class'warning'>This circuitboard seems to be broken.</span>")
|
||||
return
|
||||
if(!anchored && B.needs_anchored)
|
||||
to_chat(user, "<span class='warning'>The frame needs to be secured first!</span>")
|
||||
return
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
var/last_use = 0
|
||||
var/next_use = 0
|
||||
var/obj/effect/abstract/sync_holder/sync_holder
|
||||
var/resync_timer
|
||||
|
||||
/obj/item/desynchronizer/attack_self(mob/living/user)
|
||||
if(world.time < next_use)
|
||||
@@ -56,16 +57,20 @@
|
||||
SEND_SIGNAL(AM, COMSIG_MOVABLE_SECLUDED_LOCATION)
|
||||
last_use = world.time
|
||||
icon_state = "desynchronizer-on"
|
||||
addtimer(CALLBACK(src, .proc/resync), duration)
|
||||
resync_timer = addtimer(CALLBACK(src, .proc/resync), duration , TIMER_STOPPABLE)
|
||||
|
||||
/obj/item/desynchronizer/proc/resync()
|
||||
new /obj/effect/temp_visual/desynchronizer(sync_holder.drop_location())
|
||||
QDEL_NULL(sync_holder)
|
||||
if(resync_timer)
|
||||
deltimer(resync_timer)
|
||||
resync_timer = null
|
||||
icon_state = initial(icon_state)
|
||||
next_use = world.time + (world.time - last_use) // Could be 2*world.time-last_use but that would just be confusing
|
||||
|
||||
/obj/item/desynchronizer/Destroy()
|
||||
resync()
|
||||
if(sync_holder)
|
||||
resync()
|
||||
return ..()
|
||||
|
||||
/obj/effect/abstract/sync_holder
|
||||
|
||||
@@ -42,8 +42,9 @@
|
||||
if(.)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You take down [src].</span>")
|
||||
victim.forceMove(drop_location())
|
||||
victim = null
|
||||
if(victim)
|
||||
victim.forceMove(drop_location())
|
||||
victim = null
|
||||
spear.forceMove(drop_location())
|
||||
spear = null
|
||||
qdel(src)
|
||||
Reference in New Issue
Block a user