From 044e3dfe7ec5a1d55e8c82a96e2aba553b118833 Mon Sep 17 00:00:00 2001 From: Trilby Date: Fri, 18 Oct 2024 00:39:45 -0400 Subject: [PATCH 01/12] Toxins Troubles --- code/game/objects/structures/noticeboard.dm | 27 +++- code/modules/paperwork/paper_premade.dm | 21 +++ code/modules/research/experiment.dm | 55 ------- code/modules/research/experiment_toxins.dm | 145 ++++++++++++++++++ .../map/_Nadezhda_Deep_Tunnels.dmm | 54 +++++++ sojourn-station.dme | 1 + 6 files changed, 247 insertions(+), 56 deletions(-) create mode 100644 code/modules/research/experiment_toxins.dm diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index 56ff319941c..d78c9adca52 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -241,7 +241,7 @@ name = "Research bulletin board" desc = "A board containing vital notices and official memos for the Soteria research" icon_state = "nboard00" - notices = 1 + notices = 2 /obj/structure/noticeboard/research/New() var/obj/item/paper/P = new() @@ -261,6 +261,31 @@ src.contents += P update_icon() + P = new() + P.name = "Memo RE: Toxins Testing Value Index" + P.info = "Index Contents:
    \ +
  1. Shooting Targets: 5.\ +
  2. Machine Frames: 15 (17 If frame has wires or a cruitboard).\ +
  3. Any Flora (Not produce/trays): 2.\ +
  4. Compressed Cubes: 7.\ +
  5. Salvageable Machines: 60.\ +
  6. Filingcabinets: 30.\ +
  7. Metal Grilles: 2.\ +
  8. Barricades: 3.\ +
  9. Bookcases: 15.\ +
  10. Catwalks: 2.\ +
  11. Tables: 2.\ +
  12. Railing: 2 (5 if reinforced).\ +
  13. Beds and Chairs: 2.\ +
  14. Windows: Normal 2. Reinforced 3. Plasma 5 .Reinforced Plasma 10\ +
  15. Reagent Dispensers (Such as: Watercoolers, Welder Fuel Tanks, Beer Kegs): 25.\ +
  16. Lockers and Closets: 10.\ +
  17. Damaged Floors: -2 (Reduces Value)
" + P.add_overlay(list("paper_stamp-dots")) + P.stamped &= STAMP_FACTION + src.contents += P + update_icon() + /obj/structure/noticeboard/guild name = "Artificers Guild bulletin board" desc = "A board containing vital notices and official memos for the colonies resident Guild" diff --git a/code/modules/paperwork/paper_premade.dm b/code/modules/paperwork/paper_premade.dm index 9311d89a924..89d2c07be1b 100644 --- a/code/modules/paperwork/paper_premade.dm +++ b/code/modules/paperwork/paper_premade.dm @@ -40,6 +40,27 @@
\n\t\t\tThe effect are cumulative.
\n\t\tWARNING: It is a crime to use this without authorization"} +/obj/item/paper/toxin_index + name = "Memo RE: Toxins Testing Value Index" + info = {"Index Contents:
    \ +
  1. Shooting Targets: 5.\ +
  2. Machine Frames: 15 (17 If frame has wires or a cruitboard).\ +
  3. Any Flora (Not produce/trays): 2.\ +
  4. Compressed Cubes: 7.\ +
  5. Salvageable Machines: 60.\ +
  6. Filingcabinets: 30.\ +
  7. Metal Grilles: 2.\ +
  8. Barricades: 3.\ +
  9. Bookcases: 15.\ +
  10. Catwalks: 2.\ +
  11. Tables: 2.\ +
  12. Railing: 2 (5 if reinforced).\ +
  13. Beds and Chairs: 2.\ +
  14. Windows: Normal 2. Reinforced 3. Plasma 5 .Reinforced Plasma 10\ +
  15. Reagent Dispensers (Such as: Watercoolers, Welder Fuel Tanks, Beer Kegs): 25.\ +
  16. Lockers and Closets: 10.\ +
  17. Damaged Floors: -2 (Reduces Value)
