mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 11:34:19 +01:00
Ports TG's Fultons
This commit is contained in:
@@ -413,7 +413,7 @@
|
||||
new /datum/data/mining_equipment("Stabilizing Serum", /obj/item/hivelordstabilizer, 400),
|
||||
new /datum/data/mining_equipment("Space Cash", /obj/item/stack/spacecash/c1000, 2000),
|
||||
new /datum/data/mining_equipment("Point Transfer Card", /obj/item/card/mining_point_card, 500),
|
||||
// new /datum/data/mining_equipment("Fulton Beacon", /obj/item/fulton_core, 400),
|
||||
new /datum/data/mining_equipment("Fulton Beacon", /obj/item/fulton_core, 400),
|
||||
new /datum/data/mining_equipment("Shelter Capsule", /obj/item/survivalcapsule, 400),
|
||||
new /datum/data/mining_equipment("GAR Meson Scanners", /obj/item/clothing/glasses/meson/gar, 500),
|
||||
new /datum/data/mining_equipment("Explorer's Webbing", /obj/item/storage/belt/mining, 500),
|
||||
@@ -425,7 +425,7 @@
|
||||
new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/gun/energy/kinetic_accelerator, 750),
|
||||
new /datum/data/mining_equipment("Advanced Scanner", /obj/item/t_scanner/adv_mining_scanner, 800),
|
||||
new /datum/data/mining_equipment("Resonator", /obj/item/resonator, 800),
|
||||
// new /datum/data/mining_equipment("Fulton Pack", /obj/item/extraction_pack, 1000),
|
||||
new /datum/data/mining_equipment("Fulton Pack", /obj/item/extraction_pack, 1000),
|
||||
new /datum/data/mining_equipment("Lazarus Injector", /obj/item/lazarus_injector, 1000),
|
||||
new /datum/data/mining_equipment("Silver Pickaxe", /obj/item/pickaxe/silver, 1000),
|
||||
new /datum/data/mining_equipment("Mining Conscription Kit", /obj/item/storage/backpack/duffel/mining_conscript, 1500),
|
||||
@@ -602,7 +602,7 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/proc/RedeemVoucher(obj/item/mining_voucher/voucher, mob/redeemer)
|
||||
var/items = list("Survival Capsule and Explorer's Webbing", "Resonator Kit", "Minebot Kit", "Crusher Kit", "Mining Conscription Kit")
|
||||
var/items = list("Survival Capsule and Explorer's Webbing", "Resonator Kit", "Minebot Kit", "Extraction and Rescue Kit", "Crusher Kit", "Mining Conscription Kit")
|
||||
|
||||
var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") as null|anything in items
|
||||
if(!selection || !Adjacent(redeemer) || QDELETED(voucher) || voucher.loc != redeemer)
|
||||
@@ -619,10 +619,10 @@
|
||||
new /obj/item/mining_drone_cube(drop_location)
|
||||
new /obj/item/weldingtool/hugetank(drop_location)
|
||||
new /obj/item/clothing/head/welding(drop_location)
|
||||
// if("Extraction and Rescue Kit")
|
||||
// new /obj/item/extraction_pack(drop_location)
|
||||
// new /obj/item/fulton_core(drop_location)
|
||||
// new /obj/item/stack/marker_beacon/thirty(drop_location)
|
||||
if("Extraction and Rescue Kit")
|
||||
new /obj/item/extraction_pack(drop_location)
|
||||
new /obj/item/fulton_core(drop_location)
|
||||
new /obj/item/stack/marker_beacon/thirty(drop_location)
|
||||
if("Crusher Kit")
|
||||
new /obj/item/extinguisher/mini(drop_location)
|
||||
new /obj/item/twohanded/required/kinetic_crusher(drop_location)
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
GLOBAL_LIST_EMPTY(total_extraction_beacons)
|
||||
|
||||
/obj/item/extraction_pack
|
||||
name = "fulton extraction pack"
|
||||
desc = "A balloon that can be used to extract equipment or personnel to a Fulton Recovery Beacon. Anything not bolted down can be moved. Link the pack to a beacon by using the pack in hand."
|
||||
icon = 'icons/obj/fulton.dmi'
|
||||
icon_state = "extraction_pack"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/obj/structure/extraction_point/beacon
|
||||
var/list/beacon_networks = list("station")
|
||||
var/uses_left = 3
|
||||
var/can_use_indoors
|
||||
var/safe_for_living_creatures = TRUE
|
||||
var/max_force_fulton = MOVE_FORCE_STRONG
|
||||
|
||||
/obj/item/extraction_pack/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "It has [uses_left] use\s remaining.")
|
||||
|
||||
/obj/item/extraction_pack/attack_self(mob/user)
|
||||
var/list/possible_beacons = list()
|
||||
for(var/B in GLOB.total_extraction_beacons)
|
||||
var/obj/structure/extraction_point/EP = B
|
||||
if(EP.beacon_network in beacon_networks)
|
||||
possible_beacons += EP
|
||||
|
||||
if(!possible_beacons.len)
|
||||
to_chat(user, "There are no extraction beacons in existence!")
|
||||
return
|
||||
|
||||
else
|
||||
var/A
|
||||
|
||||
A = input("Select a beacon to connect to", "Balloon Extraction Pack", A) as null|anything in possible_beacons
|
||||
|
||||
if(!A)
|
||||
return
|
||||
beacon = A
|
||||
to_chat(user, "You link the extraction pack to the beacon system.")
|
||||
|
||||
/obj/item/extraction_pack/afterattack(atom/movable/A, mob/living/carbon/human/user, flag, params)
|
||||
. = ..()
|
||||
if(!beacon)
|
||||
to_chat(user, "<span class='warning'>[src] is not linked to a beacon, and cannot be used!</span>")
|
||||
return
|
||||
if(!can_use_indoors)
|
||||
var/area/area = get_area(A)
|
||||
if(!area.outdoors)
|
||||
to_chat(user, "<span class='warning'>[src] can only be used on things that are outdoors!</span>")
|
||||
return
|
||||
if(!flag)
|
||||
return
|
||||
if(!istype(A))
|
||||
return
|
||||
else
|
||||
if(!safe_for_living_creatures && check_for_living_mobs(A))
|
||||
to_chat(user, "<span class='warning'>[src] is not safe for use with living creatures, they wouldn't survive the trip back!</span>")
|
||||
return
|
||||
if(!isturf(A.loc)) // no extracting stuff inside other stuff
|
||||
return
|
||||
if(A.anchored || (A.move_resist > max_force_fulton))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start attaching the pack to [A]...</span>")
|
||||
if(do_after(user, 50, target = A))
|
||||
to_chat(user, "<span class='notice'>You attach the pack to [A] and activate it.</span>")
|
||||
if(loc == user && istype(user.back, /obj/item/storage/backpack))
|
||||
var/obj/item/storage/backpack/B = user.back
|
||||
if(B.can_be_inserted(src, stop_messages = TRUE))
|
||||
B.handle_item_insertion(src)
|
||||
uses_left--
|
||||
if(uses_left <= 0)
|
||||
user.drop_item(src)
|
||||
forceMove(A)
|
||||
var/mutable_appearance/balloon
|
||||
var/mutable_appearance/balloon2
|
||||
var/mutable_appearance/balloon3
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
M.Weaken(16) // Keep them from moving during the duration of the extraction
|
||||
M.buckled = 0 // Unbuckle them to prevent anchoring problems
|
||||
else
|
||||
A.anchored = TRUE
|
||||
A.density = FALSE
|
||||
var/obj/effect/extraction_holder/holder_obj = new(A.loc)
|
||||
holder_obj.appearance = A.appearance
|
||||
A.forceMove(holder_obj)
|
||||
balloon2 = mutable_appearance('icons/obj/fulton_balloon.dmi', "fulton_expand")
|
||||
balloon2.pixel_y = 10
|
||||
balloon2.appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM
|
||||
holder_obj.add_overlay(balloon2)
|
||||
sleep(4)
|
||||
balloon = mutable_appearance('icons/obj/fulton_balloon.dmi', "fulton_balloon")
|
||||
balloon.pixel_y = 10
|
||||
balloon.appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM
|
||||
holder_obj.cut_overlay(balloon2)
|
||||
holder_obj.add_overlay(balloon)
|
||||
playsound(holder_obj.loc, 'sound/items/fultext_deploy.ogg', 50, 1, -3)
|
||||
animate(holder_obj, pixel_z = 10, time = 20)
|
||||
sleep(20)
|
||||
animate(holder_obj, pixel_z = 15, time = 10)
|
||||
sleep(10)
|
||||
animate(holder_obj, pixel_z = 10, time = 10)
|
||||
sleep(10)
|
||||
animate(holder_obj, pixel_z = 15, time = 10)
|
||||
sleep(10)
|
||||
animate(holder_obj, pixel_z = 10, time = 10)
|
||||
sleep(10)
|
||||
playsound(holder_obj.loc, 'sound/items/fultext_launch.ogg', 50, 1, -3)
|
||||
animate(holder_obj, pixel_z = 1000, time = 30)
|
||||
if(ishuman(A))
|
||||
var/mob/living/carbon/human/L = A
|
||||
L.SetParalysis(0)
|
||||
L.drowsyness = 0
|
||||
L.SetSleeping(0)
|
||||
sleep(30)
|
||||
var/list/flooring_near_beacon = list()
|
||||
for(var/turf/floor in orange(1, beacon))
|
||||
if(floor.density)
|
||||
continue
|
||||
flooring_near_beacon += floor
|
||||
holder_obj.forceMove(pick(flooring_near_beacon))
|
||||
animate(holder_obj, pixel_z = 10, time = 50)
|
||||
sleep(50)
|
||||
animate(holder_obj, pixel_z = 15, time = 10)
|
||||
sleep(10)
|
||||
animate(holder_obj, pixel_z = 10, time = 10)
|
||||
sleep(10)
|
||||
balloon3 = mutable_appearance('icons/obj/fulton_balloon.dmi', "fulton_retract")
|
||||
balloon3.pixel_y = 10
|
||||
balloon3.appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM
|
||||
holder_obj.cut_overlay(balloon)
|
||||
holder_obj.add_overlay(balloon3)
|
||||
sleep(4)
|
||||
holder_obj.cut_overlay(balloon3)
|
||||
A.anchored = FALSE // An item has to be unanchored to be extracted in the first place.
|
||||
A.density = initial(A.density)
|
||||
animate(holder_obj, pixel_z = 0, time = 5)
|
||||
sleep(5)
|
||||
A.forceMove(holder_obj.loc)
|
||||
qdel(holder_obj)
|
||||
if(uses_left <= 0)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/fulton_core
|
||||
name = "extraction beacon signaller"
|
||||
desc = "Emits a signal which fulton recovery devices can lock onto. Activate in hand to create a beacon."
|
||||
icon = 'icons/obj/stock_parts.dmi'
|
||||
icon_state = "subspace_amplifier"
|
||||
|
||||
/obj/item/fulton_core/attack_self(mob/user)
|
||||
if(do_after(user, 15, target = user) && !QDELETED(src))
|
||||
new /obj/structure/extraction_point(get_turf(user))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/extraction_point
|
||||
name = "fulton recovery beacon"
|
||||
desc = "A beacon for the fulton recovery system. Activate a pack in your hand to link it to a beacon."
|
||||
icon = 'icons/obj/fulton.dmi'
|
||||
icon_state = "extraction_point"
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
var/beacon_network = "station"
|
||||
|
||||
/obj/structure/extraction_point/New()
|
||||
..()
|
||||
name += " ([rand(100,999)]) ([get_location_name(src)])"
|
||||
GLOB.total_extraction_beacons += src
|
||||
|
||||
/obj/structure/extraction_point/Destroy()
|
||||
GLOB.total_extraction_beacons -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/extraction_holder
|
||||
name = "extraction holder"
|
||||
desc = "you shouldnt see this"
|
||||
var/atom/movable/stored_obj
|
||||
|
||||
/obj/item/extraction_pack/proc/check_for_living_mobs(atom/A)
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
if(L.stat != DEAD)
|
||||
return TRUE
|
||||
for(var/thing in A.GetAllContents())
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
if(L.stat != DEAD)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/effect/extraction_holder/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/extraction_holder/singularity_pull()
|
||||
return
|
||||
Reference in New Issue
Block a user