mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Adds the Emergency Extraction Flare (#16220)
* Adds the Emergency Extraction Flare * removes extra message * Apply suggestions from code review Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: dearmochi <shenesis@gmail.com> * All I ever get, is a pain in the ash... 🎵 * Affecteds requests part 1 Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * Use populate_contents * Update code/modules/mining/equipment/wormhole_jaunter.dm Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> Co-authored-by: dearmochi <shenesis@gmail.com> Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
co-authored by
S34N
dearmochi
AffectedArc07
parent
7e16877a2e
commit
1b1f49ac81
@@ -89,3 +89,87 @@
|
||||
if(ishuman(L))
|
||||
shake_camera(L, 20, 1)
|
||||
addtimer(CALLBACK(L, /mob/living/carbon.proc/vomit), 20)
|
||||
|
||||
/obj/item/wormhole_jaunter/contractor
|
||||
name = "emergency extraction flare"
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
desc = "A single-use extraction flare that will let you create a portal to any beacon on the station. You must choose the destination beforehand, else it will target a random beacon. The portal is generated 5 seconds after activation, and has 1 use."
|
||||
icon_state = "flare-contractor"
|
||||
item_state = "flare"
|
||||
var/destination
|
||||
|
||||
/obj/item/wormhole_jaunter/contractor/verb/set_destination()
|
||||
set category = "Object"
|
||||
set name = "Change Portal Destination"
|
||||
set src in usr
|
||||
|
||||
var/list/L = list()
|
||||
var/list/areaindex = list()
|
||||
|
||||
for(var/obj/item/radio/beacon/R in GLOB.beacons)
|
||||
var/turf/T = get_turf(R)
|
||||
if(!T)
|
||||
continue
|
||||
if(!is_teleport_allowed(T.z))
|
||||
continue
|
||||
var/tmpname = T.loc.name
|
||||
if(areaindex[tmpname])
|
||||
tmpname = "[tmpname] ([++areaindex[tmpname]])"
|
||||
else
|
||||
areaindex[tmpname] = 1
|
||||
L[tmpname] = R
|
||||
|
||||
var/desc = input("Please select a location to target.", "Flare Target Interface") in L
|
||||
destination = L[desc]
|
||||
return
|
||||
|
||||
/obj/item/wormhole_jaunter/contractor/attack_self(mob/user) // message is later down
|
||||
activate(user, TRUE)
|
||||
|
||||
/obj/item/wormhole_jaunter/contractor/activate(mob/user)
|
||||
if(!turf_check(user))
|
||||
return
|
||||
if(!destination)
|
||||
var/list/L = get_destinations(user)
|
||||
if(!length(L))
|
||||
to_chat(user, "<span class='warning'>[src] found no beacons in the sector to target.</span>")
|
||||
return
|
||||
destination = pick(L)
|
||||
var/obj/effect/temp_visual/getaway_flare/F = new(get_turf(src))
|
||||
user.visible_message("<span class='notice'>[user] pulls out a black and gold flare and lights it.</span>",\
|
||||
"<span class='notice'>You light an emergency extraction flare, initiating the extraction process.</span>")
|
||||
user.drop_item()
|
||||
forceMove(F)
|
||||
addtimer(CALLBACK(src, .proc/create_portal, destination), 5 SECONDS)
|
||||
|
||||
/obj/item/wormhole_jaunter/contractor/proc/create_portal(turf/destination)
|
||||
new /obj/effect/decal/cleanable/ash(get_turf(src))
|
||||
new /obj/effect/portal/redspace/getaway(get_turf(src), get_turf(destination), src, 100)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/wormhole_jaunter/contractor/emag_act(mob/user)
|
||||
to_chat(user, "<span class='warning'>Emagging [src] has no effect.</span>")
|
||||
|
||||
/obj/item/wormhole_jaunter/contractor/chasm_react(mob/user)
|
||||
return //This is not an instant getaway portal like the jaunter
|
||||
|
||||
/obj/item/storage/box/syndie_kit/escape_flare
|
||||
name = "emergency extraction kit"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/escape_flare/populate_contents()
|
||||
new /obj/item/wormhole_jaunter/contractor(src)
|
||||
new /obj/item/radio/beacon/emagged(src)
|
||||
|
||||
/obj/effect/portal/redspace/getaway
|
||||
one_use = TRUE
|
||||
|
||||
/obj/effect/temp_visual/getaway_flare // Because the original contractor flare is not a temp visual, for some reason.
|
||||
name = "contractor extraction flare"
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "flare-contractor-on"
|
||||
duration = 5.1 SECONDS // Needs to be slightly longer then the callback to make the portal
|
||||
|
||||
/obj/effect/temp_visual/getaway_flare/Initialize()
|
||||
. = ..()
|
||||
playsound(loc, 'sound/goonstation/misc/matchstick_light.ogg', 50, TRUE)
|
||||
set_light(8, l_color = "#FFD165")
|
||||
|
||||
Reference in New Issue
Block a user