mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Fixes janiborg soap (#64803)
Fixes issue #64682 (Janiborg Soap module runs out and disappears, causing odd behavior) Instead of the janiborg's soap despawning, it will remain in their inventory but useless until they recharge
This commit is contained in:
@@ -64,6 +64,8 @@
|
||||
cleanspeed = 2.8 SECONDS //janitor gets this
|
||||
uses = 300
|
||||
|
||||
/obj/item/soap/nanotrasen/cyborg
|
||||
|
||||
/obj/item/soap/deluxe
|
||||
desc = "A deluxe Waffle Co. brand bar of soap. Smells of high-class luxury."
|
||||
grind_results = list(/datum/reagent/consumable/aloejuice = 10, /datum/reagent/lye = 10)
|
||||
@@ -115,8 +117,15 @@
|
||||
if(prob(skillcheck*100)) //higher level = more uses assuming RNG is nice
|
||||
uses--
|
||||
if(uses <= 0)
|
||||
to_chat(user, span_warning("[src] crumbles into tiny bits!"))
|
||||
qdel(src)
|
||||
noUses(user)
|
||||
|
||||
/obj/item/soap/proc/noUses(mob/user)
|
||||
to_chat(user, span_warning("[src] crumbles into tiny bits!"))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/soap/nanotrasen/cyborg/noUses(mob/user)
|
||||
to_chat(user, span_warning("The soap has ran out of chemicals"))
|
||||
|
||||
|
||||
/obj/item/soap/afterattack(atom/target, mob/user, proximity)
|
||||
. = ..()
|
||||
@@ -173,6 +182,12 @@
|
||||
decreaseUses(user)
|
||||
return
|
||||
|
||||
/obj/item/soap/nanotrasen/cyborg/afterattack(atom/target, mob/user, proximity)
|
||||
if(uses <= 0)
|
||||
to_chat(user, span_warning("No good, you need to recharge!"))
|
||||
return
|
||||
. = ..()
|
||||
|
||||
|
||||
/*
|
||||
* Bike Horns
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
/obj/item/screwdriver/cyborg,
|
||||
/obj/item/crowbar/cyborg,
|
||||
/obj/item/stack/tile/iron/base/cyborg,
|
||||
/obj/item/soap/nanotrasen,
|
||||
/obj/item/soap/nanotrasen/cyborg,
|
||||
/obj/item/storage/bag/trash/cyborg,
|
||||
/obj/item/melee/flyswatter,
|
||||
/obj/item/extinguisher/mini,
|
||||
@@ -578,6 +578,12 @@
|
||||
if(lube)
|
||||
lube.reagents.add_reagent(/datum/reagent/lube, 2 * coeff)
|
||||
|
||||
var/obj/item/soap/nanotrasen/cyborg/soap = locate(/obj/item/soap/nanotrasen/cyborg) in basic_modules
|
||||
if(!soap)
|
||||
return
|
||||
if(soap.uses < initial(soap.uses))
|
||||
soap.uses += ROUND_UP(initial(soap.uses) / 100) * coeff
|
||||
|
||||
/obj/item/robot_model/medical
|
||||
name = "Medical"
|
||||
basic_modules = list(
|
||||
|
||||
Reference in New Issue
Block a user