Merge pull request #49808 from ATH1909/finally

[READY] Cyborgs can finally unbuckle people from chairs
This commit is contained in:
Rohesie
2020-03-19 17:47:55 -03:00
committed by GitHub
4 changed files with 22 additions and 13 deletions
+8
View File
@@ -322,6 +322,14 @@ Class Procs:
/obj/machinery/attack_robot(mob/user)
if(!(interaction_flags_machine & INTERACT_MACHINE_ALLOW_SILICON) && !IsAdminGhost(user))
return FALSE
if(Adjacent(user) && can_buckle && has_buckled_mobs()) //so that borgs (but not AIs, sadly (perhaps in a future PR?)) can unbuckle people from machines
if(buckled_mobs.len > 1)
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in sortNames(buckled_mobs)
if(user_unbuckle_mob(unbuckled,user))
return TRUE
else
if(user_unbuckle_mob(buckled_mobs[1],user))
return TRUE
return _try_interact(user)
/obj/machinery/attack_ai(mob/user)
-5
View File
@@ -161,9 +161,4 @@
/obj/machinery/stasis/nap_violation(mob/violator)
unbuckle_mob(violator, TRUE)
/obj/machinery/stasis/attack_robot(mob/user)
if(Adjacent(user) && occupant)
unbuckle_mob(occupant)
else
..()
#undef STASIS_TOGGLE_COOLDOWN
+14
View File
@@ -20,6 +20,20 @@
if(user_unbuckle_mob(buckled_mobs[1],user))
return 1
//literally just the above extension of attack_hand(), but for silicons instead (with an adjacency check, since attack_robot() being called doesn't mean that you're adjacent to something)
/atom/movable/attack_robot(mob/living/user)
. = ..()
if(.)
return
if(Adjacent(user) && can_buckle && has_buckled_mobs())
if(buckled_mobs.len > 1)
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in sortNames(buckled_mobs)
if(user_unbuckle_mob(unbuckled,user))
return TRUE
else
if(user_unbuckle_mob(buckled_mobs[1],user))
return TRUE
/atom/movable/MouseDrop_T(mob/living/M, mob/living/user)
. = ..()
return mouse_buckle_handling(M, user)
@@ -4,14 +4,6 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
/obj/item/clothing/head/chameleon/broken \
)))
/mob/living/silicon/robot/attack_robot(mob/user)
. = ..()
if(user == src && has_buckled_mobs() && user.a_intent == INTENT_HELP)
for(var/i in buckled_mobs)
var/mob/buckmob = i
unbuckle_mob(buckmob)
/mob/living/silicon/robot/attackby(obj/item/W, mob/user, params)
if(W.tool_behaviour == TOOL_WELDER && (user.a_intent != INTENT_HARM || user == src))
user.changeNext_move(CLICK_CD_MELEE)