Skip to content

Commit

Permalink
Merge pull request #52 from Atermonera/baychem
Browse files Browse the repository at this point in the history
Baychem & Phoron
  • Loading branch information
Atermonera authored Sep 21, 2024
2 parents 8269d60 + 02d68d0 commit 745ac69
Show file tree
Hide file tree
Showing 113 changed files with 804 additions and 155 deletions.
2 changes: 2 additions & 0 deletions code/__defines/atmos.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
#define ATMOSTANK_NITROGEN 90000 // A lot of N2 is needed to produce air mix, that's why we keep 90MPa of it
#define ATMOSTANK_OXYGEN 50000 // O2 is also important for airmix, but not as much as N2 as it's only 21% of it.
#define ATMOSTANK_CO2 60000 // CO2 is used for smaller vessels as the primary fuel propellant, and we need lots to stick around.
#define ATMOSTANK_PHORON 25000
#define ATMOSTANK_PHORON_FUEL 15000
#define ATMOSTANK_HYDROGEN 50000
#define ATMOSTANK_HYDROGEN_FUEL 25000
#define ATMOSTANK_NITROUSOXIDE 10000 // N2O doesn't have a real useful use, i guess it's on station just to allow refilling of sec's riot control canisters?
Expand Down
12 changes: 12 additions & 0 deletions code/datums/supplypacks/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@
containername = "nitrogen canister crate"
containertype = /obj/structure/largecrate

/decl/hierarchy/supply_pack/atmospherics/canister_phoron
name = "Gas - Phoron gas canister"
contains = list(/obj/machinery/portable_atmospherics/canister/phoron)
containername = "phoron gas canister crate"
containertype = /obj/structure/closet/crate/secure/large
access = access_atmospherics

/decl/hierarchy/supply_pack/atmospherics/canister_hydrogen
name = "Gas - Hydrogen canister"
contains = list(/obj/machinery/portable_atmospherics/canister/hydrogen)
Expand All @@ -82,6 +89,11 @@
contains = list(/obj/item/tank/hydrogen = 4)
containername = "hydrogen tank crate"

/decl/hierarchy/supply_pack/atmospherics/phoron
name = "Gas - Phoron tanks"
contains = list(/obj/item/tank/phoron = 3)
containername = "phoron tank crate"

/decl/hierarchy/supply_pack/atmospherics/voidsuit
name = "EVA - Atmospherics voidsuit"
contains = list(/obj/item/clothing/suit/space/void/atmos/alt,
Expand Down
5 changes: 5 additions & 0 deletions code/datums/supplypacks/materials.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@
contains = list(/obj/item/stack/material/sheet/reinforced/mapped/ocp/ten)
containername = "osmium carbide plasteel sheets crate"

/decl/hierarchy/supply_pack/materials/phoron10
name = "10 phoron sheets"
contains = list(/obj/item/stack/material/crystal/mapped/phoron/ten)
containername = "phoron sheets crate"

/decl/hierarchy/supply_pack/materials/gold10
name = "10 gold sheets"
contains = list(/obj/item/stack/material/ingot/mapped/gold/ten)
Expand Down
1 change: 1 addition & 0 deletions code/datums/trading/traders/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ They sell generic supplies and ask for generic supplies.
/obj/item/stack/material/brick/mapped/marble = TRADER_THIS_TYPE,
/obj/item/stack/material/gemstone/mapped/diamond = TRADER_THIS_TYPE,
/obj/item/stack/material/puck/mapped/uranium = TRADER_THIS_TYPE,
/obj/item/stack/material/crystal/mapped/phoron = TRADER_THIS_TYPE,
/obj/item/stack/material/panel/mapped/plastic = TRADER_THIS_TYPE,
/obj/item/stack/material/ingot/mapped/gold = TRADER_THIS_TYPE,
/obj/item/stack/material/ingot/mapped/silver = TRADER_THIS_TYPE,
Expand Down
1 change: 1 addition & 0 deletions code/game/gamemodes/objectives/objective_heist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
/decl/material/solid/metal/steel = 300,
/decl/material/solid/glass = 200,
/decl/material/solid/metal/plasteel = 100,
/decl/material/solid/phoron = 100,
/decl/material/solid/metal/silver = 50,
/decl/material/solid/metal/gold = 20,
/decl/material/solid/metal/uranium = 20,
Expand Down
6 changes: 4 additions & 2 deletions code/game/machinery/alarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
)
var/list/dangerous_gasses = list(
/decl/material/gas/carbon_dioxide = TRUE,
/decl/material/gas/chlorine = TRUE
/decl/material/gas/chlorine = TRUE,
/decl/material/solid/phoron = TRUE
)
var/list/filter_gasses = list(
/decl/material/gas/oxygen,
/decl/material/gas/nitrogen,
/decl/material/gas/carbon_dioxide,
/decl/material/gas/nitrous_oxide,
/decl/material/gas/chlorine
/decl/material/gas/chlorine,
/decl/material/solid/phoron,
)

