ports "Adds superlube to the clown ruin" and buffs clown PDAs
This commit is contained in:
@@ -203,11 +203,12 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache)
|
||||
#define LOCKED_SENSORS 2
|
||||
|
||||
//Wet floor type flags. Stronger ones should be higher in number.
|
||||
#define TURF_DRY 0
|
||||
#define TURF_WET_WATER 1
|
||||
#define TURF_WET_PERMAFROST 2
|
||||
#define TURF_WET_ICE 4
|
||||
#define TURF_WET_LUBE 8
|
||||
#define TURF_DRY (0)
|
||||
#define TURF_WET_WATER (1<<0)
|
||||
#define TURF_WET_PERMAFROST (1<<1)
|
||||
#define TURF_WET_ICE (1<<2)
|
||||
#define TURF_WET_LUBE (1<<3)
|
||||
#define TURF_WET_SUPERLUBE (1<<4)
|
||||
|
||||
#define IS_WET_OPEN_TURF(O) O.GetComponent(/datum/component/wet_floor)
|
||||
|
||||
|
||||
@@ -201,6 +201,8 @@
|
||||
#define SLIDE (1<<1)
|
||||
#define GALOSHES_DONT_HELP (1<<2)
|
||||
#define SLIDE_ICE (1<<3)
|
||||
#define SLIP_WHEN_CRAWLING (1<<4) //clown planet ruin
|
||||
#define SLIP_WHEN_JOGGING (1<<5) //slips prevented by walking are also dodged if the mob is not sprinting or fatigued... unless this flag is on.
|
||||
|
||||
#define MAX_CHICKENS 50
|
||||
|
||||
|
||||
@@ -88,6 +88,9 @@
|
||||
if(TURF_WET_PERMAFROST)
|
||||
intensity = 120
|
||||
lube_flags = SLIDE_ICE | GALOSHES_DONT_HELP
|
||||
if(TURF_WET_SUPERLUBE)
|
||||
intensity = 120
|
||||
lube_flags = SLIDE | GALOSHES_DONT_HELP | SLIP_WHEN_CRAWLING
|
||||
else
|
||||
qdel(parent.GetComponent(/datum/component/slippery))
|
||||
return
|
||||
@@ -159,7 +162,7 @@
|
||||
//NB it's possible we get deleted after this, due to inherit
|
||||
|
||||
/datum/component/wet_floor/proc/add_wet(type, duration_minimum = 0, duration_add = 0, duration_maximum = MAXIMUM_WET_TIME, _permanent = FALSE)
|
||||
var/static/list/allowed_types = list(TURF_WET_WATER, TURF_WET_LUBE, TURF_WET_ICE, TURF_WET_PERMAFROST)
|
||||
var/static/list/allowed_types = list(TURF_WET_WATER, TURF_WET_LUBE, TURF_WET_ICE, TURF_WET_PERMAFROST, TURF_WET_SUPERLUBE)
|
||||
if(duration_minimum <= 0 || !type)
|
||||
return FALSE
|
||||
if(type in allowed_types)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/obj/item/pda/clown/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/slippery, 120, NO_SLIP_WHEN_WALKING, CALLBACK(src, .proc/AfterSlip))
|
||||
AddComponent(/datum/component/slippery, 120, NO_SLIP_WHEN_WALKING|SLIP_WHEN_JOGGING, CALLBACK(src, .proc/AfterSlip))
|
||||
|
||||
/obj/item/pda/clown/proc/AfterSlip(mob/living/carbon/human/M)
|
||||
if (istype(M) && (M.real_name != owner))
|
||||
|
||||
@@ -267,14 +267,15 @@
|
||||
if(!(lube&GALOSHES_DONT_HELP)) //can't slip while buckled unless it's lube.
|
||||
return 0
|
||||
else
|
||||
if(C.lying || !(C.status_flags & CANKNOCKDOWN)) // can't slip unbuckled mob if they're lying or can't fall.
|
||||
if((lube&SLIP_WHEN_CRAWLING) && (!(C.lying || !(C.status_flags & CANKNOCKDOWN))) // can't slip unbuckled mob if they're lying or can't fall.
|
||||
return 0
|
||||
if(C.m_intent == MOVE_INTENT_WALK && (lube&NO_SLIP_WHEN_WALKING))
|
||||
return 0
|
||||
if(ishuman(C) && (lube&NO_SLIP_WHEN_WALKING))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(!H.sprinting && H.getStaminaLoss() <= 20)
|
||||
if(lube & NO_SLIP_WHEN_WALKING)
|
||||
if(C.m_intent == MOVE_INTENT_WALK)
|
||||
return 0
|
||||
if(ishuman(C) && !(lube & SLIP_WHEN_JOGGING))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(!H.sprinting && H.getStaminaLoss() <= 20)
|
||||
return 0
|
||||
if(!(lube&SLIDE_ICE))
|
||||
to_chat(C, "<span class='notice'>You slipped[ O ? " on the [O.name]" : ""]!</span>")
|
||||
playsound(C.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
|
||||
Reference in New Issue
Block a user