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

Centcom Tactical Bat #671

Merged
merged 18 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from 14 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
84 changes: 84 additions & 0 deletions modular_ss220/objects/code/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,87 @@
max_ammo = 100
icon = 'modular_ss220/objects/icons/ammo.dmi'
icon_state = "mm127_box"

Fullonibus marked this conversation as resolved.
Show resolved Hide resolved
// Тактическая бита Флота Nanotrasen
/obj/item/melee/baseball_bat/homerun/central_command
name = "тактическая бита Флота Nanotrasen"
desc = "Выдвижная тактическая бита Центрального Командования Nanotrasen. \
В официальных документах эта бита проходит под элегантным названием \"Высокоскоростная система доставки СРП\". \
Выдаваясь только самым верным и эффективным офицерам Nanotrasen, это оружие является одновременно символом статуса \
и инструментом высшего правосудия."
slot_flags = SLOT_FLAG_BELT
w_class = WEIGHT_CLASS_SMALL

var/on = FALSE
/// Force when concealed
force = 5
/// Force when extended
var/force_on = 20

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'
/// Item state when concealed
item_state = "centcom_bat_0"
/// Item state when extended
var/item_state_on = "centcom_bat_1"
/// Icon state when concealed
icon_state = "centcom_bat_0"
/// Icon state when extended
var/icon_state_on = "centcom_bat_1"
/// Sound to play when concealing or extending
var/extend_sound = 'sound/weapons/batonextend.ogg'
/// Attack verbs when concealed (created on Initialize)
attack_verb = list("hit", "poked")
/// Attack verbs when extended (created on Initialize)
var/list/attack_verb_on = list("smacked", "struck", "cracked", "beaten")

/obj/item/melee/baseball_bat/homerun/central_command/Initialize(mapload)
. = ..()
/// Ability to make homerun
homerun_able = on
Fullonibus marked this conversation as resolved.
Show resolved Hide resolved
/obj/item/melee/baseball_bat/homerun/central_command/pickup(mob/living/user)
Fullonibus marked this conversation as resolved.
Show resolved Hide resolved
. = ..()
if(!(user.mind.offstation_role))
user.Weaken(10 SECONDS)
user.unEquip(src, force, silent = FALSE)
to_chat(user, span_userdanger("Это - оружие истинного правосудия. Тебе не дано обуздать его мощь."))
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(rand(force/2, force), BRUTE, pick("l_arm", "r_arm"))
Fullonibus marked this conversation as resolved.
Show resolved Hide resolved
else
user.adjustBruteLoss(rand(force/2, force))

/obj/item/melee/baseball_bat/homerun/central_command/attack_self(mob/user)
Fullonibus marked this conversation as resolved.
Show resolved Hide resolved
on = !on

if(on)
to_chat(user, span_userdanger("Вы активировали [src.name] - время для правосудия!"))
item_state = item_state_on
icon_state = icon_state_on
w_class = WEIGHT_CLASS_HUGE //doesnt fit in backpack when its on for balance
Fullonibus marked this conversation as resolved.
Show resolved Hide resolved
force = force_on
attack_verb = attack_verb_on
homerun_ready = TRUE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

homerun_ready нет смысла выставлять, так как оно всегда включено при атаке, разве не так?

else
to_chat(user, span_notice("Вы деактивировали [src.name]."))
item_state = initial(item_state)
icon_state = initial(icon_state)
w_class = initial(w_class)
force = initial(force)
attack_verb = initial(attack_verb)
homerun_ready = FALSE
Fullonibus marked this conversation as resolved.
Show resolved Hide resolved

homerun_able = on
// 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/item/melee/baseball_bat/homerun/central_command/attack(mob/living/target, mob/living/user)
. = ..()
if(on)
homerun_ready = 1
AyIong marked this conversation as resolved.
Show resolved Hide resolved
Binary file not shown.
Binary file not shown.
Binary file added modular_ss220/objects/icons/melee.dmi
Binary file not shown.
2 changes: 2 additions & 0 deletions modular_ss220/outfits/code/outfits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
/obj/item/ammo_box/speed_loader_mm127 = 3
)

/datum/outfit/job/ntnavyofficer
l_pocket = /obj/item/melee/baseball_bat/homerun/central_command

/obj/item/clothing/under/solgov/srt
name = "marine uniform"
Expand Down