mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
[MIRROR] Fixes plenty instances of 1-tile foam [MDB IGNORE] (#17414)
* Fixes plenty instances of 1-tile foam (#71132) ## About The Pull Request All of these from what i heard were supposed to make all foam with range "4" but most of these ranges were stupidly big so Fixes 1 tile foam that was apparently not fixed after the foam refactor in: AI Upload Foam Dispensers, with a range of "4" Hygienebot death, with a range of "2" Clown cars taking damage, with a range of "4" and 25u of space lube. (henk) Clown plasmaman envirosuits extinguishment, with a range of "4" and 15u of space lube. (hunke) Soap suicide, with a range of "1" Emagged cleanbots wetting the floor and making foam, with a range of "2" Firebots when exposed to an atmos fire, firefighting foam with a range of "3"  ## Why It's Good For The Game Fixes #68441 Makes firebots less ass Also barely-functional code bad, functional code good ## Changelog 🆑 fix: Fixes 1 tile foam in Foam Dispensers,Clown Cars, Hygiene Bots,Firebots, Soap Suicide, Emagged cleanbots, and the clown plasmaman envirosuit /🆑 * Fixes plenty instances of 1-tile foam Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com>
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
armor = list(MELEE = 50, BULLET = 20, LASER = 20, ENERGY = 20, BOMB = 0, BIO = 0, FIRE = 50, ACID = 30)
|
||||
|
||||
var/uses = 20
|
||||
var/cooldown = 0
|
||||
var/cooldown_time = 100
|
||||
COOLDOWN_DECLARE(foam_cooldown)
|
||||
var/cooldown_time = 10 SECONDS // just about enough cooldown time so you cant waste foam
|
||||
req_access = list(ACCESS_AI_UPLOAD)
|
||||
|
||||
/obj/machinery/ai_slipper/examine(mob/user)
|
||||
@@ -21,7 +21,7 @@
|
||||
/obj/machinery/ai_slipper/update_icon_state()
|
||||
if(machine_stat & BROKEN)
|
||||
return ..()
|
||||
if((machine_stat & NOPOWER) || cooldown_time > world.time || !uses)
|
||||
if((machine_stat & NOPOWER) || !COOLDOWN_FINISHED(src, foam_cooldown) || !uses)
|
||||
icon_state = "[base_icon_state]0"
|
||||
return ..()
|
||||
icon_state = "[base_icon_state]1"
|
||||
@@ -34,12 +34,14 @@
|
||||
if(!uses)
|
||||
to_chat(user, span_warning("[src] is out of foam and cannot be activated!"))
|
||||
return
|
||||
if(cooldown_time > world.time)
|
||||
to_chat(user, span_warning("[src] cannot be activated for <b>[DisplayTimeText(world.time - cooldown_time)]</b>!"))
|
||||
if(!COOLDOWN_FINISHED(src, foam_cooldown))
|
||||
to_chat(user, span_warning("[src] cannot be activated for <b>[DisplayTimeText(COOLDOWN_TIMELEFT(src, foam_cooldown))]</b>!"))
|
||||
return
|
||||
new /obj/effect/particle_effect/fluid/foam(loc)
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new
|
||||
foam.set_up(4, holder = src, location = loc)
|
||||
foam.start()
|
||||
uses--
|
||||
to_chat(user, span_notice("You activate [src]. It now has <b>[uses]</b> uses of foam remaining."))
|
||||
cooldown = world.time + cooldown_time
|
||||
COOLDOWN_START(src, foam_cooldown,cooldown_time)
|
||||
power_change()
|
||||
addtimer(CALLBACK(src, .proc/power_change), cooldown_time)
|
||||
|
||||
@@ -253,6 +253,9 @@
|
||||
return
|
||||
foaming.adjust_wet_stacks(2)
|
||||
|
||||
/// A factory which produces firefighting foam
|
||||
/datum/effect_system/fluid_spread/foam/firefighting
|
||||
effect_type = /obj/effect/particle_effect/fluid/foam/firefighting
|
||||
|
||||
// Metal foam
|
||||
|
||||
|
||||
@@ -113,7 +113,9 @@
|
||||
/obj/item/soap/suicide_act(mob/user)
|
||||
user.say(";FFFFFFFFFFFFFFFFUUUUUUUDGE!!", forced="soap suicide")
|
||||
user.visible_message(span_suicide("[user] lifts [src] to [user.p_their()] mouth and gnaws on it furiously, producing a thick froth! [user.p_they(TRUE)]'ll never get that BB gun now!"))
|
||||
new /obj/effect/particle_effect/fluid/foam(loc)
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new
|
||||
foam.set_up(1, holder = src, location = user.loc)
|
||||
foam.start()
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/soap/proc/should_clean(datum/cleaning_source, atom/atom_to_clean, mob/living/cleaner)
|
||||
|
||||
@@ -131,4 +131,8 @@
|
||||
extinguishes_left--
|
||||
H.visible_message(span_warning("[H]'s suit spews space lube everywhere!"),span_warning("Your suit spews space lube everywhere!"))
|
||||
H.extinguish_mob()
|
||||
new /obj/effect/particle_effect/fluid/foam(loc) //Truely terrifying.
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new
|
||||
var/datum/reagents/foamreagent = new /datum/reagents(15)
|
||||
foamreagent.add_reagent(/datum/reagent/lube, 15)
|
||||
foam.set_up(4, holder = src, location = loc, carry = foamreagent)
|
||||
foam.start() //Truly terrifying.
|
||||
|
||||
@@ -408,7 +408,9 @@
|
||||
current_floor.MakeSlippery(TURF_WET_WATER, min_wet_time = 20 SECONDS, wet_time_to_add = 15 SECONDS)
|
||||
else
|
||||
visible_message(span_danger("[src] whirs and bubbles violently, before releasing a plume of froth!"))
|
||||
new /obj/effect/particle_effect/fluid/foam(loc)
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new
|
||||
foam.set_up(2, holder = src, location = loc)
|
||||
foam.start()
|
||||
|
||||
/mob/living/simple_animal/bot/cleanbot/explode()
|
||||
var/atom/drop_loc = drop_location()
|
||||
|
||||
@@ -265,7 +265,9 @@
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/atmos_expose(datum/gas_mixture/air, exposed_temperature)
|
||||
if(COOLDOWN_FINISHED(src, foam_cooldown))
|
||||
new /obj/effect/particle_effect/fluid/foam/firefighting(loc)
|
||||
var/datum/effect_system/fluid_spread/foam/firefighting/foam = new
|
||||
foam.set_up(3, holder = src, location = loc)
|
||||
foam.start()
|
||||
COOLDOWN_START(src, foam_cooldown, FOAM_INTERVAL)
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/proc/spray_water(atom/target, mob/user)
|
||||
|
||||
@@ -53,7 +53,9 @@
|
||||
ADD_TRAIT(src, TRAIT_SPRAY_PAINTABLE, INNATE_TRAIT)
|
||||
|
||||
/mob/living/simple_animal/bot/hygienebot/explode()
|
||||
new /obj/effect/particle_effect/fluid/foam(loc)
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new
|
||||
foam.set_up(2, holder = src, location = loc)
|
||||
foam.start()
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -83,7 +83,11 @@
|
||||
. = ..()
|
||||
if(prob(33))
|
||||
visible_message(span_danger("[src] spews out a ton of space lube!"))
|
||||
new /obj/effect/particle_effect/fluid/foam(loc) //YEET
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new
|
||||
var/datum/reagents/foamreagent = new /datum/reagents(25)
|
||||
foamreagent.add_reagent(/datum/reagent/lube, 25)
|
||||
foam.set_up(4, holder = src, location = loc, carry = foamreagent)
|
||||
foam.start()
|
||||
|
||||
/obj/vehicle/sealed/car/clowncar/attacked_by(obj/item/I, mob/living/user)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user