Skip to content

Commit ff4c61a

Browse files
authored
Landing pods (#3697)
1 parent 118ba09 commit ff4c61a

File tree

20 files changed

+424
-58
lines changed

20 files changed

+424
-58
lines changed

code/modules/shuttles/escape_pods.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ var/global/list/escape_pods_by_name = list()
104104
/datum/shuttle/autodock/ferry/escape_pod/can_force()
105105
// [SIERRA-ADD]
106106
if (arming_controller && arming_controller.master.emagged) // inf
107-
return (next_location && next_location.is_valid(src) && !current_location.cannot_depart(src) && moving_status == SHUTTLE_IDLE && !location && arming_controller && arming_controller.armed) // inf
107+
return (next_location && !current_location.cannot_depart(src) && moving_status == SHUTTLE_IDLE && !location && arming_controller && arming_controller.armed) // inf
108108
// [/SIERRA-ADD]
109109
if (arming_controller.eject_time && world.time < arming_controller.eject_time + 50)
110110
return 0 //dont allow force launching until 5 seconds after the arming controller has reached it's countdown

code/modules/shuttles/landmarks.dm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
/obj/shuttle_landmark/proc/sector_set(obj/overmap/visitable/O, shuttle_name)
6868
shuttle_restricted = shuttle_name
6969

70-
7170
/obj/shuttle_landmark/proc/is_valid(datum/shuttle/shuttle)
7271
if(shuttle.current_location == src)
7372
return FALSE

maps/mapsystem/maps_unit_testing.dm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@
6060
/area/meatstation,
6161
/area/lost_supply_base,
6262
/area/magshield,
63+
/area/shuttle/escape_pod,
6364
)
64-
// /area/mine, /area/bluespaceriver, /area/lar_maria, /area/casino, /area/meatstation, /area/lost_supply_base, /area/magshield //[SIERRA-ADD]
65+
// /area/mine, /area/bluespaceriver, /area/lar_maria, /area/casino, /area/meatstation, /area/lost_supply_base, /area/magshield, /area/shuttle/escape_pod //[SIERRA-ADD]
6566

6667
var/list/area_purity_test_exempt_areas = list()
6768

maps/sierra/sierra_shuttles.dm

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
name = "Escaped"
1919

2020
//Pods
21+
22+
/area/shuttle/escape_pod
23+
name = "Escape Pod"
24+
base_turf = /turf/simulated/floor/plating
25+
2126
#define SIERRA_ESCAPE_POD(NUMBER) \
2227
/datum/shuttle/autodock/ferry/escape_pod/sierrapod/escape_pod##NUMBER { \
2328
shuttle_area = /area/shuttle/escape_pod/escape_pod##NUMBER/station; \
@@ -33,10 +38,10 @@
3338
docking_controller = "escape_pod_"+ #NUMBER +"_berth"; \
3439
} \
3540
/obj/shuttle_landmark/escape_pod/out/pod##NUMBER { \
36-
landmark_tag = "escape_pod_"+ #NUMBER +"_internim"; \
41+
landmark_tag = "escape_pod_"+ #NUMBER +"_out"; \
3742
} \
3843
/obj/shuttle_landmark/escape_pod/transit/pod##NUMBER { \
39-
landmark_tag = "escape_pod_"+ #NUMBER +"_out"; \
44+
landmark_tag = "escape_pod_"+ #NUMBER +"_internim"; \
4045
}
4146

4247
SIERRA_ESCAPE_POD(1)

maps/sierra/z1-z4_sierra.dmm

Lines changed: 37 additions & 37 deletions
Large diffs are not rendered by default.

mods/RnD/code/designs_autolathe/designs_arms_ammo.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
build_path = /obj/item/ammo_magazine/pistol/double
6868

6969
/datum/design/autolathe/arms_ammo/hidden/magazine_pistol_double_rubber
70-
name = "ammunition (pistol doublestack. rubber)"
70+
name = "ammunition (pistol doublestack rubber)"
7171
build_path = /obj/item/ammo_magazine/pistol/double/rubber
7272

7373
/datum/design/autolathe/arms_ammo/hidden/magazine_small

mods/RnD/code/designs_autolathe/designs_general.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
/datum/design/autolathe/general/suit_cooler
3131
build_path = /obj/item/device/suit_cooling_unit
3232

33+
/datum/design/autolathe/general/suit_cooler_mini
34+
build_path = /obj/item/device/suit_cooling_unit/miniature
35+
3336
/datum/design/autolathe/general/weldermask
3437
build_path = /obj/item/clothing/head/welding
3538

mods/RnD/code/designs_autolathe/disks.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
/datum/design/autolathe/general/radio_headset,
5959
/datum/design/autolathe/general/radio_bounced,
6060
/datum/design/autolathe/general/suit_cooler,
61+
/datum/design/autolathe/general/suit_cooler_mini,
6162
/datum/design/autolathe/general/weldermask,
6263
/datum/design/autolathe/general/knife,
6364
/datum/design/autolathe/general/taperecorder,

