Skip to content

Commit

Permalink
Merge pull request #103 from NebulaSS13/dev
Browse files Browse the repository at this point in the history
Updating from Neb dev.
  • Loading branch information
MistakeNot4892 authored Nov 9, 2024
2 parents c340bde + f7eedf1 commit 36cc073
Show file tree
Hide file tree
Showing 27 changed files with 523 additions and 328 deletions.
3 changes: 2 additions & 1 deletion code/datums/trading/traders/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ They sell generic supplies and ask for generic supplies.
/obj/item/stack/material/ingot/mapped/osmium = TRADER_THIS_TYPE,
/obj/item/stack/material/sheet/mapped/steel = TRADER_THIS_TYPE,
/obj/item/stack/material/sheet/reinforced/mapped/plasteel = TRADER_THIS_TYPE,
/obj/machinery/mining = TRADER_SUBTYPES_ONLY
/obj/machinery/mining_drill = TRADER_THIS_TYPE,
/obj/structure/drill_brace = TRADER_THIS_TYPE
)

/datum/trader/trading_beacon/manufacturing
Expand Down
4 changes: 2 additions & 2 deletions code/datums/trading/traders/goods.dm
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,8 @@ Sells devices, odds and ends, and medical stuff
)

possible_trading_items = list(
/obj/machinery/mining/drill = TRADER_THIS_TYPE,
/obj/machinery/mining/brace = TRADER_THIS_TYPE,
/obj/machinery/mining_drill = TRADER_THIS_TYPE,
/obj/structure/drill_brace = TRADER_THIS_TYPE,
/obj/machinery/floodlight = TRADER_THIS_TYPE,
/obj/item/box/greenglowsticks = TRADER_THIS_TYPE,
/obj/item/clothing/suit/space/void/engineering/salvage/prepared = TRADER_THIS_TYPE,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
/obj/item/stock_parts/circuitboard/miningdrill
name = "circuitboard (mining drill head)"
build_path = /obj/machinery/mining/drill
build_path = /obj/machinery/mining_drill
board_type = "machine"
origin_tech = @'{"programming":1,"engineering":1}'
req_components = list(
/obj/item/stock_parts/capacitor = 1,
/obj/item/stock_parts/matter_bin = 1,
/obj/item/stock_parts/micro_laser = 1)
/obj/item/stock_parts/micro_laser = 1,
/obj/item/stock_parts/scanning_module = 1
)
additional_spawn_components = list(
/obj/item/stock_parts/power/battery/buildable/stock,
/obj/item/cell = 1
)

/obj/item/stock_parts/circuitboard/miningdrillbrace
name = "circuitboard (mining drill brace)"
build_path = /obj/machinery/mining/brace
board_type = "machine"
origin_tech = @'{"programming":1,"engineering":1}'
req_components = list()
additional_spawn_components = null
30 changes: 18 additions & 12 deletions code/game/turfs/flooring/flooring_reinforced.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,28 @@
gender = NEUTER

/decl/flooring/reinforced/circuit
name = "processing strata"
desc = "A complex network of circuits beneath reinforced glass."
icon = 'icons/turf/flooring/circuit.dmi'
icon_base = "bcircuit"
build_type = null
flooring_flags = TURF_ACID_IMMUNE | TURF_CAN_BREAK | TURF_REMOVE_WRENCH
can_paint = 1
can_engrave = FALSE
name = "processing strata"
desc = "A complex network of circuits beneath reinforced glass."
icon = 'icons/turf/flooring/circuit.dmi'
icon_base = "bcircuit"
build_type = null
flooring_flags = TURF_ACID_IMMUNE | TURF_CAN_BREAK | TURF_REMOVE_WRENCH
can_paint = 1
can_engrave = FALSE
turf_light_range = 2
turf_light_power = 3
turf_light_color = COLOR_BLUE

/decl/flooring/reinforced/circuit/green
icon_base = "gcircuit"
icon_base = "gcircuit"
turf_light_color = COLOR_GREEN

/decl/flooring/reinforced/circuit/red
icon_base = "rcircuit"
flooring_flags = TURF_ACID_IMMUNE
can_paint = 0
icon_base = "rcircuit"
flooring_flags = TURF_ACID_IMMUNE
can_paint = 0
turf_light_power = 2
turf_light_color = COLOR_RED

/decl/flooring/reinforced/shuttle
name = "floor"
Expand Down
9 changes: 0 additions & 9 deletions code/game/turfs/floors/subtypes/floor_circuit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
icon = 'icons/turf/flooring/circuit.dmi'
icon_state = "bcircuit"
_flooring = /decl/flooring/reinforced/circuit
light_range = 2
light_power = 3
light_color = COLOR_BLUE

/turf/floor/bluegrid/airless
name = "airless floor"
Expand All @@ -17,9 +14,6 @@
icon = 'icons/turf/flooring/circuit.dmi'
icon_state = "gcircuit"
_flooring = /decl/flooring/reinforced/circuit/green
light_range = 2
light_power = 3
light_color = COLOR_GREEN

