Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@
/datum/action/item_action/advanced/ninja/SpiderOS,
/datum/action/item_action/advanced/ninja/ninja_autodust,
/datum/action/item_action/ninjastatus,
/datum/action/item_action/advanced/ninja/ninja_sword_recall
/datum/action/item_action/advanced/ninja/ninja_sword_recall,
/datum/action/item_action/advanced/ninja/suit_mode,
)
var/action_path
for(action_path in n_suit.actions_types)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/antagonists/space_ninja/suit/head.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
righthand_file = 'icons/mob/inhands/antag/ninja_righthand.dmi'
icon_state = "ninja_hood_classic"
item_state = "ninja_hood_classic"
armor = list(MELEE = 40, BULLET = 30, LASER = 20,ENERGY = 15, BOMB = 30, BIO = 30, FIRE = 100, ACID = 100)
armor = list(MELEE = 40, BULLET = 30, LASER = 20, ENERGY = 15, BOMB = 30, BIO = 30, FIRE = 100, ACID = 100)
clothing_flags = NONE
blockTracking = TRUE //Roughly the only unique thing about this helmet.
strip_delay = 12
permeability_coefficient = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
lighting_alpha = 220
flash_protect = FLASH_PROTECTION_SENSITIVE
vision_flags |= SEE_MOBS
icon_state = "[initial(icon_state)]_red"
item_state = "[initial(item_state)]_red"
icon_state = "securityhudnight"
item_state = "securityhudnight"
balloon_alert(user, "режим — Термальное видение")
if(NINJA_FLASHPROTECTION)
see_in_dark = 2
lighting_alpha = null
flash_protect = FLASH_PROTECTION_FLASH
vision_flags &= ~SEE_MOBS
icon_state = "[initial(icon_state)]_blue"
item_state = "[initial(item_state)]_blue"
icon_state = "healthhudnight"
item_state = "healthhudnight"
balloon_alert(user, "режим — Защита от ослепления")

if(n_mask && istype(user.wear_mask, /obj/item/clothing/mask/gas/space_ninja))
Expand Down
49 changes: 46 additions & 3 deletions code/modules/antagonists/space_ninja/suit/suit.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#define NINJA_SUITMODE_SPACE 1
#define NINJA_SUITMODE_COMBAT 2
#define NINJA_SUITSLOWDOWN_SPACE 1
#define NINJA_SUITSLOWDOWN_COMBAT 0
#define NINJA_SUITTRAIT_SPACE STOPSPRESSUREDAMAGE|THICKMATERIAL|STACKABLE_HELMET_EXEMPT
#define NINJA_SUITTRAIT_COMBAT NONE

/**
* # Ninja Suit
*
Expand All @@ -22,17 +29,20 @@
armor = list(MELEE = 40, BULLET = 30, LASER = 20,ENERGY = 30, BOMB = 30, BIO = 100, FIRE = 100, ACID = 100)
strip_delay = 12
permeability_coefficient = 1
clothing_flags = NONE
flags_inv = HIDEGLOVES|HIDEJUMPSUIT|HIDETAIL
flags_inv_transparent = HIDEGLOVES|HIDEJUMPSUIT
actions = list()
action_icon = list()
action_icon_state = list()
var/suit_mode = NINJA_SUITMODE_COMBAT
/// Абилки костюма
actions_types = list(
/datum/action/item_action/advanced/ninja/SpiderOS,
/datum/action/item_action/advanced/ninja/ninja_autodust,
/datum/action/item_action/ninjastatus,
/datum/action/item_action/advanced/ninja/ninja_sword_recall,
/datum/action/item_action/advanced/ninja/suit_mode,
/* /datum/action/item_action/advanced/ninja/ninja_stealth, Не используется
/datum/action/item_action/advanced/ninja/ninja_chameleon,
/datum/action/item_action/advanced/ninja/ninja_spirit_form,
Expand All @@ -47,9 +57,6 @@
/datum/action/item_action/advanced/ninja/ninjanet,
/datum/action/item_action/advanced/ninja/toggle_shuriken_fire_mode
/datum/action/item_action/ninjastar, */ )

/// Мы не хотим чтобы ниндзю замедлял его же костюм!
slowdown = 0
/// If this is a path, this gets created as an object in Initialize.
var/obj/item/stock_parts/cell/cell = /obj/item/stock_parts/cell/high
/// The person wearing the suit
Expand Down Expand Up @@ -442,6 +449,9 @@
if(/datum/action/item_action/advanced/ninja/ninja_sword_recall)
ninja_sword_recall()
return TRUE
if(/datum/action/item_action/advanced/ninja/suit_mode)
suit_mode()
return TRUE
if(/datum/action/item_action/advanced/ninja/ninja_stealth)
toggle_stealth()
return TRUE
Expand Down Expand Up @@ -471,6 +481,32 @@
return TRUE
return FALSE

/datum/action/item_action/advanced/ninja/suit_mode
name = "Переключить режим костюма"
desc = "Доступные режимы: защита от космоса, боевой."
button_icon = 'icons/mob/actions/actions_ninja.dmi'
background_icon_state = "background_green"

/obj/item/clothing/suit/space/space_ninja/proc/suit_mode()
var/mob/living/carbon/human/ninja = usr
if(suit_mode == NINJA_SUITMODE_SPACE)
suit_mode = NINJA_SUITMODE_COMBAT
src.slowdown = NINJA_SUITSLOWDOWN_COMBAT
src.clothing_flags = NINJA_SUITTRAIT_COMBAT
if(istype(ninja.head, /obj/item/clothing/head/helmet/space/space_ninja))
ninja.head.clothing_flags = NINJA_SUITTRAIT_COMBAT
ninja.head.update_equipped_item()
balloon_alert(ninja, "боевой режим")
else
suit_mode = NINJA_SUITMODE_SPACE
src.slowdown = NINJA_SUITSLOWDOWN_SPACE
src.clothing_flags = NINJA_SUITTRAIT_SPACE
if(istype(ninja.head, /obj/item/clothing/head/helmet/space/space_ninja))
ninja.head.clothing_flags = NINJA_SUITTRAIT_SPACE
ninja.head.update_equipped_item()
balloon_alert(ninja, "защита от космоса")
src.update_equipped_item()

/**
* Proc for changing the suit's appearance to the selected design.
*
Expand Down Expand Up @@ -746,3 +782,10 @@
QDEL_NULL(n_scarf)
QDEL_NULL(n_backpack)
QDEL_NULL(src)

#undef NINJA_SUITMODE_SPACE
#undef NINJA_SUITMODE_COMBAT
#undef NINJA_SUITSLOWDOWN_SPACE
#undef NINJA_SUITSLOWDOWN_COMBAT
#undef NINJA_SUITTRAIT_SPACE
#undef NINJA_SUITTRAIT_COMBAT
2 changes: 1 addition & 1 deletion code/modules/reagents/reagent_containers/applicator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

var/protection = 0
if(!ignore_flags)
if(!target.can_inject(user, FALSE))
if(!target.can_inject(user, TRUE))
Comment thread
FlitchTime marked this conversation as resolved.
return .

if(ishuman(target))
Expand Down
Loading