mods/RnD/code/machinery/autolathe.dm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@
103103
update_icon()
104104

105105
/obj/machinery/fabricator/Destroy()
106+
for(var/material in stored_material)
107+
var/material/M = SSmaterials.get_material_by_name(material)
108+
if(stored_material[material] > M.units_per_sheet)
109+
M.place_sheet(get_turf(src), round(stored_material[material] / M.units_per_sheet), M.name)
106110
QDEL_NULL(wires)
107111
return ..()
108112

@@ -745,7 +749,7 @@
745749
/obj/machinery/fabricator/proc/consume_materials(datum/design/design)
746750
for(var/material in design.materials)
747751
var/material_cost = design.adjust_materials ? SANITIZE_LATHE_COST(design.materials[material]) : design.materials[material]
748-
stored_material[material] = max(0, stored_material[material] - material_cost)
752+
stored_material[material] = max(0, stored_material[material] - material_cost * mat_efficiency)
749753

750754
for(var/reagent in design.chemicals)
751755
container.reagents.remove_reagent(reagent, design.chemicals[reagent])

mods/RnD/code/machinery/rdconsole.dm

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,12 @@ won't update every console in existence) but it's more of a hassle to do. Also,
481481
))
482482

483483
// This calculates how much research points we missed because we already researched items with such orig_tech levels
484-
var/tech_points_mod = files.experiments.get_object_research_value(linked_destroy.loaded_item) / files.experiments.get_object_research_value(linked_destroy.loaded_item, ignoreRepeat = TRUE)
484+
var/denominator = files.experiments.get_object_research_value(linked_destroy.loaded_item, ignoreRepeat = TRUE)
485+
var/tech_points_mod
486+
if(denominator)
487+
tech_points_mod = files.experiments.get_object_research_value(linked_destroy.loaded_item) / denominator
488+
else
489+
tech_points_mod = 1
485490

