mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[MIRROR] Fixes deployable turrets not actually being undeployable. (#27655)
* Fixes deployable turrets not actually being undeployable. (#83061) Fixes #83053 --------- Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com> * Fixes deployable turrets not actually being undeployable. --------- Co-authored-by: Afevis <ShizCalev@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
This commit is contained in:
co-authored by
MrMelbert
Afevis
parent
35a7f722c9
commit
249495424b
@@ -51,19 +51,21 @@
|
||||
|
||||
/// Undeploying, for when you want to move your big dakka around
|
||||
/obj/machinery/deployable_turret/wrench_act(mob/living/user, obj/item/wrench/used_wrench)
|
||||
. = ..()
|
||||
if(!can_be_undeployed)
|
||||
return
|
||||
return ITEM_INTERACT_SKIP_TO_ATTACK
|
||||
if(!ishuman(user))
|
||||
return
|
||||
return ITEM_INTERACT_SKIP_TO_ATTACK
|
||||
used_wrench.play_tool_sound(user)
|
||||
user.balloon_alert(user, "undeploying...")
|
||||
if(!do_after(user, undeploy_time))
|
||||
return
|
||||
var/obj/undeployed_object = new spawned_on_undeploy(src)
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
var/obj/undeployed_object = new spawned_on_undeploy()
|
||||
//Keeps the health the same even if you redeploy the gun
|
||||
undeployed_object.modify_max_integrity(max_integrity)
|
||||
if(!user.put_in_hands(undeployed_object))
|
||||
undeployed_object.forceMove(loc)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
//BUCKLE HOOKS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user