"} + /obj/item/paper/courtroom name = "A Crash Course in Legal SOP on the colony." info = {"Roles: diff --git a/code/modules/research/experiment.dm b/code/modules/research/experiment.dm index c2b8a366720..42cd14d31f2 100644 --- a/code/modules/research/experiment.dm +++ b/code/modules/research/experiment.dm @@ -247,61 +247,6 @@ GLOBAL_LIST_EMPTY(explosion_watcher_list) saved_best_explosion = max(saved_best_explosion, O.saved_best_explosion) - -// Grants research points when explosion happens nearby -/obj/item/device/radio/beacon/explosion_watcher - name = "Kinetic Energy Scanner" - desc = "Scans the level of kinetic energy from explosions. This beacon, is in fact bomb proof and to use it properly you must use the bomb within 10 tiles of this scanner." - - channels = list("Science" = 1) - var/targetBoom - var/stored_points //This is how many points we hve stored, we use them up when successfull - -/obj/item/device/radio/beacon/explosion_watcher/examine() - ..() - to_chat(usr, "EXPECTED EXPLOSION - [targetBoom]") - to_chat(usr, "Points Left - [stored_points]") - return - -/obj/item/device/radio/beacon/explosion_watcher/ex_act(severity) - return - -/obj/item/device/radio/beacon/explosion_watcher/Initialize() - . = ..() - GLOB.explosion_watcher_list += src - targetBoom = rand(10,35) - stored_points = 250000 //6.1 perfect bombs - -/obj/item/device/radio/beacon/explosion_watcher/Destroy() - GLOB.explosion_watcher_list -= src - return ..() - -/obj/item/device/radio/beacon/explosion_watcher/proc/react_explosion(turf/epicenter, power) - power = round(power) - var/calculated_research_points = -1 - for(var/obj/machinery/computer/rdconsole/RD in GLOB.computer_list) - if(RD.id == 1) // only core gets the science - var missed - - missed = abs(power-targetBoom) * 8000 // each step away from the target will result in 8,000 points less, this is a range of 11. - if(stored_points >= 40000) - calculated_research_points = max(0,40000 - missed) - else - calculated_research_points = max(0,stored_points - missed) - - - stored_points -= calculated_research_points - RD.files.adjust_research_points(calculated_research_points) - - if(calculated_research_points > 0 && stored_points) - autosay("Detected explosion with power level [power]. Expected explosion was [targetBoom]. Received [calculated_research_points] Research Points", name ,"Science") - if(0 >= stored_points) - autosay("Detected explosion with power level [power]. Expected explosion was [targetBoom]. No Additional Data Points Able To Gather", name ,"Science") - if(0 >= calculated_research_points) - autosay("Detected explosion with power level [power], Expected explosion was [targetBoom]. Test Results Outside Expected Range", name ,"Science") - targetBoom = rand(10,35) - autosay("Next expected power level is [targetBoom]", name ,"Science") - // Universal tool to get research points from autopsy reports, virus info reports, archeology reports, slime cores /obj/item/device/science_tool name = "science tool" diff --git a/code/modules/research/experiment_toxins.dm b/code/modules/research/experiment_toxins.dm new file mode 100644 index 00000000000..958c7b1fa6e --- /dev/null +++ b/code/modules/research/experiment_toxins.dm @@ -0,0 +1,145 @@ + +// Grants research points when explosion happens nearby +/obj/item/device/radio/beacon/explosion_watcher + name = "Kinetic Energy Scanner" + desc = "Scans the level of kinetic energy from explosions. \ + This beacon, is in fact bomb proof and to use it properly you must use the bomb within 10 tiles of this scanner." + + channels = list("Science" = 1) + var/targetBoom + var/stored_points = 250000 //This is how many points we hve stored, we use them up when successfull + //6.1 perfect bombs + var/target_wealth = 0 //Used for how much stuff is worth around. + var/over_value_punishment = 1.5 + +/obj/item/device/radio/beacon/explosion_watcher/examine() + ..() + to_chat(usr, "EXPECTED EXPLOSION - [targetBoom]") + to_chat(usr, "Points Left - [stored_points]") + to_chat(usr, "Required Asset Value - [target_wealth] to [target_wealth*over_value_punishment]") + to_chat(usr, "Assets in view worth - [asset_wealth(give_value=TRUE)]") + return + +/obj/item/device/radio/beacon/explosion_watcher/ex_act(severity) + return + +/obj/item/device/radio/beacon/explosion_watcher/Initialize() + . = ..() + GLOB.explosion_watcher_list += src + targetBoom = rand(10,35) + target_wealth = rand(100, 200) + +/obj/item/device/radio/beacon/explosion_watcher/Destroy() + GLOB.explosion_watcher_list -= src + return ..() + +/obj/item/device/radio/beacon/explosion_watcher/proc/asset_wealth(give_value = FALSE) + var/gathered_value = 0 + for(var/obj/structure/S in oview(src,8)) + if(istype(S, /obj/structure/closet)) + gathered_value += 10 + + if(istype(S, /obj/structure/railing)) + gathered_value += 2 + var/obj/structure/railing/R = S + if(R.reinforced) //If we add a few extra bits of reinforcement then we add a small amount + gathered_value += 3 + + if(istype(S, /obj/structure/low_wall)) + gathered_value += 5 + + if(istype(S, /obj/structure/window)) + gathered_value += 2 + if(istype(S, /obj/structure/window/reinforced)) + gathered_value += 1 + if(istype(S, /obj/structure/window/reinforced/plasma)) + gathered_value += 8 + if(istype(S, /obj/structure/window/plasmabasic)) + gathered_value += 3 + + if(istype(S, /obj/structure/table)) + gathered_value += 5 + if(istype(S, /obj/structure/bed)) + gathered_value += 2 + if(istype(S, /obj/structure/catwalk)) + gathered_value += 1 + if(istype(S, /obj/structure/bookcase)) + gathered_value += 15 + if(istype(S, /obj/structure/barricade)) + gathered_value += 3 + if(istype(S, /obj/structure/grille)) + gathered_value += 2 + if(istype(S, /obj/structure/filingcabinet)) + gathered_value += 30 + //Bringind trash down or going to a trash ritch area should be rewarded + if(istype(S, /obj/structure/salvageable)) + gathered_value += 60 + if(istype(S, /obj/structure/scrap_cube)) + gathered_value += 7 + if(istype(S, /obj/structure/flora)) + gathered_value += 2 + if(istype(S, /obj/structure/reagent_dispensers)) + gathered_value += 25 //Rare-ish + + for(var/obj/item/target/T in oview(8)) + if(T) + gathered_value += 5 //Targets are worth 5 as you can buy and stack like 400 in a single tile! + + for(var/obj/machinery/constructable_frame/machine_frame/CF in oview(8)) + if(CF) + gathered_value += 15 + if(CF.state > 1) + gathered_value += 2 + + for(var/turf/simulated/floor/F in oview(8)) + if(F.health != F.maxHealth) + gathered_value -= 2 // Repair the floors you smucks! + + if(give_value) + return gathered_value + + if(gathered_value > (target_wealth * over_value_punishment)) + return FALSE + if(gathered_value < target_wealth) + return FALSE + return TRUE + +/obj/item/device/radio/beacon/explosion_watcher/proc/react_explosion(turf/epicenter, power) + power = round(power) + var/calculated_research_points = -1 + var/target_wealth_achived = asset_wealth() + for(var/obj/machinery/computer/rdconsole/RD in GLOB.computer_list) + if(RD.id == 1) // only core gets the science + var missed + autosay("Notice: target_wealth_achived [target_wealth_achived] [asset_wealth(TRUE)].", name ,"Science") + + if(target_wealth_achived) + missed = abs(power-targetBoom) * 8000 // each step away from the target will result in 8,000 points less, this is a range of 11. + if(stored_points >= 40000) + calculated_research_points = max(0,40000 - missed) + else + calculated_research_points = max(0,stored_points - missed) + stored_points -= calculated_research_points + RD.files.adjust_research_points(calculated_research_points) + else + autosay("Notice: Explosion environment not correctly fielded. No Points generated.", name ,"Science") + + if(target_wealth_achived) + if(calculated_research_points > 0 && stored_points) + autosay("Detected explosion with power level [power]. Expected explosion was [targetBoom]. Received [calculated_research_points] Research Points", name ,"Science") + if(0 >= stored_points) + autosay("Detected explosion with power level [power]. Expected explosion was [targetBoom]. No Additional Data Points Able To Gather", name ,"Science") + if(0 >= calculated_research_points) + autosay("Detected explosion with power level [power], Expected explosion was [targetBoom]. Test Results Outside Expected Range", name ,"Science") + targetBoom = rand(10,35) + if(target_wealth == initial(target_wealth)) + target_wealth = rand(100, 200) + + else + if(calculated_research_points) + var/wealth_mult = initial(calculated_research_points)/(calculated_research_points + 1) + target_wealth = target_wealth = rand(125, 150) * wealth_mult + target_wealth = round(target_wealth) + autosay("Next expected power level is [targetBoom]; Asset Value Range: [target_wealth] to [target_wealth*over_value_punishment].", name ,"Science") + + diff --git a/maps/__DeepTunnels/map/_Nadezhda_Deep_Tunnels.dmm b/maps/__DeepTunnels/map/_Nadezhda_Deep_Tunnels.dmm index f8b4f4f3d9b..9ba07a72e50 100644 --- a/maps/__DeepTunnels/map/_Nadezhda_Deep_Tunnels.dmm +++ b/maps/__DeepTunnels/map/_Nadezhda_Deep_Tunnels.dmm @@ -7984,6 +7984,7 @@ "uJ" = ( /obj/structure/table/reinforced, /obj/item/device/radio/beacon/explosion_watcher, +/obj/item/paper/toxin_index, /turf/simulated/floor/tiled/white/gray_perforated, /area/nadezhda/rnd/mixing) "uK" = ( @@ -8408,6 +8409,53 @@ /obj/machinery/atmospherics/unary/vent_pump{ dir = 8 }, +/obj/structure/closet/crate, +/obj/item/target, +/obj/item/target, +/obj/item/target, +/obj/item/target, +/obj/item/target, +/obj/item/target/alien, +/obj/item/target/alien, +/obj/item/target/alien, +/obj/item/target/alien, +/obj/item/target/alien, +/obj/item/target/alien, +/obj/item/target/alien, +/obj/item/target/clown, +/obj/item/target/clown, +/obj/item/target/clown, +/obj/item/target/clown, +/obj/item/target/clown, +/obj/item/target/clown, +/obj/item/target/clown, +/obj/item/target/clown, +/obj/item/target/syndicate, +/obj/item/target/syndicate, +/obj/item/target/syndicate, +/obj/item/target/syndicate, +/obj/item/target/syndicate, +/obj/item/target/syndicate, +/obj/item/target/syndicate, +/obj/item/stack/material/wood/full, +/obj/item/stack/material/wood/full, +/obj/item/stack/rods/random, +/obj/item/stack/rods/random, +/obj/item/stack/rods/random, +/obj/item/stack/material/glass/plasmaglass/random, +/obj/item/stack/material/glass/plasmaglass/random, +/obj/item/stack/material/glass/plasmaglass/random, +/obj/item/stack/material/glass/plasmaglass/random, +/obj/item/stack/material/glass/random, +/obj/item/stack/material/glass/random, +/obj/item/stack/material/glass/random, +/obj/item/stack/material/glass/random, +/obj/item/stack/material/steel/random, +/obj/item/stack/material/steel/random, +/obj/item/stack/material/steel/random, +/obj/item/stack/material/steel/random, +/obj/item/stack/material/steel/random, +/obj/item/stack/material/steel/random, /turf/simulated/floor/tiled/white, /area/nadezhda/rnd/mixing) "BR" = ( @@ -9191,6 +9239,9 @@ name = "Toxins mass driver" }, /obj/effect/floor_decal/industrial/warningred/full, +/obj/structure/noticeboard/research{ + pixel_y = 32 + }, /turf/simulated/floor/reinforced, /area/nadezhda/rnd/mixing) "Uf" = ( @@ -9347,6 +9398,9 @@ id = "Toxins_Pad"; name = "Launch-pad door-control" }, +/obj/structure/noticeboard/research{ + pixel_y = 32 + }, /turf/simulated/floor/tiled/white, /area/nadezhda/rnd/mixing) "XP" = ( diff --git a/sojourn-station.dme b/sojourn-station.dme index 3ea97e7ae07..2b111510af5 100644 --- a/sojourn-station.dme +++ b/sojourn-station.dme @@ -3158,6 +3158,7 @@ #include "code\modules\research\designs.dm" #include "code\modules\research\destructive_analyzer.dm" #include "code\modules\research\experiment.dm" +#include "code\modules\research\experiment_toxins.dm" #include "code\modules\research\message_server.dm" #include "code\modules\research\rd-readme.dm" #include "code\modules\research\rdconsole.dm" From 21d923837275baabec187ef4680875fd20c54d1a Mon Sep 17 00:00:00 2001 From: Trilbyspaceclone <30435998+Trilbyspaceclone@users.noreply.github.com> Date: Fri, 18 Oct 2024 00:59:05 -0400 Subject: [PATCH 02/12] debug line --- code/modules/research/experiment_toxins.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/research/experiment_toxins.dm b/code/modules/research/experiment_toxins.dm index 958c7b1fa6e..54245cb11ba 100644 --- a/code/modules/research/experiment_toxins.dm +++ b/code/modules/research/experiment_toxins.dm @@ -111,7 +111,6 @@ for(var/obj/machinery/computer/rdconsole/RD in GLOB.computer_list) if(RD.id == 1) // only core gets the science var missed - autosay("Notice: target_wealth_achived [target_wealth_achived] [asset_wealth(TRUE)].", name ,"Science") if(target_wealth_achived) missed = abs(power-targetBoom) * 8000 // each step away from the target will result in 8,000 points less, this is a range of 11. From 5b577ecf56bad3e261f6e81fc47f91b9f05ef439 Mon Sep 17 00:00:00 2001 From: Trilbyspaceclone <30435998+Trilbyspaceclone@users.noreply.github.com> Date: Sat, 19 Oct 2024 03:24:50 -0400 Subject: [PATCH 03/12] Apply suggestions from code review Co-authored-by: Smokingsquirrel <62299539+Smokingsquirrel@users.noreply.github.com> --- code/game/objects/structures/noticeboard.dm | 2 +- code/modules/paperwork/paper_premade.dm | 2 +- code/modules/research/experiment_toxins.dm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index d78c9adca52..a3d4bcefa13 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -265,7 +265,7 @@ P.name = "Memo RE: Toxins Testing Value Index" P.info = "Index Contents:
    \
  1. Shooting Targets: 5.\ -
  2. Machine Frames: 15 (17 If frame has wires or a cruitboard).\ +
  3. Machine Frames: 15 (17 If frame has wires or a circuitboard).\
  4. Any Flora (Not produce/trays): 2.\
  5. Compressed Cubes: 7.\
  6. Salvageable Machines: 60.\ diff --git a/code/modules/paperwork/paper_premade.dm b/code/modules/paperwork/paper_premade.dm index 89d2c07be1b..d560e403d25 100644 --- a/code/modules/paperwork/paper_premade.dm +++ b/code/modules/paperwork/paper_premade.dm @@ -44,7 +44,7 @@ name = "Memo RE: Toxins Testing Value Index" info = {"Index Contents:
      \
    1. Shooting Targets: 5.\ -
    2. Machine Frames: 15 (17 If frame has wires or a cruitboard).\ +
    3. Machine Frames: 15 (17 If frame has wires or a circuitboard).\
    4. Any Flora (Not produce/trays): 2.\
    5. Compressed Cubes: 7.\
    6. Salvageable Machines: 60.\ diff --git a/code/modules/research/experiment_toxins.dm b/code/modules/research/experiment_toxins.dm index 54245cb11ba..6b39ba096e0 100644 --- a/code/modules/research/experiment_toxins.dm +++ b/code/modules/research/experiment_toxins.dm @@ -3,7 +3,7 @@ /obj/item/device/radio/beacon/explosion_watcher name = "Kinetic Energy Scanner" desc = "Scans the level of kinetic energy from explosions. \ - This beacon, is in fact bomb proof and to use it properly you must use the bomb within 10 tiles of this scanner." + This beacon is, in fact, bombproof and to use it properly you must use the bomb within 10 tiles of this scanner." channels = list("Science" = 1) var/targetBoom From 3d9f4fb75ce19551e438984e0db8903a35eb4d89 Mon Sep 17 00:00:00 2001 From: Trilby Date: Thu, 24 Oct 2024 12:05:11 -0400 Subject: [PATCH 04/12] trashy way to give people a list of buildables --- code/modules/research/experiment_toxins.dm | 74 ++++++++++++++++++++-- 1 file changed, 68 insertions(+), 6 deletions(-) diff --git a/code/modules/research/experiment_toxins.dm b/code/modules/research/experiment_toxins.dm index 6b39ba096e0..df083a44c71 100644 --- a/code/modules/research/experiment_toxins.dm +++ b/code/modules/research/experiment_toxins.dm @@ -12,13 +12,14 @@ var/target_wealth = 0 //Used for how much stuff is worth around. var/over_value_punishment = 1.5 -/obj/item/device/radio/beacon/explosion_watcher/examine() +/obj/item/device/radio/beacon/explosion_watcher/examine(mob/user) ..() to_chat(usr, "EXPECTED EXPLOSION - [targetBoom]") to_chat(usr, "Points Left - [stored_points]") to_chat(usr, "Required Asset Value - [target_wealth] to [target_wealth*over_value_punishment]") to_chat(usr, "Assets in view worth - [asset_wealth(give_value=TRUE)]") - return + if(iscarbon(user)) + to_chat(usr, "Randomize List Simple For Reaching Target Wealth - [rlsfrtw()]") /obj/item/device/radio/beacon/explosion_watcher/ex_act(severity) return @@ -27,12 +28,73 @@ . = ..() GLOB.explosion_watcher_list += src targetBoom = rand(10,35) - target_wealth = rand(100, 200) + target_wealth = rand(80, 120) /obj/item/device/radio/beacon/explosion_watcher/Destroy() GLOB.explosion_watcher_list -= src return ..() +/obj/item/device/radio/beacon/explosion_watcher/proc/rlsfrtw() + var/return_orders = "\n" + if(asset_wealth()) + return_orders = "Current Area Matches Wealth Requirements" + else + var/shopping_list = 0 + var/picked_picker + //Someone more smart then me should make this into a list + var/closets = 0 + var/railings = 0 + var/tables = 0 + var/grilles = 0 + var/bookcases = 0 + var/chairstables = 0 + var/lowwalls = 0 + var/windows = 0 + var/barricades = 0 + + while(shopping_list < target_wealth) + picked_picker = pick("Closets","Railings","Tables","Grilles","Bookcases","ChairsTables","LowWalls","Windows", "Barricades") + switch(picked_picker) + if("Closets") + closets += 1 + shopping_list += 10 + if("Railings") + railings += 1 + shopping_list += 2 + if("Tables") + tables += 1 + shopping_list += 5 + if("Grilles") + grilles += 1 + shopping_list += 10 + if("Bookcases") + bookcases += 1 + shopping_list += 15 + if("ChairsTables") + chairstables += 1 + shopping_list += 2 + if("LowWalls") + lowwalls += 1 + shopping_list += 5 + if("Windows") + windows += 1 + shopping_list += 2 + if("Barricades") + barricades += 1 + shopping_list += 3 + + return_orders += "Closets:[closets].\n" + return_orders += "Railings:[railings].\n" + return_orders += "Tables:[tables].\n" + return_orders += "Grilles:[grilles].\n" + return_orders += "Bookcases:[bookcases].\n" + return_orders += "Chairs and Tables:[chairstables].\n" + return_orders += "Low Walls:[lowwalls].\n" + return_orders += "Windows (basic glass):[windows].\n" + return_orders += "Barricades:[barricades].\n" + + return return_orders + /obj/item/device/radio/beacon/explosion_watcher/proc/asset_wealth(give_value = FALSE) var/gathered_value = 0 for(var/obj/structure/S in oview(src,8)) @@ -132,12 +194,12 @@ autosay("Detected explosion with power level [power], Expected explosion was [targetBoom]. Test Results Outside Expected Range", name ,"Science") targetBoom = rand(10,35) if(target_wealth == initial(target_wealth)) - target_wealth = rand(100, 200) + target_wealth = rand(80, 120) else if(calculated_research_points) - var/wealth_mult = initial(calculated_research_points)/(calculated_research_points + 1) - target_wealth = target_wealth = rand(125, 150) * wealth_mult + var/wealth_mult = initial(stored_points)/(calculated_research_points + 1) + target_wealth = target_wealth = rand(80, 120) * wealth_mult target_wealth = round(target_wealth) autosay("Next expected power level is [targetBoom]; Asset Value Range: [target_wealth] to [target_wealth*over_value_punishment].", name ,"Science") From d94a79b9b892f6db783195ad99802f0cf03b36ba Mon Sep 17 00:00:00 2001 From: Trilby Date: Thu, 24 Oct 2024 20:45:25 -0400 Subject: [PATCH 05/12] consoles --- code/game/objects/structures/noticeboard.dm | 2 + code/modules/paperwork/paper_premade.dm | 2 + code/modules/research/experiment_toxins.dm | 120 +++++++++++--------- 3 files changed, 70 insertions(+), 54 deletions(-) diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index a3d4bcefa13..8863fe2adb7 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -269,6 +269,8 @@
    7. Any Flora (Not produce/trays): 2.\
    8. Compressed Cubes: 7.\
    9. Salvageable Machines: 60.\ +
    10. Modular Computer Consoles: 18.\ +
    11. Non-Modular Consoles: 17.\
    12. Filingcabinets: 30.\
    13. Metal Grilles: 2.\
    14. Barricades: 3.\ diff --git a/code/modules/paperwork/paper_premade.dm b/code/modules/paperwork/paper_premade.dm index d560e403d25..7ec3d4857fd 100644 --- a/code/modules/paperwork/paper_premade.dm +++ b/code/modules/paperwork/paper_premade.dm @@ -45,6 +45,8 @@ info = {"Index Contents:
        \
      1. Shooting Targets: 5.\
      2. Machine Frames: 15 (17 If frame has wires or a circuitboard).\ +
      3. Modular Computer Consoles: 18.\ +
      4. Non-Modular Consoles: 17.\
      5. Any Flora (Not produce/trays): 2.\
      6. Compressed Cubes: 7.\
      7. Salvageable Machines: 60.\ diff --git a/code/modules/research/experiment_toxins.dm b/code/modules/research/experiment_toxins.dm index df083a44c71..db25b28a692 100644 --- a/code/modules/research/experiment_toxins.dm +++ b/code/modules/research/experiment_toxins.dm @@ -38,60 +38,64 @@ var/return_orders = "\n" if(asset_wealth()) return_orders = "Current Area Matches Wealth Requirements" - else - var/shopping_list = 0 - var/picked_picker - //Someone more smart then me should make this into a list - var/closets = 0 - var/railings = 0 - var/tables = 0 - var/grilles = 0 - var/bookcases = 0 - var/chairstables = 0 - var/lowwalls = 0 - var/windows = 0 - var/barricades = 0 - - while(shopping_list < target_wealth) - picked_picker = pick("Closets","Railings","Tables","Grilles","Bookcases","ChairsTables","LowWalls","Windows", "Barricades") - switch(picked_picker) - if("Closets") - closets += 1 - shopping_list += 10 - if("Railings") - railings += 1 - shopping_list += 2 - if("Tables") - tables += 1 - shopping_list += 5 - if("Grilles") - grilles += 1 - shopping_list += 10 - if("Bookcases") - bookcases += 1 - shopping_list += 15 - if("ChairsTables") - chairstables += 1 - shopping_list += 2 - if("LowWalls") - lowwalls += 1 - shopping_list += 5 - if("Windows") - windows += 1 - shopping_list += 2 - if("Barricades") - barricades += 1 - shopping_list += 3 - - return_orders += "Closets:[closets].\n" - return_orders += "Railings:[railings].\n" - return_orders += "Tables:[tables].\n" - return_orders += "Grilles:[grilles].\n" - return_orders += "Bookcases:[bookcases].\n" - return_orders += "Chairs and Tables:[chairstables].\n" - return_orders += "Low Walls:[lowwalls].\n" - return_orders += "Windows (basic glass):[windows].\n" - return_orders += "Barricades:[barricades].\n" + return return_orders + if(asset_wealth(give_value=TRUE) > (target_wealth * over_value_punishment)) + return_orders = "Current Area Matches Has To Much Wealth. Please remove some structures!" + return return_orders + + var/shopping_list = 0 + var/picked_picker + //Someone more smart then me should make this into a list + var/closets = 0 + var/railings = 0 + var/tables = 0 + var/grilles = 0 + var/bookcases = 0 + var/chairstables = 0 + var/lowwalls = 0 + var/windows = 0 + var/barricades = 0 + + while(shopping_list < target_wealth) + picked_picker = pick("Closets","Railings","Tables","Grilles","Bookcases","ChairsTables","LowWalls","Windows", "Barricades") + switch(picked_picker) + if("Closets") + closets += 1 + shopping_list += 10 + if("Railings") + railings += 1 + shopping_list += 2 + if("Tables") + tables += 1 + shopping_list += 5 + if("Grilles") + grilles += 1 + shopping_list += 10 + if("Bookcases") + bookcases += 1 + shopping_list += 15 + if("ChairsTables") + chairstables += 1 + shopping_list += 2 + if("LowWalls") + lowwalls += 1 + shopping_list += 5 + if("Windows") + windows += 1 + shopping_list += 2 + if("Barricades") + barricades += 1 + shopping_list += 3 + + return_orders += "Closets:[closets].\n" + return_orders += "Railings:[railings].\n" + return_orders += "Tables:[tables].\n" + return_orders += "Grilles:[grilles].\n" + return_orders += "Bookcases:[bookcases].\n" + return_orders += "Chairs and Tables:[chairstables].\n" + return_orders += "Low Walls:[lowwalls].\n" + return_orders += "Windows (basic glass):[windows].\n" + return_orders += "Barricades:[barricades].\n" return return_orders @@ -153,6 +157,14 @@ if(CF.state > 1) gathered_value += 2 + for(var/obj/item/modular_computer/console/PC in oview(8)) + if(PC) + gathered_value += 18 + + for(var/obj/machinery/computer/C in oview(8)) + if(C) + gathered_value += 17 + for(var/turf/simulated/floor/F in oview(8)) if(F.health != F.maxHealth) gathered_value -= 2 // Repair the floors you smucks! From d13c24ce41dba938088f032067124c35f26e34db Mon Sep 17 00:00:00 2001 From: Trilby Date: Thu, 7 Nov 2024 17:44:06 -0500 Subject: [PATCH 06/12] math fix + safer tunnel --- code/modules/research/experiment_toxins.dm | 2 +- .../map/_Nadezhda_Deep_Tunnels.dmm | 2542 +++++++++-------- 2 files changed, 1275 insertions(+), 1269 deletions(-) diff --git a/code/modules/research/experiment_toxins.dm b/code/modules/research/experiment_toxins.dm index db25b28a692..8459b5aa595 100644 --- a/code/modules/research/experiment_toxins.dm +++ b/code/modules/research/experiment_toxins.dm @@ -211,7 +211,7 @@ else if(calculated_research_points) var/wealth_mult = initial(stored_points)/(calculated_research_points + 1) - target_wealth = target_wealth = rand(80, 120) * wealth_mult + target_wealth = rand(80, 120) * wealth_mult target_wealth = round(target_wealth) autosay("Next expected power level is [targetBoom]; Asset Value Range: [target_wealth] to [target_wealth*over_value_punishment].", name ,"Science") diff --git a/maps/__DeepTunnels/map/_Nadezhda_Deep_Tunnels.dmm b/maps/__DeepTunnels/map/_Nadezhda_Deep_Tunnels.dmm index 9ba07a72e50..98fcc19f941 100644 --- a/maps/__DeepTunnels/map/_Nadezhda_Deep_Tunnels.dmm +++ b/maps/__DeepTunnels/map/_Nadezhda_Deep_Tunnels.dmm @@ -8350,6 +8350,9 @@ }, /turf/simulated/floor/tiled/steel, /area/mine/hallway) +"zy" = ( +/turf/unsimulated/mask, +/area/nadezhda/rnd/mixing) "Ag" = ( /turf/simulated/floor/beach/water/jungledeep{ desc = "Filthy, stinking bilge water."; @@ -9204,6 +9207,9 @@ }, /turf/simulated/floor/tiled/white/cargo, /area/nadezhda/rnd/mixing) +"SL" = ( +/turf/simulated/mineral, +/area/mine/unexplored) "SZ" = ( /obj/structure/extinguisher_cabinet{ pixel_x = -27 @@ -9301,7 +9307,7 @@ dir = 8 }, /turf/simulated/floor/asteroid, -/area/mine/unexplored) +/area/nadezhda/rnd/mixing) "UU" = ( /obj/structure/disposalpipe/segment, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, @@ -21614,15 +21620,15 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -tK +Gz +Gz +Gz +IH +IH +IH +IH UO -tK +IH YV oD pO @@ -21816,15 +21822,15 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -tK -tK -tK +Gz +Gz +Gz +IH +IH +IH +IH +IH +IH jA TT Er @@ -22018,15 +22024,15 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -tK -tK -tK +Gz +Gz +Gz +IH +IH +IH +IH +IH +IH Za LL Za @@ -22035,8 +22041,8 @@ Za Za Za jA -ti -ti +SL +SL ti ti ti @@ -22219,28 +22225,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -tK -tK +SL +Gz +Gz +Gz +IH +IH +IH +IH +IH +IH IH YH IH -tK -tK -tK -tK -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +zy +zy ti ti ti @@ -22420,29 +22426,29 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -tK -tK +SL +SL +Gz +Gz +Gz +IH +IH +IH +IH +IH +IH Kv YH IH -tK -tK -tK -tK -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +zy +zy ti ti ti @@ -22622,29 +22628,29 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -tK -tK +SL +SL +Gz +Gz +Gz +IH +IH +IH +IH +IH +IH Kv YH IH -tK -tK -tK -tK -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +zy +zy ti ti ti @@ -22824,29 +22830,29 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +SL +Gz +Gz +Gz +IH +IH +IH +IH +IH +IH Kv YH IH -tK -tK -tK -tK -ti -ti -ti -ti -ti +IH +IH +IH +IH +Gz +Gz +Gz +zy +zy ti ti ti @@ -23027,28 +23033,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH IH -tK -tK -tK -tK -ti -ti -ti -ti -ti +IH +IH +IH +IH +Gz +Gz +Gz +zy +zy ti ti ti @@ -23228,29 +23234,29 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -Kv -YH +SL +SL +Gz +Gz +Gz +Gz IH -tK -tK -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +Kv +YH +IH +IH +IH +IH +IH +Gz +Gz +Gz +zy +zy ti ti ti @@ -23430,29 +23436,29 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH IH -tK -tK -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +Gz +Gz +Gz +zy +zy ti ti ti @@ -23632,29 +23638,29 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +zy +zy ti ti ti @@ -23834,29 +23840,29 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +zy +zy ti ti ti @@ -24036,29 +24042,29 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -24238,29 +24244,29 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -24441,28 +24447,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -24644,27 +24650,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -24846,27 +24852,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -25048,27 +25054,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -25250,27 +25256,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -25451,28 +25457,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -25647,34 +25653,34 @@ ti ti ti ti +tK +tK ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -25849,34 +25855,34 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -tK tK +vj ti ti ti ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -25975,37 +25981,8 @@ ti ti ti ti -tK -tK -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -tK -tK -tK -tK -tK -ti -ti -ti -ti -ti -ti -ti -ti +tK +tK ti ti ti @@ -26022,6 +25999,12 @@ ti ti ti ti +tK +tK +tK +tK +tK +ti ti ti ti @@ -26058,8 +26041,6 @@ ti ti ti ti -tK -vj ti ti ti @@ -26067,8 +26048,6 @@ ti ti ti ti -Kv -YH ti ti ti @@ -26078,7 +26057,34 @@ ti ti ti ti +tK +tK +ti +ti +ti ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH +Kv +YH +IH +IH +IH +IH +IH +IH +Gz +Gz +Gz +zy ti ti ti @@ -26259,28 +26265,28 @@ ti ti ti ti -ti -tK -tK -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +IH +Gz +Gz +Gz +zy ti ti ti @@ -26461,28 +26467,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +IH +Gz +Gz +Gz +zy ti ti ti @@ -26663,28 +26669,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +IH +Gz +Gz +Gz +zy ti ti ti @@ -26865,28 +26871,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -27068,27 +27074,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -27270,27 +27276,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +zy +zy ti ti ti @@ -27472,27 +27478,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +zy +zy ti ti ti @@ -27674,27 +27680,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +zy +zy ti ti ti @@ -27875,28 +27881,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy +zy ti ti ti @@ -28077,28 +28083,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy +zy ti ti ti @@ -28279,28 +28285,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy +zy ti ti ti @@ -28481,28 +28487,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy +zy ti ti ti @@ -28683,28 +28689,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -Kv -YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH +Kv +YH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy +zy ti ti ti @@ -28885,28 +28891,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy +zy ti ti ti @@ -29087,28 +29093,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +IH +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy +zy ti ti ti @@ -29289,28 +29295,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +IH +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy +zy ti ti ti @@ -29492,27 +29498,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +Gz +Gz +Gz +IH +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +zy +zy ti ti ti @@ -29694,27 +29700,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +Gz +Gz +Gz +IH +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +IH +Gz +Gz +zy +zy ti ti ti @@ -29896,27 +29902,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +zy +zy ti ti ti @@ -30098,27 +30104,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -Kv -YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +zy +Gz +Gz +Gz +IH +IH +IH +IH +IH +Kv +YH +IH +IH +IH +IH +IH +Gz +Gz +Gz +zy +zy ti ti ti @@ -30300,27 +30306,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +zy +zy +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -30502,27 +30508,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +zy +zy +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -30704,27 +30710,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +zy +zy +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -30906,27 +30912,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +zy +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -31108,27 +31114,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +zy +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -31310,27 +31316,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -31511,28 +31517,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -31713,28 +31719,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +Gz +Gz +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -31915,28 +31921,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +IH +IH +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -32117,28 +32123,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +IH +IH +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -32319,28 +32325,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +IH +IH +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -32521,28 +32527,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +IH +IH +IH +IH +IH +IH +IH Kv YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +Gz +zy ti ti ti @@ -32723,28 +32729,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +IH +IH +IH +IH +IH +IH +IH IH YH -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +IH +Gz +Gz +Gz +zy +zy ti ti ti @@ -32925,28 +32931,28 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +IH +IH +IH +IH +IH +IH Gz Gz Ya Gz Gz -ti -ti -ti -ti -ti -ti -ti -ti +IH +IH +IH +IH +Gz +Gz +zy +zy ti ti ti @@ -33127,13 +33133,13 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +IH +IH +IH +IH Gz Gz Gz @@ -33143,12 +33149,12 @@ oD Gz Gz Gz -ti -ti -ti -ti -ti -ti +IH +IH +Gz +Gz +zy +zy ti ti ti @@ -33329,12 +33335,12 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti +SL +Gz +Gz +IH +IH +IH Gz Gz oD @@ -33346,11 +33352,11 @@ oD oD Gz Gz -ti -ti -ti -ti -ti +IH +Gz +Gz +zy +zy ti ti ti @@ -33531,11 +33537,11 @@ ti ti ti ti -ti -ti -ti -ti -ti +SL +Gz +Gz +IH +IH Gz Gz La @@ -33549,10 +33555,10 @@ oD yH Gz Gz -ti -ti -ti -ti +Gz +Gz +zy +zy ti ti ti @@ -33734,10 +33740,10 @@ ti ti ti ti -ti -ti -ti -ti +Gz +Gz +Gz +IH Gz oD oD @@ -33751,10 +33757,10 @@ yH oD oD Gz -ti -ti -ti -ti +Gz +Gz +zy +zy ti ti ti @@ -33936,9 +33942,9 @@ ti ti ti ti -ti -ti -ti +zy +Gz +Gz Gz Gz oD @@ -33954,9 +33960,9 @@ oD oD Gz Gz -ti -ti -ti +Gz +zy +zy ti ti ti @@ -34138,9 +34144,9 @@ ti ti ti ti -ti -ti -ti +zy +Gz +Gz Gz pf oD @@ -34156,9 +34162,9 @@ oD oD JM Gz -ti -ti -ti +Gz +zy +zy ti ti ti @@ -34340,9 +34346,9 @@ ti ti ti ti -ti -ti -ti +zy +Gz +Gz Gz Ol Ya @@ -34358,9 +34364,9 @@ Ya Ya OY Gz -ti -ti -ti +Gz +zy +zy ti ti ti @@ -34542,9 +34548,9 @@ ti ti ti ti -ti -ti -ti +zy +Gz +Gz Gz pf oD @@ -34560,9 +34566,9 @@ oD oD JM Gz -ti -ti -ti +Gz +zy +zy ti ti ti @@ -34744,9 +34750,9 @@ ti ti ti ti -ti -ti -ti +zy +Gz +Gz Gz Gz oD @@ -34762,9 +34768,9 @@ oD oD Gz Gz -ti -ti -ti +Gz +zy +zy ti ti ti @@ -34946,10 +34952,10 @@ ti ti ti ti -ti -ti -ti -ti +zy +Gz +Gz +Gz Gz oD oD @@ -34963,10 +34969,10 @@ Om oD oD Gz -ti -ti -ti -ti +Gz +Gz +zy +zy ti ti ti @@ -35148,10 +35154,10 @@ ti ti ti ti -ti -ti -ti -ti +zy +Gz +Gz +Gz Gz Gz FT @@ -35165,10 +35171,10 @@ oD Om Gz Gz -ti -ti -ti -ti +Gz +Gz +zy +zy ti ti ti @@ -35350,11 +35356,11 @@ ti ti ti ti -ti -ti -ti -ti -ti +zy +Gz +Gz +Gz +Gz Gz Gz oD @@ -35366,11 +35372,11 @@ oD oD Gz Gz -ti -ti -ti -ti -ti +Gz +Gz +Gz +zy +zy ti ti ti @@ -35552,12 +35558,12 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti +zy +zy +Gz +Gz +Gz +Gz Gz Gz Gz @@ -35567,12 +35573,12 @@ Ko Gz Gz Gz -ti -ti -ti -ti -ti -ti +Gz +Gz +Gz +zy +zy +zy ti ti ti @@ -35754,27 +35760,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti +zy +zy +zy Gz Gz Gz Gz Gz -ti -ti -ti -ti -ti -ti -ti -ti +Gz +Gz +Gz +Gz +Gz +Gz +Gz +Gz +Gz +Gz +zy +zy +zy ti ti ti @@ -35956,27 +35962,27 @@ ti ti ti ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti -ti +zy +zy +zy +zy +Gz +Gz +Gz +Gz +Gz +Gz +Gz +Gz +Gz +Gz +Gz +Gz +zy +zy +zy +zy +zy ti ti ti @@ -36163,15 +36169,15 @@ ti ti ti ti +SL +SL ti -ti -ti -ti -ti -ti -ti -ti -ti +SL +SL +SL +SL +SL +SL ti ti ti From 1cac15680e210344b1d9ac003e5991904c242c1b Mon Sep 17 00:00:00 2001 From: Trilby Date: Fri, 8 Nov 2024 08:03:29 -0500 Subject: [PATCH 07/12] woops math was wrong do to wrong var --- code/modules/research/experiment_toxins.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/research/experiment_toxins.dm b/code/modules/research/experiment_toxins.dm index 8459b5aa595..0eb9c4a1ac7 100644 --- a/code/modules/research/experiment_toxins.dm +++ b/code/modules/research/experiment_toxins.dm @@ -210,7 +210,7 @@ else if(calculated_research_points) - var/wealth_mult = initial(stored_points)/(calculated_research_points + 1) + var/wealth_mult = initial(stored_points)/(stored_points + 1) target_wealth = rand(80, 120) * wealth_mult target_wealth = round(target_wealth) autosay("Next expected power level is [targetBoom]; Asset Value Range: [target_wealth] to [target_wealth*over_value_punishment].", name ,"Science") From 300b5f01a07ba2ce17832fb26331d3a259100f24 Mon Sep 17 00:00:00 2001 From: Trilby Date: Fri, 15 Nov 2024 09:56:55 -0500 Subject: [PATCH 08/12] QoL floors no longer reduce points, starting value is set to 120 to always be in range of roundstart points --- code/game/objects/structures/noticeboard.dm | 2 +- code/modules/paperwork/paper_premade.dm | 2 +- code/modules/research/experiment_toxins.dm | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index 8863fe2adb7..adf085ba7cd 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -282,7 +282,7 @@
      8. Windows: Normal 2. Reinforced 3. Plasma 5 .Reinforced Plasma 10\
      9. Reagent Dispensers (Such as: Watercoolers, Welder Fuel Tanks, Beer Kegs): 25.\
      10. Lockers and Closets: 10.\ -
      11. Damaged Floors: -2 (Reduces Value)
      " +
    15. Damaged Floors: N/A
    " P.add_overlay(list("paper_stamp-dots")) P.stamped &= STAMP_FACTION src.contents += P diff --git a/code/modules/paperwork/paper_premade.dm b/code/modules/paperwork/paper_premade.dm index 7ec3d4857fd..9e86952e461 100644 --- a/code/modules/paperwork/paper_premade.dm +++ b/code/modules/paperwork/paper_premade.dm @@ -61,7 +61,7 @@
  7. Windows: Normal 2. Reinforced 3. Plasma 5 .Reinforced Plasma 10\
  8. Reagent Dispensers (Such as: Watercoolers, Welder Fuel Tanks, Beer Kegs): 25.\
  9. Lockers and Closets: 10.\ -
  10. Damaged Floors: -2 (Reduces Value)
"} +
  • Damaged Floors: N/A "} /obj/item/paper/courtroom name = "A Crash Course in Legal SOP on the colony." diff --git a/code/modules/research/experiment_toxins.dm b/code/modules/research/experiment_toxins.dm index 0eb9c4a1ac7..403aa2c8356 100644 --- a/code/modules/research/experiment_toxins.dm +++ b/code/modules/research/experiment_toxins.dm @@ -28,7 +28,7 @@ . = ..() GLOB.explosion_watcher_list += src targetBoom = rand(10,35) - target_wealth = rand(80, 120) + target_wealth = 120 //First ones free 100% of the time. /obj/item/device/radio/beacon/explosion_watcher/Destroy() GLOB.explosion_watcher_list -= src @@ -164,11 +164,11 @@ for(var/obj/machinery/computer/C in oview(8)) if(C) gathered_value += 17 - +/* for(var/turf/simulated/floor/F in oview(8)) if(F.health != F.maxHealth) gathered_value -= 2 // Repair the floors you smucks! - +*/ if(give_value) return gathered_value @@ -211,6 +211,8 @@ else if(calculated_research_points) var/wealth_mult = initial(stored_points)/(stored_points + 1) + if(wealth_mult > 3) //Slower scaling + wealth_mult *= 0.5 target_wealth = rand(80, 120) * wealth_mult target_wealth = round(target_wealth) autosay("Next expected power level is [targetBoom]; Asset Value Range: [target_wealth] to [target_wealth*over_value_punishment].", name ,"Science") From 2b7c2bdaa7bc4c6e34ad85f796eb5004399fc65e Mon Sep 17 00:00:00 2001 From: Trilbyspaceclone <30435998+Trilbyspaceclone@users.noreply.github.com> Date: Tue, 26 Nov 2024 18:22:49 -0500 Subject: [PATCH 09/12] Update code/modules/research/experiment_toxins.dm --- code/modules/research/experiment_toxins.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/research/experiment_toxins.dm b/code/modules/research/experiment_toxins.dm index 403aa2c8356..beaec92075d 100644 --- a/code/modules/research/experiment_toxins.dm +++ b/code/modules/research/experiment_toxins.dm @@ -101,7 +101,7 @@ /obj/item/device/radio/beacon/explosion_watcher/proc/asset_wealth(give_value = FALSE) var/gathered_value = 0 - for(var/obj/structure/S in oview(src,8)) + for(var/obj/structure/S in oview(8)) if(istype(S, /obj/structure/closet)) gathered_value += 10 From b7715b899572c842a5f603e676d956e5548533b2 Mon Sep 17 00:00:00 2001 From: Trilby Date: Wed, 27 Nov 2024 14:03:56 -0500 Subject: [PATCH 10/12] fixes --- code/modules/research/experiment_toxins.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/research/experiment_toxins.dm b/code/modules/research/experiment_toxins.dm index beaec92075d..52270e19079 100644 --- a/code/modules/research/experiment_toxins.dm +++ b/code/modules/research/experiment_toxins.dm @@ -101,7 +101,7 @@ /obj/item/device/radio/beacon/explosion_watcher/proc/asset_wealth(give_value = FALSE) var/gathered_value = 0 - for(var/obj/structure/S in oview(8)) + for(var/obj/structure/S in orange(8, src)) if(istype(S, /obj/structure/closet)) gathered_value += 10 @@ -147,25 +147,25 @@ if(istype(S, /obj/structure/reagent_dispensers)) gathered_value += 25 //Rare-ish - for(var/obj/item/target/T in oview(8)) + for(var/obj/item/target/T in orange(8, src)) if(T) gathered_value += 5 //Targets are worth 5 as you can buy and stack like 400 in a single tile! - for(var/obj/machinery/constructable_frame/machine_frame/CF in oview(8)) + for(var/obj/machinery/constructable_frame/machine_frame/CF in orange(8, src)) if(CF) gathered_value += 15 if(CF.state > 1) gathered_value += 2 - for(var/obj/item/modular_computer/console/PC in oview(8)) + for(var/obj/item/modular_computer/console/PC in orange(8, src)) if(PC) gathered_value += 18 - for(var/obj/machinery/computer/C in oview(8)) + for(var/obj/machinery/computer/C in orange(8, src)) if(C) gathered_value += 17 /* - for(var/turf/simulated/floor/F in oview(8)) + for(var/turf/simulated/floor/F in orange(8, src)) if(F.health != F.maxHealth) gathered_value -= 2 // Repair the floors you smucks! */ From 6370420235375188bcf46810b978cfb9660c8357 Mon Sep 17 00:00:00 2001 From: Trilby Date: Tue, 10 Dec 2024 22:01:09 -0500 Subject: [PATCH 11/12] mini game rework --- code/game/objects/structures/noticeboard.dm | 3 +- code/modules/paperwork/paper_premade.dm | 3 +- code/modules/research/experiment_toxins.dm | 160 +++++++++++++------- 3 files changed, 112 insertions(+), 54 deletions(-) diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index adf085ba7cd..95c3620b7b3 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -282,7 +282,8 @@
  • Windows: Normal 2. Reinforced 3. Plasma 5 .Reinforced Plasma 10\
  • Reagent Dispensers (Such as: Watercoolers, Welder Fuel Tanks, Beer Kegs): 25.\
  • Lockers and Closets: 10.\ -
  • Damaged Floors: N/A" +
  • Damaged Floors: N/A
    \ + NOTE: The Watcher sees a max range of 8 tiles around it. If you use a bomb that has less then 16 Power it will match how far it scans to the round(Power/2) of the bomb used." P.add_overlay(list("paper_stamp-dots")) P.stamped &= STAMP_FACTION src.contents += P diff --git a/code/modules/paperwork/paper_premade.dm b/code/modules/paperwork/paper_premade.dm index 9e86952e461..d766f494271 100644 --- a/code/modules/paperwork/paper_premade.dm +++ b/code/modules/paperwork/paper_premade.dm @@ -61,7 +61,8 @@
  • Windows: Normal 2. Reinforced 3. Plasma 5 .Reinforced Plasma 10\
  • Reagent Dispensers (Such as: Watercoolers, Welder Fuel Tanks, Beer Kegs): 25.\
  • Lockers and Closets: 10.\ -
  • Damaged Floors: N/A "} +
  • Damaged Floors: N/A\ + NOTE: The Watcher sees a max range of 8 tiles around it. If you use a bomb that has less then 16 Power it will match how far it scans to the round(Power/2) of the bomb used."} /obj/item/paper/courtroom name = "A Crash Course in Legal SOP on the colony." diff --git a/code/modules/research/experiment_toxins.dm b/code/modules/research/experiment_toxins.dm index 52270e19079..04bc9371557 100644 --- a/code/modules/research/experiment_toxins.dm +++ b/code/modules/research/experiment_toxins.dm @@ -6,19 +6,45 @@ This beacon is, in fact, bombproof and to use it properly you must use the bomb within 10 tiles of this scanner." channels = list("Science" = 1) + + //Used for are current limit of points, depleted per successful mini game + var/stored_points = 250000 + +/* +| Bomb Target mini game +*/ + //Simpley what we want are bomb power to be. var/targetBoom - var/stored_points = 250000 //This is how many points we hve stored, we use them up when successfull - //6.1 perfect bombs + + //How many points we give for successfully doing Bomb Target mini game + var/power_points = 30000 + + //How far off we can be: this is a range of miss_range(under) + miss_range(over) + 1 (perfect) + var/miss_range = 4 + + //How many points we subtract per power off targetBoom + var/miss_point_subtractor = 2500 + +/* +| Building mini game +*/ + //Used for building requirements. var/target_wealth = 0 //Used for how much stuff is worth around. + + //Gives us are range for building requirements + //if your over 150% then you do not get rewarded the points var/over_value_punishment = 1.5 + //Reward for matching target building requirements. + var/wealth_target_reward = 15000 + /obj/item/device/radio/beacon/explosion_watcher/examine(mob/user) ..() - to_chat(usr, "EXPECTED EXPLOSION - [targetBoom]") + to_chat(usr, "Power Level expectation - [targetBoom]") to_chat(usr, "Points Left - [stored_points]") to_chat(usr, "Required Asset Value - [target_wealth] to [target_wealth*over_value_punishment]") - to_chat(usr, "Assets in view worth - [asset_wealth(give_value=TRUE)]") - if(iscarbon(user)) + to_chat(usr, "Assets in view worth - [asset_wealth(give_value=TRUE)]. Note this is assuming that the bomb power is 16 or higher") + if(iscarbon(user)) //Anti lag from ghost spam examining to_chat(usr, "Randomize List Simple For Reaching Target Wealth - [rlsfrtw()]") /obj/item/device/radio/beacon/explosion_watcher/ex_act(severity) @@ -34,6 +60,67 @@ GLOB.explosion_watcher_list -= src return ..() +/obj/item/device/radio/beacon/explosion_watcher/proc/react_explosion(turf/epicenter, power) + power = round(power) + + autosay("Detected explosion with power level [power].", name ,"Science") + + //Feedback if you set items on the edge and cant reach it + if(power && power < 16) + autosay("Notice: Power level of test is below 16, Watchers Assets view range descressed to [power/2] rounded.", name ,"Science") + + + var/calculated_research_points = 0 + var/target_wealth_achived = asset_wealth(FALSE, sight = power) + for(var/obj/machinery/computer/rdconsole/RD in GLOB.computer_list) + if(RD.id == 1) // only core gets the science + var/missed + + if(target_wealth_achived) + autosay("Notice: Explosion environment correctly fielded. Rewarding [wealth_target_reward] extra points.", name ,"Science") + calculated_research_points += wealth_target_reward + + // each step away from the target will result in 8,000 points less, this is a range of 11. + missed = abs(power-targetBoom) + // If it's too far, no points at all, otherwise, penalty + var/boom_points = missed > miss_range ? 0 : power_points - missed*miss_point_subtractor + + if(boom_points) + autosay("Notice: Power Level within expectation. Rewarding [boom_points] extra points.", name ,"Science") + + + calculated_research_points = clamp(calculated_research_points + boom_points, 0, stored_points) + + stored_points -= calculated_research_points + RD.files.adjust_research_points(calculated_research_points) + + if(calculated_research_points) + autosay("Total Rewards: [calculated_research_points] Research Points.", name ,"Science") + + targetBoom = rand(10,35) + if(target_wealth == initial(target_wealth)) + target_wealth = rand(80, 120) + else + if(calculated_research_points) + var/wealth_mult = initial(stored_points)/(stored_points + 1) + if(wealth_mult > 3) //Slower scaling + wealth_mult *= 0.5 + target_wealth = rand(80, 120) * wealth_mult + target_wealth = round(target_wealth) + //Each mini game gets its own yapping + autosay("Next expected Power Level is [targetBoom]. Asset Value Range: [target_wealth] to [target_wealth*over_value_punishment].", name ,"Science") + autosay("Next expected Asset Value Range: [target_wealth] to [target_wealth*over_value_punishment].", name ,"Science") + + //No more points. Let people know this. + if(stored_points <= 0) + autosay("No Additional Data Points Able To Gather.", name ,"Science") + +/* + +Everything for building + +*/ + /obj/item/device/radio/beacon/explosion_watcher/proc/rlsfrtw() var/return_orders = "\n" if(asset_wealth()) @@ -99,9 +186,17 @@ return return_orders -/obj/item/device/radio/beacon/explosion_watcher/proc/asset_wealth(give_value = FALSE) +/obj/item/device/radio/beacon/explosion_watcher/proc/asset_wealth(give_value = FALSE, sight = 16) var/gathered_value = 0 - for(var/obj/structure/S in orange(8, src)) + //Anit cheat, so people are not doing 1 power bombs and never destorying anything + if(sight <= 16) + sight *= 0.5 + sight = round(sight) + + if(sight > 16) + sight = 8 + + for(var/obj/structure/S in orange(sight, src)) if(istype(S, /obj/structure/closet)) gathered_value += 10 @@ -147,24 +242,26 @@ if(istype(S, /obj/structure/reagent_dispensers)) gathered_value += 25 //Rare-ish - for(var/obj/item/target/T in orange(8, src)) + for(var/obj/item/target/T in orange(sight, src)) if(T) gathered_value += 5 //Targets are worth 5 as you can buy and stack like 400 in a single tile! - for(var/obj/machinery/constructable_frame/machine_frame/CF in orange(8, src)) + for(var/obj/machinery/constructable_frame/machine_frame/CF in orange(sight, src)) if(CF) gathered_value += 15 if(CF.state > 1) gathered_value += 2 - for(var/obj/item/modular_computer/console/PC in orange(8, src)) + for(var/obj/item/modular_computer/console/PC in orange(sight, src)) if(PC) gathered_value += 18 - for(var/obj/machinery/computer/C in orange(8, src)) + for(var/obj/machinery/computer/C in orange(sight, src)) if(C) gathered_value += 17 /* + Disabled as anti-frustation, people didnt understand what "damaged floors" meant. + + weldering every floor is lame and unfun for(var/turf/simulated/floor/F in orange(8, src)) if(F.health != F.maxHealth) gathered_value -= 2 // Repair the floors you smucks! @@ -177,44 +274,3 @@ if(gathered_value < target_wealth) return FALSE return TRUE - -/obj/item/device/radio/beacon/explosion_watcher/proc/react_explosion(turf/epicenter, power) - power = round(power) - var/calculated_research_points = -1 - var/target_wealth_achived = asset_wealth() - for(var/obj/machinery/computer/rdconsole/RD in GLOB.computer_list) - if(RD.id == 1) // only core gets the science - var missed - - if(target_wealth_achived) - missed = abs(power-targetBoom) * 8000 // each step away from the target will result in 8,000 points less, this is a range of 11. - if(stored_points >= 40000) - calculated_research_points = max(0,40000 - missed) - else - calculated_research_points = max(0,stored_points - missed) - stored_points -= calculated_research_points - RD.files.adjust_research_points(calculated_research_points) - else - autosay("Notice: Explosion environment not correctly fielded. No Points generated.", name ,"Science") - - if(target_wealth_achived) - if(calculated_research_points > 0 && stored_points) - autosay("Detected explosion with power level [power]. Expected explosion was [targetBoom]. Received [calculated_research_points] Research Points", name ,"Science") - if(0 >= stored_points) - autosay("Detected explosion with power level [power]. Expected explosion was [targetBoom]. No Additional Data Points Able To Gather", name ,"Science") - if(0 >= calculated_research_points) - autosay("Detected explosion with power level [power], Expected explosion was [targetBoom]. Test Results Outside Expected Range", name ,"Science") - targetBoom = rand(10,35) - if(target_wealth == initial(target_wealth)) - target_wealth = rand(80, 120) - - else - if(calculated_research_points) - var/wealth_mult = initial(stored_points)/(stored_points + 1) - if(wealth_mult > 3) //Slower scaling - wealth_mult *= 0.5 - target_wealth = rand(80, 120) * wealth_mult - target_wealth = round(target_wealth) - autosay("Next expected power level is [targetBoom]; Asset Value Range: [target_wealth] to [target_wealth*over_value_punishment].", name ,"Science") - - From e77de703360c58d2604e5cba10d0e0e280875079 Mon Sep 17 00:00:00 2001 From: Trilby Date: Wed, 11 Dec 2024 13:25:15 -0500 Subject: [PATCH 12/12] pitty system --- code/modules/research/experiment_toxins.dm | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/code/modules/research/experiment_toxins.dm b/code/modules/research/experiment_toxins.dm index 04bc9371557..6074f182ea5 100644 --- a/code/modules/research/experiment_toxins.dm +++ b/code/modules/research/experiment_toxins.dm @@ -9,6 +9,15 @@ //Used for are current limit of points, depleted per successful mini game var/stored_points = 250000 +/* +| Bomb Power mini game +*/ + + //Base points given no matter what if you have a bomb that has power above 0 + var/pitty = 500 + + //How many extra points given based on how big the bomb is. Bomb Cap at this time is 40. + var/points_per_power = 375 /* | Bomb Target mini game @@ -61,16 +70,29 @@ return ..() /obj/item/device/radio/beacon/explosion_watcher/proc/react_explosion(turf/epicenter, power) + var/calculated_research_points = 0 + power = round(power) autosay("Detected explosion with power level [power].", name ,"Science") + if(power > 1) + calculated_research_points += pitty + (points_per_power * power) + + if(power == 1) + calculated_research_points += pitty + + //Feedback so people that dont read the code and after 2+ bombs figure out the math. + if(calculated_research_points) + //Note that we are not "exta" points. This should tell the player that this is the base/pitty + autosay("Notice: Viable Explosion Recorded: Rewarding [calculated_research_points] points.", name ,"Science") + + //Feedback if you set items on the edge and cant reach it if(power && power < 16) autosay("Notice: Power level of test is below 16, Watchers Assets view range descressed to [power/2] rounded.", name ,"Science") - var/calculated_research_points = 0 var/target_wealth_achived = asset_wealth(FALSE, sight = power) for(var/obj/machinery/computer/rdconsole/RD in GLOB.computer_list) if(RD.id == 1) // only core gets the science