From 6dec5b6dbd90cf86b815d8425452c33816d2e047 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sun, 16 Jun 2024 12:07:59 +1000 Subject: [PATCH 01/13] Fixing issues with mob holders. --- code/modules/mob_holder/holder_mobs.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/mob_holder/holder_mobs.dm b/code/modules/mob_holder/holder_mobs.dm index eeed2d5f4b2..53e5a9743ac 100644 --- a/code/modules/mob_holder/holder_mobs.dm +++ b/code/modules/mob_holder/holder_mobs.dm @@ -35,7 +35,8 @@ to_chat(initiator, "You scoop up \the [src]!") to_chat(src, "\The [initiator] scoops you up!") - src.forceMove(H) + forceMove(H) + reset_offsets(0) target.status_flags |= PASSEMOTES H.sync(src) @@ -46,6 +47,9 @@ return FALSE if(QDELETED(scooper) || QDELETED(src)) return FALSE - if(!CanPhysicallyInteract(scooper)) + if(istype(loc, /obj/item/holder)) + if(loc.CanUseTopicPhysical(scooper) != STATUS_INTERACTIVE) + return FALSE + else if(!CanPhysicallyInteract(scooper)) return FALSE return !!holder_type && scooper.mob_size > src.mob_size From 6727e3157e00fa88141787ba3c0076d6c6caa896 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sun, 16 Jun 2024 12:10:00 +1000 Subject: [PATCH 02/13] Fixing flickering salmon inhand. --- icons/mob/simple_animal/fish_salmon.dmi | Bin 1983 -> 1957 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/icons/mob/simple_animal/fish_salmon.dmi b/icons/mob/simple_animal/fish_salmon.dmi index 4226c4cb46e24e3fb20d19934df9f059ca4e8a03..56e77249b1fb82420fc9567323ec2948fec32213 100644 GIT binary patch delta 1838 zcmV+}2hsSy52X)~7Yd*V0{{R3ZT6FIks*11uzFNjbVOxyV{&P5bZKvH004NLebB)Q zfh6%+fKNqFQE(L#) zb;>m2DE6BzXRSgn`(~GNCQ03;|2EEpr#=R)u^I!;P+2!1&TbZJ`eh^y-5{c|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XVayO)=NGDA zJm@yhFVw(UYHXfgsDfVXZJ%GLgj#NIo?keSHzHMBtM6Cl7skbZQnrDO_5IrX!d2f7 z6`Ly#w%7OT@(T~3@7LI0tM9K4fDo=K?87y{b^3nnhOW`~*V~`Wj@`0S-;cc<73=%p z*4uYe1-v(%o9X))VpQM9$HUZ;rckKj@UcuZKzB_r1MzgrV<8Q&`xtS({%ldfo%p&h`Cai0k|Q z_@wWLGg`5}kIt;mFMQ~M@#%Zl_njB;WBR@?ne=^tWe*hV`$o_0GxG~D1@Jx}4tL__ zm&Ji2rTV_PJ$qN>7u+m>W>8Co#8!sX+9i)mO?DNKi#1|@Gs*6-^!-QH);JrIavQ34 zhw;jo-O{!{oK1PTO@+I|+7|iPgNP$sJ+S|RAneX(pCMZ8-`|x6`}g;ye*gZ?RPW#4 znd<%fdsDrCzcRm2O#^+uD!))m8-2e#zfjHI-w#x?m%iVOLVdqkexZf`1^Rxo{6d2O ziuCUUaIdm$}eQ|1B~)RxxQbWU!cAK zp~~Oc>HC4$H#o2Q6}aUy2lx4YAo>;5>vW4ygOv-oIZ2^(`jjTg^Mw`}fPBzJ_IdEqkMXe*bH-4{`FhPpp)M}3`Ua8%QT1=^_5)v-@-;gG z?5@~<(edD0A_Bau?B;_bJo!5AR@6eY2gdXJ>*JzymDpa zd`ZjKNw;Da634?USA^9`3t9QP+V+ZGBpS+plx-`aoD8p3C3hA{^ zYUHZ(8hfek$idX*Uux z_hL;d=Rx`G{tJR22!bF8f*=TjAP9mW2!bF8S^fhlNrFZj<0Cr&0000 Date: Sun, 16 Jun 2024 12:13:33 +1000 Subject: [PATCH 03/13] Reduces worm compost hunger amount. --- code/game/objects/structures/compost.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/game/objects/structures/compost.dm b/code/game/objects/structures/compost.dm index 5d92998565f..35913794a14 100644 --- a/code/game/objects/structures/compost.dm +++ b/code/game/objects/structures/compost.dm @@ -1,6 +1,7 @@ /// The number of worms influences the rate at which contents are decomposed into compost. -var/global/const/COMPOST_WORM_EAT_AMOUNT = 50 -var/global/const/COMPOST_MAX_WORMS = 10 +var/global/const/COMPOST_WORM_EAT_AMOUNT = 50 +var/global/const/COMPOST_MAX_WORMS = 10 +var/global/const/COMPOST_WORM_HUNGER_FACTOR = MINIMUM_CHEMICAL_VOLUME /obj/structure/reagent_dispensers/compost_bin name = "compost bin" @@ -186,7 +187,7 @@ var/global/const/COMPOST_MAX_WORMS = 10 if(compost_amount > 0) // Worms gotta eat... if(worms_are_hungry) - reagents.remove_reagent(/decl/material/liquid/fertilizer/compost, worm_drink_amount * 0.025) + reagents.remove_reagent(/decl/material/liquid/fertilizer/compost, worm_drink_amount * WORM_HUNGER_FACTOR) if(prob(1) && worms < COMPOST_MAX_WORMS) var/obj/item/chems/food/worm/worm = new(src) if(!storage.handle_item_insertion(null, worm)) From d8c819b7c6fa56a4426fc882bd1fbc51f2cd72fa Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sun, 16 Jun 2024 12:21:08 +1000 Subject: [PATCH 04/13] Natural floors cannot be engraved by default. --- code/game/objects/structures/compost.dm | 2 +- code/game/turfs/floors/natural/_natural.dm | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/game/objects/structures/compost.dm b/code/game/objects/structures/compost.dm index 35913794a14..157a761128c 100644 --- a/code/game/objects/structures/compost.dm +++ b/code/game/objects/structures/compost.dm @@ -187,7 +187,7 @@ var/global/const/COMPOST_WORM_HUNGER_FACTOR = MINIMUM_CHEMICAL_VOLUME if(compost_amount > 0) // Worms gotta eat... if(worms_are_hungry) - reagents.remove_reagent(/decl/material/liquid/fertilizer/compost, worm_drink_amount * WORM_HUNGER_FACTOR) + reagents.remove_reagent(/decl/material/liquid/fertilizer/compost, worm_drink_amount * COMPOST_WORM_HUNGER_FACTOR) if(prob(1) && worms < COMPOST_MAX_WORMS) var/obj/item/chems/food/worm/worm = new(src) if(!storage.handle_item_insertion(null, worm)) diff --git a/code/game/turfs/floors/natural/_natural.dm b/code/game/turfs/floors/natural/_natural.dm index 4a7d2910149..25b039c740e 100644 --- a/code/game/turfs/floors/natural/_natural.dm +++ b/code/game/turfs/floors/natural/_natural.dm @@ -14,6 +14,8 @@ base_icon_state = "0" base_color = null + can_engrave = FALSE + var/dirt_color = "#7c5e42" var/possible_states = 0 var/icon_edge_layer = -1 From 848b7b153d72ee7d0b8db58d1921a7ae21166bdf Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sun, 16 Jun 2024 12:27:01 +1000 Subject: [PATCH 05/13] Added a wooden table frame recipe to planks. --- code/modules/crafting/stack_recipes/recipes_planks.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/modules/crafting/stack_recipes/recipes_planks.dm b/code/modules/crafting/stack_recipes/recipes_planks.dm index 97c4a450e57..bf02340a893 100644 --- a/code/modules/crafting/stack_recipes/recipes_planks.dm +++ b/code/modules/crafting/stack_recipes/recipes_planks.dm @@ -176,3 +176,8 @@ /decl/stack_recipe/planks/furniture/barrel result_type = /obj/structure/reagent_dispensers/barrel difficulty = MAT_VALUE_HARD_DIY + +/decl/stack_recipe/planks/furniture/table_frame + result_type = /obj/structure/table/frame + category = "furniture" + difficulty = MAT_VALUE_HARD_DIY From ef4dff4b55c060771b53e872b44eb0566cee5747 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sun, 16 Jun 2024 12:30:03 +1000 Subject: [PATCH 06/13] Drying racks can't work in fluids or rain. --- code/game/objects/structures/drying_rack.dm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/game/objects/structures/drying_rack.dm b/code/game/objects/structures/drying_rack.dm index 123ac0641b8..bbcf96ba0d0 100644 --- a/code/game/objects/structures/drying_rack.dm +++ b/code/game/objects/structures/drying_rack.dm @@ -20,6 +20,14 @@ /obj/structure/drying_rack/Process() if(!drying) return + + var/decl/state/weather/weather_state = weather?.weather_system?.current_state + if(istype(weather_state) && weather_state.is_liquid) + return // can't dry in the rain + + if(loc?.is_flooded(TRUE)) + return // can't dry in the wet + var/dry_product = drying?.dry_out(src) if(dry_product) if(drying != dry_product) From db62f20be16714c7fec809d54d4b56b4d1f02949 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sun, 16 Jun 2024 12:31:56 +1000 Subject: [PATCH 07/13] Replaces some out of place props on Shaded Hills. --- maps/shaded_hills/shaded_hills-grassland.dmm | 4 ++-- maps/shaded_hills/shaded_hills-woods.dmm | 2 +- maps/shaded_hills/submaps/woods/bear_den/bear_den.dmm | 2 +- maps/shaded_hills/submaps/woods/hunter_camp/hunter_camp.dmm | 2 +- maps/shaded_hills/submaps/woods/old_cabin/old_cabin.dmm | 2 +- .../submaps/woods/suspicious_cabin/suspicious_cabin.dmm | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/maps/shaded_hills/shaded_hills-grassland.dmm b/maps/shaded_hills/shaded_hills-grassland.dmm index 2d15d1952d7..db47baa5a25 100644 --- a/maps/shaded_hills/shaded_hills-grassland.dmm +++ b/maps/shaded_hills/shaded_hills-grassland.dmm @@ -71,7 +71,7 @@ "kr" = ( /obj/structure/closet/crate/chest, /obj/item/tool/pickaxe/iron, -/obj/item/tool/axe/hatchet, +/obj/item/tool/axe, /obj/abstract/exterior_marker/inside, /turf/floor/woven, /area/shaded_hills/outside) @@ -96,7 +96,7 @@ /area/shaded_hills/caves) "mG" = ( /obj/structure/bed/chair/bench/ebony, -/obj/item/knife/utility, +/obj/item/bladed/folding, /obj/abstract/landmark/start/shaded_hills/miner, /turf/floor/natural/barren, /area/shaded_hills/outside) diff --git a/maps/shaded_hills/shaded_hills-woods.dmm b/maps/shaded_hills/shaded_hills-woods.dmm index 48c711f86a2..9d2af2d4755 100644 --- a/maps/shaded_hills/shaded_hills-woods.dmm +++ b/maps/shaded_hills/shaded_hills-woods.dmm @@ -9,7 +9,7 @@ /area/shaded_hills/outside/woods) "cN" = ( /obj/structure/table/woodentable/ebony, -/obj/item/knife/kitchen, +/obj/item/bladed/knife, /turf/floor/wood/ebony, /area/shaded_hills/forester_hut) "dp" = ( diff --git a/maps/shaded_hills/submaps/woods/bear_den/bear_den.dmm b/maps/shaded_hills/submaps/woods/bear_den/bear_den.dmm index b0ab07b1d98..cebf783cb01 100644 --- a/maps/shaded_hills/submaps/woods/bear_den/bear_den.dmm +++ b/maps/shaded_hills/submaps/woods/bear_den/bear_den.dmm @@ -22,7 +22,7 @@ /turf/floor/natural/dirt, /area/shaded_hills/outside/point_of_interest/bear_den) "w" = ( -/obj/item/knife, +/obj/item/bladed/knife, /obj/item/cash/imperial/crown, /obj/item/cash/imperial/crown, /obj/item/cash/imperial/quin, diff --git a/maps/shaded_hills/submaps/woods/hunter_camp/hunter_camp.dmm b/maps/shaded_hills/submaps/woods/hunter_camp/hunter_camp.dmm index 4e05687fb3c..b13b7d1214f 100644 --- a/maps/shaded_hills/submaps/woods/hunter_camp/hunter_camp.dmm +++ b/maps/shaded_hills/submaps/woods/hunter_camp/hunter_camp.dmm @@ -85,7 +85,7 @@ /turf/floor/natural/barren, /area/shaded_hills/outside/point_of_interest/hunter_camp) "Z" = ( -/obj/item/knife, +/obj/item/bladed/knife, /turf/floor/natural/barren, /area/shaded_hills/outside/point_of_interest/hunter_camp) diff --git a/maps/shaded_hills/submaps/woods/old_cabin/old_cabin.dmm b/maps/shaded_hills/submaps/woods/old_cabin/old_cabin.dmm index 31ee2d0a21c..96d949d2540 100644 --- a/maps/shaded_hills/submaps/woods/old_cabin/old_cabin.dmm +++ b/maps/shaded_hills/submaps/woods/old_cabin/old_cabin.dmm @@ -57,7 +57,7 @@ /area/shaded_hills/outside/point_of_interest/old_cabin) "H" = ( /obj/structure/table/woodentable/ebony, -/obj/item/knife, +/obj/item/bladed/knife, /obj/item/chems/food/grown/potato, /obj/item/chems/food/grown/potato, /obj/item/chems/food/grown/carrot, diff --git a/maps/shaded_hills/submaps/woods/suspicious_cabin/suspicious_cabin.dmm b/maps/shaded_hills/submaps/woods/suspicious_cabin/suspicious_cabin.dmm index d83d0ef38c7..0d2427bf746 100644 --- a/maps/shaded_hills/submaps/woods/suspicious_cabin/suspicious_cabin.dmm +++ b/maps/shaded_hills/submaps/woods/suspicious_cabin/suspicious_cabin.dmm @@ -43,7 +43,7 @@ /area/template_noop) "t" = ( /obj/structure/table/woodentable/ebony, -/obj/item/knife, +/obj/item/bladed/knife, /turf/floor/natural/path/basalt, /area/template_noop) "v" = ( From 708cf78d9ee965361541d8baec5358b480044cf3 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sun, 16 Jun 2024 12:35:32 +1000 Subject: [PATCH 08/13] Fixing compile errors with weather checking on drying racks. --- code/game/objects/structures/drying_rack.dm | 9 +++++---- code/modules/reagents/Chemistry-Holder.dm | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/game/objects/structures/drying_rack.dm b/code/game/objects/structures/drying_rack.dm index bbcf96ba0d0..7cec42d26fe 100644 --- a/code/game/objects/structures/drying_rack.dm +++ b/code/game/objects/structures/drying_rack.dm @@ -21,10 +21,11 @@ if(!drying) return - var/decl/state/weather/weather_state = weather?.weather_system?.current_state - if(istype(weather_state) && weather_state.is_liquid) - return // can't dry in the rain - + if(isturf(loc)) + var/turf/my_turf = loc + var/decl/state/weather/weather_state = my_turf.weather?.weather_system?.current_state + if(istype(weather_state) && weather_state.is_liquid) + return // can't dry in the rain if(loc?.is_flooded(TRUE)) return // can't dry in the wet diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index f5da9eb6233..72279bfa69b 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -654,6 +654,7 @@ var/global/obj/temp_reagents_holder = new trans_to_holder(target.reagents, amount, multiplier, copy, defer_update = defer_update) // Deferred updates are presumably being done by SSfluids. // Do an immediate fluid_act call rather than waiting for SSfluids to proc. + world << "honk" if(!defer_update) target.fluid_act(target.reagents) From 81d2434c1b68f474d732bbf85f72ee495e34090a Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sun, 16 Jun 2024 12:39:01 +1000 Subject: [PATCH 09/13] Lowers the fluid amount needed to turn dirt into mud. --- code/game/turfs/floors/natural/natural_dirt.dm | 2 +- code/game/turfs/floors/natural/natural_mud.dm | 2 +- code/modules/reagents/Chemistry-Holder.dm | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/code/game/turfs/floors/natural/natural_dirt.dm b/code/game/turfs/floors/natural/natural_dirt.dm index 91ca2198c36..46ca4824538 100644 --- a/code/game/turfs/floors/natural/natural_dirt.dm +++ b/code/game/turfs/floors/natural/natural_dirt.dm @@ -14,7 +14,7 @@ return 1 /turf/floor/natural/dirt/fluid_act(var/datum/reagents/fluids) - if(fluids?.total_volume < FLUID_SHALLOW) + if(fluids?.total_volume < FLUID_PUDDLE) return ..() var/turf/new_turf = ChangeTurf(/turf/floor/natural/mud, keep_air = TRUE, keep_height = TRUE) return new_turf.fluid_act(fluids) diff --git a/code/game/turfs/floors/natural/natural_mud.dm b/code/game/turfs/floors/natural/natural_mud.dm index 63ecba4907b..e129a3ba14d 100644 --- a/code/game/turfs/floors/natural/natural_mud.dm +++ b/code/game/turfs/floors/natural/natural_mud.dm @@ -69,7 +69,7 @@ return 0.0 /turf/floor/natural/dry/fluid_act(datum/reagents/fluids) - if(fluids?.total_volume < FLUID_SHALLOW) + if(fluids?.total_volume < FLUID_PUDDLE) return ..() var/turf/new_turf = ChangeTurf(/turf/floor/natural/mud, keep_air = TRUE, keep_height = TRUE) return new_turf.fluid_act(fluids) diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 72279bfa69b..f5da9eb6233 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -654,7 +654,6 @@ var/global/obj/temp_reagents_holder = new trans_to_holder(target.reagents, amount, multiplier, copy, defer_update = defer_update) // Deferred updates are presumably being done by SSfluids. // Do an immediate fluid_act call rather than waiting for SSfluids to proc. - world << "honk" if(!defer_update) target.fluid_act(target.reagents) From 1e356740564726d48ed21db8cbb96ef7e51e47dc Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sun, 16 Jun 2024 12:44:08 +1000 Subject: [PATCH 10/13] Hammers can now be used to unanchor objects. --- code/game/machinery/jukebox.dm | 4 ++-- code/game/machinery/vending/_vending.dm | 6 +++--- code/game/objects/objs.dm | 12 ++++++++---- .../components/binary_devices/binary_atmos_base.dm | 2 +- .../components/binary_devices/pipeturbine.dm | 2 +- code/modules/fabrication/fabricator_intake.dm | 2 +- code/modules/fabrication/fabricator_pipe.dm | 2 +- 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index 51e67f598eb..aad9c1c3188 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -154,9 +154,9 @@ qdel(src) /obj/machinery/media/jukebox/attackby(obj/item/W, mob/user) - if(IS_WRENCH(W) && !panel_open) + if((IS_WRENCH(W) || IS_HAMMER(W)) && !panel_open) add_fingerprint(user) - wrench_floor_bolts(user, 0) + wrench_floor_bolts(user, 0, W) power_change() return return ..() diff --git a/code/game/machinery/vending/_vending.dm b/code/game/machinery/vending/_vending.dm index e10d32215be..dcd978ded68 100644 --- a/code/game/machinery/vending/_vending.dm +++ b/code/game/machinery/vending/_vending.dm @@ -88,7 +88,7 @@ build_inventory(populate_parts) return INITIALIZE_HINT_LATELOAD - + /obj/machinery/vending/LateInitialize() ..() update_icon() @@ -181,8 +181,8 @@ return TRUE if((. = component_attackby(W, user))) return - if((obj_flags & OBJ_FLAG_ANCHORABLE) && IS_WRENCH(W)) - wrench_floor_bolts(user) + if((obj_flags & OBJ_FLAG_ANCHORABLE) && (IS_WRENCH(W) || IS_HAMMER(W))) + wrench_floor_bolts(user, null, W) power_change() return diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 531d9b598e3..767b6907fb7 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -129,14 +129,18 @@ . |= DAM_LASER /obj/attackby(obj/item/O, mob/user) - if((obj_flags & OBJ_FLAG_ANCHORABLE) && IS_WRENCH(O)) - wrench_floor_bolts(user) + if((obj_flags & OBJ_FLAG_ANCHORABLE) && (IS_WRENCH(O) || IS_HAMMER(O))) + wrench_floor_bolts(user, null, O) update_icon() return TRUE return ..() -/obj/proc/wrench_floor_bolts(mob/user, delay=20) - playsound(loc, 'sound/items/Ratchet.ogg', 100, 1) +/obj/proc/wrench_floor_bolts(mob/user, delay = 2 SECONDS, obj/item/tool) + if(!istype(tool) || IS_WRENCH(tool)) + playsound(loc, 'sound/items/Ratchet.ogg', 100, 1) + else if(IS_HAMMER(tool)) + playsound(loc, 'sound/weapons/Genhit.ogg', 100, 1) + if(anchored) user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.") else diff --git a/code/modules/atmospherics/components/binary_devices/binary_atmos_base.dm b/code/modules/atmospherics/components/binary_devices/binary_atmos_base.dm index 3a52c06d259..bd58d0d112f 100644 --- a/code/modules/atmospherics/components/binary_devices/binary_atmos_base.dm +++ b/code/modules/atmospherics/components/binary_devices/binary_atmos_base.dm @@ -30,7 +30,7 @@ return TRUE // Will only be used if you set the anchorable obj flag. -/obj/machinery/atmospherics/binary/wrench_floor_bolts(user) +/obj/machinery/atmospherics/binary/wrench_floor_bolts(mob/user, delay = 2 SECONDS, obj/item/tool) . = ..() if(anchored) set_dir(dir) // making sure diff --git a/code/modules/atmospherics/components/binary_devices/pipeturbine.dm b/code/modules/atmospherics/components/binary_devices/pipeturbine.dm index 50577bfd646..e72a09e8d18 100644 --- a/code/modules/atmospherics/components/binary_devices/pipeturbine.dm +++ b/code/modules/atmospherics/components/binary_devices/pipeturbine.dm @@ -99,7 +99,7 @@ if (turbine.stat & (BROKEN) || !turbine.anchored || turn(turbine.dir,180) != dir) turbine = null -/obj/machinery/turbinemotor/wrench_floor_bolts(user) +/obj/machinery/turbinemotor/wrench_floor_bolts(mob/user, delay = 2 SECONDS, obj/item/tool) . = ..() updateConnection() diff --git a/code/modules/fabrication/fabricator_intake.dm b/code/modules/fabrication/fabricator_intake.dm index b7e65173c5b..5af01117dbe 100644 --- a/code/modules/fabrication/fabricator_intake.dm +++ b/code/modules/fabrication/fabricator_intake.dm @@ -97,7 +97,7 @@ if(panel_open && (IS_MULTITOOL(O) || IS_WIRECUTTER(O))) attack_hand_with_interaction_checks(user) return TRUE - if((obj_flags & OBJ_FLAG_ANCHORABLE) && IS_WRENCH(O)) + if((obj_flags & OBJ_FLAG_ANCHORABLE) && (IS_WRENCH(O) || IS_HAMMER(O))) return ..() if(stat & (NOPOWER | BROKEN)) return diff --git a/code/modules/fabrication/fabricator_pipe.dm b/code/modules/fabrication/fabricator_pipe.dm index b378f098ba7..92b988cb55a 100644 --- a/code/modules/fabrication/fabricator_pipe.dm +++ b/code/modules/fabrication/fabricator_pipe.dm @@ -19,7 +19,7 @@ return STATUS_CLOSE return ..() -/obj/machinery/fabricator/pipe/wrench_floor_bolts() +/obj/machinery/fabricator/pipe/wrench_floor_bolts(mob/user, delay = 2 SECONDS, obj/item/tool) ..() update_use_power(anchored ? POWER_USE_IDLE : POWER_USE_OFF) From 3fa3340df3d8ecaa230d2d8ba532775500562604 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sun, 16 Jun 2024 12:45:36 +1000 Subject: [PATCH 11/13] Textiles structures can now be unanchored. --- code/modules/crafting/textiles/_textiles.dm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/code/modules/crafting/textiles/_textiles.dm b/code/modules/crafting/textiles/_textiles.dm index 705725e21b6..3e3c2b41bd6 100644 --- a/code/modules/crafting/textiles/_textiles.dm +++ b/code/modules/crafting/textiles/_textiles.dm @@ -1,14 +1,15 @@ /obj/structure/textiles - abstract_type = /obj/structure/textiles - icon_state = ICON_STATE_WORLD - anchored = TRUE - density = TRUE - material = /decl/material/solid/organic/wood + abstract_type = /obj/structure/textiles + icon_state = ICON_STATE_WORLD + anchored = TRUE + density = TRUE + material = /decl/material/solid/organic/wood material_alteration = MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_NAME | MAT_FLAG_ALTERATION_DESC + obj_flags = OBJ_FLAG_ANCHORABLE - var/tmp/working = FALSE - var/work_skill = SKILL_CONSTRUCTION + var/tmp/working = FALSE + var/work_skill = SKILL_CONSTRUCTION var/product_type var/datum/composite_sound/work_sound From 41795ad673b29366aa016e413e28af854445db57 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sun, 16 Jun 2024 12:48:20 +1000 Subject: [PATCH 12/13] Plants now drop extracted seeds instead of packeted seeds. --- code/game/objects/structures/flora/plant.dm | 2 +- code/modules/hydroponics/seed.dm | 2 +- code/modules/hydroponics/trays/tray.dm | 2 +- code/modules/hydroponics/trays/tray_soil.dm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/objects/structures/flora/plant.dm b/code/game/objects/structures/flora/plant.dm index 7d49a97b5ed..133f8e1017d 100644 --- a/code/game/objects/structures/flora/plant.dm +++ b/code/game/objects/structures/flora/plant.dm @@ -38,7 +38,7 @@ var/fail_chance = user ? user.skill_fail_chance(SKILL_BOTANY, 30, SKILL_ADEPT) : 30 if(!prob(fail_chance)) for(var/i = 1 to rand(1,3)) - new /obj/item/seeds(loc, null, plant) + new /obj/item/seeds/extracted(loc, null, plant) return ..() /obj/structure/flora/plant/Initialize(ml, _mat, _reinf_mat, datum/seed/_plant) diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 549a6948a70..54af40396c3 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -583,7 +583,7 @@ update_growth_stages() //Place the plant products at the feet of the user. -/datum/seed/proc/harvest(var/mob/user,var/yield_mod,var/harvest_sample,var/force_amount) +/datum/seed/proc/harvest(var/mob/user, var/yield_mod, var/harvest_sample, var/force_amount) if(!user) return FALSE diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index 9986843208a..c43a5f49272 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -260,7 +260,7 @@ check_plant_health() //Harvests the product of a plant. -/obj/machinery/portable_atmospherics/hydroponics/proc/harvest(var/mob/user) +/obj/machinery/portable_atmospherics/hydroponics/proc/harvest(mob/user) //Harvest the product of the plant, if(!seed || !harvest) diff --git a/code/modules/hydroponics/trays/tray_soil.dm b/code/modules/hydroponics/trays/tray_soil.dm index ec1eec2a61e..64a48f1df5c 100644 --- a/code/modules/hydroponics/trays/tray_soil.dm +++ b/code/modules/hydroponics/trays/tray_soil.dm @@ -166,7 +166,7 @@ ..() qdel(src) -/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/harvest() +/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/harvest(mob/user) ..() if(!seed) // Repeat harvests are a thing. qdel(src) From f4f8c210a57da7bd73a228b7feffd6c4eee61ea2 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sun, 16 Jun 2024 12:54:03 +1000 Subject: [PATCH 13/13] Compost bins and wells should behave a bit more sanely. --- code/game/objects/structures/compost.dm | 9 ++++++--- code/game/objects/structures/well.dm | 15 ++++++++------- code/modules/reagents/reagent_dispenser.dm | 16 ++++++++++++++-- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/code/game/objects/structures/compost.dm b/code/game/objects/structures/compost.dm index 157a761128c..18ef1e5faf9 100644 --- a/code/game/objects/structures/compost.dm +++ b/code/game/objects/structures/compost.dm @@ -9,11 +9,15 @@ var/global/const/COMPOST_WORM_HUNGER_FACTOR = MINIMUM_CHEMICAL_VOLUME icon = 'icons/obj/structures/compost.dmi' icon_state = ICON_STATE_WORLD anchored = TRUE - atom_flags = ATOM_FLAG_CLIMBABLE | ATOM_FLAG_OPEN_CONTAINER - material = /decl/material/solid/organic/wood + density = TRUE + atom_flags = ATOM_FLAG_CLIMBABLE matter = null + material = /decl/material/solid/organic/wood material_alteration = MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_NAME | MAT_FLAG_ALTERATION_DESC wrenchable = FALSE + possible_transfer_amounts = @"[10,25,50,100]" + volume = 2000 + can_toggle_open = FALSE storage = /datum/storage/hopper/industrial/compost /obj/structure/reagent_dispensers/compost_bin/Initialize() @@ -29,7 +33,6 @@ var/global/const/COMPOST_WORM_HUNGER_FACTOR = MINIMUM_CHEMICAL_VOLUME qdel(worm) break . = ..() - atom_flags |= ATOM_FLAG_OPEN_CONTAINER // something seems to be unsetting this :( /obj/structure/reagent_dispensers/compost_bin/Destroy() if(is_processing) diff --git a/code/game/objects/structures/well.dm b/code/game/objects/structures/well.dm index 0d7888198f9..7f0e460e00f 100644 --- a/code/game/objects/structures/well.dm +++ b/code/game/objects/structures/well.dm @@ -5,7 +5,7 @@ icon_state = ICON_STATE_WORLD anchored = TRUE density = TRUE - atom_flags = ATOM_FLAG_CLIMBABLE | ATOM_FLAG_OPEN_CONTAINER + atom_flags = ATOM_FLAG_CLIMBABLE matter = null material = /decl/material/solid/stone/granite material_alteration = MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_DESC @@ -13,12 +13,19 @@ amount_dispensed = 10 possible_transfer_amounts = @"[10,25,50,100]" volume = 10000 + can_toggle_open = FALSE /obj/structure/reagent_dispensers/well/on_update_icon() . = ..() if(reagents?.total_volume) add_overlay(overlay_image(icon, "[icon_state]-fluid", reagents.get_color(), (RESET_COLOR | RESET_ALPHA))) +/obj/structure/reagent_dispensers/well/on_reagent_change() + . = ..() + update_icon() + if(!is_processing) + START_PROCESSING(SSobj, src) + /obj/structure/reagent_dispensers/well/mapped/populate_reagents() . = ..() add_to_reagents(/decl/material/liquid/water, reagents.maximum_volume) @@ -34,9 +41,3 @@ if(is_processing) STOP_PROCESSING(SSobj, src) return ..() - -/obj/structure/reagent_dispensers/well/mapped/on_reagent_change() - . = ..() - update_icon() - if(!is_processing) - START_PROCESSING(SSobj, src) diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 115243743c8..c36c615d139 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -14,6 +14,7 @@ var/unwrenched = FALSE var/tmp/volume = 1000 var/amount_dispensed = 10 + var/can_toggle_open = TRUE var/tmp/possible_transfer_amounts = @"[10,25,50,100,500]" /obj/structure/reagent_dispensers/Initialize(ml, _mat, _reinf_mat) @@ -22,6 +23,16 @@ if (!possible_transfer_amounts) verbs -= /obj/structure/reagent_dispensers/verb/set_amount_dispensed +/obj/structure/reagent_dispensers/receive_mouse_drop(atom/dropping, mob/user, params) + if(!(. = ..()) && user?.get_active_held_item() == dropping && isitem(dropping)) + // Awful. Sorry. + var/obj/item/item = dropping + var/old_atom_flags = atom_flags + atom_flags |= ATOM_FLAG_OPEN_CONTAINER + if(item.standard_pour_into(user, src)) + . = TRUE + atom_flags = old_atom_flags + /obj/structure/reagent_dispensers/on_reagent_change() ..() if(reagents?.total_volume > 0) @@ -311,7 +322,8 @@ /obj/structure/reagent_dispensers/get_alt_interactions(var/mob/user) . = ..() LAZYADD(., /decl/interaction_handler/set_transfer/reagent_dispenser) - LAZYADD(., /decl/interaction_handler/toggle_open/reagent_dispenser) + if(can_toggle_open) + LAZYADD(., /decl/interaction_handler/toggle_open/reagent_dispenser) //Set amount dispensed /decl/interaction_handler/set_transfer/reagent_dispenser @@ -337,4 +349,4 @@ target.atom_flags &= ~ATOM_FLAG_OPEN_CONTAINER else target.atom_flags |= ATOM_FLAG_OPEN_CONTAINER - return TRUE \ No newline at end of file + return TRUE