////////////////////////////////////////
Expand Down
23 changes: 21 additions & 2 deletions code/game/machinery/atmoalter/canister.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@
canister_color = "purple"
can_label = FALSE

/obj/machinery/portable_atmospherics/canister/phoron
name = "\improper Canister \[Phoron\]"
icon_state = "orange"
canister_color = "orange"
can_label = 0

/obj/machinery/portable_atmospherics/canister/carbon_dioxide
name = "\improper CO2 canister"
icon_state = "black"
Expand Down Expand Up @@ -95,6 +101,9 @@
/obj/machinery/portable_atmospherics/canister/empty/oxygen
icon_state = "blue"
canister_type = /obj/machinery/portable_atmospherics/canister/oxygen
/obj/machinery/portable_atmospherics/canister/empty/phoron
icon_state = "orange"
canister_type = /obj/machinery/portable_atmospherics/canister/phoron
/obj/machinery/portable_atmospherics/canister/empty/nitrogen
icon_state = "red"
canister_type = /obj/machinery/portable_atmospherics/canister/nitrogen
Expand Down Expand Up @@ -293,12 +302,12 @@
var/list/colors = list(
"\[N2O\]" = "redws",
"\[N2\]" = "red",
"\[Phoron\]" = "orange",
"\[O2\]" = "blue",
"\[CO2\]" = "black",
"\[H2\]" = "purple",
"\[Air\]" = "grey",
"\[CAUTION\]" = "yellow",
"\[Explosive\]" = "orange"
"\[CAUTION\]" = "yellow"
)
var/label = input(user, "Choose canister label", "Gas canister") as null|anything in colors
if (label && CanUseTopic(user, state))
Expand All @@ -313,6 +322,11 @@
return STATUS_CLOSE
return ..()

/obj/machinery/portable_atmospherics/canister/phoron/Initialize()
. = ..()
air_contents.adjust_gas(/decl/material/solid/phoron, MolesForPressure())
queue_icon_update()

/obj/machinery/portable_atmospherics/canister/oxygen/Initialize()
. = ..()
air_contents.adjust_gas(/decl/material/gas/oxygen, MolesForPressure())
Expand Down Expand Up @@ -367,6 +381,11 @@
air_contents.adjust_gas(/decl/material/gas/carbon_dioxide, MolesForPressure())
update_icon()

/obj/machinery/portable_atmospherics/canister/phoron/engine_setup/Initialize()
. = ..()
src.air_contents.adjust_gas(/decl/material/solid/phoron, MolesForPressure())
queue_icon_update()

/obj/machinery/portable_atmospherics/canister/hydrogen/engine_setup/Initialize()
. = ..()
air_contents.adjust_gas(/decl/material/gas/hydrogen, MolesForPressure())
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/robot/robot_upgrades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@
require_module = 1
material = /decl/material/solid/metal/steel
matter = list(
/decl/material/solid/metal/silver = MATTER_AMOUNT_REINFORCEMENT,
/decl/material/solid/phoron = MATTER_AMOUNT_REINFORCEMENT,
/decl/material/solid/metal/silver = MATTER_AMOUNT_TRACE,
/decl/material/solid/metal/gold = MATTER_AMOUNT_TRACE
)
origin_tech = @'{"materials":4,"engineering":4,"programming":3}'
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/weapons/grenades/decompiler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
icon = 'icons/obj/items/grenades/delivery.dmi'
origin_tech = @'{"materials":3,"magnets":2,"exoticmatter":3}'
matter = list(
/decl/material/solid/exotic_matter = MATTER_AMOUNT_TRACE
/decl/material/solid/phoron = MATTER_AMOUNT_REINFORCEMENT,
/decl/material/solid/supermatter = MATTER_AMOUNT_TRACE
)