/turf/floor/greengrid/airless
name = "airless floor"
Expand All @@ -34,6 +28,3 @@
icon = 'icons/turf/flooring/circuit.dmi'
icon_state = "rcircuit"
_flooring = /decl/flooring/reinforced/circuit/red
light_range = 2
light_power = 2
light_color = COLOR_RED
6 changes: 5 additions & 1 deletion code/modules/ZAS/Turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ var/global/list/STANDARD_AIRMIX = list(
/turf/return_air()
RETURN_TYPE(/datum/gas_mixture)

// TODO: immutable gas mixtures for stuff like this, to avoid creating new datums every time.
if(!simulated)
return make_air()

// ZAS participation
if(zone && !zone.invalid)
SSair.mark_zone_update(zone)
Expand Down Expand Up @@ -261,7 +265,7 @@ var/global/list/STANDARD_AIRMIX = list(
return FALSE

/turf/proc/make_air()
air = new/datum/gas_mixture
air = new /datum/gas_mixture
air.temperature = temperature
if(initial_gas)
if(initial_gas == GAS_STANDARD_AIRMIX)
Expand Down
12 changes: 12 additions & 0 deletions code/modules/codex/entries/machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,16 @@
lore_text = "A signal repeater, capable of transmitting and decoding hyperintense radio waves to and from PLEXUS uplinks."
mechanics_text = "Allows for network devices in its sector to connect to and communicate with distant networks over PLEXUS.<BR>Networks requires a modem to utilize PLEXUS connections."
disambiguator = "machine"
available_to_map_tech_level = MAP_TECH_LEVEL_SPACE

/datum/codex_entry/mining_drill
associated_paths = list(/obj/machinery/mining_drill)
mechanics_text = "When properly supported by two adjacent braces, the mining drill can automatically mine underground mineral deposits.<br>\
You can empty the ore storage by click-dragging the drill onto an ore box, or using the <b>Unload Drill</b> verb.<br>\
The drill head can be upgraded using a number of different components:<br>\
- Micro lasers control the drill's mining speed. The drill's energy usage proportionally increases with faster speed.<br>\
- Matter bins expand the drill's internal ore storage, allowing it to mine for longer before it gets fill.<br>\
- Scanning modules expand the drill's ore scanner radius, allowing it to mine from farther away.<br>\
- Capacitors improve the drill's energy efficiency, reducing how much energy is required to extract a piece of ore from the ground."
disambiguator = "machine"
available_to_map_tech_level = MAP_TECH_LEVEL_SPACE
3 changes: 3 additions & 0 deletions code/modules/crafting/stack_recipes/recipes_steel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,6 @@

/decl/stack_recipe/steel/furniture/tank
result_type = /obj/item/pipe/tank

/decl/stack_recipe/steel/furniture/drill_brace
result_type = /obj/structure/drill_brace
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,6 @@
/datum/fabricator_recipe/imprinter/circuit/miningdrill
path = /obj/item/stock_parts/circuitboard/miningdrill

/datum/fabricator_recipe/imprinter/circuit/miningdrillbrace
path = /obj/item/stock_parts/circuitboard/miningdrillbrace

/datum/fabricator_recipe/imprinter/circuit/floodlight
path = /obj/item/stock_parts/circuitboard/floodlight

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,12 @@
//Rename the surface area if we have one yet
adapt_location_name(parent_planetoid.name)

///If we're getting atmos from our parent planet, decide if we're going to apply it, or ignore it
///If we're getting atmos from our parent planet, apply it.
/datum/level_data/planetoid/proc/apply_planet_atmosphere(var/datum/planetoid_data/P)
if(istype(exterior_atmosphere))
return //level atmos takes priority over planet atmos
exterior_atmosphere = P.atmosphere.Clone() //Make sure we get one instance per level
if(istype(P) && istype(P.atmosphere))
exterior_atmosphere = P.atmosphere.Clone()
exterior_atmosphere.update_values()
exterior_atmosphere.check_tile_graphic()

///Apply our parent planet's ambient lighting settings if we want to.
/datum/level_data/planetoid/proc/apply_planet_ambient_lighting(var/datum/planetoid_data/P)
Expand Down
56 changes: 56 additions & 0 deletions code/modules/mining/drilling/brace.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/obj/structure/drill_brace
name = "mining drill brace"
desc = "A machinery brace for an industrial drill. It looks like it's about half a metre thick."
icon = 'icons/obj/mining_drill.dmi'
icon_state = "mining_brace"
density = TRUE
layer = ABOVE_HUMAN_LAYER
obj_flags = OBJ_FLAG_ROTATABLE|OBJ_FLAG_ANCHORABLE
var/obj/machinery/mining_drill/connected = null

/obj/structure/drill_brace/Destroy()
if(connected)
disconnect_from_drill()
return ..()

/obj/structure/drill_brace/on_update_icon()
icon_state = "mining_brace[connected ? "_active" : ""]"
return ..()

/obj/structure/drill_brace/wrench_floor_bolts(mob/user, delay, obj/item/tool)
if(connected && connected.use_power != POWER_USE_OFF)
to_chat(user, SPAN_NOTICE("You can't work with the brace of a running drill!"))
return
if(isspaceturf(get_turf(src)))
to_chat(user, SPAN_NOTICE("You can't anchor something to empty space. Idiot."))
return

var/old_anchored = anchored
..() // Call parent to try to actually anchor/unanchor it.
if(anchored != old_anchored)
if(anchored && connect_to_drill())
to_chat(user, SPAN_NOTICE("You attach \the [src] to \the [connected]."))
else if(disconnect_from_drill())
to_chat(user, SPAN_NOTICE("You detatch \the [src]."))

/obj/structure/drill_brace/proc/connect_to_drill()
var/turf/front_turf = get_step(get_turf(src), dir)
if(!istype(front_turf))
return FALSE
var/obj/machinery/mining_drill/drill = locate(/obj/machinery/mining_drill) in front_turf
if(drill)
connected = drill
connected.supports += src
connected.handle_supports()
update_icon()
return TRUE
return FALSE

/obj/structure/drill_brace/proc/disconnect_from_drill()
if(!connected)
return FALSE
connected.supports -= src
connected.handle_supports()
connected = null
update_icon()
return TRUE
Loading

0 comments on commit 36cc073

Please sign in to comment.