Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _maps/map_files/generic/CentCom.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -24046,7 +24046,7 @@
"aWC" = (
/obj/structure/table/wood,
/obj/item/clothing/gloves/rapid,
/obj/item/clothing/gloves/krav_maga/sec,
/obj/item/clothing/gloves/sec_maga,
/turf/open/floor/wood,
/area/centcom/testchamber)
"aWD" = (
Expand Down
42 changes: 40 additions & 2 deletions code/datums/martial/krav_maga.dm
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,54 @@
if(H.get_item_by_slot(SLOT_GLOVES) == src)
style.remove(H)

/obj/item/clothing/gloves/krav_maga/sec//more obviously named, given to sec
/obj/item/clothing/gloves/sec_maga //more obviously named, given to sec
name = "krav maga gloves"
desc = "These gloves can teach you to perform Krav Maga using nanochips."
desc = "These gloves can teach you to perform Krav Maga using nanochips, but due to budget cuts, they only work in security areas."
icon_state = "fightgloves"
item_state = "fightgloves"
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
heat_protection = HANDS
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
resistance_flags = NONE
var/datum/martial_art/krav_maga/style = new
cryo_preserve = TRUE
var/equipper = null //who's wearing the gloves?
var/equipped = FALSE //does the user currently have the martial art?
var/list/enabled_areas = list(/area/security,
/area/ai_monitored/security,
/area/mine/laborcamp,
/area/shuttle/labor,
/area/crew_quarters/heads/hos) //where can we use krav maga?

/obj/item/clothing/gloves/sec_maga/equipped(mob/user, slot)
. = ..()
if(slot == SLOT_GLOVES)
equipper = user
START_PROCESSING(SSobj, src)

/obj/item/clothing/gloves/sec_maga/dropped(mob/user, slot)
. = ..()
var/mob/living/carbon/human/H = user
if(H.get_item_by_slot(SLOT_GLOVES) == src)
STOP_PROCESSING(SSobj, src)
style.remove(H)
equipper = null
equipped = FALSE

/obj/item/clothing/gloves/sec_maga/proc/check_location()
for(var/location in enabled_areas)
if(istype(get_area(equipper), location))
return TRUE
return FALSE

/obj/item/clothing/gloves/sec_maga/process()
if(!isnull(equipper) && !equipped && check_location())
style.teach(equipper,1)
equipped = TRUE
else if(equipped && !check_location())
style.remove(equipper)
equipped = FALSE

/obj/item/clothing/gloves/krav_maga/combatglovesplus
name = "combat gloves plus"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
new /obj/item/storage/box/flashbangs(src)
new /obj/item/storage/belt/security/full(src)
new /obj/item/flashlight/seclite(src)
new /obj/item/clothing/gloves/krav_maga/sec(src)
new /obj/item/clothing/gloves/sec_maga(src)
new /obj/item/door_remote/head_of_security(src)
new /obj/item/gun/ballistic/shotgun/automatic/combat/compact(src)
new /obj/item/clipboard/yog/paperwork/warden(src)
Expand Down