mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Merge pull request #13558 from SteelSlayer/slippery-component
Adds the slippery component
This commit is contained in:
@@ -160,11 +160,11 @@
|
||||
T.on_cross(src, AM)
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/on_trip(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
if(. && seed)
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_slip(src, H)
|
||||
/obj/item/reagent_containers/food/snacks/grown/after_slip(mob/living/carbon/human/H)
|
||||
if(!seed)
|
||||
return
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_slip(src, H)
|
||||
|
||||
// Glow gene procs
|
||||
/obj/item/reagent_containers/food/snacks/grown/generate_trash(atom/location)
|
||||
|
||||
@@ -118,12 +118,10 @@
|
||||
/obj/item/grown/bananapeel/specialpeel //used by /obj/item/clothing/shoes/clown_shoes/banana_shoes
|
||||
name = "synthesized banana peel"
|
||||
desc = "A synthetic banana peel."
|
||||
trip_stun = 2
|
||||
trip_weaken = 2
|
||||
trip_chance = 100
|
||||
trip_walksafe = FALSE
|
||||
trip_verb = TV_SLIP
|
||||
|
||||
/obj/item/grown/bananapeel/specialpeel/on_trip(mob/living/carbon/human/H)
|
||||
if(..())
|
||||
qdel(src)
|
||||
/obj/item/grown/bananapeel/specialpeel/ComponentInitialize()
|
||||
AddComponent(/datum/component/slippery, src, 2, 2, 100, 0, FALSE)
|
||||
|
||||
/obj/item/grown/bananapeel/specialpeel/after_slip(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
qdel(src)
|
||||
|
||||
@@ -57,11 +57,11 @@
|
||||
T.on_cross(src, AM)
|
||||
..()
|
||||
|
||||
/obj/item/grown/on_trip(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
if(. && seed)
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_slip(src, H)
|
||||
/obj/item/grown/after_slip(mob/living/carbon/human/H)
|
||||
if(!seed)
|
||||
return
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_slip(src, H)
|
||||
|
||||
/obj/item/grown/throw_impact(atom/hit_atom)
|
||||
if(!..()) //was it caught by a mob?
|
||||
|
||||
@@ -217,11 +217,7 @@
|
||||
|
||||
stun_len = min(stun_len, 7) // No fun allowed
|
||||
|
||||
G.trip_stun = stun_len
|
||||
G.trip_weaken = stun_len
|
||||
G.trip_chance = 100
|
||||
G.trip_verb = TV_SLIP
|
||||
G.trip_walksafe = FALSE
|
||||
G.AddComponent(/datum/component/slippery, G, stun_len, stun_len, 100, 0, FALSE)
|
||||
|
||||
/datum/plant_gene/trait/cell_charge
|
||||
// Cell recharging trait. Charges all mob's power cells to (potency*rate)% mark when eaten.
|
||||
|
||||
@@ -977,25 +977,30 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
|
||||
|
||||
/mob/living/carbon/proc/slip(description, stun, weaken, tilesSlipped, walkSafely, slipAny, slipVerb = "slip")
|
||||
if(flying || buckled || (walkSafely && m_intent == MOVE_INTENT_WALK))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if((lying) && (!(tilesSlipped)))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(!(slipAny))
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(isobj(H.shoes) && H.shoes.flags & NOSLIP)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(tilesSlipped)
|
||||
for(var/t = 0, t<=tilesSlipped, t++)
|
||||
spawn (t) step(src, src.dir)
|
||||
for(var/i in 1 to tilesSlipped)
|
||||
spawn(i)
|
||||
step(src, dir)
|
||||
|
||||
stop_pulling()
|
||||
to_chat(src, "<span class='notice'>You [slipVerb]ped on [description]!</span>")
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
playsound(loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
// Something something don't run with scissors
|
||||
moving_diagonally = 0 //If this was part of diagonal move slipping will stop it.
|
||||
Stun(stun)
|
||||
Weaken(weaken)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/proc/can_eat(flags = 255)
|
||||
return 1
|
||||
|
||||
@@ -38,11 +38,8 @@
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. The surface is coated with polytetrafluoroethylene and banana drippings."
|
||||
ttone = "honk"
|
||||
|
||||
trip_stun = 8
|
||||
trip_weaken = 5
|
||||
trip_chance = 100
|
||||
trip_walksafe = TRUE
|
||||
trip_verb = TV_SLIP
|
||||
/obj/item/pda/clown/ComponentInitialize()
|
||||
AddComponent(/datum/component/slippery, src, 8, 5, 100)
|
||||
|
||||
/obj/item/pda/mime
|
||||
default_cartridge = /obj/item/cartridge/mime
|
||||
@@ -191,7 +188,7 @@
|
||||
var/datum/data/pda/app/messenger/M = find_program(/datum/data/pda/app/messenger)
|
||||
if(M)
|
||||
M.m_hidden = 1
|
||||
|
||||
|
||||
//Some spare PDAs in a box
|
||||
/obj/item/storage/box/PDAs
|
||||
name = "spare PDAs"
|
||||
|
||||
Reference in New Issue
Block a user