Skip to content

Tutel - Tactical shield with integral shotgun loader #4863

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

Merged
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
15 changes: 9 additions & 6 deletions code/modules/projectiles/boxes_magazines/_box_magazine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
var/list/bullet_cost
///cost of the materials in the magazine/box itself
var/list/base_cost
///Whether the sprite updates if it has ammunition, monke var
var/spriteshift = TRUE

/obj/item/ammo_box/Initialize(mapload)
. = ..()
Expand Down Expand Up @@ -173,12 +175,13 @@
desc = "[initial(desc)] There [(shells_left == 1) ? "is" : "are"] [shells_left] shell\s left!"

/obj/item/ammo_box/update_icon_state()
var/shells_left = LAZYLEN(stored_ammo)
switch(multiple_sprites)
if(AMMO_BOX_PER_BULLET)
icon_state = "[multiple_sprite_use_base ? base_icon_state : initial(icon_state)]-[shells_left]"
if(AMMO_BOX_FULL_EMPTY)
icon_state = "[multiple_sprite_use_base ? base_icon_state : initial(icon_state)]-[shells_left ? "full" : "empty"]"
if(spriteshift == TRUE) ///this if loop is monke edit
var/shells_left = LAZYLEN(stored_ammo)
switch(multiple_sprites)
if(AMMO_BOX_PER_BULLET)
icon_state = "[multiple_sprite_use_base ? base_icon_state : initial(icon_state)]-[shells_left]"
if(AMMO_BOX_FULL_EMPTY)
icon_state = "[multiple_sprite_use_base ? base_icon_state : initial(icon_state)]-[shells_left ? "full" : "empty"]"
return ..()

/// Updates the amount of material in this ammo box according to how many bullets are left in it.
Expand Down
Binary file modified icons/mob/clothing/back.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/equipment/shields_lefthand.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/equipment/shields_righthand.dmi
Binary file not shown.
Binary file modified icons/obj/weapons/shields.dmi
Binary file not shown.
124 changes: 124 additions & 0 deletions monkestation/code/game/objects/items/tactical_shields.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
/// Tutel shield, designed to work with the Bobr
/// Comes with a built-in 4 round ammobox to allow for easy reloading
/// I based it off of ammo_box instead of shield because I believe ammo_box is more complicated

/obj/item/ammo_box/tacshield/tutel/
name = "Tutel tactical buckler"
desc = "A lightweight titanium-alloy shield. It has an integrated shotgun speedloader, allowing you to reload without putting down the shield."
icon = 'icons/obj/weapons/shields.dmi'
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
icon_state = "tutel"
inhand_icon_state = "tutel"
worn_icon_state = "ammobox"
ammo_type = /obj/item/ammo_casing/shotgun
max_ammo = 4
caliber = CALIBER_SHOTGUN
multitype = TRUE
block_chance = 50
max_integrity = 65 //breaks on the second slug block, survives the first
slot_flags = ITEM_SLOT_BACK | ITEM_SLOT_BELT
force = 15
w_class = WEIGHT_CLASS_NORMAL
attack_verb_continuous = list("shoves", "bashes")
attack_verb_simple = list("shove", "bash")
armor_type = /datum/armor/item_shield
block_sound = 'sound/weapons/block_shield.ogg'
start_empty = TRUE
spriteshift = FALSE
var/tutel_break_leftover = /obj/item/broken_shield

/obj/item/ammo_box/tacshield/tutel/examine(mob/user)
. = ..()
var/healthpercent = round((atom_integrity/max_integrity) * 100, 1)
switch(healthpercent)
if(50 to 99)
. += span_info("It looks slightly damaged.")
if(25 to 50)
. += span_info("It appears heavily damaged.")
if(0 to 25)
. += span_warning("It's falling apart!")

/obj/item/ammo_box/tacshield/tutel/proc/shatter(mob/living/carbon/human/owner)
playsound(owner, 'sound/effects/bang.ogg', 50)
explosion(owner, 0, 0, 0, 0) //Shield breaking should be extremely obvious, and a little silly
new tutel_break_leftover(get_turf(src))


/obj/item/ammo_box/tacshield/tutel/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
. = ..()
if(.)
if (atom_integrity <= damage)
var/turf/owner_turf = get_turf(owner)
owner_turf.visible_message(span_warning("[hitby] destroys [src]!"))
shatter(owner)
qdel(src)
return TRUE
take_damage(damage)
return TRUE

