mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 06:34:45 +01:00
Converts no slip into a trait (#23140)
* makes noslips work * trait part * THE REST * it didnt conflict too much actually * this was intended, whoops lol * no more processing * consistency * lewc review * Apply suggestions from code review --------- Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
@@ -525,7 +525,7 @@
|
||||
icon_state = "black"
|
||||
item_color = "black"
|
||||
desc = "A pair of black shoes."
|
||||
flags = NOSLIP
|
||||
no_slip = TRUE
|
||||
|
||||
/obj/item/clothing/shoes/chameleon/noslip/broken/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -466,6 +466,7 @@
|
||||
var/chained = FALSE
|
||||
var/can_cut_open = FALSE
|
||||
var/cut_open = FALSE
|
||||
var/no_slip = FALSE
|
||||
body_parts_covered = FEET
|
||||
slot_flags = SLOT_FLAG_FEET
|
||||
|
||||
@@ -480,6 +481,20 @@
|
||||
"Drask" = 'icons/mob/clothing/species/drask/shoes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/shoes/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
if(!no_slip || slot != SLOT_HUD_SHOES)
|
||||
return
|
||||
ADD_TRAIT(user, TRAIT_NOSLIP, UID())
|
||||
|
||||
/obj/item/clothing/shoes/dropped(mob/user)
|
||||
..()
|
||||
if(!no_slip)
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.get_item_by_slot(SLOT_HUD_SHOES) == src)
|
||||
REMOVE_TRAIT(H, TRAIT_NOSLIP, UID())
|
||||
|
||||
/obj/item/clothing/shoes/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/match) && src.loc == user)
|
||||
var/obj/item/match/M = I
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
var/slowdown_active = 2
|
||||
var/slowdown_passive = SHOES_SLOWDOWN
|
||||
var/magpulse_name = "mag-pulse traction system"
|
||||
///If a pair of magboots has different icons for being on or off
|
||||
var/multiple_icons = TRUE
|
||||
actions_types = list(/datum/action/item_action/toggle)
|
||||
strip_delay = 70
|
||||
put_on_delay = 70
|
||||
@@ -34,14 +36,16 @@
|
||||
toggle_magpulse(user, forced)
|
||||
|
||||
/obj/item/clothing/shoes/magboots/proc/toggle_magpulse(mob/user, forced)
|
||||
if(magpulse)
|
||||
flags &= ~NOSLIP
|
||||
if(magpulse) //magpulse and no_slip will always be the same value unless VV happens
|
||||
REMOVE_TRAIT(user, TRAIT_NOSLIP, UID())
|
||||
slowdown = slowdown_passive
|
||||
else
|
||||
flags |= NOSLIP
|
||||
ADD_TRAIT(user, TRAIT_NOSLIP, UID())
|
||||
slowdown = slowdown_active
|
||||
magpulse = !magpulse
|
||||
icon_state = "[magboot_state][magpulse]"
|
||||
no_slip = !no_slip
|
||||
if(multiple_icons)
|
||||
icon_state = "[magboot_state][magpulse]"
|
||||
if(!forced)
|
||||
to_chat(user, "You [magpulse ? "enable" : "disable"] the [magpulse_name].")
|
||||
user.update_inv_shoes() //so our mob-overlays update
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
desc = "High speed, no drag combat boots."
|
||||
permeability_coefficient = 0.01
|
||||
armor = list(MELEE = 35, BULLET = 20, LASER = 15, ENERGY = 15, BOMB = 50, RAD = 20, FIRE = 450, ACID = 50)
|
||||
flags = NOSLIP
|
||||
no_slip = TRUE
|
||||
|
||||
/obj/item/clothing/shoes/sandal
|
||||
name = "sandals"
|
||||
@@ -45,7 +45,7 @@
|
||||
desc = "A pair of yellow rubber boots, designed to prevent slipping on wet surfaces."
|
||||
icon_state = "galoshes"
|
||||
permeability_coefficient = 0.05
|
||||
flags = NOSLIP
|
||||
no_slip = TRUE
|
||||
slowdown = SHOES_SLOWDOWN+1
|
||||
strip_delay = 50
|
||||
put_on_delay = 50
|
||||
|
||||
@@ -207,12 +207,11 @@
|
||||
species_restricted = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/clothing/species/vox/feet.dmi')
|
||||
multiple_icons = FALSE
|
||||
|
||||
/obj/item/clothing/shoes/magboots/vox/attack_self(mob/user)
|
||||
if(magpulse)
|
||||
flags &= ~NOSLIP
|
||||
magpulse = FALSE
|
||||
flags |= NODROP
|
||||
flags &= ~NODROP
|
||||
to_chat(user, "You relax your deathgrip on the flooring.")
|
||||
else
|
||||
//make sure these can only be used when equipped.
|
||||
@@ -222,20 +221,18 @@
|
||||
if(H.shoes != src)
|
||||
to_chat(user, "<span class='warning>You will have to put on [src] before you can do that.</span>")
|
||||
return
|
||||
|
||||
flags |= NOSLIP
|
||||
magpulse = TRUE
|
||||
flags &= ~NODROP //kinda hard to take off magclaws when you are gripping them tightly.
|
||||
flags |= NODROP //kinda hard to take off magclaws when you are gripping them tightly.
|
||||
to_chat(user, "You dig your claws deeply into the flooring, bracing yourself.")
|
||||
to_chat(user, "It would be hard to take off [src] without relaxing your grip first.")
|
||||
return ..()
|
||||
|
||||
//In case they somehow come off while enabled.
|
||||
/obj/item/clothing/shoes/magboots/vox/dropped(mob/user as mob)
|
||||
..()
|
||||
if(magpulse)
|
||||
user.visible_message("[src] go limp as they are removed from [usr]'s feet.", "[src] go limp as they are removed from your feet.")
|
||||
flags &= ~NOSLIP
|
||||
magpulse = FALSE
|
||||
no_slip = FALSE
|
||||
flags &= ~NODROP
|
||||
|
||||
/obj/item/clothing/shoes/magboots/vox/examine(mob/user)
|
||||
|
||||
@@ -1131,7 +1131,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
|
||||
if(!(slipAny))
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(isobj(H.shoes) && H.shoes.flags & NOSLIP)
|
||||
if(HAS_TRAIT(H, TRAIT_NOSLIP))
|
||||
return FALSE
|
||||
|
||||
if(tilesSlipped)
|
||||
|
||||
@@ -746,10 +746,8 @@ emp_act
|
||||
|
||||
/mob/living/carbon/human/experience_pressure_difference(pressure_difference, direction)
|
||||
playsound(src, 'sound/effects/space_wind.ogg', 50, TRUE)
|
||||
if(shoes && isclothing(shoes))
|
||||
var/obj/item/clothing/S = shoes
|
||||
if(S.flags & NOSLIP)
|
||||
return FALSE
|
||||
if(HAS_TRAIT(src, TRAIT_NOSLIP))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/water_act(volume, temperature, source, method = REAGENT_TOUCH)
|
||||
|
||||
@@ -143,10 +143,10 @@
|
||||
origin_tech = "syndicate=1"
|
||||
|
||||
/obj/item/mod/module/noslip/on_suit_activation()
|
||||
mod.boots.flags |= NOSLIP
|
||||
ADD_TRAIT(mod.wearer, TRAIT_NOSLIP, UID())
|
||||
|
||||
/obj/item/mod/module/noslip/on_suit_deactivation(deleting = FALSE)
|
||||
mod.boots.flags ^= NOSLIP
|
||||
REMOVE_TRAIT(mod.wearer, TRAIT_NOSLIP, UID())
|
||||
|
||||
//Bite of 87 Springlock - Equips faster, disguised as DNA lock, can block retracting for 10 seconds.
|
||||
/obj/item/mod/module/springlock/bite_of_87
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
mod.boots.flags |= NOSLIP
|
||||
ADD_TRAIT(mod.wearer, TRAIT_NOSLIP, UID())
|
||||
mod.slowdown += slowdown_active
|
||||
ADD_TRAIT(mod.wearer, TRAIT_MAGPULSE, "magbooted")
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
mod.boots.flags ^= NOSLIP
|
||||
REMOVE_TRAIT(mod.wearer, TRAIT_NOSLIP, UID())
|
||||
mod.slowdown -= slowdown_active
|
||||
REMOVE_TRAIT(mod.wearer, TRAIT_MAGPULSE, "magbooted")
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
desc = "A pair of running shoes. Excellent for running and even better for smashing skulls."
|
||||
icon_state = "s-ninja"
|
||||
permeability_coefficient = 0.01
|
||||
flags = NOSLIP
|
||||
no_slip = TRUE
|
||||
armor = list(MELEE = 75, BULLET = 50, LASER = 20, ENERGY = 10, BOMB = 20, RAD = 15, FIRE = INFINITY, ACID = INFINITY)
|
||||
cold_protection = FEET
|
||||
min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT
|
||||
|
||||
Reference in New Issue
Block a user