mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-29 11:31:51 +00:00
Merge pull request #2813 from Anewbe/boots
Adds toggle shoe layer, fixes boot knives
This commit is contained in:
@@ -377,9 +377,11 @@
|
||||
body_parts_covered = FEET
|
||||
slot_flags = SLOT_FEET
|
||||
|
||||
var/can_hold_knife
|
||||
var/can_hold_knife = 0
|
||||
var/obj/item/holding
|
||||
|
||||
var/show_above_pants = 1
|
||||
|
||||
permeability_coefficient = 0.50
|
||||
slowdown = SHOES_SLOWDOWN
|
||||
force = 2
|
||||
@@ -415,10 +417,10 @@
|
||||
|
||||
|
||||
/obj/item/clothing/shoes/attackby(var/obj/item/I, var/mob/user)
|
||||
if(can_hold_knife && istype(I, /obj/item/weapon/material/shard) || \
|
||||
if((can_hold_knife == 1) && (istype(I, /obj/item/weapon/material/shard) || \
|
||||
istype(I, /obj/item/weapon/material/butterfly) || \
|
||||
istype(I, /obj/item/weapon/material/kitchen/utensil) || \
|
||||
istype(I, /obj/item/weapon/material/hatchet/tacknife))
|
||||
istype(I, /obj/item/weapon/material/hatchet/tacknife)))
|
||||
if(holding)
|
||||
user << "<span class='warning'>\The [src] is already holding \a [holding].</span>"
|
||||
return
|
||||
@@ -431,10 +433,23 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/shoes/verb/toggle_layer()
|
||||
set name = "Switch Shoe Layer"
|
||||
set category = "Object"
|
||||
|
||||
if(show_above_pants == -1)
|
||||
usr << "<span class='notice'>\The [src] cannot be worn above your suit!</span>"
|
||||
return
|
||||
show_above_pants = !show_above_pants
|
||||
update_icon()
|
||||
|
||||
/obj/item/clothing/shoes/update_icon()
|
||||
overlays.Cut()
|
||||
if(holding)
|
||||
overlays += image(icon, "[icon_state]_knife")
|
||||
if(ismob(usr))
|
||||
var/mob/M = usr
|
||||
M.update_inv_shoes()
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/shoes/proc/handle_movement(var/turf/walking, var/running)
|
||||
|
||||
@@ -110,29 +110,30 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
#define DAMAGE_LAYER 2
|
||||
#define SURGERY_LEVEL 3 //bs12 specific.
|
||||
#define UNDERWEAR_LAYER 4
|
||||
#define UNIFORM_LAYER 5
|
||||
#define ID_LAYER 6
|
||||
#define SHOES_LAYER 7
|
||||
#define GLOVES_LAYER 8
|
||||
#define BELT_LAYER 9
|
||||
#define SUIT_LAYER 10
|
||||
#define TAIL_LAYER 11 //bs12 specific. this hack is probably gonna come back to haunt me
|
||||
#define GLASSES_LAYER 12
|
||||
#define BELT_LAYER_ALT 13
|
||||
#define SUIT_STORE_LAYER 14
|
||||
#define BACK_LAYER 15
|
||||
#define HAIR_LAYER 16 //TODO: make part of head layer?
|
||||
#define EARS_LAYER 17
|
||||
#define FACEMASK_LAYER 18
|
||||
#define HEAD_LAYER 19
|
||||
#define COLLAR_LAYER 20
|
||||
#define HANDCUFF_LAYER 21
|
||||
#define LEGCUFF_LAYER 22
|
||||
#define L_HAND_LAYER 23
|
||||
#define R_HAND_LAYER 24
|
||||
#define FIRE_LAYER 25 //If you're on fire
|
||||
#define TARGETED_LAYER 26 //BS12: Layer for the target overlay from weapon targeting system
|
||||
#define TOTAL_LAYERS 26
|
||||
#define SHOES_LAYER_ALT 5
|
||||
#define UNIFORM_LAYER 6
|
||||
#define ID_LAYER 7
|
||||
#define SHOES_LAYER 8
|
||||
#define GLOVES_LAYER 9
|
||||
#define BELT_LAYER 10
|
||||
#define SUIT_LAYER 11
|
||||
#define TAIL_LAYER 12 //bs12 specific.
|
||||
#define GLASSES_LAYER 13
|
||||
#define BELT_LAYER_ALT 14
|
||||
#define SUIT_STORE_LAYER 15
|
||||
#define BACK_LAYER 16
|
||||
#define HAIR_LAYER 17 //TODO: make part of head layer?
|
||||
#define EARS_LAYER 18
|
||||
#define FACEMASK_LAYER 19
|
||||
#define HEAD_LAYER 20
|
||||
#define COLLAR_LAYER 21
|
||||
#define HANDCUFF_LAYER 22
|
||||
#define LEGCUFF_LAYER 23
|
||||
#define L_HAND_LAYER 24
|
||||
#define R_HAND_LAYER 25
|
||||
#define FIRE_LAYER 26 //If you're on fire
|
||||
#define TARGETED_LAYER 27 //BS12: Layer for the target overlay from weapon targeting system
|
||||
#define TOTAL_LAYERS 27
|
||||
//////////////////////////////////
|
||||
|
||||
/mob/living/carbon/human
|
||||
@@ -514,7 +515,7 @@ var/global/list/damage_icon_parts = list()
|
||||
overlays_standing[UNIFORM_LAYER] = null
|
||||
|
||||
//hiding/revealing shoes if necessary
|
||||
update_inv_shoes(0)
|
||||
update_inv_shoes(1)
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
@@ -642,12 +643,21 @@ var/global/list/damage_icon_parts = list()
|
||||
else
|
||||
standing = image("icon" = 'icons/mob/feet.dmi', "icon_state" = "[shoes.icon_state]")
|
||||
|
||||
var/shoe_layer = SHOES_LAYER
|
||||
if(istype(shoes, /obj/item/clothing/shoes))
|
||||
var/obj/item/clothing/shoes/ushoes = shoes
|
||||
if(ushoes.show_above_pants)
|
||||
overlays_standing[SHOES_LAYER] = null
|
||||
shoe_layer = SHOES_LAYER_ALT
|
||||
else
|
||||
overlays_standing[SHOES_LAYER_ALT] = null
|
||||
|
||||
if(shoes.blood_DNA)
|
||||
var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "shoeblood")
|
||||
bloodsies.color = shoes.blood_color
|
||||
standing.overlays += bloodsies
|
||||
standing.color = shoes.color
|
||||
overlays_standing[SHOES_LAYER] = standing
|
||||
overlays_standing[shoe_layer] = standing
|
||||
else
|
||||
if(feet_blood_DNA)
|
||||
var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "shoeblood")
|
||||
@@ -655,6 +665,7 @@ var/global/list/damage_icon_parts = list()
|
||||
overlays_standing[SHOES_LAYER] = bloodsies
|
||||
else
|
||||
overlays_standing[SHOES_LAYER] = null
|
||||
overlays_standing[SHOES_LAYER_ALT] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_s_store(var/update_icons=1)
|
||||
|
||||
Reference in New Issue
Block a user