/obj/item/ammo_box/tacshield/tutel/attackby(obj/item/attackby_item, mob/user, params)
if(istype(attackby_item, /obj/item/stack/sheet/mineral/titanium))
if (atom_integrity >= max_integrity)
to_chat(user, span_warning("[src] is already in perfect condition."))
return
var/obj/item/stack/sheet/mineral/titanium/titanium_sheet = attackby_item
titanium_sheet.use(1)
atom_integrity = max_integrity
to_chat(user, span_notice("You repair [src] with [titanium_sheet]."))
return
return ..()

/obj/item/broken_shield
name = "broken Tutel"
desc = "A broken tactical shield, it looks as though you could repair it with some titanium.."
icon = 'icons/obj/weapons/shields.dmi'
icon_state = "brokentutel"
flags_1 = CONDUCT_1
force = 5
throwforce = 5
w_class = WEIGHT_CLASS_NORMAL
custom_materials = list(/datum/material/titanium = HALF_SHEET_MATERIAL_AMOUNT + SMALL_MATERIAL_AMOUNT * 3)
attack_verb_continuous = list("hits", "bludgeons", "whacks", "bonks")
attack_verb_simple = list("hit", "bludgeon", "whack", "bonk")

/obj/item/broken_shield/Initialize(mapload)
. = ..()

var/static/list/hovering_item_typechecks = list(
/obj/item/stack/sheet/mineral/titanium = list(
SCREENTIP_CONTEXT_LMB = "Repair shield",
),

)

AddElement(/datum/element/contextual_screentip_item_typechecks, hovering_item_typechecks)

/obj/item/broken_shield/attackby(obj/item/attacking_item, mob/user, params)
if(istype(attacking_item, /obj/item/stack/sheet/mineral/titanium))
var/datum/crafting_recipe/recipe_to_use = /datum/crafting_recipe/tutel
user.balloon_alert(user, "repairing shield...")
if(do_after(user, initial(recipe_to_use.time), src)) // we do initial work here to get the correct timer
var/obj/item/ammo_box/tacshield/tutel/crafted_tutel = new /obj/item/ammo_box/tacshield/tutel/()

remove_item_from_storage(user)
if (!user.transferItemToLoc(attacking_item, crafted_tutel))
return
crafted_tutel.CheckParts(list(attacking_item))
qdel(src)

user.put_in_hands(crafted_tutel)
user.balloon_alert(user, "repaired shield")
return
return ..()

/datum/crafting_recipe/tutel
name = "Tutel Repair"
result = /obj/item/ammo_box/tacshield/tutel/
reqs = list(
/obj/item/broken_shield = 1,
/obj/item/stack/sheet/mineral/titanium = 1,
)
time = 5 SECONDS
category = CAT_WEAPON_MELEE

4 changes: 4 additions & 0 deletions monkestation/code/modules/blueshift/armaments/nri.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
item_type = /obj/item/trench_tool
cost = PAYCHECK_CREW

/datum/armament_entry/company_import/nri_surplus/misc/tutel
item_type = /obj/item/ammo_box/tacshield/tutel/
cost = PAYCHECK_CREW * 3

/datum/armament_entry/company_import/nri_surplus/firearm
subcategory = "Firearms"

Expand Down
12 changes: 12 additions & 0 deletions monkestation/code/modules/blueshift/cargo/armory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,15 @@
/obj/item/gun/energy/modular_laser_rifle,
)
crate_name = "\improper Modular Laser Rifle Crate"

//monke from here down
/datum/supply_pack/security/armory/bobr
name = "Tactical Bóbr Crate"
desc = "Two Bóbr shotgun revolvers, with matching Tutel ballistic shields and ammo for each."
cost = CARGO_CRATE_VALUE * 20
contains = list(
/obj/item/gun/ballistic/revolver/shotgun_revolver = 2,
/obj/item/ammo_box/tacshield/tutel/ = 2,
/obj/item/ammo_box/advanced/s12gauge = 2,
)
crate_name = "Tactical Bóbr Crate"
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6121,6 +6121,7 @@
#include "monkestation\code\game\objects\items\spraycan_gun.dm"
#include "monkestation\code\game\objects\items\stickers.dm"
#include "monkestation\code\game\objects\items\superglue.dm"
#include "monkestation\code\game\objects\items\tactical_shields.dm"
#include "monkestation\code\game\objects\items\translation_hat.dm"
#include "monkestation\code\game\objects\items\trash.dm"
#include "monkestation\code\game\objects\items\turf_demolisher.dm"
Expand Down
Loading