mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
slippery component
This commit is contained in:
@@ -98,15 +98,6 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
|
||||
var/icon_override = null //Used to override hardcoded clothing dmis in human clothing proc.
|
||||
var/sprite_sheets_obj = null //Used to override hardcoded clothing inventory object dmis in human clothing proc.
|
||||
|
||||
var/trip_verb = TV_TRIP
|
||||
var/trip_chance = 0
|
||||
|
||||
var/trip_stun = 0
|
||||
var/trip_weaken = 0
|
||||
var/trip_any = FALSE
|
||||
var/trip_walksafe = TRUE
|
||||
var/trip_tiles = 0
|
||||
|
||||
//Tooltip vars
|
||||
var/in_inventory = FALSE //is this item equipped into an inventory slot or hand of a mob?
|
||||
var/tip_timer = 0
|
||||
@@ -606,16 +597,6 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
|
||||
/obj/item/proc/is_equivalent(obj/item/I)
|
||||
return I == src
|
||||
|
||||
/obj/item/Crossed(atom/movable/AM, oldloc)
|
||||
. = ..()
|
||||
if(prob(trip_chance) && ishuman(AM))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
on_trip(H)
|
||||
|
||||
/obj/item/proc/on_trip(mob/living/carbon/human/H)
|
||||
if(H.slip(src, trip_stun, trip_weaken, trip_tiles, trip_walksafe, trip_any, trip_verb))
|
||||
return TRUE
|
||||
|
||||
/obj/item/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
return
|
||||
|
||||
|
||||
@@ -13,22 +13,12 @@
|
||||
/obj/item/grenade/clown_grenade/prime()
|
||||
..()
|
||||
playsound(src.loc, 'sound/items/bikehorn.ogg', 25, -3)
|
||||
/*
|
||||
for(var/turf/simulated/floor/T in view(affected_area, src.loc))
|
||||
if(prob(75))
|
||||
banana(T)
|
||||
*/
|
||||
var/i = 0
|
||||
var/number = 0
|
||||
for(var/direction in GLOB.alldirs)
|
||||
for(i = 0; i < 2; i++)
|
||||
number++
|
||||
var/obj/item/grown/bananapeel/traitorpeel/peel = new /obj/item/grown/bananapeel/traitorpeel(get_turf(src.loc))
|
||||
/* var/direction = pick(alldirs)
|
||||
var/spaces = pick(1;150, 2)
|
||||
var/a = 0
|
||||
for(a = 0; a < spaces; a++)
|
||||
step(peel,direction)*/
|
||||
var/a = 1
|
||||
if(number & 2)
|
||||
for(a = 1; a <= 2; a++)
|
||||
@@ -39,21 +29,17 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/grown/bananapeel/traitorpeel
|
||||
trip_stun = 0
|
||||
trip_weaken = 7
|
||||
trip_tiles = 4
|
||||
trip_walksafe = FALSE
|
||||
|
||||
trip_chance = 100
|
||||
|
||||
|
||||
/obj/item/grown/bananapeel/traitorpeel/on_trip(mob/living/carbon/human/H)
|
||||
/obj/item/grown/bananapeel/traitorpeel/New(newloc, obj/item/seeds/new_seed)
|
||||
. = ..()
|
||||
if(.)
|
||||
to_chat(H, "<span class='warning'>Your feet feel like they're on fire!</span>")
|
||||
H.take_overall_damage(0, rand(2,8))
|
||||
H.take_organ_damage(2) // Was 5 -- TLE
|
||||
// The reason this AddComponent is here and not in ComponentInitialize() is because if it's put there, it will be ran before the parent New proc for /grown types.
|
||||
// And then be overriden by the generic component placed onto it by the `/datum/plant_gene/trait/slip`.
|
||||
AddComponent(/datum/component/slippery, src, 0, 7, 100, 4, FALSE)
|
||||
|
||||
/obj/item/grown/bananapeel/traitorpeel/after_slip(mob/living/carbon/human/H)
|
||||
to_chat(H, "<span class='warning'>Your feet feel like they're on fire!</span>")
|
||||
H.take_overall_damage(0, rand(2,8))
|
||||
H.take_organ_damage(2)
|
||||
return ..()
|
||||
|
||||
/obj/item/grown/bananapeel/traitorpeel/throw_impact(atom/hit_atom)
|
||||
var/burned = rand(1,3)
|
||||
|
||||
@@ -11,15 +11,11 @@
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
discrete = 1
|
||||
|
||||
trip_stun = 4
|
||||
trip_weaken = 2
|
||||
trip_chance = 100
|
||||
trip_walksafe = FALSE
|
||||
trip_verb = TV_SLIP
|
||||
|
||||
var/cleanspeed = 50 //slower than mop
|
||||
|
||||
/obj/item/soap/ComponentInitialize()
|
||||
AddComponent(/datum/component/slippery, src, 4, 2, 100, 0, FALSE)
|
||||
|
||||
/obj/item/soap/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
|
||||
|
||||
Reference in New Issue
Block a user