mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Ports duplicated slipping code to a component (#29628)
* Ports duplicated slipping code to a component * Makes metal not slippery * asdf * Instead of cherry picking like an idiot I could just copy paster * OOP * And blood, don't forget Fry's blood! * Further fixes * A more generic fashion * Use the new system * Fixes * Fix cartridge type * Remove inertia
This commit is contained in:
@@ -29,6 +29,9 @@
|
||||
metal = ALUMINUM_FOAM
|
||||
icon_state = "mfoam"
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/MakeSlippery()
|
||||
return
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/iron
|
||||
name = "iron foam"
|
||||
metal = IRON_FOAM
|
||||
@@ -38,12 +41,16 @@
|
||||
metal = RESIN_FOAM
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/New(loc)
|
||||
..(loc)
|
||||
/obj/effect/particle_effect/foam/Initialize()
|
||||
. = ..()
|
||||
MakeSlippery()
|
||||
create_reagents(1000) //limited by the size of the reagent holder anyway.
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/MakeSlippery()
|
||||
AddComponent(/datum/component/slippery, 100)
|
||||
|
||||
/obj/effect/particle_effect/foam/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return ..()
|
||||
@@ -101,15 +108,6 @@
|
||||
lifetime--
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/foam/Crossed(atom/movable/AM)
|
||||
if(istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
M.slip(100, src)
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/Crossed(atom/movable/AM)
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/spread_foam()
|
||||
var/turf/t_loc = get_turf(src)
|
||||
for(var/turf/T in t_loc.GetAtmosAdjacentTurfs())
|
||||
|
||||
@@ -7,16 +7,20 @@
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. The surface is coated with polytetrafluoroethylene and banana drippings."
|
||||
ttone = "honk"
|
||||
|
||||
/obj/item/device/pda/clown/Crossed(AM as mob|obj)
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
if(M.slip(120, src, NO_SLIP_WHEN_WALKING))
|
||||
if (ishuman(M) && (M.real_name != src.owner))
|
||||
if (istype(src.cartridge, /obj/item/weapon/cartridge/virus/clown))
|
||||
var/obj/item/weapon/cartridge/virus/cart = src.cartridge
|
||||
if(cart.charges < 5)
|
||||
cart.charges++
|
||||
/obj/item/device/pda/clown/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/slippery, 120, NO_SLIP_WHEN_WALKING)
|
||||
|
||||
/obj/item/device/pda/clown/ComponentActivated(datum/component/C)
|
||||
..()
|
||||
var/datum/component/slippery/S = C
|
||||
if(!istype(S))
|
||||
return
|
||||
var/mob/living/carbon/human/M = S.slip_victim
|
||||
if (istype(M) && (M.real_name != src.owner))
|
||||
var/obj/item/weapon/cartridge/virus/clown/cart = cartridge
|
||||
if(istype(cart) && cart.charges < 5)
|
||||
cart.charges++
|
||||
|
||||
// Special AI/pAI PDAs that cannot explode.
|
||||
/obj/item/device/pda/ai
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
var/cleanspeed = 50 //slower than mop
|
||||
force_string = "robust... against germs"
|
||||
|
||||
/obj/item/weapon/soap/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/slippery, 80)
|
||||
|
||||
/obj/item/weapon/soap/nanotrasen
|
||||
desc = "A Nanotrasen brand bar of soap. Smells of plasma."
|
||||
icon_state = "soapnt"
|
||||
@@ -48,11 +52,6 @@
|
||||
new /obj/effect/particle_effect/foam(loc)
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/weapon/soap/Crossed(AM as mob|obj)
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
M.slip(80, src)
|
||||
|
||||
/obj/item/weapon/soap/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity || !check_allowed_items(target))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user