/obj/item/grenade/decompiler/detonate()
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/items/weapons/material/coins.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,6 @@

/obj/item/coin/platinum
material = /decl/material/solid/metal/platinum

/obj/item/coin/phoron
material = /decl/material/solid/phoron
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/material/twohanded.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
cable_color = COLOR_GREEN

/obj/item/twohanded/spear/supermatter
material = /decl/material/solid/exotic_matter
material = /decl/material/solid/supermatter
shaft_material = /decl/material/solid/organic/wood/ebony
cable_color = COLOR_INDIGO

Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/weapons/storage/bags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
material = /decl/material/solid/organic/plastic
matter = list(
/decl/material/solid/metal/gold = MATTER_AMOUNT_REINFORCEMENT,
/decl/material/solid/metal/uranium = MATTER_AMOUNT_TRACE
/decl/material/solid/metal/uranium = MATTER_AMOUNT_TRACE,
/decl/material/solid/phoron = MATTER_AMOUNT_TRACE
)
origin_tech = @'{"exoticmatter":5,"materials":6}'
storage = /datum/storage/bag/trash/advanced
Expand Down
14 changes: 14 additions & 0 deletions code/game/objects/items/weapons/tanks/tank_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Oxygen
* Anesthetic
* Air
* Phoron
* Hydrogen
* Emergency Oxygen
*/
Expand Down Expand Up @@ -35,6 +36,19 @@
starting_pressure = list(/decl/material/gas/oxygen = (6 ATM) * O2STANDARD, /decl/material/gas/nitrogen = (6 ATM) * N2STANDARD)
volume = 180

/*
* Phoron
*/
/obj/item/tank/phoron
name = "phoron tank"
desc = "Contains dangerous phoron. Do not inhale. Warning: extremely flammable."
icon = 'icons/obj/items/tanks/tank_greyscaled.dmi'
color = "#d3681a"
gauge_icon = null
obj_flags = OBJ_FLAG_CONDUCTIBLE
slot_flags = null //they have no straps!
starting_pressure = list(/decl/material/solid/phoron = 3*ONE_ATMOSPHERE)

/*
* Hydrogen
*/
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/tanks/tanks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ var/global/list/global/tank_gauge_cache = list()
. = ..()

// Set up appearance/strings.
var/obj/item/tank/tank_copy = pick(typesof(/obj/item/tank/oxygen) + typesof(/obj/item/tank/hydrogen))
var/obj/item/tank/tank_copy = pick(typesof(/obj/item/tank/oxygen) + typesof(/obj/item/tank/hydrogen) + typesof(/obj/item/tank/phoron))
name = initial(tank_copy.name)
desc = initial(tank_copy.desc)
icon = initial(tank_copy.icon)
Expand Down
4 changes: 3 additions & 1 deletion code/game/objects/random/subtypes/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@
/obj/item/coin/diamond = 2,
/obj/item/coin/iron = 4,
/obj/item/coin/uranium = 3,
/obj/item/coin/platinum = 1
/obj/item/coin/platinum = 1,
/obj/item/coin/phoron = 1
)
return spawnable_choices

Expand Down Expand Up @@ -355,6 +356,7 @@
/obj/item/stack/material/gemstone/mapped/diamond/ten = 7,
/obj/item/stack/material/pane/mapped/rborosilicate/ten = 7,
/obj/item/stack/material/brick/mapped/marble/ten = 8,
/obj/item/stack/material/crystal/mapped/phoron/ten = 7,
/obj/item/stack/material/ingot/mapped/gold/ten = 7,
/obj/item/stack/material/ingot/mapped/silver/ten = 7,
/obj/item/stack/material/ingot/mapped/osmium/ten = 7,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@
if(pickednum >= 10)
SSmaterials.create_object(/decl/material/solid/metal/plasteel, src, rand(common_min, common_max))

