mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Finally fixed those clean_blood() calls so they update mob-overlays properly. Resolves issue 681. Fixes space-cleaner grenades/splashing/spraying, Soap (work-around), Showers (again) and Janitor-borgs.
Fixed putting ammo in RCDs, resolves issue 696. Removed a little spam-text from RCDs too. Removed some dyslexia from spesscash. added an undef for LEGCUFF_LAYER git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4209 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -39,12 +39,13 @@ RCD
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/rcd_ammo))
|
||||
if((matter + 10) > 30)
|
||||
user << "The RCD cant hold any more matter."
|
||||
user << "<span class='notice'>The RCD cant hold any more matter-units.</span>"
|
||||
return
|
||||
user.drop_item()
|
||||
del(W)
|
||||
matter += 10
|
||||
playsound(src.loc, 'click.ogg', 50, 1)
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
user << "<span class='notice'>The RCD now holds [matter]/30 matter-units.</span>"
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
|
||||
@@ -52,21 +53,22 @@ RCD
|
||||
attack_self(mob/user as mob)
|
||||
//Change the mode
|
||||
playsound(src.loc, 'pop.ogg', 50, 0)
|
||||
if(mode == 1)
|
||||
mode = 2
|
||||
user << "Changed mode to 'Airlock'"
|
||||
src.spark_system.start()
|
||||
return
|
||||
if(mode == 2)
|
||||
mode = 3
|
||||
user << "Changed mode to 'Deconstruct'"
|
||||
src.spark_system.start()
|
||||
return
|
||||
if(mode == 3)
|
||||
mode = 1
|
||||
user << "Changed mode to 'Floor & Walls'"
|
||||
src.spark_system.start()
|
||||
return
|
||||
switch(mode)
|
||||
if(1)
|
||||
mode = 2
|
||||
user << "<span class='notice'>Changed mode to 'Airlock'</span>"
|
||||
src.spark_system.start()
|
||||
return
|
||||
if(2)
|
||||
mode = 3
|
||||
user << "<span class='notice'>Changed mode to 'Deconstruct'</span>"
|
||||
src.spark_system.start()
|
||||
return
|
||||
if(3)
|
||||
mode = 1
|
||||
user << "<span class='notice'>Changed mode to 'Floor & Walls'</span>"
|
||||
src.spark_system.start()
|
||||
return
|
||||
|
||||
|
||||
afterattack(atom/A, mob/user as mob)
|
||||
@@ -79,18 +81,15 @@ RCD
|
||||
|
||||
if(istype(A, /turf) && mode == 1)
|
||||
if(istype(A, /turf/space) && matter >= 1)
|
||||
user << "Building Floor (1)..."
|
||||
if(!disabled && matter >= 1)
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
A:ReplaceWithPlating()
|
||||
matter--
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
if(istype(A, /turf/simulated/floor) && matter >= 3)
|
||||
user << "Building Wall (3)..."
|
||||
playsound(src.loc, 'click.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if(!disabled && matter >= 3)
|
||||
@@ -99,7 +98,6 @@ RCD
|
||||
A:ReplaceWithWall()
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
matter -= 3
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
else if(istype(A, /turf/simulated/floor) && mode == 2 && matter >= 10)
|
||||
@@ -118,7 +116,6 @@ RCD
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(src.loc, 'sparks2.ogg', 50, 1)
|
||||
matter -= 10
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
else if(mode == 3 && (istype(A, /turf) || istype(A, /obj/machinery/door/airlock) ) )
|
||||
@@ -132,7 +129,6 @@ RCD
|
||||
A:ReplaceWithPlating()
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
matter -= 4
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
if(istype(A, /turf/simulated/wall/r_wall))
|
||||
@@ -147,7 +143,6 @@ RCD
|
||||
A:ReplaceWithSpace()
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
matter -= 5
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
if(istype(A, /obj/machinery/door/airlock) && matter >= 10)
|
||||
@@ -160,6 +155,5 @@ RCD
|
||||
del(A)
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
matter -= 10
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
|
||||
@@ -44,11 +44,15 @@ BIKE HORN
|
||||
M.Weaken(2)
|
||||
|
||||
/obj/item/weapon/soap/afterattack(atom/target, mob/user as mob)
|
||||
if(istype(target,/obj/effect/decal/cleanable))
|
||||
user << "\blue You scrub \the [target.name] out."
|
||||
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
|
||||
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
|
||||
if(user.client && (target in user.client.screen))
|
||||
user << "<span class='notice'>You need to take that [target.name] off before cleaning it.</span>"
|
||||
else if(istype(target,/obj/effect/decal/cleanable))
|
||||
user << "<span class='notice'>You scrub \the [target.name] out.</span>"
|
||||
del(target)
|
||||
else
|
||||
user << "\blue You clean \the [target.name]."
|
||||
user << "<span class='notice'>You clean \the [target.name].</span>"
|
||||
target.clean_blood()
|
||||
return
|
||||
|
||||
|
||||
@@ -361,12 +361,9 @@
|
||||
obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
|
||||
src.reagents.reaction(A,1,10)
|
||||
A.clean_blood()
|
||||
for(var/obj/effect/rune/R in A)
|
||||
del(R)
|
||||
for(var/obj/effect/decal/cleanable/R in A)
|
||||
del(R)
|
||||
for(var/obj/effect/overlay/R in A)
|
||||
del(R)
|
||||
for(var/obj/effect/O in A)
|
||||
if( istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay) )
|
||||
del(O)
|
||||
|
||||
|
||||
/obj/effect/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
@@ -201,45 +201,38 @@
|
||||
/obj/machinery/shower/proc/wash(atom/movable/O as obj|mob)
|
||||
if(!on) return
|
||||
|
||||
if(istype(O, /mob/living/carbon))
|
||||
var/mob/living/carbon/monkey = O //it's not necessarily a monkey, but >accurate varnames
|
||||
if(monkey.r_hand)
|
||||
monkey.r_hand.clean_blood()
|
||||
if(monkey.l_hand)
|
||||
monkey.l_hand.clean_blood()
|
||||
if(monkey.wear_mask)
|
||||
monkey.wear_mask.clean_blood()
|
||||
monkey.update_inv_wear_mask(0)
|
||||
|
||||
if(istype(O, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/washer = O
|
||||
if(washer.head)
|
||||
washer.head.clean_blood()
|
||||
washer.update_inv_head(0)
|
||||
if(washer.wear_suit)
|
||||
washer.wear_suit.clean_blood()
|
||||
washer.update_inv_wear_suit(0)
|
||||
else if(washer.w_uniform)
|
||||
washer.w_uniform.clean_blood()
|
||||
washer.update_inv_w_uniform(0)
|
||||
if(washer.shoes)
|
||||
washer.shoes.clean_blood()
|
||||
washer.update_inv_shoes(0)
|
||||
if(washer.gloves)
|
||||
washer.gloves.clean_blood()
|
||||
// washer.update_inv_gloves(0) //no need for this one since it's located in clean_blood too.
|
||||
if(iscarbon(O))
|
||||
var/mob/living/carbon/M = O
|
||||
if(M.r_hand)
|
||||
M.r_hand.clean_blood()
|
||||
if(M.l_hand)
|
||||
M.l_hand.clean_blood()
|
||||
if(M.wear_mask)
|
||||
M.wear_mask.clean_blood()
|
||||
M.update_inv_wear_mask(0)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.head)
|
||||
H.head.clean_blood()
|
||||
H.update_inv_head(0)
|
||||
if(H.wear_suit)
|
||||
H.wear_suit.clean_blood()
|
||||
H.update_inv_wear_suit(0)
|
||||
else if(H.w_uniform)
|
||||
H.w_uniform.clean_blood()
|
||||
H.update_inv_w_uniform(0)
|
||||
if(H.shoes)
|
||||
H.shoes.clean_blood()
|
||||
H.update_inv_shoes(0)
|
||||
|
||||
O.clean_blood()
|
||||
|
||||
if(loc)
|
||||
var/turf/tile = get_turf(loc)
|
||||
if(isturf(loc))
|
||||
var/turf/tile = loc
|
||||
loc.clean_blood()
|
||||
for(var/obj/effect/rune/R in tile)
|
||||
del(R)
|
||||
for(var/obj/effect/decal/cleanable/R in tile)
|
||||
del(R)
|
||||
for(var/obj/effect/overlay/R in tile)
|
||||
del(R)
|
||||
for(var/obj/effect/E in tile)
|
||||
if(istype(E,/obj/effect/rune) || istype(E,/obj/effect/decal/cleanable) || istype(E,/obj/effect/overlay))
|
||||
del(E)
|
||||
|
||||
/obj/machinery/shower/process()
|
||||
if(!on || !mobpresent) return
|
||||
@@ -298,18 +291,7 @@
|
||||
|
||||
if(M.loc != location) return //Person has moved away from the sink
|
||||
|
||||
if(istype(M, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = M
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/washer = C
|
||||
if(washer.gloves) //if they have gloves
|
||||
washer.gloves.clean_blood() //clean the gloves
|
||||
washer.update_inv_gloves() //update our overlays
|
||||
else //and if they don't,
|
||||
washer.clean_blood() //wash their hands (a mob being bloody means they are 'red handed')
|
||||
//overlays will be updated in clean_blood()
|
||||
else
|
||||
C.clean_blood() //other things that can't wear gloves should just wash the mob.
|
||||
M.clean_blood()
|
||||
for(var/mob/V in viewers(src, null))
|
||||
V.show_message("\blue [M] washes their hands using \the [src].")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user