From c4caddf12e3c58ef10a73cf8d996e695b01a25bd Mon Sep 17 00:00:00 2001 From: Beagle <56142455+BeagleGaming1@users.noreply.github.com> Date: Tue, 20 Jun 2023 14:40:12 -0400 Subject: [PATCH 01/16] Automatic changelog for PR #3470 [ci skip] --- html/changelogs/AutoChangeLog-pr-3470.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-3470.yml diff --git a/html/changelogs/AutoChangeLog-pr-3470.yml b/html/changelogs/AutoChangeLog-pr-3470.yml new file mode 100644 index 000000000000..3d4a4ce22710 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-3470.yml @@ -0,0 +1,4 @@ +author: "Morrow" +delete-after: True +changes: + - rscadd: "Re-added the nuke that you can buy via intel at tier 4. Only purchasable past 120 minutes. Requires holding both groundside comms towers for authorization decryption before being able to be armed." \ No newline at end of file From 5995e277723c6c05c5d3e19f80cfbc277e6bb9b1 Mon Sep 17 00:00:00 2001 From: Beagle <56142455+BeagleGaming1@users.noreply.github.com> Date: Thu, 6 Jul 2023 20:01:06 -0400 Subject: [PATCH 02/16] dispesner --- .../chemistry_machinery/chem_dispenser.dm | 204 ++++++++++-------- maps/interiors/fancylocker.dmm | 2 +- maps/map_files/CORSAT/Corsat.dmm | 4 +- .../map_files/Ice_Colony_v2/Ice_Colony_v2.dmm | 2 +- .../Ice_Colony_v3/Shivas_Snowball.dmm | 2 +- maps/map_files/Kutjevo/Kutjevo.dmm | 2 +- maps/map_files/LV624/LV624.dmm | 2 +- maps/map_files/New_Varadero/New_Varadero.dmm | 2 +- .../Sorokyne_Strata/Sorokyne_Strata.dmm | 6 +- maps/map_files/USS_Almayer/USS_Almayer.dmm | 2 +- maps/map_files/generic/Admin_level.dmm | 2 +- maps/templates/Chinook.dmm | 2 +- maps/templates/clf_ert_station.dmm | 2 +- maps/templates/weyland_ert_station.dmm | 2 +- 14 files changed, 132 insertions(+), 104 deletions(-) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index 8de20ca2b79a..d39007c49e38 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -1,3 +1,9 @@ +#define DISPENSER_UNHACKABLE -1 +#define DISPENSER_NOT_HACKED 0 +#define DISPENSER_HACKED 1 + + + /obj/structure/machinery/chem_dispenser name = "chem dispenser" density = TRUE @@ -5,6 +11,7 @@ icon = 'icons/obj/structures/machinery/science_machines.dmi' icon_state = "dispenser" use_power = USE_POWER_NONE + wrenchable = FALSE idle_power_usage = 40 layer = BELOW_OBJ_LAYER //So beakers reliably appear above it var/req_skill = SKILL_MEDICAL @@ -13,13 +20,37 @@ var/obj/structure/machinery/chem_storage/chem_storage var/network = "Ground" var/amount = 30 - var/accept_glass = 0 //At 0 ONLY accepts glass containers. Kinda misleading varname. + var/accept_beaker_only = 0 //At 0 ONLY accepts glass containers. Kinda misleading varname. var/obj/item/reagent_container/beaker = null var/ui_check = 0 var/static/list/possible_transfer_amounts = list(5,10,20,30,40) - var/list/dispensable_reagents = list("hydrogen","lithium","carbon","nitrogen","oxygen","fluorine", - "sodium","aluminum","silicon","phosphorus","sulfur","chlorine","potassium","iron", - "copper","mercury","radium","water","ethanol","sugar","sulphuric acid") + var/list/dispensable_reagents = list( + "hydrogen", + "lithium", + "carbon", + "nitrogen", + "oxygen", + "fluorine", + "sodium", + "aluminum", + "silicon", + "phosphorus", + "sulfur", + "chlorine", + "potassium", + "iron", + "copper", + "mercury", + "radium", + "water", + "ethanol", + "sugar", + "sulphuric acid", + ) + /// Has it been hacked + var/hackedcheck = DISPENSER_UNHACKABLE + /// Additional reagents gotten when it is hacked + var/hacked_reagents = list() /obj/structure/machinery/chem_dispenser/medbay network = "Medbay" @@ -111,9 +142,9 @@ var/list/beakerContents = list() var/beakerCurrentVolume = 0 if(beaker && beaker.reagents && beaker.reagents.reagent_list.len) - for(var/datum/reagent/R in beaker.reagents.reagent_list) - beakerContents += list(list("name" = R.name, "volume" = R.volume)) // list in a list because Byond merges the first list... - beakerCurrentVolume += R.volume + for(var/datum/reagent/current_reagent in beaker.reagents.reagent_list) + beakerContents += list(list("name" = current_reagent.name, "volume" = current_reagent.volume)) // list in a list because Byond merges the first list... + beakerCurrentVolume += current_reagent.volume .["beakerContents"] = beakerContents if (beaker) @@ -149,11 +180,11 @@ return var/reagent_name = params["reagent"] if(beaker && dispensable_reagents.Find(reagent_name)) - var/obj/item/reagent_container/B = beaker - var/datum/reagents/R = B.reagents - var/space = R.maximum_volume - R.total_volume + var/obj/item/reagent_container/current_beaker = beaker + var/datum/reagents/current_reagent = current_beaker.reagents + var/space = current_reagent.maximum_volume - current_reagent.total_volume - R.add_reagent(reagent_name, min(amount, chem_storage.energy * 10, space)) + current_reagent.add_reagent(reagent_name, min(amount, chem_storage.energy * 10, space)) chem_storage.energy = max(chem_storage.energy - min(amount, chem_storage.energy * 10, space) / 10, 0) . = TRUE @@ -170,32 +201,65 @@ replace_beaker(usr) . = TRUE -/obj/structure/machinery/chem_dispenser/attackby(obj/item/reagent_container/B, mob/user) +/obj/structure/machinery/chem_dispenser/attackby(obj/item/reagent_container/attacking_object, mob/user) if(isrobot(user)) return - if(istype(B, /obj/item/reagent_container/glass) || istype(B, /obj/item/reagent_container/food)) - if(!accept_glass && istype(B,/obj/item/reagent_container/food)) + + if(istype(attacking_object, /obj/item/reagent_container/glass) || istype(attacking_object, /obj/item/reagent_container/food)) + if(!accept_beaker_only && istype(attacking_object,/obj/item/reagent_container/food)) to_chat(user, SPAN_NOTICE("This machine only accepts beakers")) - if(user.drop_inv_item_to_loc(B, src)) + if(user.drop_inv_item_to_loc(attacking_object, src)) var/obj/item/old_beaker = beaker - beaker = B + beaker = attacking_object if(old_beaker) - to_chat(user, SPAN_NOTICE("You swap out \the [old_beaker] for \the [B].")) + to_chat(user, SPAN_NOTICE("You swap out \the [old_beaker] for \the [attacking_object].")) user.put_in_hands(old_beaker) else - to_chat(user, SPAN_NOTICE("You set \the [B] on the machine.")) + to_chat(user, SPAN_NOTICE("You set \the [attacking_object] on the machine.")) SStgui.update_uis(src) update_icon() return + if(HAS_TRAIT(attacking_object, TRAIT_TOOL_MULTITOOL)) + switch(hackedcheck) + if(DISPENSER_UNHACKABLE) + to_chat(user, SPAN_NOTICE("[src] cannot be hacked.")) + return + if(DISPENSER_NOT_HACKED) + dispensable_reagents += hacked_reagents + hackedcheck = DISPENSER_HACKED + return + if(DISPENSER_HACKED) + dispensable_reagents -= hacked_reagents + hackedcheck = DISPENSER_NOT_HACKED + + if(HAS_TRAIT(attacking_object, TRAIT_TOOL_WRENCH)) + if(!wrenchable) + to_chat(user, "[src] cannot be unwrenched.") + + if(!do_after(user, 2 SECONDS, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) + return + if(!src) + return + + playsound(src.loc, 'sound/items/Ratchet.ogg', 25, 1) + switch(anchored) + if(FALSE) + anchored = TRUE + user.visible_message("[user] tightens the bolts securing [src] to the surface.", "You tighten the bolts securing [src] to the surface.") + if(TRUE) + user.visible_message("[user] unfastens the bolts securing [src] to the surface.", "You unfasten the bolts securing [src] to the surface.") + anchored = FALSE + /obj/structure/machinery/chem_dispenser/attack_remote(mob/user as mob) return src.attack_hand(user) /obj/structure/machinery/chem_dispenser/attack_hand(mob/user as mob) if(stat & BROKEN) + to_chat(user, SPAN_WARNING("[src] is inoperative.")) return if(req_skill && !skillcheck(user, req_skill, req_skill_level)) - to_chat(user, SPAN_WARNING("You don't have the training to use this.")) + to_chat(user, SPAN_WARNING("You don't have the training to use [src].")) return tgui_interact(user) @@ -206,9 +270,10 @@ ui_title = "Soda Dispens-o-matic" req_skill = null req_skill_level = null - accept_glass = 1 + accept_beaker_only = TRUE wrenchable = TRUE network = "Misc" + hackedcheck = DISPENSER_NOT_HACKED dispensable_reagents = list( "water", "ice", @@ -233,76 +298,39 @@ "lemonjuice", "banana", ) - var/hackedcheck = 0 - -/obj/structure/machinery/chem_dispenser/soda/attackby(obj/item/B as obj, mob/user as mob) - ..() - if(HAS_TRAIT(B, TRAIT_TOOL_MULTITOOL)) - if(hackedcheck == 0) - to_chat(user, "You change the mode from 'Soda Magic' to 'Milking Time'.") - dispensable_reagents += list("milk","soymilk") - hackedcheck = 1 - return - - else - to_chat(user, "You change the mode from 'Milking Time' to 'Soda Magic'.") - dispensable_reagents -= list("milk","soymilk") - hackedcheck = 0 - return - else if(HAS_TRAIT(B, TRAIT_TOOL_WRENCH)) - if(!wrenchable) return - - if(do_after(user, 20, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) - if(!src) return - playsound(src.loc, 'sound/items/Ratchet.ogg', 25, 1) - switch (anchored) - if (FALSE) - anchored = TRUE - user.visible_message("[user] tightens the bolts securing \the [src] to the surface.", "You tighten the bolts securing \the [src] to the surface.") - if (TRUE) - user.visible_message("[user] unfastens the bolts securing \the [src] to the surface.", "You unfasten the bolts securing \the [src] to the surface.") - anchored = FALSE - return + hacked_reagents = list( + "milk", + "soymilk", + ) -/obj/structure/machinery/chem_dispenser/beer +/obj/structure/machinery/chem_dispenser/soda/beer icon_state = "booze_dispenser" name = "booze dispenser" ui_title = "Booze Portal 9001" - req_skill = null - req_skill_level = null - accept_glass = 1 - wrenchable = TRUE - network = "Misc" desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one." - dispensable_reagents = list("water","ice","sodawater","sugar","tonic","beer","kahlua","whiskey","sake","wine","vodka","gin","rum","vermouth","cognac","ale","mead","thirteenloko","tequila") - var/hackedcheck = 0 - -/obj/structure/machinery/chem_dispenser/beer/attackby(obj/item/B as obj, mob/user as mob) - ..() - - if(HAS_TRAIT(B, TRAIT_TOOL_MULTITOOL)) - if(hackedcheck == 0) - to_chat(user, "You disable the 'Weyland-Yutani-are-cheap-bastards' lock, enabling hidden and very expensive boozes.") - dispensable_reagents += list("goldschlager","patron","absinthe") - hackedcheck = 1 - return - - else - to_chat(user, "You re-enable the 'Weyland-Yutani-are-cheap-bastards' lock, disabling hidden and very expensive boozes.") - dispensable_reagents -= list("goldschlager","patron","absinthe") - hackedcheck = 0 - return - else if(HAS_TRAIT(B, TRAIT_TOOL_WRENCH)) - if(!wrenchable) return - - if(do_after(user, 20, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) - if(!src) return - playsound(src.loc, 'sound/items/Ratchet.ogg', 25, 1) - switch (anchored) - if (FALSE) - anchored = TRUE - user.visible_message("[user] tightens the bolts securing \the [src] to the surface.", "You tighten the bolts securing \the [src] to the surface.") - if (TRUE) - user.visible_message("[user] unfastens the bolts securing \the [src] to the surface.", "You unfasten the bolts securing \the [src] to the surface.") - anchored = FALSE - return + dispensable_reagents = list( + "water", + "ice", + "sodawater", + "sugar", + "tonic", + "beer", + "kahlua", + "whiskey", + "sake", + "wine", + "vodka", + "gin", + "rum", + "vermouth", + "cognac", + "ale", + "mead", + "thirteenloko", + "tequila" + ) + hacked_reagents = list( + "goldschlager", + "patron", + "absinthe", + ) diff --git a/maps/interiors/fancylocker.dmm b/maps/interiors/fancylocker.dmm index b26879d705f8..a6ecb6155e72 100644 --- a/maps/interiors/fancylocker.dmm +++ b/maps/interiors/fancylocker.dmm @@ -88,7 +88,7 @@ /area/vehicle/apc) "t" = ( /obj/structure/surface/table/woodentable/fancy, -/obj/structure/machinery/chem_dispenser/beer, +/obj/structure/machinery/chem_dispenser/soda/beer, /turf/open/floor/wood, /area/vehicle/apc) "u" = ( diff --git a/maps/map_files/CORSAT/Corsat.dmm b/maps/map_files/CORSAT/Corsat.dmm index bddc64a61ad2..3fefea9f08b0 100644 --- a/maps/map_files/CORSAT/Corsat.dmm +++ b/maps/map_files/CORSAT/Corsat.dmm @@ -22132,7 +22132,7 @@ /area/corsat/gamma/biodome/toxins) "biR" = ( /obj/structure/surface/table/woodentable, -/obj/structure/machinery/chem_dispenser/beer{ +/obj/structure/machinery/chem_dispenser/soda/beer{ dir = 8; pixel_x = 15 }, @@ -25197,7 +25197,7 @@ /area/corsat/sigma/south/offices) "bsN" = ( /obj/structure/surface/table/woodentable, -/obj/structure/machinery/chem_dispenser/beer{ +/obj/structure/machinery/chem_dispenser/soda/beer{ dir = 8 }, /turf/open/floor/corsat{ diff --git a/maps/map_files/Ice_Colony_v2/Ice_Colony_v2.dmm b/maps/map_files/Ice_Colony_v2/Ice_Colony_v2.dmm index 7ce999271a29..76257b973b43 100644 --- a/maps/map_files/Ice_Colony_v2/Ice_Colony_v2.dmm +++ b/maps/map_files/Ice_Colony_v2/Ice_Colony_v2.dmm @@ -14261,7 +14261,7 @@ /area/ice_colony/surface/bar/bar) "aPy" = ( /obj/structure/surface/table/woodentable, -/obj/structure/machinery/chem_dispenser/beer, +/obj/structure/machinery/chem_dispenser/soda/beer, /obj/structure/machinery/alarm{ dir = 1; pixel_y = -24 diff --git a/maps/map_files/Ice_Colony_v3/Shivas_Snowball.dmm b/maps/map_files/Ice_Colony_v3/Shivas_Snowball.dmm index a431aa368702..d221090da880 100644 --- a/maps/map_files/Ice_Colony_v3/Shivas_Snowball.dmm +++ b/maps/map_files/Ice_Colony_v3/Shivas_Snowball.dmm @@ -6004,7 +6004,7 @@ /turf/open/floor/plating, /area/shiva/interior/colony/s_admin) "aRc" = ( -/obj/structure/machinery/chem_dispenser/beer{ +/obj/structure/machinery/chem_dispenser/soda/beer{ pixel_y = 8 }, /obj/structure/surface/table/reinforced/prison, diff --git a/maps/map_files/Kutjevo/Kutjevo.dmm b/maps/map_files/Kutjevo/Kutjevo.dmm index 3d626437679a..e5a6a43cf617 100644 --- a/maps/map_files/Kutjevo/Kutjevo.dmm +++ b/maps/map_files/Kutjevo/Kutjevo.dmm @@ -381,7 +381,7 @@ /turf/open/floor/kutjevo/grey/plate, /area/kutjevo/interior/complex/med/cells) "azb" = ( -/obj/structure/machinery/chem_dispenser/beer{ +/obj/structure/machinery/chem_dispenser/soda/beer{ icon_state = "dispenser" }, /turf/open/floor/kutjevo/tan/multi_tiles, diff --git a/maps/map_files/LV624/LV624.dmm b/maps/map_files/LV624/LV624.dmm index cec27c56b079..90fe5066bc40 100644 --- a/maps/map_files/LV624/LV624.dmm +++ b/maps/map_files/LV624/LV624.dmm @@ -12062,7 +12062,7 @@ /area/lv624/lazarus/comms) "aZi" = ( /obj/structure/surface/table/woodentable/fancy, -/obj/structure/machinery/chem_dispenser/beer{ +/obj/structure/machinery/chem_dispenser/soda/beer{ pixel_y = 26 }, /obj/effect/landmark/item_pool_spawner/survivor_ammo/buckshot, diff --git a/maps/map_files/New_Varadero/New_Varadero.dmm b/maps/map_files/New_Varadero/New_Varadero.dmm index 7969b1a120a0..139b956c9622 100644 --- a/maps/map_files/New_Varadero/New_Varadero.dmm +++ b/maps/map_files/New_Varadero/New_Varadero.dmm @@ -6101,7 +6101,7 @@ /area/varadero/interior/hall_SE) "fvw" = ( /obj/structure/surface/table/reinforced/prison, -/obj/structure/machinery/chem_dispenser/beer{ +/obj/structure/machinery/chem_dispenser/soda/beer{ pixel_y = 8 }, /turf/open/floor/shiva{ diff --git a/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm b/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm index 2da1f3f4295d..17f2e577a120 100644 --- a/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm +++ b/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm @@ -9733,7 +9733,7 @@ }, /area/strata/ag/interior/outpost/canteen) "aDr" = ( -/obj/structure/machinery/chem_dispenser/beer, +/obj/structure/machinery/chem_dispenser/soda/beer, /turf/open/floor/interior/plastic, /area/strata/ag/interior/outpost/canteen) "aDs" = ( @@ -10184,7 +10184,7 @@ }, /area/strata/ag/interior/dorms) "aEK" = ( -/obj/structure/machinery/chem_dispenser/beer, +/obj/structure/machinery/chem_dispenser/soda/beer, /obj/structure/surface/table/reinforced/prison, /turf/open/floor/strata{ icon_state = "orange_tile" @@ -12088,7 +12088,7 @@ }, /area/strata/ag/interior/outpost/admin) "aKQ" = ( -/obj/structure/machinery/chem_dispenser/beer, +/obj/structure/machinery/chem_dispenser/soda/beer, /obj/structure/surface/table/reinforced/prison, /turf/open/floor/strata{ dir = 4; diff --git a/maps/map_files/USS_Almayer/USS_Almayer.dmm b/maps/map_files/USS_Almayer/USS_Almayer.dmm index b15ee29dd20a..d41ddafca4ec 100644 --- a/maps/map_files/USS_Almayer/USS_Almayer.dmm +++ b/maps/map_files/USS_Almayer/USS_Almayer.dmm @@ -12716,7 +12716,7 @@ /area/almayer/hallways/starboard_hallway) "aSt" = ( /obj/structure/surface/table/reinforced/almayer_B, -/obj/structure/machinery/chem_dispenser/beer, +/obj/structure/machinery/chem_dispenser/soda/beer, /turf/open/floor/prison{ icon_state = "kitchen" }, diff --git a/maps/map_files/generic/Admin_level.dmm b/maps/map_files/generic/Admin_level.dmm index 727ae18b926a..8dd8e17e6507 100644 --- a/maps/map_files/generic/Admin_level.dmm +++ b/maps/map_files/generic/Admin_level.dmm @@ -1040,7 +1040,7 @@ }, /area/adminlevel/ert_station) "zk" = ( -/obj/structure/machinery/chem_dispenser/beer{ +/obj/structure/machinery/chem_dispenser/soda/beer{ density = 0; pixel_y = 10 }, diff --git a/maps/templates/Chinook.dmm b/maps/templates/Chinook.dmm index 0d9e64628b24..f2acbe320aeb 100644 --- a/maps/templates/Chinook.dmm +++ b/maps/templates/Chinook.dmm @@ -1875,7 +1875,7 @@ /area/adminlevel/chinook/engineering) "gv" = ( /obj/structure/surface/table/reinforced/almayer_B, -/obj/structure/machinery/chem_dispenser/beer, +/obj/structure/machinery/chem_dispenser/soda/beer, /turf/open/floor/almayer{ icon_state = "plate" }, diff --git a/maps/templates/clf_ert_station.dmm b/maps/templates/clf_ert_station.dmm index ec2a81bf6218..cf8bc8d46bf6 100644 --- a/maps/templates/clf_ert_station.dmm +++ b/maps/templates/clf_ert_station.dmm @@ -1828,7 +1828,7 @@ /turf/open/gm/river, /area/adminlevel/ert_station/clf_station) "RR" = ( -/obj/structure/machinery/chem_dispenser/beer{ +/obj/structure/machinery/chem_dispenser/soda/beer{ density = 0; pixel_y = 10 }, diff --git a/maps/templates/weyland_ert_station.dmm b/maps/templates/weyland_ert_station.dmm index 171bd8d9ac6e..854299a4efda 100644 --- a/maps/templates/weyland_ert_station.dmm +++ b/maps/templates/weyland_ert_station.dmm @@ -2509,7 +2509,7 @@ /area/adminlevel/ert_station/weyland_station) "EW" = ( /obj/structure/surface/table/reinforced, -/obj/structure/machinery/chem_dispenser/beer{ +/obj/structure/machinery/chem_dispenser/soda/beer{ density = 0; pixel_y = 23 }, From f6c446925a5a408761a91549e4fd9dac1dad8f46 Mon Sep 17 00:00:00 2001 From: Beagle <56142455+BeagleGaming1@users.noreply.github.com> Date: Thu, 6 Jul 2023 20:02:15 -0400 Subject: [PATCH 03/16] more --- .../modules/reagents/chemistry_machinery/chem_dispenser.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index d39007c49e38..9bf922f9cd9d 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -1,9 +1,6 @@ #define DISPENSER_UNHACKABLE -1 #define DISPENSER_NOT_HACKED 0 #define DISPENSER_HACKED 1 - - - /obj/structure/machinery/chem_dispenser name = "chem dispenser" density = TRUE @@ -334,3 +331,7 @@ "patron", "absinthe", ) + +#undef DISPENSER_UNHACKABLE +#undef DISPENSER_NOT_HACKED +#undef DISPENSER_HACKED From 15933f85508023fcdffafe161b8c1537323f8961 Mon Sep 17 00:00:00 2001 From: Beagle <56142455+BeagleGaming1@users.noreply.github.com> Date: Thu, 6 Jul 2023 20:13:32 -0400 Subject: [PATCH 04/16] bad var --- code/modules/reagents/chemistry_machinery/chem_dispenser.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index 9bf922f9cd9d..6b9c83be5dfa 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -17,7 +17,7 @@ var/obj/structure/machinery/chem_storage/chem_storage var/network = "Ground" var/amount = 30 - var/accept_beaker_only = 0 //At 0 ONLY accepts glass containers. Kinda misleading varname. + var/accept_beaker_only = TRUE var/obj/item/reagent_container/beaker = null var/ui_check = 0 var/static/list/possible_transfer_amounts = list(5,10,20,30,40) @@ -203,7 +203,7 @@ return if(istype(attacking_object, /obj/item/reagent_container/glass) || istype(attacking_object, /obj/item/reagent_container/food)) - if(!accept_beaker_only && istype(attacking_object,/obj/item/reagent_container/food)) + if(accept_beaker_only && istype(attacking_object,/obj/item/reagent_container/food)) to_chat(user, SPAN_NOTICE("This machine only accepts beakers")) if(user.drop_inv_item_to_loc(attacking_object, src)) var/obj/item/old_beaker = beaker @@ -267,7 +267,7 @@ ui_title = "Soda Dispens-o-matic" req_skill = null req_skill_level = null - accept_beaker_only = TRUE + accept_beaker_only = FALSE wrenchable = TRUE network = "Misc" hackedcheck = DISPENSER_NOT_HACKED From 43549778d0de6b13c770e960aa20082357505b14 Mon Sep 17 00:00:00 2001 From: Beagle <56142455+BeagleGaming1@users.noreply.github.com> Date: Thu, 6 Jul 2023 21:10:50 -0400 Subject: [PATCH 05/16] pedantic --- .../reagents/chemistry_machinery/chem_dispenser.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index 6b9c83be5dfa..1614d6bb52a1 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -45,7 +45,7 @@ "sulphuric acid", ) /// Has it been hacked - var/hackedcheck = DISPENSER_UNHACKABLE + var/hacked_check = DISPENSER_UNHACKABLE /// Additional reagents gotten when it is hacked var/hacked_reagents = list() @@ -218,17 +218,17 @@ return if(HAS_TRAIT(attacking_object, TRAIT_TOOL_MULTITOOL)) - switch(hackedcheck) + switch(hacked_check) if(DISPENSER_UNHACKABLE) to_chat(user, SPAN_NOTICE("[src] cannot be hacked.")) return if(DISPENSER_NOT_HACKED) dispensable_reagents += hacked_reagents - hackedcheck = DISPENSER_HACKED + hacked_check = DISPENSER_HACKED return if(DISPENSER_HACKED) dispensable_reagents -= hacked_reagents - hackedcheck = DISPENSER_NOT_HACKED + hacked_check = DISPENSER_NOT_HACKED if(HAS_TRAIT(attacking_object, TRAIT_TOOL_WRENCH)) if(!wrenchable) @@ -270,7 +270,7 @@ accept_beaker_only = FALSE wrenchable = TRUE network = "Misc" - hackedcheck = DISPENSER_NOT_HACKED + hacked_check = DISPENSER_NOT_HACKED dispensable_reagents = list( "water", "ice", From 7b7a0cb5fd10bf9cb16d6317a245c765732a7f47 Mon Sep 17 00:00:00 2001 From: Beagle <56142455+BeagleGaming1@users.noreply.github.com> Date: Thu, 6 Jul 2023 21:57:56 -0400 Subject: [PATCH 06/16] linters --- .../chemistry_machinery/chem_dispenser.dm | 98 +++++++++---------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index 1614d6bb52a1..a9614b21af30 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -22,28 +22,28 @@ var/ui_check = 0 var/static/list/possible_transfer_amounts = list(5,10,20,30,40) var/list/dispensable_reagents = list( - "hydrogen", - "lithium", - "carbon", - "nitrogen", - "oxygen", - "fluorine", - "sodium", - "aluminum", - "silicon", - "phosphorus", - "sulfur", - "chlorine", - "potassium", - "iron", - "copper", - "mercury", - "radium", - "water", - "ethanol", - "sugar", - "sulphuric acid", - ) + "hydrogen", + "lithium", + "carbon", + "nitrogen", + "oxygen", + "fluorine", + "sodium", + "aluminum", + "silicon", + "phosphorus", + "sulfur", + "chlorine", + "potassium", + "iron", + "copper", + "mercury", + "radium", + "water", + "ethanol", + "sugar", + "sulphuric acid", + ) /// Has it been hacked var/hacked_check = DISPENSER_UNHACKABLE /// Additional reagents gotten when it is hacked @@ -272,32 +272,32 @@ network = "Misc" hacked_check = DISPENSER_NOT_HACKED dispensable_reagents = list( - "water", - "ice", - "coffee", - "cream", - "tea", - "cola", - "spacemountainwind", - "dr_gibb", - "space_up", - "tonic", - "sodawater", - "lemon_lime", - "sugar", - "orangejuice", - "limejuice", - "watermelonjuice", - "tomatojuice", - "carrotjuice", - "berryjuice", - "grapejuice", - "lemonjuice", - "banana", + "water", + "ice", + "coffee", + "cream", + "tea", + "cola", + "spacemountainwind", + "dr_gibb", + "space_up", + "tonic", + "sodawater", + "lemon_lime", + "sugar", + "orangejuice", + "limejuice", + "watermelonjuice", + "tomatojuice", + "carrotjuice", + "berryjuice", + "grapejuice", + "lemonjuice", + "banana", ) hacked_reagents = list( - "milk", - "soymilk", + "milk", + "soymilk", ) /obj/structure/machinery/chem_dispenser/soda/beer @@ -327,9 +327,9 @@ "tequila" ) hacked_reagents = list( - "goldschlager", - "patron", - "absinthe", + "goldschlager", + "patron", + "absinthe", ) #undef DISPENSER_UNHACKABLE From 3578c96c5693f878b1d2b4a12271896d06f45aac Mon Sep 17 00:00:00 2001 From: Beagle <56142455+BeagleGaming1@users.noreply.github.com> Date: Thu, 6 Jul 2023 22:00:32 -0400 Subject: [PATCH 07/16] more --- code/modules/reagents/chemistry_machinery/chem_dispenser.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index a9614b21af30..590f7b90c9d0 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -221,12 +221,12 @@ switch(hacked_check) if(DISPENSER_UNHACKABLE) to_chat(user, SPAN_NOTICE("[src] cannot be hacked.")) - return if(DISPENSER_NOT_HACKED) + user.visible_message("[user] modifies [src] with [attacking_object], turning a light on.", "You enable a light in [src].") dispensable_reagents += hacked_reagents hacked_check = DISPENSER_HACKED - return if(DISPENSER_HACKED) + user.visible_message("[user] modifies [src] with [attacking_object], turning a light off.", "You disable a light in [src].") dispensable_reagents -= hacked_reagents hacked_check = DISPENSER_NOT_HACKED From 90fedf5f3b5f3f43092212c6b5f7b9ddf4dfde05 Mon Sep 17 00:00:00 2001 From: Beagle <56142455+BeagleGaming1@users.noreply.github.com> Date: Thu, 6 Jul 2023 22:55:13 -0400 Subject: [PATCH 08/16] i hate linters --- .../chemistry_machinery/chem_dispenser.dm | 134 +++++++++--------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index 590f7b90c9d0..c31ba860a37c 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -22,27 +22,27 @@ var/ui_check = 0 var/static/list/possible_transfer_amounts = list(5,10,20,30,40) var/list/dispensable_reagents = list( - "hydrogen", - "lithium", - "carbon", - "nitrogen", - "oxygen", - "fluorine", - "sodium", - "aluminum", - "silicon", - "phosphorus", - "sulfur", - "chlorine", - "potassium", - "iron", - "copper", - "mercury", - "radium", - "water", - "ethanol", - "sugar", - "sulphuric acid", + "hydrogen", + "lithium", + "carbon", + "nitrogen", + "oxygen", + "fluorine", + "sodium", + "aluminum", + "silicon", + "phosphorus", + "sulfur", + "chlorine", + "potassium", + "iron", + "copper", + "mercury", + "radium", + "water", + "ethanol", + "sugar", + "sulphuric acid", ) /// Has it been hacked var/hacked_check = DISPENSER_UNHACKABLE @@ -272,32 +272,32 @@ network = "Misc" hacked_check = DISPENSER_NOT_HACKED dispensable_reagents = list( - "water", - "ice", - "coffee", - "cream", - "tea", - "cola", - "spacemountainwind", - "dr_gibb", - "space_up", - "tonic", - "sodawater", - "lemon_lime", - "sugar", - "orangejuice", - "limejuice", - "watermelonjuice", - "tomatojuice", - "carrotjuice", - "berryjuice", - "grapejuice", - "lemonjuice", - "banana", + "water", + "ice", + "coffee", + "cream", + "tea", + "cola", + "spacemountainwind", + "dr_gibb", + "space_up", + "tonic", + "sodawater", + "lemon_lime", + "sugar", + "orangejuice", + "limejuice", + "watermelonjuice", + "tomatojuice", + "carrotjuice", + "berryjuice", + "grapejuice", + "lemonjuice", + "banana", ) hacked_reagents = list( - "milk", - "soymilk", + "milk", + "soymilk", ) /obj/structure/machinery/chem_dispenser/soda/beer @@ -306,30 +306,30 @@ ui_title = "Booze Portal 9001" desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one." dispensable_reagents = list( - "water", - "ice", - "sodawater", - "sugar", - "tonic", - "beer", - "kahlua", - "whiskey", - "sake", - "wine", - "vodka", - "gin", - "rum", - "vermouth", - "cognac", - "ale", - "mead", - "thirteenloko", - "tequila" + "water", + "ice", + "sodawater", + "sugar", + "tonic", + "beer", + "kahlua", + "whiskey", + "sake", + "wine", + "vodka", + "gin", + "rum", + "vermouth", + "cognac", + "ale", + "mead", + "thirteenloko", + "tequila" ) hacked_reagents = list( - "goldschlager", - "patron", - "absinthe", + "goldschlager", + "patron", + "absinthe", ) #undef DISPENSER_UNHACKABLE From b2ec41148547011da3a5e7b3fa2619cb90adc8d9 Mon Sep 17 00:00:00 2001 From: Beagle <56142455+BeagleGaming1@users.noreply.github.com> Date: Thu, 6 Jul 2023 23:08:43 -0400 Subject: [PATCH 09/16] i am losing it --- code/modules/reagents/chemistry_machinery/chem_dispenser.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index c31ba860a37c..418215fc8520 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -324,7 +324,7 @@ "ale", "mead", "thirteenloko", - "tequila" + "tequila", ) hacked_reagents = list( "goldschlager", From bfbcf27abbff762c76ca8b19a41b387631daa975 Mon Sep 17 00:00:00 2001 From: BeagleGaming1 <56142455+BeagleGaming1@users.noreply.github.com> Date: Fri, 7 Jul 2023 14:09:13 -0400 Subject: [PATCH 10/16] Update code/modules/reagents/chemistry_machinery/chem_dispenser.dm Co-authored-by: harryob --- code/modules/reagents/chemistry_machinery/chem_dispenser.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index 418215fc8520..425e852e9db5 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -1,6 +1,7 @@ #define DISPENSER_UNHACKABLE -1 #define DISPENSER_NOT_HACKED 0 #define DISPENSER_HACKED 1 + /obj/structure/machinery/chem_dispenser name = "chem dispenser" density = TRUE From 4bce12d57bbf837a2c4b5b3c526d12f0584c3621 Mon Sep 17 00:00:00 2001 From: BeagleGaming1 <56142455+BeagleGaming1@users.noreply.github.com> Date: Fri, 7 Jul 2023 14:09:24 -0400 Subject: [PATCH 11/16] Update code/modules/reagents/chemistry_machinery/chem_dispenser.dm Co-authored-by: harryob --- code/modules/reagents/chemistry_machinery/chem_dispenser.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index 425e852e9db5..2db4bf5b47e0 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -213,7 +213,7 @@ to_chat(user, SPAN_NOTICE("You swap out \the [old_beaker] for \the [attacking_object].")) user.put_in_hands(old_beaker) else - to_chat(user, SPAN_NOTICE("You set \the [attacking_object] on the machine.")) + to_chat(user, SPAN_NOTICE("You set [attacking_object] on the machine.")) SStgui.update_uis(src) update_icon() return From aab9590eadff7b4a3c100797bd2051ca6e27c142 Mon Sep 17 00:00:00 2001 From: BeagleGaming1 <56142455+BeagleGaming1@users.noreply.github.com> Date: Fri, 7 Jul 2023 14:09:30 -0400 Subject: [PATCH 12/16] Update code/modules/reagents/chemistry_machinery/chem_dispenser.dm Co-authored-by: harryob --- code/modules/reagents/chemistry_machinery/chem_dispenser.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index 2db4bf5b47e0..9fab672ef7ef 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -210,7 +210,7 @@ var/obj/item/old_beaker = beaker beaker = attacking_object if(old_beaker) - to_chat(user, SPAN_NOTICE("You swap out \the [old_beaker] for \the [attacking_object].")) + to_chat(user, SPAN_NOTICE("You swap out [old_beaker] for [attacking_object].")) user.put_in_hands(old_beaker) else to_chat(user, SPAN_NOTICE("You set [attacking_object] on the machine.")) From 4d0016b3817047da8ecd66cdd0ea614738222ed1 Mon Sep 17 00:00:00 2001 From: BeagleGaming1 <56142455+BeagleGaming1@users.noreply.github.com> Date: Fri, 7 Jul 2023 14:09:38 -0400 Subject: [PATCH 13/16] Update code/modules/reagents/chemistry_machinery/chem_dispenser.dm Co-authored-by: harryob --- code/modules/reagents/chemistry_machinery/chem_dispenser.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index 9fab672ef7ef..fc0385d5075f 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -240,7 +240,7 @@ if(!src) return - playsound(src.loc, 'sound/items/Ratchet.ogg', 25, 1) + playsound(loc, 'sound/items/Ratchet.ogg', 25, 1) switch(anchored) if(FALSE) anchored = TRUE From 5ddd05de0a942ae434b8f7b40fb3dbd14857abf9 Mon Sep 17 00:00:00 2001 From: BeagleGaming1 <56142455+BeagleGaming1@users.noreply.github.com> Date: Fri, 7 Jul 2023 14:09:54 -0400 Subject: [PATCH 14/16] Update code/modules/reagents/chemistry_machinery/chem_dispenser.dm Co-authored-by: harryob --- .../reagents/chemistry_machinery/chem_dispenser.dm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index fc0385d5075f..ee3827321602 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -241,14 +241,12 @@ return playsound(loc, 'sound/items/Ratchet.ogg', 25, 1) - switch(anchored) - if(FALSE) - anchored = TRUE + anchored = !anchored + if(anchored) user.visible_message("[user] tightens the bolts securing [src] to the surface.", "You tighten the bolts securing [src] to the surface.") - if(TRUE) - user.visible_message("[user] unfastens the bolts securing [src] to the surface.", "You unfasten the bolts securing [src] to the surface.") - anchored = FALSE - + return + + user.visible_message("[user] unfastens the bolts securing [src] to the surface.", "You unfasten the bolts securing [src] to the surface.") /obj/structure/machinery/chem_dispenser/attack_remote(mob/user as mob) return src.attack_hand(user) From f852054920c981cd83b60d6d7d9e8010ea0079f5 Mon Sep 17 00:00:00 2001 From: Beagle <56142455+BeagleGaming1@users.noreply.github.com> Date: Fri, 7 Jul 2023 14:55:39 -0400 Subject: [PATCH 15/16] never trusting harry again --- code/modules/reagents/chemistry_machinery/chem_dispenser.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index ee3827321602..db427bebe492 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -243,9 +243,9 @@ playsound(loc, 'sound/items/Ratchet.ogg', 25, 1) anchored = !anchored if(anchored) - user.visible_message("[user] tightens the bolts securing [src] to the surface.", "You tighten the bolts securing [src] to the surface.") - return - + user.visible_message("[user] tightens the bolts securing [src] to the surface.", "You tighten the bolts securing [src] to the surface.") + return + user.visible_message("[user] unfastens the bolts securing [src] to the surface.", "You unfasten the bolts securing [src] to the surface.") /obj/structure/machinery/chem_dispenser/attack_remote(mob/user as mob) return src.attack_hand(user) From a9d88a33ff9aa1c099956d9924199298a8844cfb Mon Sep 17 00:00:00 2001 From: BeagleGaming1 <56142455+BeagleGaming1@users.noreply.github.com> Date: Fri, 14 Jul 2023 14:22:24 -0400 Subject: [PATCH 16/16] Update code/modules/reagents/chemistry_machinery/chem_dispenser.dm Co-authored-by: harryob --- code/modules/reagents/chemistry_machinery/chem_dispenser.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index db427bebe492..9dd555a09d1c 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -247,6 +247,7 @@ return user.visible_message("[user] unfastens the bolts securing [src] to the surface.", "You unfasten the bolts securing [src] to the surface.") + /obj/structure/machinery/chem_dispenser/attack_remote(mob/user as mob) return src.attack_hand(user)