Skip to content

Commit

Permalink
Merge pull request #1097 from ariaworld/fix-tailbags
Browse files Browse the repository at this point in the history
[REFACTOR] Refactor, clean and optimize tailbag code.
  • Loading branch information
MosleyTheMalO authored Mar 11, 2024
2 parents b539523 + d442c44 commit 21f4e41
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 150 deletions.
1 change: 1 addition & 0 deletions code/controllers/subsystem/shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ SUBSYSTEM_DEF(shuttle)
wait = 10
init_order = INIT_ORDER_SHUTTLE
flags = SS_KEEP_TIMING|SS_NO_TICK_CHECK
runlevels = RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME // Splurt edit: Add RUNLEVEL_POSTGAME to let shuttles move after round is over.

var/list/mobile = list()
var/list/stationary = list()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/datum/crafting_recipe/tailbag
name = "Tailbag"
result = /obj/item/storage/tailbag
result = /obj/item/storage/wallet/tailbag
reqs = list(/obj/item/stack/sheet/leather = 2)
time = 30
category = CAT_CLOTHING

/datum/crafting_recipe/tailbag_xl
name = "XL Tailbag"
result = /obj/item/storage/tailbag/xtralg
reqs = list(/obj/item/storage/tailbag = 1,
result = /obj/item/storage/wallet/tailbag/xtralg
reqs = list(/obj/item/storage/wallet/tailbag = 1,
/obj/item/stack/sheet/leather = 2)
time = 30
category = CAT_CLOTHING
122 changes: 0 additions & 122 deletions modular_splurt/code/game/objects/items/storage/tailbag.dm

This file was deleted.

40 changes: 40 additions & 0 deletions modular_splurt/code/game/objects/items/storage/wallets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,43 @@
/obj/item/storage/wallet/bluespace/update_icon_state()
// Don't update icons
return

// Tailbags
/obj/item/storage/wallet/tailbag
name = "tailbag"
desc = "A bag for holding small items. It fastens around the base of the tail."
icon = 'modular_splurt/icons/obj/storage.dmi'
icon_state = "tailbag"

/obj/item/storage/wallet/tailbag/update_icon_state()
// Don't update icons
return

/obj/item/storage/wallet/tailbag/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 6
STR.can_hold += typecacheof(list( // Extra items that can go in tailbags, more than wallets
/obj/item/restraints/handcuffs,
/obj/item/assembly/flash,
/obj/item/laser_pointer,
/obj/item/pda,
/obj/item/paicard
))

/obj/item/storage/wallet/tailbag/xtralg
name = "XL Tailbag"
desc = "A larger tail bag for larger creatures"
icon = 'modular_splurt/icons/obj/storage.dmi'
icon_state = "tailbag_xl"

/obj/item/storage/wallet/tailbag/xtralg/update_icon_state()
// Don't update icons
return

/obj/item/storage/wallet/tailbag/xtralg/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 8

//
48 changes: 24 additions & 24 deletions modular_splurt/code/modules/client/loadout/hands.dm
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/datum/gear/hands/paicard
name = "pAI device"
description = "A personal AI device for checking and downloading various personalities."
path = /obj/item/paicard

/datum/gear/hands/tailbag
name = "Tailbag"
description = "A bag for holding small personal items, which fastens around the base of the tail."
path = /obj/item/storage/tailbag

/datum/gear/hands/tarotdeck
name = "Tarot Deck"
description = "A full 78 card deck of Tarot Cards, no refunds on false predicitons."
path = /obj/item/toy/cards/deck/tarot

//MODIFIED COSTS - MODULAR SPLURT
/datum/gear/hands/straightrazor
cost = 6

/datum/gear/hands/flask
cost = 1

/datum/gear/hands/cigar
cost = 2
/datum/gear/hands/paicard
name = "pAI device"
description = "A personal AI device for checking and downloading various personalities."
path = /obj/item/paicard

/datum/gear/hands/tailbag
name = "Tailbag"
description = "A bag for holding small personal items, which fastens around the base of the tail."
path = /obj/item/storage/wallet/tailbag

/datum/gear/hands/tarotdeck
name = "Tarot Deck"
description = "A full 78 card deck of Tarot Cards, no refunds on false predicitons."
path = /obj/item/toy/cards/deck/tarot

//MODIFIED COSTS - MODULAR SPLURT
/datum/gear/hands/straightrazor
cost = 6

/datum/gear/hands/flask
cost = 1

/datum/gear/hands/cigar
cost = 2
1 change: 0 additions & 1 deletion tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -4584,7 +4584,6 @@
#include "modular_splurt\code\game\objects\items\storage\boxes.dm"
#include "modular_splurt\code\game\objects\items\storage\firstaid.dm"
#include "modular_splurt\code\game\objects\items\storage\secure.dm"
#include "modular_splurt\code\game\objects\items\storage\tailbag.dm"
#include "modular_splurt\code\game\objects\items\storage\wallets.dm"
#include "modular_splurt\code\game\objects\items\tanks\tank_types.dm"
#include "modular_splurt\code\game\objects\items\weaponry\armyknife.dm"
Expand Down

0 comments on commit 21f4e41

Please sign in to comment.