From 17d1fd0692a568984c90e7df2641c3facb7c4150 Mon Sep 17 00:00:00 2001 From: lolman360 Date: Wed, 22 Jul 2020 12:42:46 +1000 Subject: [PATCH] fixes --- code/datums/components/plumbing/_plumbing.dm | 4 +- .../plumbing/chemical_acclimator.dm | 2 +- code/datums/components/plumbing/filter.dm | 4 +- .../components/plumbing/reaction_chamber.dm | 10 +-- code/game/objects/items/RCD.dm | 19 +++-- code/game/objects/structures/geyser.dm | 74 ---------------- .../turfs/simulated/floor/plating/asteroid.dm | 11 +++ code/modules/asset_cache/asset_list_items.dm | 2 +- .../plumbing/plumbers/_plumb_machinery.dm | 3 +- code/modules/plumbing/plumbers/acclimator.dm | 4 +- code/modules/plumbing/plumbers/bottler.dm | 2 +- code/modules/plumbing/plumbers/fermenter.dm | 25 ++++-- code/modules/plumbing/plumbers/filter.dm | 4 +- .../plumbing/plumbers/grinder_chemical.dm | 28 +++--- code/modules/plumbing/plumbers/pill_press.dm | 80 +++++++++++------- code/modules/plumbing/plumbers/pumps.dm | 59 +++++-------- code/modules/plumbing/plumbers/synthesizer.dm | 4 +- code/modules/reagents/chemistry/reagents.dm | 8 ++ .../chemistry/reagents/medicine_reagents.dm | 16 ++-- .../chemistry/reagents/other_reagents.dm | 16 +++- .../chemistry/reagents/toxin_reagents.dm | 1 + .../reagents/chemistry/recipes/medicine.dm | 8 +- .../reagents/chemistry/recipes/others.dm | 35 +++++++- .../research/designs/medical_designs.dm | 2 +- code/modules/vending/medical.dm | 3 +- icons/obj/lavaland/terrain.dmi | Bin 0 -> 771 bytes tgstation.dme | 1 - 27 files changed, 222 insertions(+), 203 deletions(-) delete mode 100644 code/game/objects/structures/geyser.dm create mode 100644 icons/obj/lavaland/terrain.dmi diff --git a/code/datums/components/plumbing/_plumbing.dm b/code/datums/components/plumbing/_plumbing.dm index 22b8bafde5..6592e41103 100644 --- a/code/datums/components/plumbing/_plumbing.dm +++ b/code/datums/components/plumbing/_plumbing.dm @@ -17,7 +17,7 @@ var/turn_connects = TRUE /datum/component/plumbing/Initialize(start=TRUE, _turn_connects=TRUE) //turn_connects for wheter or not we spin with the object to change our pipes - if(parent && !ismovableatom(parent)) + if(parent && !istype(parent, /atom/movable)) return COMPONENT_INCOMPATIBLE var/atom/movable/AM = parent if(!AM.reagents) @@ -77,7 +77,7 @@ if(reagent) //only asked for one type of reagent for(var/A in reagents.reagent_list) var/datum/reagent/R = A - if(R.id == reagent) + if(R.type == reagent) return TRUE else if(reagents.total_volume > 0) //take whatever return TRUE diff --git a/code/datums/components/plumbing/chemical_acclimator.dm b/code/datums/components/plumbing/chemical_acclimator.dm index 44a1396c6d..1cbe6ff017 100644 --- a/code/datums/components/plumbing/chemical_acclimator.dm +++ b/code/datums/components/plumbing/chemical_acclimator.dm @@ -1,4 +1,4 @@ -v/datum/component/plumbing/acclimator +/datum/component/plumbing/acclimator demand_connects = WEST supply_connects = EAST var/obj/machinery/plumbing/acclimator/AC diff --git a/code/datums/components/plumbing/filter.dm b/code/datums/components/plumbing/filter.dm index cfbfb641da..55647a353b 100644 --- a/code/datums/components/plumbing/filter.dm +++ b/code/datums/components/plumbing/filter.dm @@ -35,12 +35,12 @@ else for(var/A in reagents.reagent_list) var/datum/reagent/R = A - if(!can_give_in_direction(direction, R.id)) + if(!can_give_in_direction(direction, R)) continue var/new_amount if(R.volume < amount) new_amount = amount - R.volume - reagents.trans_id_to(target.parent, R.id, amount) + reagents.trans_id_to(target.parent, R, amount) amount = new_amount if(amount <= 0) break diff --git a/code/datums/components/plumbing/reaction_chamber.dm b/code/datums/components/plumbing/reaction_chamber.dm index 6435d11ae6..705611ed1a 100644 --- a/code/datums/components/plumbing/reaction_chamber.dm +++ b/code/datums/components/plumbing/reaction_chamber.dm @@ -17,17 +17,17 @@ var/obj/machinery/plumbing/reaction_chamber/RC = parent if(RC.emptying || !LAZYLEN(RC.required_reagents)) return - for(var/RTid in RC.required_reagents) + for(var/RT in RC.required_reagents) var/has_reagent = FALSE for(var/A in reagents.reagent_list) var/datum/reagent/RD = A - if(RTid == RD.id) + if(RT == RD) has_reagent = TRUE - if(RD.volume < RC.required_reagents[RTid]) - process_request(min(RC.required_reagents[RTid] - RD.volume, MACHINE_REAGENT_TRANSFER) , RTid, dir) + if(RD.volume < RC.required_reagents[RT]) + process_request(min(RC.required_reagents[RT] - RD.volume, MACHINE_REAGENT_TRANSFER) , RT, dir) return if(!has_reagent) - process_request(min(RC.required_reagents[RTid], MACHINE_REAGENT_TRANSFER), RTid, dir) + process_request(min(RC.required_reagents[RT], MACHINE_REAGENT_TRANSFER), RT, dir) return RC.reagent_flags &= ~NO_REACT diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index 29a04237ea..3ec0da70c5 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -135,6 +135,14 @@ RLD flick("[icon_state]_empty", src) //somewhat hacky thing to make RCDs with ammo counters actually have a blinking yellow light return . + +/obj/item/construction/proc/check_menu(mob/living/user) + if(!istype(user)) + return FALSE + if(user.incapacitated() || !user.Adjacent(src)) + return FALSE + return TRUE + /obj/item/construction/proc/range_check(atom/A, mob/user) if(!(A in range(custom_range, get_turf(user)))) to_chat(user, "The \'Out of Range\' light on [src] blinks red.") @@ -276,13 +284,6 @@ RLD //Not scaling these down to button size because they look horrible then, instead just bumping up radius. return MA -/obj/item/construction/rcd/proc/check_menu(mob/living/user) - if(!istype(user)) - return FALSE - if(user.incapacitated() || !user.Adjacent(src)) - return FALSE - return TRUE - /obj/item/construction/rcd/proc/change_computer_dir(mob/user) if(!user) return @@ -915,9 +916,9 @@ RLD if(O.density) //let's not built ontop of dense stuff, like big machines and other obstacles, it kills my immershion return FALSE -/obj/item/construction/plumbing/afterattack(atom/A, mob/user, proximity) +/obj/item/construction/plumbing/afterattack(atom/A, mob/user) . = ..() - if(!prox_check(proximity)) + if(!range_check(A, user)) return if(istype(A, /obj/machinery/plumbing)) var/obj/machinery/plumbing/P = A diff --git a/code/game/objects/structures/geyser.dm b/code/game/objects/structures/geyser.dm deleted file mode 100644 index 1d77a3c4f8..0000000000 --- a/code/game/objects/structures/geyser.dm +++ /dev/null @@ -1,74 +0,0 @@ -//If you look at the "geyser_soup" overlay icon_state, you'll see that the first frame has 25 ticks. -//That's because the first 18~ ticks are completely skipped for some ungodly weird fucking byond reason - -/obj/structure/geyser - name = "geyser" - icon = 'icons/obj/lavaland/terrain.dmi' - icon_state = "geyser" - anchored = TRUE - var/decay = 0 //reagents/tick removed - var/erupting_state = null //set to null to get it greyscaled from "[icon_state]_soup". Not very usable with the whole random thing, but more types can be added if you change the spawn prob - var/activated = FALSE //whether we are active and generating chems - var/reagent_id = "oil" - var/potency = 2 //how much reagents we add every process (2 seconds) - var/max_volume = 500 - var/start_volume = 50 - -/obj/structure/geyser/proc/start_chemming() - activated = TRUE - create_reagents(max_volume, DRAINABLE) - reagents.add_reagent(reagent_id, start_volume) - START_PROCESSING(SSfluids, src) //It's main function is to be plumbed, so use SSfluids - if(erupting_state) - icon_state = erupting_state - else - var/mutable_appearance/I = mutable_appearance('icons/obj/lavaland/terrain.dmi', "[icon_state]_soup") - I.color = mix_color_from_reagents(reagents.reagent_list) - add_overlay(I) - -/obj/structure/geyser/process() - if(activated && reagents.total_volume <= reagents.maximum_volume) //this is also evaluated in add_reagent, but from my understanding proc calls are expensive and should be avoided in continous - reagents.add_reagent(reagent_id, potency) //processes - if(potency > 0) - potency =- decay //decaying! - -/obj/structure/geyser/plunger_act(obj/item/plunger/P, mob/living/user, _reinforced) - if(!_reinforced) - to_chat(user, "The [P.name] isn't strong enough!") - return - if(activated) - to_chat(user, "The [name] is already active!") - return - - to_chat(user, "You start vigorously plunging [src]!") - if(do_after(user, 50*P.plunge_mod, target = src) && !activated) - start_chemming() - -/obj/structure/geyser/random - erupting_state = null - var/list/options = list("oil" = 2, "clf3" = 1) //formerly crudeoil, 2,1 -/obj/structure/geyser/random/Initialize() - . = ..() - reagent_id = pickweight(options) - -/obj/item/plunger - name = "plunger" - desc = "It's a plunger for plunging." - icon = 'icons/obj/watercloset.dmi' - icon_state = "plunger" - slot_flags = ITEM_SLOT_MASK - - var/plunge_mod = 1 //time*plunge_mod = total time we take to plunge an object - var/reinforced = FALSE //whether we do heavy duty stuff like geysers - -/obj/item/plunger/attack_obj(obj/O, mob/living/user) - if(!O.plunger_act(src, user, reinforced)) - return ..() - -/obj/item/plunger/reinforced - name = "reinforced plunger" - desc = " It's an M. 7 Reinforced Plunger for heavy duty plunging." - icon_state = "reinforced_plunger" - - reinforced = TRUE - plunge_mod = 0.8 diff --git a/code/game/turfs/simulated/floor/plating/asteroid.dm b/code/game/turfs/simulated/floor/plating/asteroid.dm index 1fbeee7523..f862a314a7 100644 --- a/code/game/turfs/simulated/floor/plating/asteroid.dm +++ b/code/game/turfs/simulated/floor/plating/asteroid.dm @@ -334,8 +334,19 @@ spawned_flora = SpawnFlora(T) if(!spawned_flora) // no rocks beneath mob spawners / mobs. SpawnMonster(T) + SpawnTerrain(T) T.ChangeTurf(turf_type, null, CHANGETURF_IGNORE_AIR) +/turf/open/floor/plating/asteroid/airless/cave/proc/SpawnTerrain(turf/T) + if(prob(1)) + if(istype(loc, /area/mine/explored) || istype(loc, /area/lavaland/surface/outdoors/explored)) + return + var/randumb = pickweight(terrain_spawn_list) + for(var/obj/structure/geyser/F in range(7, T)) + if(istype(F, randumb)) + return + new randumb(T) + /// Spawns a random mob or megafauna in the tunnel /turf/open/floor/plating/asteroid/airless/cave/proc/SpawnMonster(turf/T) if(!isarea(loc)) diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm index e44c5e2a3f..febf3a84e5 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -266,7 +266,7 @@ name = "pipes" /datum/asset/spritesheet/pipes/register() - for (var/each in list('icons/obj/atmospherics/pipes/pipe_item.dmi', 'icons/obj/atmospherics/pipes/disposal.dmi', 'icons/obj/atmospherics/pipes/transit_tube.dmi', 'icons/obj/plumbing/fluid_ducts.dmi')) + for (var/each in list('icons/obj/atmospherics/pipes/pipe_item.dmi', 'icons/obj/atmospherics/pipes/disposal.dmi', 'icons/obj/atmospherics/pipes/transit_tube.dmi', 'icons/obj/plumbing/fluid_ducts.dmi')) InsertAll("", each, GLOB.alldirs) ..() diff --git a/code/modules/plumbing/plumbers/_plumb_machinery.dm b/code/modules/plumbing/plumbers/_plumb_machinery.dm index 1ea7ab56b1..0566945e3b 100644 --- a/code/modules/plumbing/plumbers/_plumb_machinery.dm +++ b/code/modules/plumbing/plumbers/_plumb_machinery.dm @@ -26,11 +26,12 @@ . = ..() anchored = bolt create_reagents(buffer, reagent_flags) - AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ) + AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS, null, CALLBACK(src, .proc/can_be_rotated)) /obj/machinery/plumbing/proc/can_be_rotated(mob/user,rotation_type) return TRUE + /obj/machinery/plumbing/examine(mob/user) . = ..() . += "The maximum volume display reads: [reagents.maximum_volume] units." diff --git a/code/modules/plumbing/plumbers/acclimator.dm b/code/modules/plumbing/plumbers/acclimator.dm index 475614c421..1b4ebe8808 100644 --- a/code/modules/plumbing/plumbers/acclimator.dm +++ b/code/modules/plumbing/plumbers/acclimator.dm @@ -25,8 +25,8 @@ and you get nasty leftovers */ var/emptying = FALSE - var/ui_x = 320 - var/ui_y = 310 + ui_x = 320 + ui_y = 310 /obj/machinery/plumbing/acclimator/Initialize(mapload, bolt) . = ..() diff --git a/code/modules/plumbing/plumbers/bottler.dm b/code/modules/plumbing/plumbers/bottler.dm index c6595fc397..57233a5873 100644 --- a/code/modules/plumbing/plumbers/bottler.dm +++ b/code/modules/plumbing/plumbers/bottler.dm @@ -56,7 +56,7 @@ to_chat(user, " The [src] will now fill for [wanted_amount]u.") /obj/machinery/plumbing/bottler/process() - if(machine_stat & NOPOWER) + if(stat & NOPOWER) return ///see if machine has enough to fill if(reagents.total_volume >= wanted_amount && anchored) diff --git a/code/modules/plumbing/plumbers/fermenter.dm b/code/modules/plumbing/plumbers/fermenter.dm index e13ae3feff..b1e1e4b676 100644 --- a/code/modules/plumbing/plumbers/fermenter.dm +++ b/code/modules/plumbing/plumbers/fermenter.dm @@ -14,17 +14,25 @@ . = ..() AddComponent(/datum/component/plumbing/simple_supply, bolt) -/obj/machinery/plumbing/grinder_chemical/can_be_rotated(mob/user, rotation_type) +/obj/machinery/plumbing/fermenter/can_be_rotated(mob/user,rotation_type) if(anchored) to_chat(user, "It is fastened to the floor!") return FALSE - return TRUE + switch(eat_dir) + if(WEST) + eat_dir = NORTH + return TRUE + if(EAST) + eat_dir = SOUTH + return TRUE + if(NORTH) + eat_dir = EAST + return TRUE + if(SOUTH) + eat_dir = WEST + return TRUE -/obj/machinery/plumbing/fermenter/setDir(newdir) - . = ..() - eat_dir = newdir - -/obj/machinery/plumbing/fermenter/CanAllowThrough(atom/movable/AM) +/obj/machinery/plumbing/fermenter/CanPass(atom/movable/AM) . = ..() if(!anchored) return @@ -36,9 +44,8 @@ . = ..() ferment(AM) -/// uses fermentation proc similar to fermentation barrels /obj/machinery/plumbing/fermenter/proc/ferment(atom/AM) - if(machine_stat & NOPOWER) + if(stat & NOPOWER) return if(reagents.holder_full()) return diff --git a/code/modules/plumbing/plumbers/filter.dm b/code/modules/plumbing/plumbers/filter.dm index 3058120b9d..b748c576e7 100644 --- a/code/modules/plumbing/plumbers/filter.dm +++ b/code/modules/plumbing/plumbers/filter.dm @@ -12,8 +12,8 @@ var/list/english_left = list() ///whitelist of chems but their name instead of path var/list/english_right = list() - var/ui_x = 320 - var/ui_y = 310 + ui_x = 320 + ui_y = 310 /obj/machinery/plumbing/filter/Initialize(mapload, bolt) diff --git a/code/modules/plumbing/plumbers/grinder_chemical.dm b/code/modules/plumbing/plumbers/grinder_chemical.dm index 4fa0d9e2cc..d080bd7c8f 100644 --- a/code/modules/plumbing/plumbers/grinder_chemical.dm +++ b/code/modules/plumbing/plumbers/grinder_chemical.dm @@ -7,23 +7,31 @@ rcd_cost = 30 rcd_delay = 30 buffer = 400 - var/eat_dir = SOUTH + var/eat_dir = NORTH /obj/machinery/plumbing/grinder_chemical/Initialize(mapload, bolt) . = ..() AddComponent(/datum/component/plumbing/simple_supply, bolt) -/obj/machinery/plumbing/grinder_chemical/can_be_rotated(mob/user, rotation_type) +/obj/machinery/plumbing/grinder_chemical/can_be_rotated(mob/user,rotation_type) if(anchored) to_chat(user, "It is fastened to the floor!") return FALSE - return TRUE + switch(eat_dir) + if(WEST) + eat_dir = NORTH + return TRUE + if(EAST) + eat_dir = SOUTH + return TRUE + if(NORTH) + eat_dir = EAST + return TRUE + if(SOUTH) + eat_dir = WEST + return TRUE -/obj/machinery/plumbing/grinder_chemical/setDir(newdir) - . = ..() - eat_dir = newdir - -/obj/machinery/plumbing/grinder_chemical/CanAllowThrough(atom/movable/AM) +/obj/machinery/plumbing/grinder_chemical/CanPass(atom/movable/AM) . = ..() if(!anchored) return @@ -36,7 +44,7 @@ grind(AM) /obj/machinery/plumbing/grinder_chemical/proc/grind(atom/AM) - if(machine_stat & NOPOWER) + if(stat & NOPOWER) return if(reagents.holder_full()) return @@ -53,6 +61,4 @@ return I.on_grind() reagents.add_reagent_list(I.grind_results) - if(I.reagents) - I.reagents.trans_to(src, I.reagents.total_volume, transfered_by = src) qdel(I) diff --git a/code/modules/plumbing/plumbers/pill_press.dm b/code/modules/plumbing/plumbers/pill_press.dm index 9c2505661c..56510fac87 100644 --- a/code/modules/plumbing/plumbers/pill_press.dm +++ b/code/modules/plumbing/plumbers/pill_press.dm @@ -1,28 +1,36 @@ ///We take a constant input of reagents, and produce a pill once a set volume is reached /obj/machinery/plumbing/pill_press - name = "pill press" - desc = "A press that presses pills." + name = "chemical press" + desc = "A press that makes pills, patches and bottles." icon_state = "pill_press" - ///the minimum size a pill can be - var/minimum_pill = 5 - ///the maximum size a pill can be - var/maximum_pill = 50 - ///the size of the pill - var/pill_size = 10 - ///pill name - var/pill_name = "factory pill" + ///maximum size of a pill + var/max_pill_volume = 50 + ///maximum size of a patch + var/max_patch_volume = 40 + ///maximum size of a bottle + var/max_bottle_volume = 30 + ///current operating product (pills or patches) + var/product = "pill" + ///the minimum size a pill or patch can be + var/min_volume = 5 + ///the maximum size a pill or patch can be + var/max_volume = 50 + ///selected size of the product + var/current_volume = 10 + ///prefix for the product name + var/product_name = "factory" ///the icon_state number for the pill. var/pill_number = RANDOM_PILL_STYLE ///list of id's and icons for the pill selection of the ui var/list/pill_styles - ///list of pills stored in the machine, so we dont have 610 pills on one tile - var/list/stored_pills = list() + ///list of products stored in the machine, so we dont have 610 pills on one tile + var/list/stored_products = list() ///max amount of pills allowed on our tile before we start storing them instead - var/max_floor_pills = 10 + var/max_floor_products = 50 //haha massive pill piles /obj/machinery/plumbing/pill_press/examine(mob/user) . = ..() - . += "The [name] currently has [stored_pills.len] stored. There needs to be less than [max_floor_pills] on the floor to continue dispensing." + . += "The [name] currently has [stored_products.len] stored. There needs to be less than [max_floor_products ] on the floor to continue dispensing." /obj/machinery/plumbing/pill_press/Initialize(mapload, bolt) . = ..() @@ -37,29 +45,41 @@ SL["htmltag"] = assets.icon_tag("pill[x]") pill_styles += list(SL) + /obj/machinery/plumbing/pill_press/process() if(stat & NOPOWER) return - if(reagents.total_volume >= pill_size) - var/obj/item/reagent_containers/pill/P = new(src) - reagents.trans_to(P, pill_size) - P.name = pill_name - stored_pills += P - if(pill_number == RANDOM_PILL_STYLE) - P.icon_state = "pill[rand(1,21)]" - else - P.icon_state = "pill[pill_number]" - if(P.icon_state == "pill4") //mirrored from chem masters - P.desc = "A tablet or capsule, but not just any, a red one, one taken by the ones not scared of knowledge, freedom, uncertainty and the brutal truths of reality." - if(stored_pills.len) + if(reagents.total_volume >= current_volume) + if (product == "pill") + var/obj/item/reagent_containers/pill/P = new(src) + reagents.trans_to(P, current_volume) + P.name = trim("[product_name] pill") + stored_products += P + if(pill_number == RANDOM_PILL_STYLE) + P.icon_state = "pill[rand(1,21)]" + else + P.icon_state = "pill[pill_number]" + if(P.icon_state == "pill4") //mirrored from chem masters + P.desc = "A tablet or capsule, but not just any, a red one, one taken by the ones not scared of knowledge, freedom, uncertainty and the brutal truths of reality." + else if (product == "patch") + var/obj/item/reagent_containers/pill/patch/P = new(src) + reagents.trans_to(P, current_volume) + P.name = trim("[product_name] patch") + stored_products += P + else if (product == "bottle") + var/obj/item/reagent_containers/glass/bottle/P = new(src) + reagents.trans_to(P, current_volume) + P.name = trim("[product_name] bottle") + stored_products += P + if(stored_products.len) var/pill_amount = 0 for(var/obj/item/reagent_containers/pill/P in loc) pill_amount++ - if(pill_amount >= max_floor_pills) //too much so just stop + if(pill_amount >= max_floor_products) //too much so just stop break - if(pill_amount < max_floor_pills) - var/atom/movable/AM = stored_pills[1] //AM because forceMove is all we need - stored_pills -= AM + if(pill_amount < max_floor_products) + var/atom/movable/AM = stored_products[1] //AM because forceMove is all we need + stored_products -= AM AM.forceMove(drop_location()) diff --git a/code/modules/plumbing/plumbers/pumps.dm b/code/modules/plumbing/plumbers/pumps.dm index aeec8c9994..c24e48098d 100644 --- a/code/modules/plumbing/plumbers/pumps.dm +++ b/code/modules/plumbing/plumbers/pumps.dm @@ -1,15 +1,17 @@ -///We pump liquids from activated(plungerated) geysers to a plumbing outlet. We need to be wired. -/obj/machinery/power/liquid_pump +///We pump liquids from activated(plungerated) geysers to a plumbing outlet. We don't need to be wired. +/obj/machinery/plumbing/liquid_pump name = "liquid pump" - desc = "Pump up those sweet liquids from under the surface." + desc = "Pump up those sweet liquids from under the surface. Uses thermal energy from geysers to power itself." //better than placing 200 cables, because it wasnt fun icon = 'icons/obj/plumbing/plumbers.dmi' icon_state = "pump" anchored = FALSE density = TRUE idle_power_usage = 10 active_power_usage = 1000 - ///Are we powered? - var/powered = FALSE + + rcd_cost = 30 + rcd_delay = 40 + ///units we pump per process (2 seconds) var/pump_power = 2 ///set to true if the loop couldnt find a geyser in process, so it remembers and stops checking every loop until moved. more accurate name would be absolutely_no_geyser_under_me_so_dont_try @@ -19,63 +21,42 @@ ///volume of our internal buffer var/volume = 200 -/obj/machinery/power/liquid_pump/Initialize() +/obj/machinery/plumbing/liquid_pump/Initialize(mapload, bolt) . = ..() - create_reagents(volume) - AddComponent(/datum/component/plumbing/simple_supply, TRUE) + AddComponent(/datum/component/plumbing/simple_supply, bolt) -/obj/machinery/power/liquid_pump/attackby(obj/item/W, mob/user, params) - if(!powered) - if(!anchored) - if(default_deconstruction_screwdriver(user, "[initial(icon_state)]_open", "[initial(icon_state)]",W)) - return - if(default_deconstruction_crowbar(W)) - return - return ..() - -/obj/machinery/power/liquid_pump/wrench_act(mob/living/user, obj/item/I) - ..() - default_unfasten_wrench(user, I) - return TRUE ///please note that the component has a hook in the parent call, wich handles activating and deactivating -/obj/machinery/power/liquid_pump/default_unfasten_wrench(mob/user, obj/item/I, time = 20) +/obj/machinery/plumbing/liquid_pump/default_unfasten_wrench(mob/user, obj/item/I, time = 20) . = ..() if(. == SUCCESSFUL_UNFASTEN) geyser = null update_icon() - powered = FALSE geyserless = FALSE //we switched state, so lets just set this back aswell -/obj/machinery/power/liquid_pump/process() - if(!anchored || panel_open) +/obj/machinery/plumbing/liquid_pump/process() + if(!anchored || panel_open || geyserless) return - if(!geyser && !geyserless) + + if(!geyser) for(var/obj/structure/geyser/G in loc.contents) geyser = G + update_icon() if(!geyser) //we didnt find one, abort - anchored = FALSE geyserless = TRUE visible_message("The [name] makes a sad beep!") playsound(src, 'sound/machines/buzz-sigh.ogg', 50) return - if(avail(active_power_usage)) - if(!powered) //we werent powered before this tick so update our sprite - powered = TRUE - update_icon() - add_load(active_power_usage) - pump() - else if(powered) //we were powered, but now we arent - powered = FALSE - update_icon() + pump() + ///pump up that sweet geyser nectar -/obj/machinery/power/liquid_pump/proc/pump() +/obj/machinery/plumbing/liquid_pump/proc/pump() if(!geyser || !geyser.reagents) return geyser.reagents.trans_to(src, pump_power) -/obj/machinery/power/liquid_pump/update_icon() - if(powered) +/obj/machinery/plumbing/liquid_pump/update_icon_state() + if(geyser) icon_state = initial(icon_state) + "-on" else if(panel_open) icon_state = initial(icon_state) + "-open" diff --git a/code/modules/plumbing/plumbers/synthesizer.dm b/code/modules/plumbing/plumbers/synthesizer.dm index 2d782e9d3e..c2bc3439ff 100644 --- a/code/modules/plumbing/plumbers/synthesizer.dm +++ b/code/modules/plumbing/plumbers/synthesizer.dm @@ -34,7 +34,7 @@ /datum/reagent/oxygen, /datum/reagent/phosphorus, /datum/reagent/potassium, - /datum/reagent/uranium/radium, + /datum/reagent/radium, /datum/reagent/silicon, /datum/reagent/silver, /datum/reagent/sodium, @@ -51,7 +51,7 @@ AddComponent(/datum/component/plumbing/simple_supply, bolt) /obj/machinery/plumbing/synthesizer/process() - if(machine_stat & NOPOWER || !reagent_id || !amount) + if(stat & NOPOWER || !reagent_id || !amount) return if(reagents.total_volume >= amount) //otherwise we get leftovers, and we need this to be precise return diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm index cdda9d0469..f2add0bd4f 100644 --- a/code/modules/reagents/chemistry/reagents.dm +++ b/code/modules/reagents/chemistry/reagents.dm @@ -53,6 +53,14 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent()) var/metabolizing = FALSE var/chemical_flags // See fermi/readme.dm REAGENT_DEAD_PROCESS, REAGENT_DONOTSPLIT, REAGENT_ONLYINVERSE, REAGENT_ONMOBMERGE, REAGENT_INVISIBLE, REAGENT_FORCEONNEW, REAGENT_SNEAKYNAME var/value = REAGENT_VALUE_NONE //How much does it sell for in cargo? + var/datum/material/material //are we made of material? + +/datum/reagent/New() + . = ..() + + if(material) + material = getmaterialref(material) + /datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references . = ..() diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index b9da8271ab..b173df3282 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -505,12 +505,13 @@ overdose_threshold = 30 pH = 2 value = REAGENT_VALUE_UNCOMMON + var/healing = 0.5 /datum/reagent/medicine/omnizine/on_mob_life(mob/living/carbon/M) - M.adjustToxLoss(-0.5*REM, 0) - M.adjustOxyLoss(-0.5*REM, 0) - M.adjustBruteLoss(-0.5*REM, 0) - M.adjustFireLoss(-0.5*REM, 0) + M.adjustToxLoss(-healing*REM, 0) + M.adjustOxyLoss(-healing*REM, 0) + M.adjustBruteLoss(-healing*REM, 0) + M.adjustFireLoss(-healing*REM, 0) ..() . = 1 @@ -522,6 +523,12 @@ ..() . = 1 +/datum/reagent/medicine/omnizine/protozine + name = "Protozine" + description = "A less environmentally friendly and somewhat weaker variant of omnizine." + color = "#d8c7b7" + healing = 0.2 + /datum/reagent/medicine/calomel name = "Calomel" description = "Quickly purges the body of all chemicals. Toxin damage is dealt if the patient is in good condition." @@ -1587,4 +1594,3 @@ if(prob(3)) to_chat(C, "[pick(GLOB.wisdoms)]") //give them a random wisdom ..() - diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 4c66b0e51e..b249310d7e 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -308,6 +308,13 @@ metabolization_rate = 45 * REAGENTS_METABOLISM . = 1 +/datum/reagent/water/hollowwater + name = "Hollow Water" + description = "An ubiquitous chemical substance that is composed of hydrogen and oxygen, but it looks kinda hollow." + color = "#88878777" + taste_description = "emptyiness" + + /datum/reagent/water/holywater name = "Holy Water" description = "Water blessed by some deity." @@ -943,6 +950,7 @@ color = "#1C1300" // rgb: 30, 20, 0 taste_description = "sour chalk" pH = 5 + material = /datum/material/diamond /datum/reagent/carbon/reaction_turf(turf/T, reac_volume) if(!isspaceturf(T)) @@ -1065,6 +1073,7 @@ pH = 6 overdose_threshold = 30 color = "#c2391d" + material = /datum/material/iron /datum/reagent/iron/on_mob_life(mob/living/carbon/C) if((HAS_TRAIT(C, TRAIT_NOMARROW))) @@ -1096,6 +1105,7 @@ reagent_state = SOLID color = "#F7C430" // rgb: 247, 196, 48 taste_description = "expensive metal" + material = /datum/material/gold /datum/reagent/silver name = "Silver" @@ -1103,6 +1113,7 @@ reagent_state = SOLID color = "#D0D0D0" // rgb: 208, 208, 208 taste_description = "expensive yet reasonable metal" + material = /datum/material/silver /datum/reagent/silver/reaction_mob(mob/living/M, method=TOUCH, reac_volume) if(M.has_bane(BANE_SILVER)) @@ -1116,6 +1127,7 @@ color = "#B8B8C0" // rgb: 184, 184, 192 taste_description = "the inside of a reactor" pH = 4 + material = /datum/material/uranium /datum/reagent/uranium/on_mob_life(mob/living/carbon/M) M.apply_effect(1/M.metabolism_efficiency,EFFECT_IRRADIATE,0) @@ -1137,6 +1149,7 @@ taste_description = "fizzling blue" pH = 12 value = REAGENT_VALUE_RARE + material = /datum/material/bluespace /datum/reagent/bluespace/reaction_mob(mob/living/M, method=TOUCH, reac_volume) if(method == TOUCH || method == VAPOR) @@ -1175,6 +1188,7 @@ color = "#A8A8A8" // rgb: 168, 168, 168 taste_mult = 0 pH = 10 + material = /datum/material/glass /datum/reagent/fuel name = "Welding fuel" @@ -2301,4 +2315,4 @@ description = "A crystaline polydextrose polymer, plants swear by this stuff." reagent_state = SOLID color = "#E6E6DA" - taste_mult = 0 \ No newline at end of file + taste_mult = 0 diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index c7add16fcf..704895b8d4 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -64,6 +64,7 @@ toxpwr = 3 pH = 4 value = REAGENT_VALUE_RARE //sheets are worth more + material = /datum/material/plasma /datum/reagent/toxin/plasma/on_mob_life(mob/living/carbon/C) if(holder.has_reagent(/datum/reagent/medicine/epinephrine)) diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm index e591daeb8e..663d232bb8 100644 --- a/code/modules/reagents/chemistry/recipes/medicine.dm +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -207,6 +207,12 @@ results = list(/datum/reagent/medicine/strange_reagent = 3) required_reagents = list(/datum/reagent/medicine/omnizine = 1, /datum/reagent/water/holywater = 1, /datum/reagent/toxin/mutagen = 1) +/datum/chemical_reaction/strange_reagent/alt + name = "Strange Reagent" + id = /datum/reagent/medicine/strange_reagent + results = list(/datum/reagent/medicine/strange_reagent = 2) + required_reagents = list(/datum/reagent/medicine/omnizine/protozine = 1, /datum/reagent/water/holywater = 1, /datum/reagent/toxin/mutagen = 1) + /datum/chemical_reaction/mannitol name = "Mannitol" id = /datum/reagent/medicine/mannitol @@ -333,4 +339,4 @@ /datum/chemical_reaction/medmesh/on_reaction(datum/reagents/holder, created_volume) var/location = get_turf(holder.my_atom) for(var/i = 1, i <= created_volume, i++) - new /obj/item/stack/medical/mesh/advanced(location) \ No newline at end of file + new /obj/item/stack/medical/mesh/advanced(location) diff --git a/code/modules/reagents/chemistry/recipes/others.dm b/code/modules/reagents/chemistry/recipes/others.dm index f32bc708d0..ddf38749c9 100644 --- a/code/modules/reagents/chemistry/recipes/others.dm +++ b/code/modules/reagents/chemistry/recipes/others.dm @@ -1,3 +1,34 @@ +/datum/chemical_reaction/metalgen + name = "metalgen" + id = /datum/reagent/metalgen + required_reagents = list(/datum/reagent/wittel = 1, /datum/reagent/bluespace = 1, /datum/reagent/toxin/mutagen = 1) + results = list(/datum/reagent/metalgen = 1) + +/datum/chemical_reaction/metalgen_imprint + name = "metalgen imprint" + id = /datum/reagent/metalgen + required_reagents = list(/datum/reagent/metalgen = 1, /datum/reagent/liquid_dark_matter = 1) + results = list(/datum/reagent/metalgen = 1) + +/datum/chemical_reaction/holywater + name = "Holy Water" + id = /datum/reagent/water/holywater + results = list(/datum/reagent/water/holywater = 1) + required_reagents = list(/datum/reagent/water/hollowwater = 1) + required_catalysts = list(/datum/reagent/water/holywater = 1) + +/datum/chemical_reaction/metalgen_imprint/on_reaction(datum/reagents/holder, created_volume) + var/datum/reagent/metalgen/MM = holder.get_reagent(/datum/reagent/metalgen) + for(var/datum/reagent/R in holder.reagent_list) + if(R.material && R.volume >= 40) + MM.data["material"] = R.material + holder.remove_reagent(R.type, 40) + +/datum/chemical_reaction/gravitum + name = "gravitum" + id = /datum/reagent/gravitum + required_reagents = list(/datum/reagent/wittel = 1, /datum/reagent/sorium = 10) + results = list(/datum/reagent/gravitum = 10) /datum/chemical_reaction/sterilizine name = "Sterilizine" @@ -711,7 +742,7 @@ /datum/chemical_reaction/slime_extractification/on_reaction(datum/reagents/holder, created_volume) var/location = get_turf(holder.my_atom) new /obj/item/slime_extract/grey(location) - + // Liquid Carpets /datum/chemical_reaction/carpet @@ -837,4 +868,4 @@ /datum/chemical_reaction/cellulose_carbonization results = list(/datum/reagent/carbon = 1) required_reagents = list(/datum/reagent/cellulose = 1) - required_temp = 512 \ No newline at end of file + required_temp = 512 diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 0598ebf9ab..7d4950cee5 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -1115,4 +1115,4 @@ construction_time = 150 build_path = /obj/item/construction/plumbing category = list("Misc","Medical Designs") - departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCEs + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE diff --git a/code/modules/vending/medical.dm b/code/modules/vending/medical.dm index fbd9a10bf2..2cdc7891c7 100644 --- a/code/modules/vending/medical.dm +++ b/code/modules/vending/medical.dm @@ -41,7 +41,8 @@ /obj/item/wrench/medical = 1, /obj/item/storage/belt/medolier/full = 2, /obj/item/gun/syringe/dart = 2, - /obj/item/storage/briefcase/medical = 2) + /obj/item/storage/briefcase/medical = 2, + /obj/item/plunger/reinforced = 2) armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50) resistance_flags = FIRE_PROOF diff --git a/icons/obj/lavaland/terrain.dmi b/icons/obj/lavaland/terrain.dmi new file mode 100644 index 0000000000000000000000000000000000000000..4db51145eeef144f90f9f37f1065da9be3d46aa6 GIT binary patch literal 771 zcmV+e1N{7nP)QvN*L!iHkEOv#1y-V93RpR+N~V3Spxui%(3> zOu??!6eyaSlUNC2>Oi0c(EgnK`~rx|qSW%tycDda7U!21U^mqaVX6_#SRh0)S6RW; z&jsvr07@rD&a+2(_y7O_;Ymb6RA_=|4*pM5!Shep-&-+suPf$?DsA%qY@2qE;Ao4Ky*O!Doi zJtE@HcrO-9)yxZo5bNQ}neWpyP0XHcMdbRT;DbMvKUAlm%b%&y%wO;1JH`|^z00!H z{j59r<5^6b-ELQ86pi=y$KK2@C<=oxSX1td_g!x{-ei0o5GUG3S9m6hEb~KJMU;iP zJK5|VeF@3`mQn6;ZzY_mW=!}YkBL5z7et|Wm~451JTTZ>ZEU(1bCJ3_p$jO%9 zK^%Ix+6W!zxzz48Fv9`M8sZtvKu2UIW3 zuWF$GvE2jGejm_$xTC7n16b2E!-@JHApO)jiC%y6{sFW-z%Q1alYG>7JnjJtWgqw| zop5^Gj(G&rKJYAkci0DPnf8H&^!s)nuyuJKSStH~^@L0Nz^%FuSWmF-1GcaaAcPP? z2qA?2@9MvEUC%APdDZ$JFxmPZ(0M=J-5xMpn76J*yM3sa)0dhzs_NFY(cLv>^t^Lz z^2IJ3(3m``T02y?wf*s*O}3@~cFMhNwZ-V4_8UJGANA)W?9KoH002ovPDHLkV1kyO Bc`*P0 literal 0 HcmV?d00001 diff --git a/tgstation.dme b/tgstation.dme index f6e46312d0..2fea4eef9c 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1189,7 +1189,6 @@ #include "code\game\objects\structures\flora.dm" #include "code\game\objects\structures\fluff.dm" #include "code\game\objects\structures\fugitive_role_spawners.dm" -#include "code\game\objects\structures\geyser.dm" #include "code\game\objects\structures\ghost_role_spawners.dm" #include "code\game\objects\structures\girders.dm" #include "code\game\objects\structures\grille.dm"