Skip to content

Commit

Permalink
Adds civil war loadouts (#16259)
Browse files Browse the repository at this point in the history
  • Loading branch information
blackdav123 authored Jul 14, 2024
1 parent 5646b5c commit 5324115
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 1 deletion.
42 changes: 42 additions & 0 deletions code/datums/quick_load_civil_war.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*!
* Any loadout that is intended for civil war vendors.
*/

///When making new loadouts, remember to also add the typepath to the list under init_civil_war_loadouts() or else it won't show up in the vendor

/datum/outfit/quick/civil_war
name = "Civil War base"
desc = "Base for redcoat and bluecoat loadouts."
require_job = FALSE

shoes = /obj/item/clothing/shoes/marinechief
head = /obj/item/clothing/head/redcoat
belt = /obj/item/storage/belt/shotgun/martini/full
back = /obj/item/weapon/gun/shotgun/double/martini
r_store = /obj/item/storage/pouch/firstaid
l_store = /obj/item/storage/holster/flarepouch/full

/datum/outfit/quick/civil_war/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
. = ..()
H.equip_to_slot_or_del(new /obj/item/storage/pill_bottle/tramadol, SLOT_IN_R_POUCH)
H.equip_to_slot_or_del(new /obj/item/stack/medical/heal_pack/gauze, SLOT_IN_R_POUCH)
H.equip_to_slot_or_del(new /obj/item/stack/medical/heal_pack/gauze, SLOT_IN_R_POUCH)
H.equip_to_slot_or_del(new /obj/item/stack/medical/heal_pack/ointment, SLOT_IN_R_POUCH)
H.equip_to_slot_or_del(new /obj/item/stack/medical/heal_pack/ointment, SLOT_IN_R_POUCH)
H.equip_to_slot_or_del(new /obj/item/stack/medical/splint, SLOT_IN_R_POUCH)

/datum/outfit/quick/civil_war/bluecoat
name = "Bluecoat"
jobtype = "Bluecoat"
desc = "Tally Ho! Show those redcoats a piece of your independence!"

w_uniform = /obj/item/clothing/under/marine/striped
mask = /obj/item/clothing/mask/bandanna/delta

/datum/outfit/quick/civil_war/redcoat
name = "Redcoat"
jobtype = "Redcoat"
desc = "God save the queen! Show those rebels the might of an empire!"

w_uniform = /obj/item/clothing/under/redcoat
mask = /obj/item/clothing/mask/bandanna/alpha
2 changes: 2 additions & 0 deletions code/datums/quick_load_outfits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
var/quantity = -1
///What job this loadout is associated with. Used for tabs and access.
var/jobtype = "Squad Marine"
///Restricts loadouts to a specific job. Set to false to allow any job to take the loadout.
var/require_job = TRUE


/datum/outfit/quick/equip(mob/living/carbon/human/H, visualsOnly = FALSE)
Expand Down
15 changes: 15 additions & 0 deletions code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,21 @@
existing_handful.create_handful(user, 1)
update_icon()

/obj/item/storage/belt/shotgun/martini/full/Initialize(mapload, ...)
. = ..()
new /obj/item/ammo_magazine/handful/martini(src)
new /obj/item/ammo_magazine/handful/martini(src)
new /obj/item/ammo_magazine/handful/martini(src)
new /obj/item/ammo_magazine/handful/martini(src)
new /obj/item/ammo_magazine/handful/martini(src)
new /obj/item/ammo_magazine/handful/martini(src)
new /obj/item/ammo_magazine/handful/martini(src)
new /obj/item/ammo_magazine/handful/martini(src)
new /obj/item/ammo_magazine/handful/martini(src)
new /obj/item/ammo_magazine/handful/martini(src)
new /obj/item/ammo_magazine/handful/martini(src)
new /obj/item/ammo_magazine/handful/martini(src)

/obj/item/storage/belt/knifepouch
name="\improper M276 pattern knife rig"
desc="The M276 is the standard load-bearing equipment of the TGMC. It consists of a modular belt with various clips. This version is specially designed with six holsters to store throwing knives. Not commonly issued, but kept in service."
Expand Down
26 changes: 26 additions & 0 deletions code/game/objects/machinery/vending/civil_war_vendor.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//Civilwar vendors

GLOBAL_LIST_INIT(civil_war_loadouts, init_civil_war_loadouts())

/proc/init_civil_war_loadouts() //List of all loadouts in civil_war_loadouts
. = list()
var/list/loadout_list = list(
/datum/outfit/quick/civil_war/bluecoat,
/datum/outfit/quick/civil_war/redcoat,
)

for(var/X in loadout_list)
.[X] = new X

/obj/machinery/quick_vendor/civil_war
categories = list(
"Bluecoat"
)

/obj/machinery/quick_vendor/civil_war/redcoat
categories = list(
"Redcoat",
)

/obj/machinery/quick_vendor/civil_war/set_stock_list()
global_list_to_use = GLOB.civil_war_loadouts
2 changes: 1 addition & 1 deletion code/game/objects/machinery/vending/quick_vendor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ GLOBAL_LIST_INIT(quick_loadouts, init_quick_loadouts())
var/obj/item/card/id/user_id = usr.get_idcard() //ui.user better?
var/user_job = user_id.rank
user_job = replacetext(user_job, "Fallen ", "") //So that jobs in valhalla can vend a loadout too
if(selected_loadout.jobtype != user_job)
if(selected_loadout.jobtype != user_job && selected_loadout.require_job != FALSE)
to_chat(usr, span_warning("You are not in the right job for this loadout!"))
return
if(user_id.id_flags & USED_GHMME) //Same check here, in case they opened the UI before vending a loadout somehow
Expand Down
7 changes: 7 additions & 0 deletions code/modules/projectiles/ammunition.dm
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,13 @@
default_ammo = /datum/ammo/bullet/shotgun/incendiary
caliber = CALIBER_12G

/obj/item/ammo_magazine/handful/martini
name = "The handful of crude heavy sniper bullet (.557/440)"
icon_state = "crude_heavy_sniper"
current_rounds = 5
default_ammo = /datum/ammo/bullet/sniper/martini
caliber = CALIBER_557

/obj/item/ammo_magazine/handful/micro_grenade
name = "handful of airburst micro grenades (10g)"
icon_state = "micro_grenade_airburst"
Expand Down
2 changes: 2 additions & 0 deletions tgmc.dme
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@
#include "code\datums\personal_statistics.dm"
#include "code\datums\progressbar.dm"
#include "code\datums\quick_load_beginners.dm"
#include "code\datums\quick_load_civil_war.dm"
#include "code\datums\quick_load_outfits.dm"
#include "code\datums\quick_load_robots.dm"
#include "code\datums\recipe.dm"
Expand Down Expand Up @@ -1138,6 +1139,7 @@
#include "code\game\objects\machinery\telecomms\machines\relay.dm"
#include "code\game\objects\machinery\telecomms\machines\server.dm"
#include "code\game\objects\machinery\vending\beginner_vendor.dm"
#include "code\game\objects\machinery\vending\civil_war_vendor.dm"
#include "code\game\objects\machinery\vending\loadout_vendor.dm"
#include "code\game\objects\machinery\vending\marine_vending.dm"
#include "code\game\objects\machinery\vending\new_marine_vendors.dm"
Expand Down

0 comments on commit 5324115

Please sign in to comment.