mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Merge branch 'master' of https://github.com/VOREStation/VOREStation
# Conflicts: # code/modules/mob/living/carbon/human/species/station/seromi.dm # code/modules/mob/living/carbon/human/species/station/station.dm Fixed conflicts, fixed race racism money bs
This commit is contained in:
191
code/modules/mining/fulton.dm
Normal file
191
code/modules/mining/fulton.dm
Normal file
@@ -0,0 +1,191 @@
|
||||
var/global/list/total_extraction_beacons = list()
|
||||
|
||||
/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 = ITEMSIZE_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 = 1
|
||||
|
||||
/obj/item/extraction_pack/examine()
|
||||
. = ..()
|
||||
usr.show_message("It has [uses_left] use\s remaining.", 1)
|
||||
|
||||
/obj/item/extraction_pack/attack_self(mob/user)
|
||||
var/list/possible_beacons = list()
|
||||
for(var/B in global.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, "[src] is not linked to a beacon, and cannot be used.")
|
||||
return
|
||||
if(!can_use_indoors)
|
||||
var/turf/T = get_turf(A)
|
||||
if(T && !T.outdoors)
|
||||
to_chat(user, "[src] can only be used on things that are outdoors!")
|
||||
return
|
||||
if(!flag)
|
||||
return
|
||||
if(!istype(A))
|
||||
return
|
||||
else
|
||||
if(!safe_for_living_creatures && check_for_living_mobs(A))
|
||||
to_chat(user, "[src] is not safe for use with living creatures, they wouldn't survive the trip back!")
|
||||
return
|
||||
if(!isturf(A.loc)) // no extracting stuff inside other stuff
|
||||
return
|
||||
if(A.anchored)
|
||||
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>")
|
||||
/* No components, sorry. No convienence for you!
|
||||
if(loc == user && istype(user.back, /obj/item/storage/backpack))
|
||||
var/obj/item/storage/backpack/B = user.back
|
||||
B.SendSignal(COMSIG_TRY_STORAGE_INSERT, src, user, FALSE, FALSE)
|
||||
*/
|
||||
uses_left--
|
||||
if(uses_left <= 0)
|
||||
user.drop_from_inventory(src, A)
|
||||
var/mutable_appearance/balloon
|
||||
var/mutable_appearance/balloon2
|
||||
var/mutable_appearance/balloon3
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
M.AdjustStunned(20) // Keep them from moving during the duration of the extraction
|
||||
if(M.buckled)
|
||||
M.buckled.unbuckle_mob(M)
|
||||
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/fulext_deploy.wav', 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.wav', 50, 1, -3)
|
||||
animate(holder_obj, pixel_z = 1000, time = 30)
|
||||
if(ishuman(A))
|
||||
var/mob/living/carbon/human/L = A
|
||||
L.AdjustStunned(20)
|
||||
L.drowsyness = 0
|
||||
sleep(30)
|
||||
var/list/flooring_near_beacon = list()
|
||||
for(var/turf/simulated/floor/floor in orange(1, beacon))
|
||||
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/initialize()
|
||||
. = ..()
|
||||
name += " ([rand(100,999)]) ([get_area_name(src, TRUE)])"
|
||||
global.total_extraction_beacons += src
|
||||
|
||||
/obj/structure/extraction_point/Destroy()
|
||||
global.total_extraction_beacons -= src
|
||||
..()
|
||||
|
||||
/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 1
|
||||
for(var/thing in A.GetAllContents())
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
if(L.stat != DEAD)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/effect/extraction_holder/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/extraction_holder/singularity_pull()
|
||||
return
|
||||
@@ -1,43 +1,71 @@
|
||||
/**********************Mineral processing unit console**************************/
|
||||
#define PROCESS_NONE 0
|
||||
#define PROCESS_SMELT 1
|
||||
#define PROCESS_COMPRESS 2
|
||||
#define PROCESS_ALLOY 3
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console
|
||||
name = "production machine console"
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon = 'icons/obj/machines/mining_machines_vr.dmi' // VOREStation Edit
|
||||
icon_state = "console"
|
||||
density = 1
|
||||
anchored = 1
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
|
||||
var/obj/item/weapon/card/id/inserted_id // VOREStation Edit - Inserted Id card
|
||||
var/obj/machinery/mineral/processing_unit/machine = null
|
||||
//var/machinedir = EAST //Dumb
|
||||
var/show_all_ores = 0
|
||||
var/show_all_ores = FALSE
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/New()
|
||||
/obj/machinery/mineral/processing_unit_console/initialize()
|
||||
. = ..()
|
||||
src.machine = locate(/obj/machinery/mineral/processing_unit) in range(5, src)
|
||||
if (machine)
|
||||
machine.console = src
|
||||
else
|
||||
log_debug("Ore processing machine console at [src.x], [src.y], [src.z] could not find its machine!")
|
||||
qdel(src)
|
||||
|
||||
// VOREStation Add Start
|
||||
/obj/machinery/mineral/processing_unit_console/Destroy()
|
||||
if(inserted_id)
|
||||
inserted_id.forceMove(loc) //Prevents deconstructing from deleting whatever ID was inside it.
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I, /obj/item/weapon/card/id))
|
||||
if(!powered())
|
||||
return
|
||||
if(!inserted_id && user.unEquip(I))
|
||||
I.forceMove(src)
|
||||
inserted_id = I
|
||||
interact(user)
|
||||
return
|
||||
..()
|
||||
spawn(7)
|
||||
//src.machine = locate(/obj/machinery/mineral/processing_unit, get_step(src, machinedir))
|
||||
src.machine = locate(/obj/machinery/mineral/processing_unit) in range(5,src)
|
||||
if (machine)
|
||||
machine.console = src
|
||||
else
|
||||
world << "<span class='danger'>Warning: Ore processing machine console at [src.x], [src.y], [src.z] could not find its machine!</span>"
|
||||
qdel(src)
|
||||
// VOREStation Add End
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(..())
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/interact(mob/user)
|
||||
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(!allowed(user))
|
||||
user << "<font color='red'>Access denied.</font>"
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = "<h1>Ore processor console</h1>"
|
||||
// VOREStation Add Start
|
||||
dat += "Current unclaimed points: [machine.points]<br>"
|
||||
if(istype(inserted_id))
|
||||
dat += "You have [inserted_id.mining_points] mining points collected. <A href='?src=\ref[src];choice=eject'>Eject ID.</A><br>"
|
||||
dat += "<A href='?src=\ref[src];choice=claim'>Claim points.</A><br>"
|
||||
else
|
||||
dat += "No ID inserted. <A href='?src=\ref[src];choice=insert'>Insert ID.</A><br>"
|
||||
// VOREStation Add End
|
||||
|
||||
dat += "<hr><table>"
|
||||
|
||||
@@ -49,13 +77,13 @@
|
||||
dat += "<tr><td width = 40><b>[capitalize(O.display_name)]</b></td><td width = 30>[machine.ores_stored[ore]]</td><td width = 100>"
|
||||
if(machine.ores_processing[ore])
|
||||
switch(machine.ores_processing[ore])
|
||||
if(0)
|
||||
if(PROCESS_NONE)
|
||||
dat += "<font color='red'>not processing</font>"
|
||||
if(1)
|
||||
if(PROCESS_SMELT)
|
||||
dat += "<font color='orange'>smelting</font>"
|
||||
if(2)
|
||||
if(PROCESS_COMPRESS)
|
||||
dat += "<font color='blue'>compressing</font>"
|
||||
if(3)
|
||||
if(PROCESS_ALLOY)
|
||||
dat += "<font color='gray'>alloying</font>"
|
||||
else
|
||||
dat += "<font color='red'>not processing</font>"
|
||||
@@ -80,10 +108,10 @@
|
||||
if(!choice) return
|
||||
|
||||
switch(choice)
|
||||
if("Nothing") choice = 0
|
||||
if("Smelting") choice = 1
|
||||
if("Compressing") choice = 2
|
||||
if("Alloying") choice = 3
|
||||
if("Nothing") choice = PROCESS_NONE
|
||||
if("Smelting") choice = PROCESS_SMELT
|
||||
if("Compressing") choice = PROCESS_COMPRESS
|
||||
if("Alloying") choice = PROCESS_ALLOY
|
||||
|
||||
machine.ores_processing[href_list["toggle_smelting"]] = choice
|
||||
|
||||
@@ -95,6 +123,29 @@
|
||||
|
||||
show_all_ores = !show_all_ores
|
||||
|
||||
// VOREStation Add Start
|
||||
if(href_list["choice"])
|
||||
if(istype(inserted_id))
|
||||
if(href_list["choice"] == "eject")
|
||||
usr.put_in_hands(inserted_id)
|
||||
inserted_id = null
|
||||
if(href_list["choice"] == "claim")
|
||||
if(access_mining_station in inserted_id.access)
|
||||
inserted_id.mining_points += machine.points
|
||||
machine.points = 0
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Required access not found.</span>")
|
||||
else if(href_list["choice"] == "insert")
|
||||
var/obj/item/weapon/card/id/I = usr.get_active_hand()
|
||||
if(istype(I))
|
||||
if(!usr.drop_item())
|
||||
return 1
|
||||
I.forceMove(src)
|
||||
inserted_id = I
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>No valid ID.</span>")
|
||||
// VOREStation Add End
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -103,10 +154,10 @@
|
||||
|
||||
/obj/machinery/mineral/processing_unit
|
||||
name = "material processor" //This isn't actually a goddamn furnace, we're in space and it's processing platinum and flammable phoron...
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon = 'icons/obj/machines/mining_machines_vr.dmi' // VOREStation Edit
|
||||
icon_state = "furnace"
|
||||
density = 1
|
||||
anchored = 1
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
light_range = 3
|
||||
var/obj/machinery/mineral/input = null
|
||||
var/obj/machinery/mineral/output = null
|
||||
@@ -115,17 +166,31 @@
|
||||
var/list/ores_processing[0]
|
||||
var/list/ores_stored[0]
|
||||
var/static/list/alloy_data
|
||||
var/active = 0
|
||||
var/active = FALSE
|
||||
// VOREStation Add Start
|
||||
var/points = 0
|
||||
var/static/list/ore_values = list(
|
||||
"sand" = 1,
|
||||
"hematite" = 1,
|
||||
"carbon" = 1,
|
||||
"phoron" = 15,
|
||||
"silver" = 16,
|
||||
"gold" = 18,
|
||||
"uranium" = 30,
|
||||
"diamond" = 50,
|
||||
"platinum" = 40,
|
||||
"mhydrogen" = 40)
|
||||
// VOREStation Add End
|
||||
|
||||
/obj/machinery/mineral/processing_unit/New()
|
||||
..()
|
||||
|
||||
// initialize static alloy_data list
|
||||
if(!alloy_data)
|
||||
alloy_data = list()
|
||||
for(var/alloytype in typesof(/datum/alloy)-/datum/alloy)
|
||||
alloy_data += new alloytype()
|
||||
|
||||
// TODO - Initializing this here is insane. Put it in global lists init or something. ~Leshana
|
||||
if(!ore_data || !ore_data.len)
|
||||
for(var/oretype in typesof(/ore)-/ore)
|
||||
var/ore/OD = new oretype()
|
||||
@@ -133,20 +198,21 @@
|
||||
ores_processing[OD.name] = 0
|
||||
ores_stored[OD.name] = 0
|
||||
|
||||
/obj/machinery/mineral/processing_unit/initialize()
|
||||
. = ..()
|
||||
// TODO - Eschew input/output machinery and just use dirs ~Leshana
|
||||
//Locate our output and input machinery.
|
||||
spawn(5)
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
return
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/processing_unit/process()
|
||||
|
||||
if (!src.output || !src.input) return
|
||||
if(!src.output || !src.input) return
|
||||
if(panel_open || !powered()) return // VOREStation Edit - Don't work when unpowered
|
||||
|
||||
var/list/tick_alloys = list()
|
||||
|
||||
@@ -156,6 +222,7 @@
|
||||
if(!O) break
|
||||
if(!isnull(ores_stored[O.material]))
|
||||
ores_stored[O.material]++
|
||||
points += ore_values[O.material] // VOREStation Edit - Give Points!
|
||||
|
||||
qdel(O)
|
||||
|
||||
@@ -174,7 +241,7 @@
|
||||
|
||||
if(!O) continue
|
||||
|
||||
if(ores_processing[metal] == 3 && O.alloy) //Alloying.
|
||||
if(ores_processing[metal] == PROCESS_ALLOY && O.alloy) //Alloying.
|
||||
|
||||
for(var/datum/alloy/A in alloy_data)
|
||||
|
||||
@@ -190,7 +257,7 @@
|
||||
|
||||
for(var/needs_metal in A.requires)
|
||||
//Check if we're alloying the needed metal and have it stored.
|
||||
if(ores_processing[needs_metal] != 3 || ores_stored[needs_metal] < A.requires[needs_metal])
|
||||
if(ores_processing[needs_metal] != PROCESS_ALLOY || ores_stored[needs_metal] < A.requires[needs_metal])
|
||||
enough_metal = 0
|
||||
break
|
||||
|
||||
@@ -207,7 +274,7 @@
|
||||
for(var/i=0,i<total,i++)
|
||||
new A.product(output.loc)
|
||||
|
||||
else if(ores_processing[metal] == 2 && O.compresses_to) //Compressing.
|
||||
else if(ores_processing[metal] == PROCESS_COMPRESS && O.compresses_to) //Compressing.
|
||||
|
||||
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
|
||||
if(can_make%2>0) can_make--
|
||||
@@ -222,7 +289,7 @@
|
||||
sheets+=2
|
||||
new M.stack_type(output.loc)
|
||||
|
||||
else if(ores_processing[metal] == 1 && O.smelts_to) //Smelting.
|
||||
else if(ores_processing[metal] == PROCESS_SMELT && O.smelts_to) //Smelting.
|
||||
|
||||
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
|
||||
|
||||
@@ -242,3 +309,8 @@
|
||||
continue
|
||||
|
||||
console.updateUsrDialog()
|
||||
|
||||
#undef PROCESS_NONE
|
||||
#undef PROCESS_SMELT
|
||||
#undef PROCESS_COMPRESS
|
||||
#undef PROCESS_ALLOY
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console
|
||||
name = "stacking machine console"
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon = 'icons/obj/machines/mining_machines_vr.dmi' // VOREStation Edit
|
||||
icon_state = "console"
|
||||
density = 1
|
||||
anchored = 1
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
/obj/machinery/mineral/stacking_machine
|
||||
name = "stacking machine"
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon = 'icons/obj/machines/mining_machines_vr.dmi' // VOREStation Edit
|
||||
icon_state = "stacker"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
/obj/machinery/mineral/unloading_machine
|
||||
name = "unloading machine"
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon = 'icons/obj/machines/mining_machines_vr.dmi' // VOREStation Edit
|
||||
icon_state = "unloader"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
|
||||
12
code/modules/mining/orm_vr/construction.dm
Normal file
12
code/modules/mining/orm_vr/construction.dm
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef T_BOARD
|
||||
#error T_BOARD macro is not defined but we need it!
|
||||
#endif
|
||||
|
||||
/obj/item/weapon/circuitboard/mining_equipment_vendor
|
||||
name = T_BOARD("Mining Equipment Vendor")
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
build_path = /obj/machinery/mineral/equipment_vendor
|
||||
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 3)
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/console_screen = 1,
|
||||
/obj/item/weapon/stock_parts/matter_bin = 3)
|
||||
205
code/modules/mining/orm_vr/equipment_vendor.dm
Normal file
205
code/modules/mining/orm_vr/equipment_vendor.dm
Normal file
@@ -0,0 +1,205 @@
|
||||
/**********************Mining Equipment Locker**************************/
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor
|
||||
name = "mining equipment vendor"
|
||||
desc = "An equipment vendor for miners, points collected at an ore redemption machine can be spent here."
|
||||
icon = 'icons/obj/machines/mining_machines_vr.dmi'
|
||||
icon_state = "mining"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
circuit = /obj/item/weapon/circuitboard/mining_equipment_vendor
|
||||
var/icon_deny = "mining-deny"
|
||||
var/obj/item/weapon/card/id/inserted_id
|
||||
var/list/prize_list = list(
|
||||
new /datum/data/mining_equipment("1 Marker Beacon", /obj/item/stack/marker_beacon, 10),
|
||||
new /datum/data/mining_equipment("10 Marker Beacons", /obj/item/stack/marker_beacon/ten, 100),
|
||||
new /datum/data/mining_equipment("30 Marker Beacons", /obj/item/stack/marker_beacon/thirty, 300),
|
||||
new /datum/data/mining_equipment("Whiskey", /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey, 125),
|
||||
new /datum/data/mining_equipment("Absinthe", /obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe, 125),
|
||||
new /datum/data/mining_equipment("Cigar", /obj/item/clothing/mask/smokable/cigarette/cigar/havana, 150),
|
||||
new /datum/data/mining_equipment("Soap", /obj/item/weapon/soap/nanotrasen, 200),
|
||||
new /datum/data/mining_equipment("Laser Pointer", /obj/item/device/laser_pointer, 900),
|
||||
new /datum/data/mining_equipment("Plush Toy", /obj/random/plushie, 300),
|
||||
// TODO new /datum/data/mining_equipment("Advanced Scanner", /obj/item/device/t_scanner/adv_mining_scanner, 800),
|
||||
new /datum/data/mining_equipment("Fulton Beacon", /obj/item/fulton_core, 500),
|
||||
new /datum/data/mining_equipment("Shelter Capsule", /obj/item/device/survivalcapsule, 500),
|
||||
// TODO new /datum/data/mining_equipment("Explorer's Webbing", /obj/item/storage/belt/mining, 500),
|
||||
new /datum/data/mining_equipment("Point Transfer Card", /obj/item/weapon/card/mining_point_card, 500),
|
||||
new /datum/data/mining_equipment("Survival Medipen", /obj/item/weapon/reagent_containers/hypospray/autoinjector/miner, 500),
|
||||
new /datum/data/mining_equipment("Mini-Translocator", /obj/item/device/perfect_tele/one_beacon, 1200),
|
||||
// new /datum/data/mining_equipment("Kinetic Crusher", /obj/item/twohanded/required/kinetic_crusher, 750),
|
||||
new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator, 900),
|
||||
new /datum/data/mining_equipment("Resonator", /obj/item/resonator, 900),
|
||||
new /datum/data/mining_equipment("Fulton Pack", /obj/item/extraction_pack, 1200),
|
||||
new /datum/data/mining_equipment("Silver Pickaxe", /obj/item/weapon/pickaxe/silver, 1200),
|
||||
//new /datum/data/mining_equipment("Mining Conscription Kit", /obj/item/storage/backpack/duffelbag/mining_conscript, 1000),
|
||||
new /datum/data/mining_equipment("Space Cash", /obj/item/weapon/spacecash/c1000, 2000),
|
||||
new /datum/data/mining_equipment("Industrial Hardsuit - Control Module", /obj/item/weapon/rig/industrial, 2000),
|
||||
new /datum/data/mining_equipment("Industrial Hardsuit - Plasma Cutter", /obj/item/rig_module/device/plasmacutter, 800),
|
||||
new /datum/data/mining_equipment("Industrial Hardsuit - Drill", /obj/item/rig_module/device/drill, 2000),
|
||||
new /datum/data/mining_equipment("Industrial Hardsuit - Ore Scanner", /obj/item/rig_module/device/orescanner, 1000),
|
||||
new /datum/data/mining_equipment("Industrial Hardsuit - Material Scanner", /obj/item/rig_module/vision/material, 500),
|
||||
new /datum/data/mining_equipment("Industrial Hardsuit - Maneuvering Jets", /obj/item/rig_module/maneuvering_jets, 1250),
|
||||
new /datum/data/mining_equipment("Diamond Pickaxe", /obj/item/weapon/pickaxe/diamond, 2000),
|
||||
new /datum/data/mining_equipment("Super Resonator", /obj/item/resonator/upgraded, 2500),
|
||||
new /datum/data/mining_equipment("Jump Boots", /obj/item/clothing/shoes/bhop, 2500),
|
||||
new /datum/data/mining_equipment("Luxury Shelter Capsule", /obj/item/device/survivalcapsule/luxury, 3100),
|
||||
new /datum/data/mining_equipment("KA White Tracer Rounds", /obj/item/borg/upgrade/modkit/tracer, 125),
|
||||
new /datum/data/mining_equipment("KA Adjustable Tracer Rounds", /obj/item/borg/upgrade/modkit/tracer/adjustable, 175),
|
||||
new /datum/data/mining_equipment("KA Super Chassis", /obj/item/borg/upgrade/modkit/chassis_mod, 250),
|
||||
new /datum/data/mining_equipment("KA Hyper Chassis", /obj/item/borg/upgrade/modkit/chassis_mod/orange, 300),
|
||||
new /datum/data/mining_equipment("KA Range Increase", /obj/item/borg/upgrade/modkit/range, 1000),
|
||||
new /datum/data/mining_equipment("KA Damage Increase", /obj/item/borg/upgrade/modkit/damage, 1000),
|
||||
new /datum/data/mining_equipment("KA Efficiency Increase", /obj/item/borg/upgrade/modkit/efficiency, 1200),
|
||||
new /datum/data/mining_equipment("KA AoE Damage", /obj/item/borg/upgrade/modkit/aoe/mobs, 2000)
|
||||
)
|
||||
|
||||
/datum/data/mining_equipment
|
||||
var/equipment_name = "generic"
|
||||
var/equipment_path = null
|
||||
var/cost = 0
|
||||
|
||||
/datum/data/mining_equipment/New(name, path, cost)
|
||||
src.equipment_name = name
|
||||
src.equipment_path = path
|
||||
src.cost = cost
|
||||
|
||||
/obj/machinery/power/quantumpad/initialize()
|
||||
. = ..()
|
||||
default_apply_parts()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/power_change()
|
||||
var/old_stat = stat
|
||||
..()
|
||||
if(old_stat != stat)
|
||||
update_icon()
|
||||
if(inserted_id && !powered())
|
||||
visible_message("<span class='notice'>The ID slot indicator light flickers on \the [src] as it spits out a card before powering down.</span>")
|
||||
inserted_id.forceMove(get_turf(src))
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/update_icon()
|
||||
if(panel_open)
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
else if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-off"
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/attack_ghost(mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/interact(mob/user)
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat
|
||||
dat +="<div class='statusDisplay'>"
|
||||
if(istype(inserted_id))
|
||||
dat += "You have [inserted_id.mining_points] mining points collected. <A href='?src=\ref[src];choice=eject'>Eject ID.</A><br>"
|
||||
else
|
||||
dat += "No ID inserted. <A href='?src=\ref[src];choice=insert'>Insert ID.</A><br>"
|
||||
dat += "</div>"
|
||||
dat += "<br><b>Equipment point cost list:</b><BR><table border='0' width='100%'>"
|
||||
for(var/datum/data/mining_equipment/prize in prize_list)
|
||||
dat += "<tr><td>[prize.equipment_name]</td><td>[prize.cost]</td><td><A href='?src=\ref[src];purchase=\ref[prize]'>Purchase</A></td></tr>"
|
||||
dat += "</table>"
|
||||
var/datum/browser/popup = new(user, "miningvendor", "Mining Equipment Vendor", 400, 600)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["choice"])
|
||||
if(istype(inserted_id))
|
||||
if(href_list["choice"] == "eject")
|
||||
to_chat(usr, "<span class='notice'>You eject the ID from [src]'s card slot.</span>")
|
||||
usr.put_in_hands(inserted_id)
|
||||
inserted_id = null
|
||||
else if(href_list["choice"] == "insert")
|
||||
var/obj/item/weapon/card/id/I = usr.get_active_hand()
|
||||
if(istype(I) && !inserted_id && usr.unEquip(I))
|
||||
I.forceMove(src)
|
||||
inserted_id = I
|
||||
interact(usr)
|
||||
to_chat(usr, "<span class='notice'>You insert the ID into [src]'s card slot.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>No valid ID.</span>")
|
||||
flick(icon_deny, src)
|
||||
|
||||
if(href_list["purchase"])
|
||||
if(istype(inserted_id))
|
||||
var/datum/data/mining_equipment/prize = locate(href_list["purchase"])
|
||||
if (!prize || !(prize in prize_list))
|
||||
to_chat(usr, "<span class='warning'>Error: Invalid choice!</span>")
|
||||
flick(icon_deny, src)
|
||||
return
|
||||
if(prize.cost > inserted_id.mining_points)
|
||||
to_chat(usr, "<span class='warning'>Error: Insufficent points for [prize.equipment_name]!</span>")
|
||||
flick(icon_deny, src)
|
||||
else
|
||||
inserted_id.mining_points -= prize.cost
|
||||
to_chat(usr, "<span class='notice'>[src] clanks to life briefly before vending [prize.equipment_name]!</span>")
|
||||
new prize.equipment_path(drop_location())
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Error: Please insert a valid ID!</span>")
|
||||
flick(icon_deny, src)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/attackby(obj/item/I, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, I))
|
||||
updateUsrDialog()
|
||||
return
|
||||
if(default_part_replacement(user, I))
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, I))
|
||||
return
|
||||
if(istype(I, /obj/item/mining_voucher))
|
||||
if(!powered())
|
||||
return
|
||||
RedeemVoucher(I, user)
|
||||
return
|
||||
if(istype(I,/obj/item/weapon/card/id))
|
||||
if(!powered())
|
||||
return
|
||||
else if(!inserted_id && user.unEquip(I))
|
||||
I.forceMove(src)
|
||||
inserted_id = I
|
||||
interact(user)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/dismantle()
|
||||
if(inserted_id)
|
||||
inserted_id.forceMove(loc) //Prevents deconstructing the ORM from deleting whatever ID was inside it.
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/proc/RedeemVoucher(obj/item/mining_voucher/voucher, mob/redeemer)
|
||||
var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") as null|anything in list("Kinetic Accelerator", "Resonator", "Mining Drone", "Advanced Scanner", "Crusher")
|
||||
if(!selection || !Adjacent(redeemer) || voucher.loc != redeemer)
|
||||
return
|
||||
var/drop_location = drop_location()
|
||||
switch(selection)
|
||||
if("Kinetic Accelerator")
|
||||
new /obj/item/weapon/gun/energy/kinetic_accelerator(drop_location)
|
||||
if("Resonator")
|
||||
new /obj/item/resonator(drop_location)
|
||||
// if("Mining Drone")
|
||||
// new /obj/item/storage/box/drone_kit(drop_location)
|
||||
// if("Advanced Scanner")
|
||||
// new /obj/item/device/t_scanner/adv_mining_scanner(drop_location)
|
||||
// if("Crusher")
|
||||
// new /obj/item/twohanded/required/mining_hammer(drop_location)
|
||||
qdel(voucher)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/ex_act(severity, target)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
if(prob(50 / severity) && severity < 3)
|
||||
qdel(src)
|
||||
33
code/modules/mining/orm_vr/mine_point_items.dm
Normal file
33
code/modules/mining/orm_vr/mine_point_items.dm
Normal file
@@ -0,0 +1,33 @@
|
||||
/**********************Mining Equipment Locker Items**************************/
|
||||
|
||||
/**********************Mining Equipment Voucher**********************/
|
||||
|
||||
/obj/item/mining_voucher
|
||||
name = "mining voucher"
|
||||
desc = "A token to redeem a piece of equipment. Use it on a mining equipment vendor."
|
||||
icon = 'icons/obj/mining_vr.dmi'
|
||||
icon_state = "mining_voucher"
|
||||
w_class = ITEMSIZE_TINY
|
||||
|
||||
/**********************Mining Point Card**********************/
|
||||
|
||||
/obj/item/weapon/card/mining_point_card
|
||||
name = "mining point card"
|
||||
desc = "A small card preloaded with mining points. Swipe your ID card over it to transfer the points, then discard."
|
||||
icon_state = "data"
|
||||
var/points = 500
|
||||
|
||||
/obj/item/weapon/card/mining_point_card/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/card/id))
|
||||
if(points)
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
C.mining_points += points
|
||||
to_chat(user, "<span class='info'>You transfer [points] points to [C].</span>")
|
||||
points = 0
|
||||
else
|
||||
to_chat(user, "<span class='info'>There's no points left on [src].</span>")
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/mining_point_card/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "There's [points] points on the card.")
|
||||
111
code/modules/mining/resonator_vr.dm
Normal file
111
code/modules/mining/resonator_vr.dm
Normal file
@@ -0,0 +1,111 @@
|
||||
/**********************Resonator**********************/
|
||||
|
||||
/obj/item/resonator
|
||||
name = "resonator"
|
||||
icon = 'icons/obj/mining_vr.dmi'
|
||||
icon_state = "resonator"
|
||||
item_state = "resonator"
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/lefthand_vr.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/righthand_vr.dmi',
|
||||
)
|
||||
origin_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 3)
|
||||
desc = "A handheld device that creates small fields of energy that resonate until they detonate, crushing rock. It can also be activated without a target to create a field at the user's location, to act as a delayed time trap. It's more effective in low temperature."
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
force = 8
|
||||
throwforce = 10
|
||||
var/cooldown = 0
|
||||
var/fieldsactive = 0
|
||||
var/burst_time = 50
|
||||
var/fieldlimit = 3
|
||||
|
||||
/obj/item/resonator/upgraded
|
||||
name = "upgraded resonator"
|
||||
desc = "An upgraded version of the resonator that can produce more fields at once."
|
||||
icon_state = "resonator_u"
|
||||
origin_tech = list(TECH_MATERIAL = 4, TECH_POWER = 3, TECH_MAGNET = 3, TECH_ENGINEERING = 3)
|
||||
fieldlimit = 5
|
||||
|
||||
/obj/item/resonator/proc/CreateResonance(var/target, var/creator)
|
||||
var/turf/T = get_turf(target)
|
||||
if(locate(/obj/effect/resonance) in T)
|
||||
return
|
||||
if(fieldsactive < fieldlimit)
|
||||
playsound(src,'sound/weapons/resonator_fire.ogg',50,1)
|
||||
new /obj/effect/resonance(T, creator, burst_time)
|
||||
fieldsactive++
|
||||
spawn(burst_time)
|
||||
fieldsactive--
|
||||
|
||||
/obj/item/resonator/attack_self(mob/user)
|
||||
if(burst_time == 50)
|
||||
burst_time = 30
|
||||
to_chat(user, "<span class='info'>You set the resonator's fields to detonate after 3 seconds.</span>")
|
||||
else
|
||||
burst_time = 50
|
||||
to_chat(user, "<span class='info'>You set the resonator's fields to detonate after 5 seconds.</span>")
|
||||
|
||||
/obj/item/resonator/afterattack(atom/target, mob/user, proximity_flag)
|
||||
if(proximity_flag)
|
||||
if(!check_allowed_items(target, 1))
|
||||
return
|
||||
CreateResonance(target, user)
|
||||
|
||||
/obj/effect/resonance
|
||||
name = "resonance field"
|
||||
desc = "A resonating field that significantly damages anything inside of it when the field eventually ruptures."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "shield1"
|
||||
plane = MOB_PLANE
|
||||
layer = ABOVE_MOB_LAYER
|
||||
mouse_opacity = 0
|
||||
var/resonance_damage = 20
|
||||
|
||||
/obj/effect/resonance/initialize(mapload, var/creator = null, var/timetoburst)
|
||||
. = ..()
|
||||
// Start small and grow to big size as we are about to burst
|
||||
transform = matrix()*0.75
|
||||
animate(src, transform = matrix()*1.5, time = timetoburst)
|
||||
// Queue the actual bursting
|
||||
spawn(timetoburst)
|
||||
if(!QDELETED(src))
|
||||
burst(creator)
|
||||
|
||||
/obj/effect/resonance/proc/burst(var/creator = null)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return
|
||||
playsound(src, 'sound/weapons/resonator_blast.ogg', 50, 1)
|
||||
// Make the collapsing effect
|
||||
new /obj/effect/temp_visual/resonance_crush(T)
|
||||
|
||||
// Mineral turfs get drilled!
|
||||
if(istype(T, /turf/simulated/mineral))
|
||||
var/turf/simulated/mineral/M = T
|
||||
M.GetDrilled()
|
||||
qdel(src)
|
||||
return
|
||||
// Otherwise we damage mobs! Boost damage if low tempreature
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
if(environment.temperature < 250)
|
||||
name = "strong resonance field"
|
||||
resonance_damage = 50
|
||||
|
||||
for(var/mob/living/L in src.loc)
|
||||
if(creator)
|
||||
add_attack_logs(creator, L, "used a resonator field on")
|
||||
to_chat(L, "<span class='danger'>\The [src] ruptured with you in it!</span>")
|
||||
L.apply_damage(resonance_damage, BRUTE)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/temp_visual/resonance_crush
|
||||
icon_state = "shield1"
|
||||
plane = MOB_PLANE
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 4
|
||||
|
||||
/obj/effect/temp_visual/resonance_crush/initialize()
|
||||
. = ..()
|
||||
transform = matrix()*1.5
|
||||
animate(src, transform = matrix()*0.1, alpha = 50, time = 4)
|
||||
255
code/modules/mining/shelter_atoms.dm
Normal file
255
code/modules/mining/shelter_atoms.dm
Normal file
@@ -0,0 +1,255 @@
|
||||
/*****************************Survival Pod********************************/
|
||||
/area/survivalpod
|
||||
name = "\improper Emergency Shelter"
|
||||
icon_state = "away"
|
||||
dynamic_lighting = TRUE
|
||||
requires_power = FALSE
|
||||
has_gravity = TRUE
|
||||
|
||||
//Survival Capsule
|
||||
/obj/item/device/survivalcapsule
|
||||
name = "surfluid shelter capsule"
|
||||
desc = "An emergency shelter programmed into construction nanomachines. It has a license for use printed on the bottom."
|
||||
icon_state = "houseball"
|
||||
icon = 'icons/obj/device_alt.dmi'
|
||||
w_class = ITEMSIZE_TINY
|
||||
var/template_id = "shelter_alpha"
|
||||
var/datum/map_template/shelter/template
|
||||
var/used = FALSE
|
||||
|
||||
/obj/item/device/survivalcapsule/proc/get_template()
|
||||
if(template)
|
||||
return
|
||||
template = SSmapping.shelter_templates[template_id]
|
||||
if(!template)
|
||||
throw EXCEPTION("Shelter template ([template_id]) not found!")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/survivalcapsule/Destroy()
|
||||
template = null // without this, capsules would be one use. per round.
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/survivalcapsule/examine(mob/user)
|
||||
. = ..()
|
||||
get_template()
|
||||
to_chat(user, "This capsule has the [template.name] stored.")
|
||||
to_chat(user, template.description)
|
||||
|
||||
/obj/item/device/survivalcapsule/attack_self()
|
||||
//Can't grab when capsule is New() because templates aren't loaded then
|
||||
get_template()
|
||||
if(!used)
|
||||
loc.visible_message("<span class='warning'>\The [src] begins to shake. Stand back!</span>")
|
||||
used = TRUE
|
||||
|
||||
sleep(5 SECONDS)
|
||||
|
||||
var/turf/deploy_location = get_turf(src)
|
||||
var/status = template.check_deploy(deploy_location)
|
||||
switch(status)
|
||||
if(SHELTER_DEPLOY_BAD_AREA)
|
||||
src.loc.visible_message("<span class='warning'>\The [src] will not function in this area.</span>")
|
||||
if(SHELTER_DEPLOY_BAD_TURFS, SHELTER_DEPLOY_ANCHORED_OBJECTS)
|
||||
var/width = template.width
|
||||
var/height = template.height
|
||||
src.loc.visible_message("<span class='warning'>\The [src] doesn't have room to deploy! You need to clear a [width]x[height] area!</span>")
|
||||
|
||||
if(status != SHELTER_DEPLOY_ALLOWED)
|
||||
used = FALSE
|
||||
return
|
||||
|
||||
var/turf/T = deploy_location
|
||||
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
|
||||
smoke.attach(T)
|
||||
smoke.set_up(10, 0, T)
|
||||
smoke.start()
|
||||
sleep(4 SECONDS)
|
||||
|
||||
playsound(get_turf(src), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
log_and_message_admins("[key_name_admin(usr)] activated a bluespace capsule at [get_area(T)]!")
|
||||
template.load(deploy_location, centered = TRUE)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/survivalcapsule/luxury
|
||||
name = "luxury surfluid shelter capsule"
|
||||
desc = "An exorbitantly expensive luxury suite programmed into construction nanomachines. There's a license for use printed on the bottom."
|
||||
template_id = "shelter_beta"
|
||||
|
||||
//Pod objects
|
||||
//Walls
|
||||
/turf/simulated/shuttle/wall/voidcraft/survival
|
||||
name = "survival shelter"
|
||||
stripe_color = "#efbc3b"
|
||||
|
||||
//Doors
|
||||
/obj/machinery/door/airlock/voidcraft/survival_pod
|
||||
name = "survival airlock"
|
||||
block_air_zones = 1
|
||||
|
||||
//Windows
|
||||
/obj/structure/window/reinforced/survival_pod
|
||||
name = "pod window"
|
||||
icon = 'icons/obj/survival_pod.dmi'
|
||||
icon_state = "pwindow"
|
||||
basestate = "pwindow"
|
||||
|
||||
//The windows have diagonal versions, and will never be a full window
|
||||
/obj/structure/window/reinforced/survival_pod/is_full_window()
|
||||
return FALSE
|
||||
|
||||
/obj/structure/window/reinforced/survival_pod/update_icon()
|
||||
icon_state = basestate
|
||||
|
||||
//Windoor
|
||||
/obj/machinery/door/window/survival_pod
|
||||
icon = 'icons/obj/survival_pod.dmi'
|
||||
icon_state = "windoor"
|
||||
base_state = "windoor"
|
||||
|
||||
//Table
|
||||
/obj/structure/table/survival_pod
|
||||
name = "table"
|
||||
icon = 'icons/obj/survival_pod.dmi'
|
||||
icon_state = "table"
|
||||
|
||||
/obj/structure/table/survival_pod/update_icon()
|
||||
icon_state = "table"
|
||||
|
||||
//Sleeper
|
||||
/obj/machinery/sleeper/survival_pod
|
||||
icon = 'icons/obj/survival_pod.dmi'
|
||||
icon_state = "sleeper"
|
||||
stasis_level = 100 //Just one setting
|
||||
|
||||
/obj/machinery/sleeper/survival_pod/update_icon()
|
||||
if(occupant)
|
||||
add_overlay("sleeper_cover")
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
//Computer
|
||||
/obj/item/device/gps/computer
|
||||
name = "pod computer"
|
||||
icon_state = "pod_computer"
|
||||
icon = 'icons/obj/survival_pod_comp.dmi'
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
pixel_y = -32
|
||||
|
||||
/obj/item/device/gps/computer/attackby(obj/item/I, mob/living/user)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
user.visible_message("<span class='warning'>[user] disassembles [src].</span>",
|
||||
"<span class='notice'>You start to disassemble [src]...</span>", "You hear clanking and banging noises.")
|
||||
if(do_after(user,4 SECONDS,src))
|
||||
new /obj/item/device/gps(loc)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
/obj/item/device/gps/computer/attack_hand(mob/user)
|
||||
attack_self(user)
|
||||
|
||||
//Bed
|
||||
/obj/structure/bed/pod
|
||||
icon = 'icons/obj/survival_pod.dmi'
|
||||
icon_state = "bed"
|
||||
|
||||
//Survival Storage Unit
|
||||
/obj/machinery/smartfridge/survival_pod
|
||||
name = "survival pod storage"
|
||||
desc = "A heated storage unit."
|
||||
icon_state = "donkvendor"
|
||||
icon = 'icons/obj/survival_pod_vend.dmi'
|
||||
icon_on = "donkvendor"
|
||||
icon_off = "donkvendor"
|
||||
light_range = 5
|
||||
light_power = 1.2
|
||||
light_color = "#DDFFD3"
|
||||
pixel_y = -4
|
||||
max_n_of_items = 10
|
||||
var/empty = FALSE
|
||||
|
||||
/obj/machinery/smartfridge/survival_pod/initialize(mapload)
|
||||
. = ..()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 5)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/liquidfood/W = new(src)
|
||||
stock(W)
|
||||
if(prob(50))
|
||||
var/obj/item/weapon/storage/pill_bottle/dice/D = new(src)
|
||||
stock(D)
|
||||
else
|
||||
var/obj/item/device/violin/V = new(src)
|
||||
stock(V)
|
||||
|
||||
/obj/machinery/smartfridge/survival_pod/accept_check(obj/item/O)
|
||||
return isitem(O)
|
||||
|
||||
/obj/machinery/smartfridge/survival_pod/empty
|
||||
name = "dusty survival pod storage"
|
||||
desc = "A heated storage unit. This one's seen better days."
|
||||
empty = TRUE
|
||||
|
||||
//Fans
|
||||
/obj/structure/fans
|
||||
icon = 'icons/obj/survival_pod.dmi'
|
||||
icon_state = "fans"
|
||||
name = "environmental regulation system"
|
||||
desc = "A large machine releasing a constant gust of air."
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
var/buildstacktype = /obj/item/stack/material/steel
|
||||
var/buildstackamount = 5
|
||||
|
||||
/obj/structure/fans/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(!height)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/fans/proc/deconstruct()
|
||||
new buildstacktype(loc,buildstackamount)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/fans/attackby(obj/item/I, mob/living/user)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
user.visible_message("<span class='warning'>[user] disassembles [src].</span>",
|
||||
"<span class='notice'>You start to disassemble [src]...</span>", "You hear clanking and banging noises.")
|
||||
if(do_after(user,4 SECONDS,src))
|
||||
deconstruct()
|
||||
return TRUE
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/structure/fans/tiny
|
||||
name = "tiny fan"
|
||||
desc = "A tiny fan, releasing a thin gust of air."
|
||||
plane = TURF_PLANE
|
||||
layer = ABOVE_TURF_LAYER
|
||||
density = FALSE
|
||||
icon_state = "fan_tiny"
|
||||
buildstackamount = 2
|
||||
|
||||
//Signs
|
||||
/obj/structure/sign/mining
|
||||
name = "nanotrasen mining corps sign"
|
||||
desc = "A sign of relief for weary miners, and a warning for would-be competitors to Nanotrasen's mining claims."
|
||||
icon = 'icons/obj/survival_pod.dmi'
|
||||
icon_state = "ntpod"
|
||||
|
||||
/obj/structure/sign/mining/survival
|
||||
name = "shelter sign"
|
||||
desc = "A high visibility sign designating a safe shelter."
|
||||
icon = 'icons/obj/survival_pod.dmi'
|
||||
icon_state = "survival"
|
||||
|
||||
//Fluff
|
||||
/obj/structure/tubes
|
||||
icon_state = "tubes"
|
||||
icon = 'icons/obj/survival_pod.dmi'
|
||||
name = "tubes"
|
||||
anchored = TRUE
|
||||
layer = BELOW_MOB_LAYER
|
||||
density = FALSE
|
||||
60
code/modules/mining/shelters.dm
Normal file
60
code/modules/mining/shelters.dm
Normal file
@@ -0,0 +1,60 @@
|
||||
/datum/map_template/shelter
|
||||
var/shelter_id
|
||||
var/description
|
||||
var/blacklisted_turfs
|
||||
var/whitelisted_turfs
|
||||
var/banned_areas
|
||||
var/banned_objects
|
||||
|
||||
/datum/map_template/shelter/New()
|
||||
. = ..()
|
||||
blacklisted_turfs = typecacheof(/turf/unsimulated)
|
||||
whitelisted_turfs = list()
|
||||
banned_areas = typecacheof(/area/shuttle)
|
||||
banned_objects = list()
|
||||
|
||||
/datum/map_template/shelter/proc/check_deploy(turf/deploy_location)
|
||||
var/affected = get_affected_turfs(deploy_location, centered=TRUE)
|
||||
for(var/turf/T in affected)
|
||||
var/area/A = get_area(T)
|
||||
if(is_type_in_typecache(A, banned_areas))
|
||||
return SHELTER_DEPLOY_BAD_AREA
|
||||
|
||||
var/banned = is_type_in_typecache(T, blacklisted_turfs)
|
||||
var/permitted = is_type_in_typecache(T, whitelisted_turfs)
|
||||
if(banned && !permitted)
|
||||
return SHELTER_DEPLOY_BAD_TURFS
|
||||
|
||||
for(var/obj/O in T)
|
||||
if((O.density && O.anchored) || is_type_in_typecache(O, banned_objects))
|
||||
return SHELTER_DEPLOY_ANCHORED_OBJECTS
|
||||
return SHELTER_DEPLOY_ALLOWED
|
||||
|
||||
/datum/map_template/shelter/alpha
|
||||
name = "Shelter Alpha"
|
||||
shelter_id = "shelter_alpha"
|
||||
description = "A cosy self-contained pressurized shelter, with \
|
||||
built-in navigation, entertainment, medical facilities and a \
|
||||
sleeping area! Order now, and we'll throw in a TINY FAN, \
|
||||
absolutely free!"
|
||||
mappath = "maps/submaps/shelters/shelter_1.dmm"
|
||||
|
||||
/datum/map_template/shelter/alpha/New()
|
||||
. = ..()
|
||||
whitelisted_turfs = typecacheof(/turf/simulated/mineral)
|
||||
banned_objects = list()
|
||||
|
||||
/datum/map_template/shelter/beta
|
||||
name = "Shelter Beta"
|
||||
shelter_id = "shelter_beta"
|
||||
description = "An extremely luxurious shelter, containing all \
|
||||
the amenities of home, including carpeted floors, hot and cold \
|
||||
running water, a gourmet three course meal, cooking facilities, \
|
||||
and a deluxe companion to keep you from getting lonely during \
|
||||
an ash storm."
|
||||
mappath = "maps/submaps/shelters/shelter_2.dmm"
|
||||
|
||||
/datum/map_template/shelter/beta/New()
|
||||
. = ..()
|
||||
whitelisted_turfs = typecacheof(/turf/simulated/mineral)
|
||||
banned_objects = list()
|
||||
Reference in New Issue
Block a user