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

[MIRROR] gun & ninja boxes are selection items, adds pilot helmet selection item #1597

Merged
merged 1 commit into from
Dec 4, 2023
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
2 changes: 1 addition & 1 deletion baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
117 changes: 64 additions & 53 deletions code/game/antagonist/outsider/ninja.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
GLOBAL_DATUM_INIT(ninjas, /datum/antagonist/ninja, new)


/datum/antagonist/ninja
id = MODE_NINJA
role_text = "Operative"
Expand All @@ -8,92 +9,89 @@ GLOBAL_DATUM_INIT(ninjas, /datum/antagonist/ninja, new)
welcome_text = "<span class='info'>You are an elite operative of some interest group. You have a variety of abilities at your disposal, thanks to your advanced hardsuit.</span>"
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("<B>Directive:</B> [SPAN_DANGER("[directive]")]<br>", /singleton/memory_options/system)
to_chat(player, "<b>Remember your directive:</b> [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)
Expand All @@ -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
)
40 changes: 0 additions & 40 deletions code/game/objects/items/gunboxes.dm

This file was deleted.

30 changes: 30 additions & 0 deletions code/game/objects/items/selection.dm
Original file line number Diff line number Diff line change
@@ -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
)
8 changes: 8 additions & 0 deletions maps/torch/items/selection.dm
Original file line number Diff line number Diff line change
@@ -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
)
4 changes: 1 addition & 3 deletions maps/torch/structures/closets/exploration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions maps/torch/torch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down