From 49bbc1431e8b26583f4e4f87d2e4efbeefdd7ef2 Mon Sep 17 00:00:00 2001
From: Spookerton <918997+Spookerton@users.noreply.github.com>
Date: Sun, 3 Dec 2023 16:30:31 +0300
Subject: [PATCH] [MIRROR] gun & ninja boxes are selection items, adds pilot
helmet selection item
---
baystation12.dme | 2 +-
code/game/antagonist/outsider/ninja.dm | 117 ++++++++++---------
code/game/objects/items/gunboxes.dm | 40 -------
code/game/objects/items/selection.dm | 30 +++++
maps/torch/items/selection.dm | 8 ++
maps/torch/structures/closets/exploration.dm | 4 +-
maps/torch/torch.dm | 1 +
7 files changed, 105 insertions(+), 97 deletions(-)
delete mode 100644 code/game/objects/items/gunboxes.dm
create mode 100644 code/game/objects/items/selection.dm
create mode 100644 maps/torch/items/selection.dm
diff --git a/baystation12.dme b/baystation12.dme
index f2177c90f4608..8d1957ff8e168 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -951,7 +951,6 @@
#include "code\game\objects\items\documents.dm"
#include "code\game\objects\items\flora.dm"
#include "code\game\objects\items\glassjar.dm"
-#include "code\game\objects\items\gunboxes.dm"
#include "code\game\objects\items\holosign_creator.dm"
#include "code\game\objects\items\instruments.dm"
#include "code\game\objects\items\latexballoon.dm"
@@ -960,6 +959,7 @@
#include "code\game\objects\items\passport.dm"
#include "code\game\objects\items\plunger.dm"
#include "code\game\objects\items\rescuebag.dm"
+#include "code\game\objects\items\selection.dm"
#include "code\game\objects\items\spirit_board.dm"
#include "code\game\objects\items\toys.dm"
#include "code\game\objects\items\traitor_plush.dm"
diff --git a/code/game/antagonist/outsider/ninja.dm b/code/game/antagonist/outsider/ninja.dm
index 7f48fb6101597..6e7fff0ea3fb7 100644
--- a/code/game/antagonist/outsider/ninja.dm
+++ b/code/game/antagonist/outsider/ninja.dm
@@ -1,5 +1,6 @@
GLOBAL_DATUM_INIT(ninjas, /datum/antagonist/ninja, new)
+
/datum/antagonist/ninja
id = MODE_NINJA
role_text = "Operative"
@@ -8,92 +9,89 @@ GLOBAL_DATUM_INIT(ninjas, /datum/antagonist/ninja, new)
welcome_text = "You are an elite operative of some interest group. You have a variety of abilities at your disposal, thanks to your advanced hardsuit."
flags = ANTAG_OVERRIDE_JOB | ANTAG_OVERRIDE_MOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_RANDSPAWN | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE
antaghud_indicator = "hudninja"
-
initial_spawn_req = 1
initial_spawn_target = 2
hard_cap = 2
hard_cap_round = 3
min_player_age = 18
-
id_type = /obj/item/card/id/syndicate
-
faction = "ninja"
no_prior_faction = TRUE
-
base_to_load = /datum/map_template/ruin/antag_spawn/ninja
-/datum/antagonist/ninja/create_objectives(datum/mind/ninja)
- if(!..())
+/datum/antagonist/ninja/create_objectives(datum/mind/ninja)
+ if (!..())
return
-
- var/objective_list = list(1,2,3,4,5)
- for(var/i=rand(2,4),i>0,i--)
- switch(pick(objective_list))
- if(1)//Kill
+ var/objective_list = list(1, 2, 3, 4, 5)
+ for (var/i = rand(2, 4) to 1 step -1)
+ switch (pick(objective_list))
+ if (1) //Kill
var/datum/objective/assassinate/ninja_objective = new
ninja_objective.owner = ninja
ninja_objective.target = ninja_objective.find_target()
- if(ninja_objective.target != "Free Objective")
+ if (ninja_objective.target != "Free Objective")
ninja.objectives += ninja_objective
else
i++
- objective_list -= 1 // No more than one kill objective
- if(2)//Steal
+ objective_list -= 1
+ if (2) //Steal
var/datum/objective/steal/ninja_objective = new
ninja_objective.owner = ninja
ninja_objective.target = ninja_objective.find_target()
ninja.objectives += ninja_objective
- if(3)//Protect
+ if (3) //Protect
var/datum/objective/protect/ninja_objective = new
ninja_objective.owner = ninja
ninja_objective.target = ninja_objective.find_target()
- if(ninja_objective.target != "Free Objective")
+ if (ninja_objective.target != "Free Objective")
ninja.objectives += ninja_objective
else
i++
objective_list -= 3
- if(4)//Download
+ if (4) //Download
var/datum/objective/download/ninja_objective = new
ninja_objective.owner = ninja
ninja_objective.gen_amount_goal()
ninja.objectives += ninja_objective
objective_list -= 4
- if(5)//Harm
+ if (5) //Harm
var/datum/objective/harm/ninja_objective = new
ninja_objective.owner = ninja
ninja_objective.target = ninja_objective.find_target()
- if(ninja_objective.target != "Free Objective")
+ if (ninja_objective.target != "Free Objective")
ninja.objectives += ninja_objective
else
i++
objective_list -= 5
-
var/datum/objective/survive/ninja_objective = new
ninja_objective.owner = ninja
ninja.objectives += ninja_objective
-/datum/antagonist/ninja/greet(datum/mind/player)
- if(!..())
+/datum/antagonist/ninja/greet(datum/mind/player)
+ if (!..())
return 0
var/directive = generate_ninja_directive("heel")
player.StoreMemory("Directive: [SPAN_DANGER("[directive]")]
", /singleton/memory_options/system)
to_chat(player, "Remember your directive: [directive].")
+
/datum/antagonist/ninja/equip(mob/living/carbon/human/player)
. = ..()
- if(.)
- var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate(player)
- player.equip_to_slot_or_del(R, slot_l_ear)
- player.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(player), slot_w_uniform)
- create_id("Operative", player)
- var/obj/item/modular_computer/pda/syndicate/U = new
- player.put_in_hands(U)
- var/singleton/uplink_source/pda/uplink_source = new
- uplink_source.setup_uplink_source(player, 0)
- var/obj/item/ninja_kit/kit = new
- player.put_in_hands(kit)
+ if (!.)
+ return
+ var/obj/item/device/radio/radio = new /obj/item/device/radio/headset/syndicate(player)
+ player.equip_to_slot_or_del(radio, slot_l_ear)
+ player.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(player), slot_w_uniform)
+ create_id("Operative", player)
+ var/obj/item/modular_computer/pda/syndicate/pda = new
+ player.put_in_hands(pda)
+ var/singleton/uplink_source/uplink_source = GET_SINGLETON(/singleton/uplink_source/pda)
+ uplink_source.setup_uplink_source(player, 0)
+ var/obj/item/selection/ninja/selection = new
+ player.put_in_hands(selection)
+
/datum/antagonist/ninja/equip_vox(mob/living/carbon/human/vox, mob/living/carbon/human/old)
vox.equip_to_slot_or_del(new /obj/item/clothing/under/vox/vox_casual(vox), slot_w_uniform)
@@ -104,46 +102,59 @@ GLOBAL_DATUM_INIT(ninjas, /datum/antagonist/ninja, new)
vox.put_in_hands(locate(/obj/item/modular_computer/pda/syndicate) in old.contents)
vox.set_internals(locate(/obj/item/tank) in vox.contents)
+
/datum/antagonist/ninja/proc/generate_ninja_directive(side)
- var/directive = "[side=="face"?"[GLOB.using_map.company_name]":"A criminal syndicate"] is your employer. "//Let them know which side they're on.
- switch(rand(1,19))
- if(1)
+ var/directive = "[side=="face"?"[GLOB.using_map.company_name]":"A criminal syndicate"] is your employer. "
+ switch (rand(1, 19))
+ if (1)
directive += "Your interest group must not be linked to this operation. Remain hidden and covert when possible."
- if(2)
+ if (2)
directive += "[GLOB.using_map.station_name] is financed by an enemy of your interest group. Cause as much structural damage as desired."
- if(3)
+ if (3)
directive += "A wealthy animal rights activist has made a request we cannot refuse. Prioritize saving animal lives whenever possible."
- if(4)
+ if (4)
directive += "Your interest group absolutely cannot be linked to this operation. Eliminate witnesses at your discretion."
- if(5)
+ if (5)
directive += "We are currently negotiating with [GLOB.using_map.company_name] [GLOB.using_map.boss_name]. Prioritize saving human lives over ending them."
- if(6)
+ if (6)
directive += "We are engaged in a legal dispute over [GLOB.using_map.station_name]. If a laywer is present on board, force their cooperation in the matter."
- if(7)
+ if (7)
directive += "A financial backer has made an offer we cannot refuse. Implicate criminal involvement in the operation."
- if(8)
+ if (8)
directive += "Let no one question the mercy of your interest group. Ensure the safety of all non-essential personnel you encounter."
- if(9)
+ if (9)
directive += "A free agent has proposed a lucrative business deal. Implicate [GLOB.using_map.company_name] involvement in the operation."
- if(10)
+ if (10)
directive += "Our reputation is on the line. Harm as few civilians and innocents as possible."
- if(11)
+ if (11)
directive += "Our honor is on the line. Utilize only honorable tactics when dealing with opponents."
- if(12)
+ if (12)
directive += "We are currently negotiating with a mercenary leader. Disguise assassinations as suicide or other natural causes."
- if(13)
+ if (13)
directive += "Some disgruntled [GLOB.using_map.company_name] employees have been supportive of our operations. Be wary of any mistreatment by command staff."
- if(14)
+ if (14)
var/xenorace = pick(SPECIES_UNATHI, SPECIES_SKRELL)
directive += "A group of [xenorace] radicals have been loyal supporters of your interest group. Favor [xenorace] crew whenever possible."
- if(15)
+ if (15)
directive += "Your interest group has recently been accused of religious insensitivity. Attempt to speak with the Chaplain and prove these accusations false."
- if(16)
+ if (16)
directive += "Your interest group has been bargaining with a competing prosthetics manufacturer. Try to shine [GLOB.using_map.company_name] prosthetics in a bad light."
- if(17)
+ if (17)
directive += "Your interest group has recently begun recruiting outsiders. Consider suitable candidates and assess their behavior amongst the crew."
- if(18)
+ if (18)
directive += "A cyborg liberation group has expressed interest in our serves. Prove your interest group is merciful towards law-bound synthetics."
else
directive += "There are no special supplemental instructions at this time."
return directive
+
+
+/obj/item/selection/ninja
+ name = "loadout selection kit"
+ desc = "A secure box containing standard operation kit for special forces operatives."
+ selection_options = list(
+ "Solar Special Operations" = /obj/structure/closet/crate/ninja/sol,
+ "Gilgameshi Commando" = /obj/structure/closet/crate/ninja/gcc,
+ "Syndicate Mercenary" = /obj/structure/closet/crate/ninja/merc,
+ "Corporate Operative" = /obj/structure/closet/crate/ninja/corpo,
+ "Spider-Clan Ninja" = /obj/structure/closet/crate/ninja
+ )
diff --git a/code/game/objects/items/gunboxes.dm b/code/game/objects/items/gunboxes.dm
deleted file mode 100644
index 811cb7b1036db..0000000000000
--- a/code/game/objects/items/gunboxes.dm
+++ /dev/null
@@ -1,40 +0,0 @@
-/obj/item/gunbox
- name = "sidearm kit"
- desc = "A secure box containing a sidearm."
- icon = 'icons/obj/boxes.dmi'
- icon_state = "excavation"
- var/list/gun_options = list(
- "Classic - Secure Smartgun" = /obj/item/gun/energy/gun/secure/preauthorized,
- "Stylish - Secure Smart Revolver" = /obj/item/gun/energy/revolver/secure/preauthorized
- )
-
-/obj/item/gunbox/attack_self(mob/user)
- var/choice = input(user, "What is your choice?") as null|anything in gun_options
- if (choice && user.use_sanity_check(src))
- var/new_weapon_path = gun_options[choice]
- var/obj/item/new_weapon = new new_weapon_path(user.loc)
- user.drop_from_inventory(src)
- user.put_in_any_hand_if_possible(new_weapon)
- to_chat(user, SPAN_NOTICE("You take \the [new_weapon] out of \the [src]."))
- qdel(src)
-
-/obj/item/ninja_kit
- name = "loadout selection kit"
- desc = "A secure box containing standard operation kit for special forces operatives."
- icon = 'icons/obj/tools/xenoarcheology_tools.dmi'
- icon_state = "excavation"
- var/list/faction_options = list(
- "Solar Special Operations Unit" = /obj/structure/closet/crate/ninja/sol,
- "Gilgameshi Commando" = /obj/structure/closet/crate/ninja/gcc,
- "Syndicate Mercenary" = /obj/structure/closet/crate/ninja/merc,
- "Corporate Operative" = /obj/structure/closet/crate/ninja/corpo,
- "Spider-Clan Ninja" = /obj/structure/closet/crate/ninja
- )
-
-/obj/item/ninja_kit/attack_self(mob/user)
- var/choice = input(user, "What is your choice?") as null|anything in faction_options
- if (choice && user.use_sanity_check(src))
- var/new_item_path = faction_options[choice]
- var/obj/new_item = new new_item_path(get_turf(src))
- to_chat(user, SPAN_NOTICE("You have chosen \the [new_item]."))
- qdel(src)
diff --git a/code/game/objects/items/selection.dm b/code/game/objects/items/selection.dm
new file mode 100644
index 0000000000000..4ba7fe5af5e0a
--- /dev/null
+++ b/code/game/objects/items/selection.dm
@@ -0,0 +1,30 @@
+/obj/item/selection
+ abstract_type = /obj/item/selection
+ icon = 'icons/obj/tools/xenoarcheology_tools.dmi'
+ icon_state = "excavation"
+ var/list/selection_options
+
+
+/obj/item/selection/attack_self(mob/living/user)
+ var/response = input(user, null, "Select Replacement Item") as null | anything in selection_options
+ if (isnull(response) || !(response in selection_options))
+ return
+ if (!user.use_sanity_check(src))
+ to_chat(user, SPAN_WARNING("You're not able to do that right now."))
+ return
+ user.drop_from_inventory(src)
+ var/obj/obj = selection_options[response]
+ obj = new obj (user.loc)
+ if (isitem(obj))
+ user.put_in_any_hand_if_possible(obj)
+ to_chat(user, SPAN_ITALIC("You take \the [obj] out of \the [src]."))
+ qdel(src)
+
+
+/obj/item/selection/siderm
+ name = "sidearm kit"
+ desc = "A secure box containing a sidearm."
+ selection_options = list(
+ "Classic - Secure Smartgun" = /obj/item/gun/energy/gun/secure/preauthorized,
+ "Stylish - Secure Smart Revolver" = /obj/item/gun/energy/revolver/secure/preauthorized
+ )
diff --git a/maps/torch/items/selection.dm b/maps/torch/items/selection.dm
new file mode 100644
index 0000000000000..a1cc8446e849f
--- /dev/null
+++ b/maps/torch/items/selection.dm
@@ -0,0 +1,8 @@
+/obj/item/selection/pilot_helmet
+ name = "pilot's helmet case"
+ desc = "A solid case containing the Shuttle Pilot's flight helmet."
+ selection_options = list(
+ "Standard Pilot's Helmet" = /obj/item/clothing/head/helmet/solgov/pilot,
+ "Corporate Pilot's Helmet" = /obj/item/clothing/head/helmet/nt/pilot,
+ "Fleet Pilot's Helmet" = /obj/item/clothing/head/helmet/solgov/pilot/fleet
+ )
diff --git a/maps/torch/structures/closets/exploration.dm b/maps/torch/structures/closets/exploration.dm
index ab95a7da98e00..0c7e76da7d6ec 100644
--- a/maps/torch/structures/closets/exploration.dm
+++ b/maps/torch/structures/closets/exploration.dm
@@ -98,9 +98,7 @@
/obj/item/device/binoculars,
/obj/item/clothing/gloves/thick,
/obj/item/clothing/suit/storage/hazardvest/blue,
- /obj/item/clothing/head/helmet/solgov/pilot,
- /obj/item/clothing/head/helmet/solgov/pilot/fleet,
- /obj/item/clothing/head/helmet/nt/pilot,
+ /obj/item/selection/pilot_helmet,
/obj/item/storage/firstaid/light,
/obj/item/material/knife/folding/swiss/explorer,
/obj/item/storage/backpack/dufflebag,
diff --git a/maps/torch/torch.dm b/maps/torch/torch.dm
index f871a0fb3a8bf..9e63e39bb1c15 100644
--- a/maps/torch/torch.dm
+++ b/maps/torch/torch.dm
@@ -62,6 +62,7 @@
#include "items/cards_ids.dm"
#include "items/coins.dm"
#include "items/encryption_keys.dm"
+ #include "items/selection.dm"
#include "items/headsets.dm"
#include "items/items.dm"
#include "items/machinery.dm"