mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Arcmining: Chemical Boosting (#95530)
This commit is contained in:
@@ -20,6 +20,11 @@
|
||||
/// Ex - if this was set to "3", our component would only request the first 3 reagents found, even if more are available
|
||||
var/distinct_reagent_cap = INFINITY
|
||||
|
||||
///Extra offset on supply pipe.
|
||||
var/supply_offset = 0
|
||||
///Extra offset on demand pipe.
|
||||
var/demand_offset = 0
|
||||
|
||||
/datum/component/plumbing/Initialize(ducting_layer)
|
||||
if(!ismovable(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
@@ -168,9 +173,7 @@
|
||||
if(tile_covered)
|
||||
return
|
||||
|
||||
//Copied from ducts handle_layer()
|
||||
var/offset
|
||||
|
||||
switch(ducting_layer)
|
||||
if(FIRST_DUCT_LAYER)
|
||||
offset = -10
|
||||
@@ -183,16 +186,36 @@
|
||||
if(FIFTH_DUCT_LAYER)
|
||||
offset = 10
|
||||
|
||||
var/duct_x = offset - parent_movable.pixel_x - parent_movable.pixel_w
|
||||
var/duct_y = offset - parent_movable.pixel_y - parent_movable.pixel_z
|
||||
var/duct_layer = PLUMBING_PIPE_VISIBILE_LAYER + ducting_layer * 0.0003
|
||||
|
||||
for(var/direction in GLOB.cardinals)
|
||||
var/color
|
||||
var/duct_x = offset - parent_movable.pixel_x - parent_movable.pixel_w
|
||||
var/duct_y = offset - parent_movable.pixel_y - parent_movable.pixel_z
|
||||
if(direction & initial(demand_connects))
|
||||
color = demand_color
|
||||
if(demand_offset)
|
||||
switch(parent_movable.dir)
|
||||
if(NORTH)
|
||||
duct_y -= demand_offset
|
||||
if(SOUTH)
|
||||
duct_y += demand_offset
|
||||
if(EAST)
|
||||
duct_x -= demand_offset
|
||||
if(WEST)
|
||||
duct_x += demand_offset
|
||||
else if(direction & initial(supply_connects))
|
||||
color = supply_color
|
||||
if(supply_offset)
|
||||
switch(parent_movable.dir)
|
||||
if(NORTH)
|
||||
duct_y += supply_offset
|
||||
if(SOUTH)
|
||||
duct_y -= supply_offset
|
||||
if(EAST)
|
||||
duct_x += supply_offset
|
||||
if(WEST)
|
||||
duct_x -= supply_offset
|
||||
else
|
||||
continue
|
||||
|
||||
@@ -218,6 +241,7 @@
|
||||
new_supply_connects |= turn(direction, angle)
|
||||
demand_connects = new_demand_connects
|
||||
supply_connects = new_supply_connects
|
||||
parent_obj.update_appearance(UPDATE_OVERLAYS)
|
||||
|
||||
if(length(ducts))
|
||||
disable()
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* The boulder machines take in many types of chems, but should only ever eject "waste" chems,
|
||||
*/
|
||||
/datum/component/plumbing/boulder_reactions
|
||||
demand_connects = NORTH
|
||||
supply_connects = SOUTH
|
||||
supply_offset = 4
|
||||
demand_offset = 4
|
||||
|
||||
/datum/component/plumbing/boulder_reactions/Initialize(ducting_layer)
|
||||
if(!istype(parent, /obj/machinery/bouldertech/refinery))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
return ..()
|
||||
|
||||
/datum/component/plumbing/boulder_reactions/can_give(amount, reagent, datum/ductnet/net)
|
||||
if(amount <= 0 || !reagents.total_volume || !reagent)
|
||||
return FALSE
|
||||
|
||||
var/obj/machinery/bouldertech/refinery/the_refinery = parent
|
||||
var/list/datum/reagents/boosters = the_refinery.booster_list
|
||||
|
||||
if(istype(amount, the_refinery.waste_chemical))
|
||||
return TRUE //Always allow waste chemicals to leave.
|
||||
|
||||
if(!length(boosters))
|
||||
return ..()
|
||||
for(var/datum/chem as anything in boosters)
|
||||
if(chem.type == reagent) // Need to check strict subtype since most acids are subtypes of eachother.
|
||||
return FALSE
|
||||
return ..()
|
||||
@@ -207,6 +207,9 @@
|
||||
extra_range = MEDIUM_RANGE_SOUND_EXTRARANGE
|
||||
falloff_exponent = 4
|
||||
|
||||
/datum/looping_sound/soup/toxic
|
||||
volume = 40
|
||||
|
||||
/datum/looping_sound/cryo_cell
|
||||
mid_sounds = list(
|
||||
'sound/machines/cryo/cryo_1.ogg',
|
||||
|
||||
@@ -69,8 +69,10 @@ Simple datum which is instanced once per type and is used for every object of sa
|
||||
var/mat_rust_resistance = RUST_RESISTANCE_ORGANIC
|
||||
/// How likely this mineral is to be found in a boulder during mining.
|
||||
var/mineral_rarity = MATERIAL_RARITY_COMMON
|
||||
/// How many points per units of ore does this grant?
|
||||
/// How many points per units of ore does this grant? This is used by ore in the ORM, NOT for boulder machinery due to the automated nature.
|
||||
var/points_per_unit = 1
|
||||
/// How many points per unit does this ore grant when processed by a smelter/refinery?
|
||||
var/points_per_boulder_unit = 1
|
||||
|
||||
// Sound/icon stats, not inherited
|
||||
/// Can be used to override the sound items make, lets add some SLOSHing.
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
mat_rust_resistance = RUST_RESISTANCE_BASIC
|
||||
mineral_rarity = MATERIAL_RARITY_COMMON
|
||||
points_per_unit = 1 / SHEET_MATERIAL_AMOUNT
|
||||
points_per_boulder_unit = 1 / SHEET_MATERIAL_AMOUNT
|
||||
minimum_value_override = 0
|
||||
tradable = TRUE
|
||||
tradable_base_quantity = MATERIAL_QUANTITY_COMMON
|
||||
@@ -57,6 +58,7 @@
|
||||
tradable_base_quantity = MATERIAL_QUANTITY_COMMON
|
||||
mineral_rarity = MATERIAL_RARITY_COMMON
|
||||
points_per_unit = 1 / SHEET_MATERIAL_AMOUNT
|
||||
points_per_boulder_unit = 1 / SHEET_MATERIAL_AMOUNT
|
||||
texture_layer_icon_state = "shine"
|
||||
|
||||
/datum/material/glass/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
|
||||
@@ -99,6 +101,7 @@
|
||||
tradable_base_quantity = MATERIAL_QUANTITY_UNCOMMON
|
||||
mineral_rarity = MATERIAL_RARITY_SEMIPRECIOUS
|
||||
points_per_unit = 16 / SHEET_MATERIAL_AMOUNT
|
||||
points_per_boulder_unit = 3.5 / SHEET_MATERIAL_AMOUNT
|
||||
texture_layer_icon_state = "shine"
|
||||
|
||||
/datum/material/silver/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
|
||||
@@ -130,6 +133,7 @@
|
||||
tradable_base_quantity = MATERIAL_QUANTITY_RARE
|
||||
mineral_rarity = MATERIAL_RARITY_PRECIOUS
|
||||
points_per_unit = 18 / SHEET_MATERIAL_AMOUNT
|
||||
points_per_boulder_unit = 4 / SHEET_MATERIAL_AMOUNT
|
||||
texture_layer_icon_state = "shine"
|
||||
|
||||
/datum/material/gold/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
|
||||
@@ -163,6 +167,7 @@
|
||||
tradable_base_quantity = MATERIAL_QUANTITY_EXOTIC
|
||||
mineral_rarity = MATERIAL_RARITY_RARE
|
||||
points_per_unit = 50 / SHEET_MATERIAL_AMOUNT
|
||||
points_per_boulder_unit = 10 / SHEET_MATERIAL_AMOUNT
|
||||
|
||||
/datum/material/diamond/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
|
||||
. = ..()
|
||||
@@ -195,6 +200,7 @@
|
||||
tradable_base_quantity = MATERIAL_QUANTITY_RARE
|
||||
mineral_rarity = MATERIAL_RARITY_SEMIPRECIOUS
|
||||
points_per_unit = 30 / SHEET_MATERIAL_AMOUNT
|
||||
points_per_boulder_unit = 3.5 / SHEET_MATERIAL_AMOUNT
|
||||
|
||||
/// Adds firestacks on hit (Still needs support to turn into gas on destruction)
|
||||
/datum/material/plasma
|
||||
@@ -219,6 +225,7 @@
|
||||
value_per_unit = 200 / SHEET_MATERIAL_AMOUNT
|
||||
mineral_rarity = MATERIAL_RARITY_PRECIOUS
|
||||
points_per_unit = 15 / SHEET_MATERIAL_AMOUNT
|
||||
points_per_boulder_unit = 2 / SHEET_MATERIAL_AMOUNT
|
||||
|
||||
/datum/material/plasma/on_applied(atom/source, mat_amount, multiplier, from_slot)
|
||||
. = ..()
|
||||
@@ -257,6 +264,7 @@
|
||||
value_per_unit = 300 / SHEET_MATERIAL_AMOUNT
|
||||
mineral_rarity = MATERIAL_RARITY_RARE
|
||||
points_per_unit = 50 / SHEET_MATERIAL_AMOUNT
|
||||
points_per_boulder_unit = 10 / SHEET_MATERIAL_AMOUNT
|
||||
tradable = TRUE
|
||||
tradable_base_quantity = MATERIAL_QUANTITY_EXOTIC
|
||||
texture_layer_icon_state = "shine"
|
||||
@@ -305,6 +313,7 @@
|
||||
value_per_unit = 1000 / SHEET_MATERIAL_AMOUNT
|
||||
mineral_rarity = MATERIAL_RARITY_UNDISCOVERED
|
||||
points_per_unit = 60 / SHEET_MATERIAL_AMOUNT
|
||||
points_per_boulder_unit = 15 / SHEET_MATERIAL_AMOUNT
|
||||
|
||||
/datum/material/bananium/on_applied(atom/source, mat_amount, multiplier, from_slot)
|
||||
. = ..()
|
||||
@@ -360,6 +369,7 @@
|
||||
sheet_type = /obj/item/stack/sheet/mineral/titanium
|
||||
ore_type = /obj/item/stack/ore/titanium
|
||||
value_per_unit = 125 / SHEET_MATERIAL_AMOUNT
|
||||
points_per_boulder_unit = 3 / SHEET_MATERIAL_AMOUNT
|
||||
tradable = TRUE
|
||||
tradable_base_quantity = MATERIAL_QUANTITY_UNCOMMON
|
||||
mat_rust_resistance = RUST_RESISTANCE_TITANIUM
|
||||
@@ -390,6 +400,7 @@
|
||||
value_per_unit = 600 / SHEET_MATERIAL_AMOUNT
|
||||
mineral_rarity = MATERIAL_RARITY_UNDISCOVERED
|
||||
points_per_unit = 100 / SHEET_MATERIAL_AMOUNT
|
||||
points_per_boulder_unit = 20 / SHEET_MATERIAL_AMOUNT
|
||||
|
||||
/datum/material/runite/on_applied(atom/source, mat_amount, multiplier, from_slot)
|
||||
. = ..()
|
||||
@@ -429,6 +440,7 @@
|
||||
value_per_unit = 25 / SHEET_MATERIAL_AMOUNT
|
||||
mineral_rarity = MATERIAL_RARITY_UNDISCOVERED // Nobody's found oil on lavaland yet.
|
||||
points_per_unit = 4 / SHEET_MATERIAL_AMOUNT
|
||||
points_per_boulder_unit = 4 / SHEET_MATERIAL_AMOUNT
|
||||
|
||||
/// Force decrease and mushy sound effect. (Not yet implemented)
|
||||
/datum/material/biomass
|
||||
@@ -483,6 +495,7 @@
|
||||
value_per_unit = 500 / SHEET_MATERIAL_AMOUNT
|
||||
mineral_rarity = MATERIAL_RARITY_UNDISCOVERED // Doesn't naturally spawn on lavaland.
|
||||
points_per_unit = 100 / SHEET_MATERIAL_AMOUNT
|
||||
points_per_boulder_unit = 20 / SHEET_MATERIAL_AMOUNT // If it ever needs it, we'll give it
|
||||
|
||||
/datum/material/adamantine/on_applied(atom/source, mat_amount, multiplier, from_slot)
|
||||
. = ..()
|
||||
@@ -521,6 +534,7 @@
|
||||
value_per_unit = 1500 / SHEET_MATERIAL_AMOUNT
|
||||
mineral_rarity = MATERIAL_RARITY_UNDISCOVERED // Doesn't naturally spawn on lavaland.
|
||||
points_per_unit = 100 / SHEET_MATERIAL_AMOUNT
|
||||
points_per_boulder_unit = 20 / SHEET_MATERIAL_AMOUNT
|
||||
|
||||
/datum/material/mythril/on_applied(atom/source, mat_amount, multiplier, from_slot)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user