486491
var/list/destroy_list = list(
487492
"has_item" = TRUE,

mods/RnD/code/misc.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
icon_state = pick("yellow", "blue", "green", "red", "purple", "black")
3333
max_capacity = 128
3434

35+
/obj/item/stock_parts/computer/hard_drive/portable/design/printable/install_default_programs()
36+
return
37+
3538

3639
/obj/item/stock_parts/computer/hard_drive/portable/LateInitialize(mapload)
3740
install_default_programs()

mods/RnD/code/xenoarch/swap.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717

1818
/datum/artifact_effect/swap/proc/swap(mob/user)
19+
if(!user)
20+
return
1921
if(world.time - last_swap > cooldown)
2022
last_swap = world.time
2123
var/weakness = GetAnomalySusceptibility(user)

mods/_master_files/code/modules/maps/map_template.dm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@
2323
if(airflow_suspended)
2424
SSairflow.wake()
2525
airflow_suspended = FALSE
26+
27+
28+
/area/shuttle/escape_pod
29+
name = "Escape Pod"

mods/escpodinf/code/evacuation_pods_fast.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
evac_prep_delay = 0 MINUTES
1818
evac_launch_delay = 5 MINUTES
19-
evac_transit_delay = 2 MINUTES
19+
evac_transit_delay = 1 MINUTES
2020

2121
transfer_prep_additional_delay = 20 MINUTES
2222
autotransfer_prep_additional_delay = 10 MINUTES

mods/utility_items/_utility_items_includes.dm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "code/vox.dm"
1717
#include "code/simple.dm"
1818
#include "code/circuit.dm"
19+
#include "code/flashlight.dm"
1920
#include "code/global_hud_sierra.dm"
2021
#include "code/labcoat.dm"
2122
#include "code/shuttle_feature.dm"
@@ -24,7 +25,8 @@
2425
#include "code/ert_maint_helmet.dm"
2526
#include "code/tag_recipe.dm"
2627
#include "code/dodge_animation.dm"
27-
#include "code/advanced_landing.dm"
28+
#include "code/shuttles/advanced_landing.dm"
29+
#include "code/shuttles/pods_landing.dm"
2830
#include "code/languages.dm"
2931
#include "code/chemistry.dm"
3032
#include "code/jobs.dm"

mods/utility_items/code/flashlight.dm

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
/obj/item/device/flashlight
2+
var/suitable_cell = /obj/item/cell/device/standard
3+
var/obj/item/cell/cell
4+
var/power_cost = 0.2
5+
6+
/obj/item/device/flashlight
7+
8+
/obj/item/device/flashlight/lamp/floodlamp
9+
power_cost = 1
10+
/obj/item/device/flashlight/lamp
11+
power_cost = 0.2
12+
/obj/item/device/flashlight/lamp/lava
13+
on = 1
14+
15+
/obj/item/device/flashlight/upgraded
16+
cell = /obj/item/cell/device/high
17+
/obj/item/device/flashlight/maglight
18+
cell = /obj/item/cell/device/high
19+
/obj/item/device/flashlight/lantern
20+
cell = /obj/item/cell/device/high//inf
21+
/obj/item/device/flashlight/drone
22+
suitable_cell = null
23+
24+
/obj/item/device/flashlight/flare
25+
suitable_cell = null
26+
27+
/obj/item/device/flashlight/Initialize()
28+
. = ..()
29+
if(!ispath(cell) && ispath(suitable_cell))
30+
cell = new suitable_cell(src)
31+
else if(ispath(cell))
32+
suitable_cell = cell
33+
cell = new cell()
34+
35+
/obj/item/device/flashlight/get_cell()
36+
return cell
37+
38+
/obj/item/device/flashlight/proc/get_power_cost()
39+
return abs(power_cost * flashlight_power / 2)
40+
41+
/obj/item/device/flashlight/Process()
42+
if(on && suitable_cell)
43+
var/obj/item/cell/C = get_cell()
44+
if(!C || !C.checked_use(get_power_cost()))
45+
if(ismob(loc))
46+
to_chat(loc, SPAN_WARNING("\The [src] dies. You are alone now."))
47+
turn_off()
48+
else
49+
apply_power_deficiency()
50+
51+
/obj/item/device/flashlight/proc/apply_power_deficiency()
52+
var/obj/item/cell/C = get_cell()
53+
if(!C)
54+
return
55+
if(flashlight_range > 0)
56+
var/percent = C.percent()
57+
var/min_range = 1
58+
var/min_power = 0.1
59+
var/range_out
60+
var/power_out
61+
if(percent >= 25)
62+
range_out = flashlight_range
63+
power_out = flashlight_power
64+
else
65+
var/k = percent / 25 // от 0 до 1
66+
range_out = max(min_range, round(flashlight_range * k))
67+
power_out = max(min_power, flashlight_power * k)
68+
set_light(range_out, power_out)
69+
70+
/obj/item/device/flashlight/set_flashlight()
71+
if(on && cell && cell.charge > 1)
72+
set_light(flashlight_range, flashlight_power)
73+
START_PROCESSING(SSobj, src)
74+
else if(on && !suitable_cell)
75+
set_light(flashlight_range, flashlight_power)
76+
else
77+
turn_off()
78+
update_icon()
79+
80+
/obj/item/device/flashlight/proc/turn_off()
81+
on = FALSE
82+
set_light(0)
83+
STOP_PROCESSING(SSobj, src)
84+
update_icon()
85+
86+
/obj/item/device/flashlight/MouseDrop(over_object)
87+
if(istype(over_object, /obj/screen/inventory))
88+
if(ismob(usr))
89+
var/mob/user = usr
90+
var/obj/screen/inventory/hand = over_object
91+
if(!user.stat && hand.name && (loc == user) && eject_item_from(cell, user))
92+
turn_off()
93+
cell = null
94+
else
95+
return ..()
96+
97+
/obj/item/device/flashlight/use_tool(obj/item/C, mob/living/user)
98+
. = ..()
99+
if(istype(C, suitable_cell) && !cell && insert_item_into(C, user))
100+
cell = C
101+
102+
103+
/obj/proc/eject_item_from(obj/item/I, mob/living/user)
104+
if(!I || !user.IsAdvancedToolUser())
105+
return FALSE
106+
user.put_in_hands(I)
107+
playsound(src.loc, 'sound/weapons/guns/interaction/pistol_magin.ogg', 75, 1)
108+
to_chat(user, SPAN_NOTICE("You remove \the [I] from \the [src]."))
109+
return TRUE
110+
111+
/obj/proc/insert_item_into(obj/item/I, mob/living/user)
112+
if(!I || !user.unEquip(I))
113+
return FALSE
114+
I.forceMove(src)
115+
playsound(src.loc, 'sound/weapons/guns/interaction/pistol_magout.ogg', 75, 1)
116+
to_chat(user, SPAN_NOTICE("You insert \the [I] into \the [src]."))
117+
return TRUE

mods/utility_items/code/advanced_landing.dm renamed to mods/utility_items/code/shuttles/advanced_landing.dm

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -313,12 +313,3 @@
313313
.=..()
314314
var/old_prev_type = prev_type
315315
prev_type = old_prev_type
316-
317-
318-
/datum/shuttle/autodock/process_launch()
319-
.=..()
320-
for(var/i in 1 to LAZYLEN(next_location.image_shadow))
321-
var/image/I = next_location.image_shadow[i]
322-
var/turf/T = locate(I.loc.x, I.loc.y, I.loc.z)
323-
I = image('mods/utility_items/icons/alphacolors.dmi', T, "dither50")
324-
T.AddOverlays(I)

0 commit comments

Comments
 (0)