From 59e41c20bfd33514ae1ae6b5a9c3852bb8559860 Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Mon, 27 Jan 2020 23:09:34 -0700
Subject: [PATCH] changes
---
code/modules/pool/pool_controller.dm | 22 +++++++++++++---------
code/modules/pool/pool_structures.dm | 20 +++++++++++++-------
2 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/code/modules/pool/pool_controller.dm b/code/modules/pool/pool_controller.dm
index e579ea1ab2..d56dbddf90 100644
--- a/code/modules/pool/pool_controller.dm
+++ b/code/modules/pool/pool_controller.dm
@@ -111,6 +111,7 @@
reagents.remove_all(INFINITY)
visible_message("[user] drains [src].")
say("Reagents cleared.")
+ update_color()
/obj/machinery/pool/controller/attackby(obj/item/W, mob/user)
if(shocked && !(stat & NOPOWER))
@@ -148,6 +149,7 @@
if(length(rejected))
rejected = english_list(rejected)
to_chat(user, "[src] rejects the following chemicals as they do not have at least [min_reagent_amount] units of volume: [rejected]")
+ update_color()
else
to_chat(user, "[src] beeps unpleasantly as it rejects the beaker. Why are you trying to feed it an empty beaker?")
return
@@ -252,17 +254,19 @@
var/turf/open/pool/color1 = X
if(bloody)
if(rcolor)
- color1.watereffect.color = BlendRGB(rgb(150, 20, 20), rcolor, 0.5)
- color1.watertop.color = color1.watereffect.color
- else
- color1.watereffect.color = rgb(150, 20, 20)
- color1.watertop.color = color1.watereffect.color
+ var/thecolor = BlendRGB(rgb(150, 20, 20), rcolor, 0.5)
+ color1.watereffect.add_atom_colour(thecolor, FIXED_COLOUR_PRIORITY)
+ color1.watertop.add_atom_colour(thecolor, FIXED_COLOUR_PRIORITY)
+
+ var/thecolor = rgb(150, 20, 20)
+ color1.watereffect.add_atom_colour(thecolor, FIXED_COLOUR_PRIORITY)
+ color1.watertop.add_atom_colour(thecolor, FIXED_COLOUR_PRIORITY)
else if(!bloody && rcolor)
- color1.watereffect.color = rcolor
- color1.watertop.color = color1.watereffect.color
+ color1.watereffect.add_atom_colour(rcolor, FIXED_COLOUR_PRIORITY)
+ color1.watertop.add_atom_colour(rcolor, FIXED_COLOUR_PRIORITY)
else
- color1.watereffect.color = null
- color1.watertop.color = null
+ color1.watereffect.remove_atom_colour(FIXED_COLOUR_PRIORITY)
+ color1.watertop.remove_atom_colour(FIXED_COLOUR_PRIORITY)
/obj/machinery/pool/controller/proc/update_temp()
if(mist_state)
diff --git a/code/modules/pool/pool_structures.dm b/code/modules/pool/pool_structures.dm
index bf6181df2e..28120e1cb2 100644
--- a/code/modules/pool/pool_structures.dm
+++ b/code/modules/pool/pool_structures.dm
@@ -40,15 +40,17 @@
var/jumping = FALSE
var/timer
-/obj/structure/pool/Lboard/proc/backswim(obj/O, mob/living/user) //Puts the sprite back to it's maiden condition after a jump.
+/obj/structure/pool/Lboard/proc/backswim()
if(jumping)
for(var/mob/living/jumpee in loc) //hackzors.
playsound(jumpee, 'sound/effects/splash.ogg', 60, TRUE, 1)
- jumpee.layer = 4
- jumpee.pixel_x = 0
- jumpee.pixel_y = 0
- jumpee.Stun(2)
jumpee.AddElement(/datum/element/swimming)
+ jumpee.Stun(2)
+
+/obj/structure/pool/Lboard/proc/reset_position(mob/user, initial_layer, initial_px, initial_py)
+ user.layer = initial_layer
+ user.pixel_x = initial_px
+ user.pixel_y = initial_py
/obj/structure/pool/Lboard/attack_hand(mob/living/user)
if(iscarbon(user))
@@ -65,15 +67,18 @@
"You climb up \the [src] and prepares to jump!")
jumper.Stun(40)
jumping = TRUE
+ var/original_layer = jumper.layer
+ var/original_px = jumper.pixel_x
+ var/original_py = jumper.pixel_y
jumper.layer = RIPPLE_LAYER
jumper.pixel_x = 3
jumper.pixel_y = 7
jumper.dir = 8
sleep(1)
jumper.forceMove(T)
- addtimer(CALLBACK(src, .proc/dive, jumper), 10)
+ addtimer(CALLBACK(src, .proc/dive, jumper, original_layer, original_px, original_py), 10)
-/obj/structure/pool/Lboard/proc/dive(mob/living/carbon/jumper)
+/obj/structure/pool/Lboard/proc/dive(mob/living/carbon/jumper, original_layer, original_px, original_py)
switch(rand(1, 100))
if(1 to 20)
jumper.visible_message("[jumper] goes for a small dive!", \
@@ -138,6 +143,7 @@
var/atom/throw_target = get_edge_target_turf(src, dir)
jumper.throw_at(throw_target, 6, 1, callback = CALLBACK(src, .proc/on_finish_jump, jumper))
addtimer(CALLBACK(src, .proc/togglejumping), 35)
+ reset_position(jumper, original_layer, original_px, original_py)
/obj/structure/pool/Lboard/proc/togglejumping()
jumping = FALSE