forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing content to entombed alt actions file
- Loading branch information
1 parent
f68fa1d
commit 3098415
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// This code handles the strip menu minutae for re-enabling someone's deactivated entombed suit. | ||
|
||
/datum/strippable_item/mob_item_slot/back/get_alternate_actions(atom/source, mob/user) | ||
. = ..() | ||
var/obj/item/mod/control/pre_equipped/entombed/entombed_suit = get_item(source) | ||
if(!istype(entombed_suit)) | ||
return | ||
|
||
if(!entombed_suit.active) | ||
return list("entombed_emergency_reactivate") | ||
|
||
/datum/strippable_item/mob_item_slot/back/perform_alternate_action(atom/source, mob/user, action_key) | ||
. = ..() | ||
var/obj/item/mod/control/pre_equipped/entombed/entombed_suit = get_item(source) | ||
if(!istype(entombed_suit)) | ||
return null | ||
|
||
switch(action_key) | ||
if("entombed_emergency_reactivate") | ||
if(!entombed_suit.active) | ||
user.visible_message(span_info("[user] begins initiating emergency reactivation procedures on [entombed_suit]...")) | ||
if(do_after(user, 3 SECONDS, entombed_suit.wearer)) | ||
// deploy all our parts so activation actually works | ||
for(var/obj/item/part as anything in entombed_suit.get_parts()) | ||
entombed_suit.deploy(user, part) | ||
entombed_suit.toggle_activate(user, TRUE) | ||
else | ||
user.balloon_alert(usr, "their suit is already online!") |