//Phoron (rare ore)
if(pickednum >= 15)
SSmaterials.create_object(/decl/material/solid/phoron, src, rand(common_min, common_max))

//Silver (rare ore)
if(pickednum >= 15)
SSmaterials.create_object(/decl/material/solid/metal/silver, src, rand(rare_min, rare_max))
Expand Down Expand Up @@ -125,6 +129,7 @@
/obj/item/stack/material/pane/mapped/glass/fifty,
/obj/item/stack/material/ingot/mapped/gold/fifty,
/obj/item/stack/material/ingot/mapped/silver/fifty,
/obj/item/stack/material/crystal/mapped/phoron/fifty,
/obj/item/stack/material/puck/mapped/uranium/fifty,
/obj/item/stack/material/gemstone/mapped/diamond/fifty,
/obj/item/stack/material/sheet/reinforced/mapped/plasteel/fifty,
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/doors/_door.dm
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
material = /decl/material/solid/organic/plastic

/obj/structure/door/exotic_matter
material = /decl/material/solid/exotic_matter
material = /decl/material/solid/supermatter

/obj/structure/door/shuttle
material = /decl/material/solid/metal/steel
2 changes: 1 addition & 1 deletion code/game/objects/structures/mineral_bath.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/obj/structure/mineral_bath/return_air()
var/datum/gas_mixture/venus = new(CELL_VOLUME, SYNTH_HEAT_LEVEL_1 - 10)
venus.adjust_multi(/decl/material/gas/chlorine, MOLES_N2STANDARD, /decl/material/gas/hydrogen, MOLES_O2STANDARD)
venus.adjust_multi(/decl/material/gas/chlorine, MOLES_N2STANDARD, /decl/material/solid/phoron, MOLES_O2STANDARD)
return venus

/obj/structure/mineral_bath/attackby(var/obj/item/thing, var/mob/user)
Expand Down
6 changes: 6 additions & 0 deletions code/game/turfs/floors/subtypes/floor_reinforced.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@
/turf/floor/reinforced/oxygen
initial_gas = list(/decl/material/gas/oxygen = ATMOSTANK_OXYGEN)

/turf/floor/reinforced/phoron
initial_gas = list(/decl/material/solid/phoron = ATMOSTANK_PHORON)

/turf/floor/reinforced/nitrogen/engine
name = "engine floor"
initial_gas = list(/decl/material/gas/nitrogen = MOLES_N2STANDARD)

/turf/floor/reinforced/phoron/fuel
initial_gas = list(/decl/material/solid/phoron = ATMOSTANK_PHORON_FUEL)

/turf/floor/reinforced/hydrogen/fuel
initial_gas = list(/decl/material/gas/hydrogen = ATMOSTANK_HYDROGEN_FUEL)

Expand Down
5 changes: 5 additions & 0 deletions code/game/turfs/walls/wall_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@
/turf/wall/plastic/facade
girder_material = /decl/material/solid/organic/plastic

/turf/wall/phoron
color = "#e37108"
icon_state = "stone"
material = /decl/material/solid/phoron

