Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: Выкидной ножик aka стилет #994

Merged
merged 9 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
55 changes: 55 additions & 0 deletions modular_ss220/objects/code/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
и инструментом высшего правосудия."
slot_flags = SLOT_FLAG_BELT
w_class = WEIGHT_CLASS_SMALL
sharp = TRUE
Legendaxe marked this conversation as resolved.
Show resolved Hide resolved

var/on = FALSE
/// Force when concealed
Expand Down Expand Up @@ -234,3 +235,57 @@
if(on)
homerun_ready = TRUE
. = ..()

/obj/item/melee/stylet
name = "выкидной нож"
desc = "Маленький складной нож скрытого ношения. \
Нож в итальянском стиле, который исторически стал предметом споров и даже запретов \
Его лезвие практически мгновенно выбрасывается при нажатии кнопки-качельки."
slot_flags = SLOT_FLAG_BELT
w_class = WEIGHT_CLASS_TINY

var/on = FALSE
force = 2
var/force_on = 8

lefthand_file = 'modular_ss220/objects/icons/inhands/melee_lefthand.dmi'
righthand_file = 'modular_ss220/objects/icons/inhands/melee_righthand.dmi'
icon = 'modular_ss220/objects/icons/melee.dmi'
hitsound = 'sound/weapons/bladeslice.ogg'
item_state = "stylet_0"
var/item_state_on = "stylet_1"
icon_state = "stylet_0"
var/icon_state_on = "stylet_1"
var/extend_sound = 'modular_ss220/objects/sound/weapons/styletext.ogg'
attack_verb = list("hit", "poked")
var/list/attack_verb_on = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")

/obj/item/melee/stylet/attack_self(mob/user)
on = !on

if(on)
to_chat(user, span_userdanger("Вы разложили [src.name]"))
item_state = item_state_on
HardexZ marked this conversation as resolved.
Show resolved Hide resolved
icon_state = icon_state_on
w_class = WEIGHT_CLASS_SMALL
force = force_on
attack_verb = attack_verb_on
else
to_chat(user, span_notice("Вы сложили [src.name]."))
HardexZ marked this conversation as resolved.
Show resolved Hide resolved
item_state = initial(item_state)
icon_state = initial(icon_state)
w_class = initial(w_class)
force = initial(force)
attack_verb = initial(attack_verb)

// Update mob hand visuals
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
playsound(loc, extend_sound, 50, TRUE)
add_fingerprint(user)

/obj/effect/spawner/lootdrop/maintenance/Initialize(mapload)
loot += list(/obj/item/melee/stylet = 3)
return..()
HardexZ marked this conversation as resolved.
Show resolved Hide resolved
Binary file modified modular_ss220/objects/icons/inhands/melee_lefthand.dmi
Binary file not shown.
Binary file modified modular_ss220/objects/icons/inhands/melee_righthand.dmi
Binary file not shown.
Binary file modified modular_ss220/objects/icons/melee.dmi
Binary file not shown.
Binary file added modular_ss220/objects/sound/weapons/styletext.ogg
Binary file not shown.
Loading