Merge pull request #11372 from Ghommie/Ghommie-cit610
Of runtimes and null.
This commit is contained in:
@@ -283,6 +283,7 @@
|
||||
if(!C.legcuffed && C.get_num_legs(FALSE) >= 2) //beartrap can't cuff your leg if there's already a beartrap or legcuffs, or you don't have two legs.
|
||||
C.legcuffed = src
|
||||
forceMove(C)
|
||||
C.update_equipment_speed_mods()
|
||||
C.update_inv_legcuffed()
|
||||
SSblackbox.record_feedback("tally", "handcuffs", 1, type)
|
||||
else if(isanimal(L))
|
||||
|
||||
@@ -1333,7 +1333,7 @@
|
||||
/obj/item/storage/box/beakers/bluespace=1,\
|
||||
/obj/item/storage/box/beakers/variety=1,\
|
||||
/obj/item/storage/box/material=1,\
|
||||
/obj/item/storage/belt/medical/surgery_belt_adv
|
||||
/obj/item/storage/belt/medical/surgery_belt_adv=1
|
||||
)
|
||||
generate_items_inside(items_inside, src)
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
var/do_knockdown = !is_A_facing_B(target,owner) || owner.alpha <= 0 || istype(owner.loc, /obj/structure/closet)
|
||||
// CAUSES: Target has their back to me, I'm invisible, or I'm in a Closet
|
||||
// Step One: Heatseek toward Target's Turf
|
||||
addtimer(CALLBACK(owner, .proc/_walk, 0), 2 SECONDS)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/_walk, owner, 0), 2 SECONDS)
|
||||
target.playsound_local(get_turf(owner), 'sound/bloodsucker/lunge_warn.ogg', 60, FALSE, pressure_affected = FALSE) // target-only telegraphing
|
||||
owner.playsound_local(owner, 'sound/bloodsucker/lunge_warn.ogg', 60, FALSE, pressure_affected = FALSE) // audio feedback to the user
|
||||
if(do_mob(owner, owner, 7, TRUE, TRUE))
|
||||
|
||||
@@ -56,7 +56,10 @@
|
||||
/obj/item/clothing/shoes/magboots/advance/debug
|
||||
|
||||
/obj/item/clothing/shoes/magboots/advance/debug/Initialize()
|
||||
attack_self(src)
|
||||
. = ..()
|
||||
var/mob/living/L = loc
|
||||
if(istype(L))
|
||||
attack_self(L)
|
||||
|
||||
/obj/item/clothing/shoes/magboots/paramedic
|
||||
desc = "A pair of magboots decked in colors matching the equipment of an emergency medical technician."
|
||||
|
||||
@@ -412,16 +412,16 @@
|
||||
else
|
||||
if(I == handcuffed)
|
||||
handcuffed.forceMove(drop_location())
|
||||
handcuffed.dropped(src)
|
||||
handcuffed = null
|
||||
I.dropped(src)
|
||||
if(buckled && buckled.buckle_requires_restraints)
|
||||
buckled.unbuckle_mob(src)
|
||||
update_handcuffed()
|
||||
return
|
||||
if(I == legcuffed)
|
||||
legcuffed.forceMove(drop_location())
|
||||
legcuffed.dropped()
|
||||
legcuffed = null
|
||||
I.dropped(src)
|
||||
update_inv_legcuffed()
|
||||
return
|
||||
else
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
layer = BELOW_MOB_LAYER
|
||||
var/obj/item/instrument/piano_synth/internal_instrument
|
||||
silicon_privileges = PRIVILEDGES_PAI
|
||||
var/datum/element/mob_holder/current_mob_holder //because only a few of their chassis can be actually held.
|
||||
|
||||
var/network = "ss13"
|
||||
var/obj/machinery/camera/current = null
|
||||
@@ -142,6 +141,11 @@
|
||||
ALM.Grant(src)
|
||||
emitter_next_use = world.time + 10 SECONDS
|
||||
|
||||
/mob/living/silicon/pai/ComponentInitialize()
|
||||
. = ..()
|
||||
if(possible_chassis[chassis])
|
||||
AddElement(/datum/element/mob_holder, chassis, 'icons/mob/pai_item_head.dmi', 'icons/mob/pai_item_rh.dmi', 'icons/mob/pai_item_lh.dmi', ITEM_SLOT_HEAD)
|
||||
|
||||
/mob/living/silicon/pai/Life()
|
||||
if(hacking)
|
||||
process_hack()
|
||||
@@ -302,11 +306,11 @@
|
||||
/obj/item/paicard/attackby(obj/item/W, mob/user, params)
|
||||
..()
|
||||
user.set_machine(src)
|
||||
if(pai.encryptmod == TRUE)
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
pai.radio.attackby(W, user, params)
|
||||
else if(istype(W, /obj/item/encryptionkey))
|
||||
pai.radio.attackby(W, user, params)
|
||||
var/encryption_key_stuff = W.tool_behaviour == TOOL_SCREWDRIVER || istype(W, /obj/item/encryptionkey)
|
||||
if(!encryption_key_stuff)
|
||||
return
|
||||
if(pai?.encryptmod)
|
||||
pai.radio.attackby(W, user, params)
|
||||
else
|
||||
to_chat(user, "Encryption Key ports not configured.")
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
var/list/choices = list("Preset - Basic", "Preset - Dynamic")
|
||||
if(CONFIG_GET(flag/pai_custom_holoforms))
|
||||
choices += "Custom"
|
||||
var/old_chassis = chassis
|
||||
var/choicetype = input(src, "What type of chassis do you want to use?") as null|anything in choices
|
||||
if(!choicetype)
|
||||
return FALSE
|
||||
@@ -95,10 +96,11 @@
|
||||
dynamic_chassis = choice
|
||||
resist_a_rest(FALSE, TRUE)
|
||||
update_icon()
|
||||
current_mob_holder?.Detach(src)
|
||||
current_mob_holder = null
|
||||
if(possible_chassis[old_chassis])
|
||||
var/datum/element/mob_holder/M = SSdcs.GetElement(/datum/element/mob_holder, old_chassis, 'icons/mob/pai_item_head.dmi', 'icons/mob/pai_item_rh.dmi', 'icons/mob/pai_item_lh.dmi', ITEM_SLOT_HEAD)
|
||||
M.Detach(src)
|
||||
if(possible_chassis[chassis])
|
||||
current_mob_holder = AddElement(/datum/element/mob_holder, chassis, 'icons/mob/pai_item_head.dmi', 'icons/mob/pai_item_rh.dmi', 'icons/mob/pai_item_lh.dmi', ITEM_SLOT_HEAD)
|
||||
AddElement(/datum/element/mob_holder, chassis, 'icons/mob/pai_item_head.dmi', 'icons/mob/pai_item_rh.dmi', 'icons/mob/pai_item_lh.dmi', ITEM_SLOT_HEAD)
|
||||
to_chat(src, "<span class='boldnotice'>You switch your holochassis projection composite to [chassis]</span>")
|
||||
|
||||
/mob/living/silicon/pai/lay_down()
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
swallow_time = istype(prey, /mob/living/carbon/human) ? belly.human_prey_swallow_time : belly.nonhuman_prey_swallow_time
|
||||
|
||||
//Timer and progress bar
|
||||
if(!do_after(user, swallow_time, prey))
|
||||
if(!do_after(user, swallow_time, TRUE, prey))
|
||||
return FALSE // Prey escaped (or user disabled) before timer expired.
|
||||
|
||||
if(!prey.Adjacent(user)) //double check'd just in case they moved during the timer and the do_mob didn't fail for whatever reason
|
||||
|
||||
Reference in New Issue
Block a user