mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-19 05:26:28 +00:00
## About The Pull Request [Fixes static lights not moving](ffef43c05a) Worked fine when the owner moved, but if the owner was inside something else, it would try and trigger an update on the PARENT's lights, which are obviously not us. [Renames MOVABLE_LIGHT and STATIC_LIGHT to better describe what they do](de73a63bd4) People keep trying to change the lighting system of lamps and it makes me mad. I choose OVERLAY_LIGHT and COMPLEX_LIGHT here, I couldn't figure out a better name for turf matrix lighting. Suggestions welcome ## Why It's Good For The Game Closes #80005 Hopefully improves understanding of lighting at a glance ## Changelog 🆑 fix: Fixes fancy lights not updating their source location when picked up and moved /🆑
91 lines
2.8 KiB
Plaintext
91 lines
2.8 KiB
Plaintext
/**
|
|
* Your new favorite industrial waste magnet!
|
|
* Accepts boulders and produces sheets of non-metalic materials.
|
|
* When upgraded, it can hold more boulders and process more at once.
|
|
*/
|
|
/obj/machinery/bouldertech/refinery
|
|
name = "boulder refinery"
|
|
desc = "BR for short. Accepts boulders and refines non-metallic ores into sheets using internal chemicals."
|
|
icon_state = "stacker"
|
|
holds_minerals = TRUE
|
|
processable_materials = list(
|
|
/datum/material/glass,
|
|
/datum/material/plasma,
|
|
/datum/material/diamond,
|
|
/datum/material/bluespace,
|
|
/datum/material/bananium,
|
|
/datum/material/plastic,
|
|
)
|
|
circuit = /obj/item/circuitboard/machine/refinery
|
|
usage_sound = 'sound/machines/mining/refinery.ogg'
|
|
holds_mining_points = TRUE
|
|
|
|
/// okay so var that holds mining points to claim
|
|
/// add total of pts from minerals mined in parent proc
|
|
/// then, little mini UI showing points to collect?
|
|
|
|
/obj/machinery/bouldertech/refinery/RefreshParts()
|
|
. = ..()
|
|
var/manipulator_stack = 0
|
|
var/matter_bin_stack = 0
|
|
for(var/datum/stock_part/servo/servo in component_parts)
|
|
manipulator_stack += servo.tier - 1
|
|
boulders_processing_max = clamp(manipulator_stack, 1, 6)
|
|
for(var/datum/stock_part/matter_bin/bin in component_parts)
|
|
matter_bin_stack += bin.tier
|
|
boulders_held_max = matter_bin_stack
|
|
|
|
|
|
/obj/machinery/bouldertech/refinery/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
|
. = ..()
|
|
if(istype(held_item, /obj/item/boulder))
|
|
context[SCREENTIP_CONTEXT_LMB] = "Insert boulder"
|
|
if(istype(held_item, /obj/item/card/id) && points_held > 0)
|
|
context[SCREENTIP_CONTEXT_LMB] = "Claim mining points"
|
|
context[SCREENTIP_CONTEXT_RMB] = "Remove boulder"
|
|
return CONTEXTUAL_SCREENTIP_SET
|
|
|
|
|
|
/**
|
|
* Your other new favorite industrial waste magnet!
|
|
* Accepts boulders and produces sheets of metalic materials.
|
|
* When upgraded, it can hold more boulders and process more at once.
|
|
*/
|
|
/obj/machinery/bouldertech/refinery/smelter
|
|
name = "boulder smelter"
|
|
desc = "BS for short. Accept boulders and refines metallic ores into sheets."
|
|
icon_state = "smelter"
|
|
processable_materials = list(
|
|
/datum/material/iron,
|
|
/datum/material/titanium,
|
|
/datum/material/silver,
|
|
/datum/material/gold,
|
|
/datum/material/uranium,
|
|
/datum/material/mythril,
|
|
/datum/material/adamantine,
|
|
/datum/material/runite,
|
|
)
|
|
light_system = OVERLAY_LIGHT
|
|
light_range = 1
|
|
light_power = 2
|
|
light_color = "#ffaf55"
|
|
light_on = FALSE
|
|
circuit = /obj/item/circuitboard/machine/smelter
|
|
usage_sound = 'sound/machines/mining/smelter.ogg'
|
|
|
|
/obj/machinery/bouldertech/refinery/smelter/RefreshParts()
|
|
. = ..()
|
|
light_power = boulders_processing_max
|
|
|
|
/obj/machinery/bouldertech/refinery/smelter/accept_boulder(obj/item/boulder/new_boulder)
|
|
. = ..()
|
|
if(.)
|
|
set_light_on(TRUE)
|
|
return TRUE
|
|
|
|
/obj/machinery/bouldertech/refinery/smelter/process()
|
|
. = ..()
|
|
if(. == PROCESS_KILL)
|
|
set_light_on(FALSE)
|
|
|