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: bomb satchel for emagged mining borg #6574

Draft
wants to merge 6 commits into
base: master220
Choose a base branch
from
Draft
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
61 changes: 61 additions & 0 deletions code/game/objects/items/weapons/storage/bags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,67 @@
. = ..()
ADD_TRAIT(src, TRAIT_NODROP, CYBORG_ITEM_TRAIT)

// -----------------------------
// bombs bag
// -----------------------------

/obj/item/storage/bag/kaboom // bag that can hold plastic explosions(used only for emagged mining borg)
name = "bomb satchell"
ru_names = list(
NOMINATIVE = "сумка для взрывчатки",
GENITIVE = "сумки для взрывчатки",
DATIVE = "сумке для взрывчатки",
ACCUSATIVE = "сумку для взрывчатки",
INSTRUMENTAL = "сумкой для взрывчатки",
PREPOSITIONAL = "сумке для взрывчатки"
)
desc = "Сумка для хранения взрычатки. Способна автоматически устанавливать выбранную взрывчатку, однако это делает невозможным достать содержимое поштучно."
icon = 'icons/obj/mining.dmi'
icon_state = "bomb_satchel"
origin_tech = "engineering=2"
slot_flags = ITEM_SLOT_BELT
slot_flags_2 = ITEM_FLAG_POCKET_LARGE
w_class = WEIGHT_CLASS_NORMAL
storage_slots = 5
max_combined_w_class = 200
max_w_class = WEIGHT_CLASS_BULKY
can_hold = list(/obj/item/grenade/plastic)
var/obj/item/grenade/plastic/nextbomb = null
var/obj/item/grenade/plastic/miningcharge/nextbombbutmining = null

/obj/item/storage/bag/kaboom/AltClick(mob/user)
if(LAZYLEN(contents))
var/list/bombs = list()
var/list/bombs_inside = list()
for(var/I in contents)
var/atom/explos = I
bombs[explos.name] = image(icon = explos.icon, icon_state = explos.icon_state)
bombs_inside[explos.name] = explos
nextbomb = show_radial_menu(user = user, anchor = src, choices = bombs, require_near = TRUE)
nextbomb = bombs_inside[nextbomb]
else
balloon_alert(user, "Сумка пустая!")

/obj/item/storage/bag/kaboom/attack(mob/living/target, mob/living/user, params, def_zone, skip_attack_anim)
if(nextbomb == null)
balloon_alert(user, "Сумка пустая!")
else
if(nextbomb == /obj/item/grenade/plastic/miningcharge)
nextbombbutmining = nextbomb
nextbombbutmining.override_safety()
nextbomb.attack(target, user, params, def_zone, skip_attack_anim = FALSE)


/obj/item/storage/bag/kaboom/cyborg // borg version
name = "cyborg bomb satchel"

/obj/item/storage/bag/kaboom/cyborg/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_NODROP, CYBORG_ITEM_TRAIT)

/obj/item/storage/bag/kaboom/cyborg/upgraded // borg with storage increase version
storage_slots = 15


// -----------------------------
// Plant bag
Expand Down
Binary file modified icons/obj/mining.dmi
Binary file not shown.
Loading