mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Tweaks Derelict Facility ruin loot and adds a new item (#26517)
* part 1 * no you don't * Update code/modules/mining/equipment/wormhole_jaunter.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: Kano <89972582+kano-dot@users.noreply.github.com> * Update code/game/objects/items/devices/radio/beacon.dm Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: Kano <89972582+kano-dot@users.noreply.github.com> * Update code/modules/awaymissions/mission_code/ruins/deepstorage.dm Co-authored-by: warriorstar-orion <orion@snowfrost.garden> Signed-off-by: Kano <89972582+kano-dot@users.noreply.github.com> * spawner update * Update code/modules/mining/equipment/wormhole_jaunter.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: Kano <89972582+kano-dot@users.noreply.github.com> * Update code/modules/mining/equipment/wormhole_jaunter.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: Kano <89972582+kano-dot@users.noreply.github.com> * Update code/modules/mining/equipment/wormhole_jaunter.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: Kano <89972582+kano-dot@users.noreply.github.com> * Update code/modules/mining/equipment/wormhole_jaunter.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: Kano <89972582+kano-dot@users.noreply.github.com> * Forgotten main reward * many things were forgotten --------- Signed-off-by: Kano <89972582+kano-dot@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Co-authored-by: warriorstar-orion <orion@snowfrost.garden> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
co-authored by
Burzah
1080pCat
warriorstar-orion
DGamerL
parent
48eaba5ba5
commit
1896ed9fd8
@@ -1,3 +1,6 @@
|
||||
// the stuff used for wormhole weaver
|
||||
GLOBAL_LIST_EMPTY(wormhole_effect)
|
||||
|
||||
/**********************Jaunter**********************/
|
||||
/obj/item/wormhole_jaunter
|
||||
name = "wormhole jaunter"
|
||||
@@ -227,3 +230,197 @@
|
||||
new /obj/effect/portal/jaunt_tunnel(drunken_opening, drunk_dial, src, 100, thrower)
|
||||
new /obj/effect/temp_visual/thunderbolt(drunken_opening)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver
|
||||
name = "wormhole weaver"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "wormhole_weaver"
|
||||
item_state = "electronic"
|
||||
desc = "This peculiar device is a prototype from a discontinued project. It was designed as an alternative to jaunters, offering more precise teleportation. However, as a prototype, it drains its entire battery with a single wormhole and can only target the beacons included in the kit."
|
||||
/// Where are we teleporting to?
|
||||
var/destination
|
||||
/// Power cell (10000W).
|
||||
var/obj/item/stock_parts/cell/high/wcell = null
|
||||
/// The amount it costs to use this.
|
||||
var/chargecost = 10000
|
||||
var/icon_state_inactive = "wormhole_weaver_inactive"
|
||||
/// Used for icon update check.
|
||||
var/inactive = FALSE
|
||||
/// Is user re-activating the device?
|
||||
var/currently_reactivating = FALSE
|
||||
/// Does the user already have the teleportation menu open?
|
||||
var/menu_open = FALSE
|
||||
/// Did we get hit by EMP?
|
||||
var/emp_inflicted = FALSE
|
||||
/// The turf where we activated the wormwhole.
|
||||
var/wormhole_loc
|
||||
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver/attack_self(mob/user)
|
||||
activate(user, TRUE)
|
||||
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver/emp_act(severity)
|
||||
|
||||
if(!emp_inflicted)
|
||||
playsound(loc, 'sound/machines/shut_down.ogg', 50, TRUE)
|
||||
visible_message("<span class='warning'>A malfunction detected in the weaver's subsystems. Initiating safety protocols.</span>")
|
||||
emp_inflicted = TRUE
|
||||
inactive = TRUE
|
||||
icon_state = icon_state_inactive
|
||||
for(var/obj/O in contents)
|
||||
O.emp_act(severity)
|
||||
for(var/obj/effect/temp_visual/thunderbolt_targeting/wormhole_weaver/E in GLOB.wormhole_effect)
|
||||
if(E)
|
||||
qdel(E)
|
||||
visible_message("<span class='warning'>Wormhole marker disappears!</span>")
|
||||
do_sparks(5, FALSE, wormhole_loc)
|
||||
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver/proc/prepare_foractivation(mob/user)
|
||||
if(do_after(user, 3 SECONDS, target = src))
|
||||
playsound(loc, 'sound/machines/twobeep.ogg', 50, TRUE)
|
||||
to_chat(user, "<span class='notice'>The weaver is now ready for use.</span>")
|
||||
inactive = FALSE
|
||||
emp_inflicted = FALSE
|
||||
currently_reactivating = FALSE
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
currently_reactivating = FALSE
|
||||
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver/get_destinations(mob/user)
|
||||
var/list/destinations = list()
|
||||
|
||||
for(var/obj/item/beacon/B in GLOB.beacons)
|
||||
if(B.wormhole_weaver)
|
||||
destinations += B
|
||||
|
||||
return destinations
|
||||
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver/activate(mob/user)
|
||||
if(wcell.charge < chargecost)
|
||||
to_chat(user, "<span class='warning'>Device isn't charged enough to be used at this time.</span>")
|
||||
return
|
||||
|
||||
if(inactive || emp_inflicted)
|
||||
if(currently_reactivating)
|
||||
to_chat(user, "<span class='warning'>You are already reactivating the device!</span>")
|
||||
return
|
||||
currently_reactivating = TRUE
|
||||
prepare_foractivation(user)
|
||||
return
|
||||
|
||||
var/list/C = get_destinations(user)
|
||||
if(!length(C))
|
||||
to_chat(user, "<span class='notice'>[src] found no beacons in the world to anchor a wormhole to.</span>")
|
||||
return
|
||||
|
||||
if(menu_open)
|
||||
return
|
||||
|
||||
var/list/L = list()
|
||||
var/list/areaindex = list()
|
||||
menu_open = TRUE
|
||||
|
||||
for(var/obj/item/beacon/R in GLOB.beacons)
|
||||
var/turf/T = get_turf(R)
|
||||
if(!T)
|
||||
continue
|
||||
if(!R.wormhole_weaver)
|
||||
continue
|
||||
var/tmpname = T.loc.name
|
||||
if(areaindex[tmpname])
|
||||
tmpname = "[tmpname] ([++areaindex[tmpname]])"
|
||||
else
|
||||
areaindex[tmpname] = 1
|
||||
L[tmpname] = R
|
||||
|
||||
var/desc = tgui_input_list(user, "Please select a location to target.", "Device Target Interface", L)
|
||||
if(!desc)
|
||||
menu_open = FALSE
|
||||
return
|
||||
|
||||
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !turf_check(user) || !Adjacent(user))
|
||||
menu_open = FALSE
|
||||
return
|
||||
|
||||
wormhole_loc = get_turf(src)
|
||||
new /obj/effect/temp_visual/thunderbolt_targeting/wormhole_weaver(wormhole_loc)
|
||||
destination = L[desc]
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] pulls out a black colored device and points it to the floor.</span>",
|
||||
"<span class='notice'>You activate the wormhole weaver, it will take some time until device assembles a wormhole link.</span>"
|
||||
)
|
||||
wcell.use(chargecost)
|
||||
icon_state = icon_state_inactive
|
||||
inactive = TRUE
|
||||
menu_open = FALSE
|
||||
|
||||
sleep(5 SECONDS)
|
||||
if(emp_inflicted)
|
||||
return
|
||||
|
||||
create_wormhole(wormhole_loc, destination)
|
||||
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver/proc/create_wormhole(used_turf, turf/destination)
|
||||
new /obj/effect/portal/jaunt_tunnel(used_turf, get_turf(destination), src, 100)
|
||||
do_sparks(5, FALSE, used_turf)
|
||||
|
||||
// overridden because we don't need this
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver/chasm_react(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver/emag_act(mob/user)
|
||||
to_chat(user, "<span class='warning'>Emagging [src] has no effect.</span>")
|
||||
|
||||
/obj/effect/temp_visual/thunderbolt_targeting/wormhole_weaver
|
||||
duration = 5 SECONDS
|
||||
|
||||
/obj/effect/temp_visual/thunderbolt_targeting/wormhole_weaver/Initialize()
|
||||
. = ..()
|
||||
GLOB.wormhole_effect += src
|
||||
playsound(loc, 'sound/machines/twobeep.ogg', 50, TRUE)
|
||||
set_light(2, l_color = "#FFD165")
|
||||
|
||||
/obj/effect/temp_visual/thunderbolt_targeting/wormhole_weaver/Destroy()
|
||||
GLOB.wormhole_effect -= src
|
||||
return ..()
|
||||
|
||||
// below here is recharge code for wormhole weaver, taken from rcs code
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver/get_cell()
|
||||
return wcell
|
||||
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver/New()
|
||||
..()
|
||||
wcell = new(src)
|
||||
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Device currently has [chargecost > wcell.charge ? "insufficient" : "sufficient"] power. You can recharge it with a recharger.</span>"
|
||||
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver/Destroy()
|
||||
QDEL_NULL(wcell)
|
||||
return ..()
|
||||
|
||||
/obj/item/paper/fluff/weaver_instruction
|
||||
name = "prototype guideline"
|
||||
info = {"<hr><center><h2>Introduction and Caution</h2></center><hr>
|
||||
<br><br>
|
||||
Firstly, thank you for your interest in our cutting-edge technology. The package you hold contains three (3) targeting beacons, each tuned to emit a specific frequency
|
||||
that can only be detected by wormhole weaver devices. For this reason, do not damage or destroy the beacons under any circumstances.
|
||||
<br><br>
|
||||
Using this device is fairly simple. First, choose a target destination and confirm your choice. Then, point the device at the location where you want the wormhole to
|
||||
position itself. It will take approximately five seconds for the weaver to establish a connection.
|
||||
<br><br>
|
||||
Please note that this prototype must be fully charged before use. Each activation drains the entire battery, and after each recharge, the device must be manually
|
||||
reactivated. Due to its fragile design, even the slightest malfunction will trigger safety protocols, immediately canceling the weaving process. Therefore, keep the
|
||||
device away from EMP interference.
|
||||
<br><br>
|
||||
It is also highly advised to avoid taking a wormhole on a full stomach."}
|
||||
|
||||
/obj/item/storage/box/weaver_kit
|
||||
name = "dusty package"
|
||||
|
||||
/obj/item/storage/box/weaver_kit/populate_contents()
|
||||
new /obj/item/wormhole_jaunter/wormhole_weaver(src)
|
||||
new /obj/item/paper/fluff/weaver_instruction(src)
|
||||
new /obj/item/beacon/wormhole_weaver(src)
|
||||
new /obj/item/beacon/wormhole_weaver(src)
|
||||
new /obj/item/beacon/wormhole_weaver(src)
|
||||
|
||||
Reference in New Issue
Block a user