/turf/wall/wood
color = COLOR_BROWN
icon_state = "wood"
Expand Down
4 changes: 2 additions & 2 deletions code/modules/admin/verbs/debug.dm
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@
for(var/obj/machinery/rad_collector/Rad in SSmachines.machinery)
if(Rad.anchored)
if(!Rad.loaded_tank)
Rad.loaded_tank = new /obj/item/tank/hydrogen(Rad)
Rad.loaded_tank.air_contents.gas[/decl/material/gas/hydrogen] = 70
Rad.loaded_tank = new /obj/item/tank/phoron(Rad)
Rad.loaded_tank.air_contents.gas[/decl/material/solid/phoron] = 70
Rad.drainratio = 0
if(!Rad.active)
Rad.toggle_power()
Expand Down
12 changes: 8 additions & 4 deletions code/modules/atmospherics/atmos_primitives.dm
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@
// - Is between 80 and 120kPa
// - Has between 17% and 30% oxygen
// - Has temperature between -10C and 50C
// - Has no or only minimal chlorine or N2O
// - Has no or only minimal phoron, chlorine, or N2O
/proc/get_atmosphere_issues(datum/gas_mixture/atmosphere, var/returntext = 0)
var/list/status = list()
if(!atmosphere)
Expand All @@ -478,12 +478,14 @@
// TODO: generalize to check for -all- unsafe gasses.
// Gas concentration checks
var/oxygen = 0
var/phoron = 0
var/chlorine = 0
var/carbondioxide = 0
var/nitrousoxide = 0
var/hydrogen = 0
if(atmosphere.total_moles) // Division by zero prevention
oxygen = (atmosphere.gas[/decl/material/gas/oxygen] / atmosphere.total_moles) * 100 // Percentage of the gas
phoron = (atmosphere.gas[/decl/material/solid/phoron] / atmosphere.total_moles) * 100
chlorine = (atmosphere.gas[/decl/material/gas/chlorine] / atmosphere.total_moles) * 100
carbondioxide = (atmosphere.gas[/decl/material/gas/carbon_dioxide] / atmosphere.total_moles) * 100
nitrousoxide = (atmosphere.gas[/decl/material/gas/nitrous_oxide] / atmosphere.total_moles) * 100
Expand All @@ -496,13 +498,15 @@



if(chlorine > 0.1) // Toxic even in small amounts.
if(phoron > 0.1) // Toxic even in small amounts.
status.Add("Phoron contamination.")
if(chlorine > 0.1) // Ditto.
status.Add("Chlorine contamination.")
if(nitrousoxide > 0.1) // Probably slightly less dangerous but still.
status.Add("N2O contamination.")
if(hydrogen > 2.5) // Not too dangerous, but flammable.
if(hydrogen > 2.5) // Not too dangerous, but flammable.
status.Add("Hydrogen contamination.")
if(carbondioxide > 5) // Not as dangerous until very large amount is present.
if(carbondioxide > 5) // Not as dangerous until a very large amount is present.
status.Add("CO2 concentration high.")


Expand Down
5 changes: 5 additions & 0 deletions code/modules/atmospherics/components/unary/tank.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@
icon_state = "co2"
filling = list(/decl/material/gas/carbon_dioxide = 1)

/obj/machinery/atmospherics/unary/tank/phoron
name = "Pressure Tank (Phoron)"
icon_state = "phoron"
filling = list(/decl/material/solid/phoron = 1)

/obj/machinery/atmospherics/unary/tank/nitrous_oxide
name = "Pressure Tank (Nitrous Oxide)"
icon_state = "n2o"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/backgrounds/location/_location_events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
. = "A [pick("festival","week long celebration","day of revelry","planet-wide holiday")] has been declared on [location.name] by [pick("Governor","Commissioner","General","Commandant","Administrator")] [random_name(pick(MALE,FEMALE))] to celebrate [pick("the birth of their [pick("son","daughter")]","coming of age of their [pick("son","daughter")]","the pacification of rogue military cell","the apprehension of a violent criminal who had been terrorising the planet")]. Massive stocks of food and meat have been bought driving up prices across the planet."

/decl/location_event/research_breakthrough/announce(var/decl/background_detail/location)
. = "A major breakthough in the field of [pick("exotic matter research","super-compressed materials","nano-augmentation","wormhole research","volatile power manipulation")] \
. = "A major breakthough in the field of [pick("phoron research","super-compressed materials","nano-augmentation","wormhole research","volatile power manipulation")] \
was announced [pick("yesterday","a few days ago","last week","earlier this month")] by a private firm on [location.name]. \
[global.using_map.company_name] declined to comment as to whether this could impinge on profits."

Expand Down
1 change: 1 addition & 0 deletions code/modules/clothing/masks/gasmask.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
ARMOR_BIO = ARMOR_BIO_STRONG
)
filtered_gases = list(
/decl/material/solid/phoron,
/decl/material/gas/nitrous_oxide,
/decl/material/gas/chlorine,
/decl/material/gas/ammonia,
Expand Down
Loading

0 comments on commit 745ac69

Please sign in to comment.