From f81bb85dfd47202f2a203abae75f0018db9d09b7 Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Sat, 20 Oct 2018 17:06:35 +0200 Subject: [PATCH 1/3] Borg fire extinguishers and welding tools now get refilled --- code/game/machinery/rechargestation.dm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index f0e23d6c7d4..255cc4d7169 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -220,6 +220,16 @@ var/i = 1 for(1, i <= coeff, i++) LR.Charge(occupant) + //Fire extinguisher + if(istype(O, /obj/item/extinguisher)) + var/obj/item/extinguisher/ext = O + if(ext.reagents.get_reagent_amount("water") < ext.max_water) + ext.reagents.add_reagent("water", 5 * coeff) + //Welding tools + if(istype(O,/obj/item/weldingtool)) + var/obj/item/weldingtool/weld = O + if(weld.reagents.get_reagent_amount("fuel") < weld.max_fuel) + weld.reagents.add_reagent("fuel", 2 * coeff) if(R) if(R.module) R.module.respawn_consumable(R) From 4c37dda301a10ea9775775c9a1b763c77daa97fa Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Sat, 20 Oct 2018 18:31:56 +0200 Subject: [PATCH 2/3] Fixed the spacing + used check_and_add() --- code/game/machinery/rechargestation.dm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 255cc4d7169..4ec97a3eaeb 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -223,13 +223,11 @@ //Fire extinguisher if(istype(O, /obj/item/extinguisher)) var/obj/item/extinguisher/ext = O - if(ext.reagents.get_reagent_amount("water") < ext.max_water) - ext.reagents.add_reagent("water", 5 * coeff) + ext.reagents.check_and_add("water", ext.max_water, 5 * coeff) //Welding tools - if(istype(O,/obj/item/weldingtool)) + if(istype(O, /obj/item/weldingtool)) var/obj/item/weldingtool/weld = O - if(weld.reagents.get_reagent_amount("fuel") < weld.max_fuel) - weld.reagents.add_reagent("fuel", 2 * coeff) + ext.reagents.check_and_add("fuel", weld.max_fuel, 2 * coeff) if(R) if(R.module) R.module.respawn_consumable(R) From 2018da1b8f3875c739b978301cc2b1e807182a57 Mon Sep 17 00:00:00 2001 From: farie82 Date: Sat, 20 Oct 2018 20:35:20 +0200 Subject: [PATCH 3/3] Sleepy me. Fixed now --- code/game/machinery/rechargestation.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 4ec97a3eaeb..1532eeaccbd 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -227,7 +227,7 @@ //Welding tools if(istype(O, /obj/item/weldingtool)) var/obj/item/weldingtool/weld = O - ext.reagents.check_and_add("fuel", weld.max_fuel, 2 * coeff) + weld.reagents.check_and_add("fuel", weld.max_fuel, 2 * coeff) if(R) if(R.module) R.module.respawn_consumable(R)