Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/game/objects/items/implants/implant_explosive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
return dat

/obj/item/implant/explosive/activate(cause)
. = ..()
if(!cause || !imp_in || active)
return 0
if(cause == "action_button" && !popup)
Expand All @@ -41,6 +40,7 @@
weak = round(weak)
to_chat(imp_in, "<span class='notice'>You activate your [name].</span>")
active = TRUE
. = ..()
var/turf/boomturf = get_turf(imp_in)
message_admins("[ADMIN_LOOKUPFLW(imp_in)] has activated their [name] at [ADMIN_VERBOSEJMP(boomturf)], with cause of [cause].")
//If the delay is short, just blow up already jeez
Expand Down
26 changes: 26 additions & 0 deletions code/modules/antagonists/ninja/ninja.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
GLOBAL_LIST_EMPTY(ninja_capture)

/datum/antagonist/ninja
name = "Ninja"
antagpanel_category = "Ninja"
Expand All @@ -15,10 +17,16 @@

/datum/antagonist/ninja/apply_innate_effects(mob/living/mob_override)
var/mob/living/M = mob_override || owner.current
for(var/obj/item/implant/explosive/E in M.implants)
if(E)
RegisterSignal(E, COMSIG_IMPLANT_ACTIVATED, .proc/on_death)
update_ninja_icons_added(M)

/datum/antagonist/ninja/remove_innate_effects(mob/living/mob_override)
var/mob/living/M = mob_override || owner.current
for(var/obj/item/implant/explosive/E in M.implants)
if(E)
UnregisterSignal(M, COMSIG_IMPLANT_ACTIVATED, .proc/on_death)
update_ninja_icons_removed(M)

/datum/antagonist/ninja/proc/equip_space_ninja(mob/living/carbon/human/H = owner.current)
Expand Down Expand Up @@ -125,6 +133,24 @@
equip_space_ninja(owner.current)
. = ..()

/datum/antagonist/ninja/proc/on_death()
for(var/mob/L in GLOB.ninja_capture)
if(get_area(L) == GLOB.areas_by_type[/area/centcom/holding])
if(!L)
continue
var/atom/movable/target = L
if(isobj(L.loc))
target = L.loc
target.forceMove(get_turf(pick(GLOB.generic_event_spawns)))
if(isliving(L))
var/mob/living/LI = L
LI.Knockdown(120)
LI.blind_eyes(10)
to_chat(L, "<span class='danger'>You lose your footing as the dojo suddenly disappears. You're free!</span>")
playsound(L, 'sound/effects/phasein.ogg', 25, 1)
playsound(L, 'sound/effects/sparks2.ogg', 50, 1)
GLOB.ninja_capture -= L

/datum/antagonist/ninja/admin_add(datum/mind/new_owner,mob/admin)
var/adj
switch(input("What kind of ninja?", "Ninja") as null|anything in list("Random","Syndicate","Nanotrasen","No objectives"))
Expand Down
7 changes: 4 additions & 3 deletions code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ It is possible to destroy the net by the occupant or someone else.
if(!QDELETED(affecting))
affecting.visible_message("[affecting.name] was recovered from the energy net!", "You were recovered from the energy net!", "<span class='italics'>You hear a grunt.</span>")
if(!QDELETED(master))//As long as they still exist.
to_chat(master, "<span class='userdanger'>ERROR</span>: unable to initiate transport protocol. Procedure terminated.")
to_chat(master, "<span class='userdanger'>ERROR</span>: unable to initiate capture protocol. Procedure terminated.")
return ..()

/obj/structure/energy_net/process()
Expand Down Expand Up @@ -64,10 +64,11 @@ It is possible to destroy the net by the occupant or someone else.

visible_message("[affecting] suddenly vanishes!")
affecting.forceMove(pick(GLOB.holdingfacility)) //Throw mob in to the holding facility.
to_chat(affecting, "<span class='danger'>You appear in a strange place!</span>")
GLOB.ninja_capture += affecting
to_chat(affecting, "<span class='danger'>You appear in a strange place. You feel very trapped.</span>")

if(!QDELETED(master))//As long as they still exist.
to_chat(master, "<span class='notice'><b>SUCCESS</b>: transport procedure of [affecting] complete.</span>")
to_chat(master, "<span class='notice'><b>SUCCESS</b>: capture procedure of [affecting] complete.</span>")
do_sparks(5, FALSE, affecting)
playsound(affecting, 'sound/effects/phasein.ogg', 25, 1)
playsound(affecting, 'sound/effects/sparks2.ogg', 50, 1)
Expand Down