Merge branch 'master' into QM-as-Head
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
var/ghetto = FALSE
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
var/datum/component/mobhook
|
||||
|
||||
/obj/item/twohanded/rcl/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
@@ -84,7 +85,7 @@
|
||||
/obj/item/twohanded/rcl/Destroy()
|
||||
QDEL_NULL(loaded)
|
||||
last = null
|
||||
active = FALSE
|
||||
setActive(FALSE, null) // setactive(FALSE) removes mobhook
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/rcl/update_icon()
|
||||
@@ -115,18 +116,19 @@
|
||||
QDEL_NULL(loaded)
|
||||
loaded = null
|
||||
unwield(user)
|
||||
active = wielded
|
||||
setActive(wielded, user)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/twohanded/rcl/dropped(mob/wearer)
|
||||
..()
|
||||
active = FALSE
|
||||
if(mobhook)
|
||||
setActive(FALSE, mobhook.parent)
|
||||
last = null
|
||||
|
||||
/obj/item/twohanded/rcl/attack_self(mob/user)
|
||||
..()
|
||||
active = wielded
|
||||
setActive(wielded, user)
|
||||
if(!active)
|
||||
last = null
|
||||
else if(!last)
|
||||
@@ -135,9 +137,15 @@
|
||||
last = C
|
||||
break
|
||||
|
||||
/obj/item/twohanded/rcl/on_mob_move(direct, mob/user)
|
||||
if(active)
|
||||
trigger(user)
|
||||
/obj/item/twohanded/rcl/proc/setActive(toggle, mob/user)
|
||||
active = toggle
|
||||
if (active && user)
|
||||
if (mobhook && mobhook.parent != user)
|
||||
QDEL_NULL(mobhook)
|
||||
if (!mobhook)
|
||||
mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED), CALLBACK(src, .proc/trigger, user))
|
||||
else
|
||||
QDEL_NULL(mobhook)
|
||||
|
||||
/obj/item/twohanded/rcl/proc/trigger(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
@@ -148,7 +156,7 @@
|
||||
|
||||
if(prob(2) && ghetto) //Give ghetto RCLs a 2% chance to jam, requiring it to be reactviated manually.
|
||||
to_chat(user, "<span class='warning'>[src]'s wires jam!</span>")
|
||||
active = FALSE
|
||||
setActive(FALSE, user)
|
||||
return
|
||||
else
|
||||
if(last)
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
/obj/item/device/sensor_device/attack_self(mob/user)
|
||||
GLOB.crewmonitor.show(user) //Proc already exists, just had to call it
|
||||
GLOB.crewmonitor.show(user,src) //Proc already exists, just had to call it
|
||||
|
||||
@@ -202,15 +202,6 @@
|
||||
/obj/proc/check_uplink_validity()
|
||||
return 1
|
||||
|
||||
/obj/proc/on_mob_move(dir, mob, oldLoc, forced)
|
||||
return
|
||||
|
||||
/obj/proc/on_mob_turn(dir, mob)
|
||||
return
|
||||
|
||||
/obj/proc/intercept_user_move(dir, mob, newLoc, oldLoc)
|
||||
return
|
||||
|
||||
/obj/vv_get_dropdown()
|
||||
. = ..()
|
||||
.["Delete all of type"] = "?_src_=vars;[HrefToken()];delall=[REF(src)]"
|
||||
|
||||
Reference in New Issue
Block a user