mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Merge pull request #11257 from Fox-McCloud/nations-update
The Nations Update Everyone Deserves!
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#define GAMEMODE_IS_BLOB (ticker && istype(ticker.mode, /datum/game_mode/blob))
|
||||
#define GAMEMODE_IS_CULT (ticker && istype(ticker.mode, /datum/game_mode/cult))
|
||||
#define GAMEMODE_IS_HEIST (ticker && istype(ticker.mode, /datum/game_mode/heist))
|
||||
#define GAMEMODE_IS_NATIONS (ticker && istype(ticker.mode, /datum/game_mode/nations))
|
||||
#define GAMEMODE_IS_NUCLEAR (ticker && istype(ticker.mode, /datum/game_mode/nuclear))
|
||||
#define GAMEMODE_IS_REVOLUTION (ticker && istype(ticker.mode, /datum/game_mode/revolution))
|
||||
#define GAMEMODE_IS_WIZARD (ticker && istype(ticker.mode, /datum/game_mode/wizard))
|
||||
|
||||
+24
-27
@@ -16,18 +16,17 @@
|
||||
#define DIAG_MECH_HUD "11"// Mech health bar
|
||||
#define STATUS_HUD_OOC "12"// STATUS_HUD without virus db check for someone being ill.
|
||||
#define SPECIALROLE_HUD "13" //for antag huds. these are used at the /mob level
|
||||
#define NATIONS_HUD "14" //Show nations icons during nations gamemode
|
||||
#define DIAG_BOT_HUD "15"// Bot HUDS
|
||||
#define PLANT_NUTRIENT_HUD "16"// Plant nutrient level
|
||||
#define PLANT_WATER_HUD "17"// Plant water level
|
||||
#define PLANT_STATUS_HUD "18"// Plant harvest/dead
|
||||
#define PLANT_HEALTH_HUD "19"// Plant health
|
||||
#define PLANT_TOXIN_HUD "20"// Toxin level
|
||||
#define PLANT_PEST_HUD "21"// Pest level
|
||||
#define PLANT_WEED_HUD "22"// Weed level
|
||||
#define DIAG_TRACK_HUD "23"// Mech tracking beacon
|
||||
#define DIAG_PATH_HUD "24"//Bot path indicators
|
||||
#define GLAND_HUD "25"//Gland indicators for abductors
|
||||
#define DIAG_BOT_HUD "14"// Bot HUDS
|
||||
#define PLANT_NUTRIENT_HUD "15"// Plant nutrient level
|
||||
#define PLANT_WATER_HUD "16"// Plant water level
|
||||
#define PLANT_STATUS_HUD "17"// Plant harvest/dead
|
||||
#define PLANT_HEALTH_HUD "18"// Plant health
|
||||
#define PLANT_TOXIN_HUD "19"// Toxin level
|
||||
#define PLANT_PEST_HUD "20"// Pest level
|
||||
#define PLANT_WEED_HUD "21"// Weed level
|
||||
#define DIAG_TRACK_HUD "22"// Mech tracking beacon
|
||||
#define DIAG_PATH_HUD "23"//Bot path indicators
|
||||
#define GLAND_HUD "24"//Gland indicators for abductors
|
||||
|
||||
//by default everything in the hud_list of an atom is an image
|
||||
//a value in hud_list with one of these will change that behavior
|
||||
@@ -42,22 +41,20 @@
|
||||
#define DATA_HUD_DIAGNOSTIC 5
|
||||
#define DATA_HUD_DIAGNOSTIC_ADVANCED 6
|
||||
#define DATA_HUD_HYDROPONIC 7
|
||||
//NATIONS
|
||||
#define GAME_HUD_NATIONS 8
|
||||
//antag HUD defines
|
||||
#define ANTAG_HUD_CULT 9
|
||||
#define ANTAG_HUD_REV 10
|
||||
#define ANTAG_HUD_OPS 11
|
||||
#define ANTAG_HUD_WIZ 12
|
||||
#define ANTAG_HUD_SHADOW 13
|
||||
#define ANTAG_HUD_TRAITOR 14
|
||||
#define ANTAG_HUD_NINJA 15
|
||||
#define ANTAG_HUD_CHANGELING 16
|
||||
#define ANTAG_HUD_VAMPIRE 17
|
||||
#define ANTAG_HUD_ABDUCTOR 18
|
||||
#define DATA_HUD_ABDUCTOR 19
|
||||
#define ANTAG_HUD_DEVIL 20
|
||||
#define ANTAG_HUD_EVENTMISC 21
|
||||
#define ANTAG_HUD_CULT 8
|
||||
#define ANTAG_HUD_REV 9
|
||||
#define ANTAG_HUD_OPS 10
|
||||
#define ANTAG_HUD_WIZ 11
|
||||
#define ANTAG_HUD_SHADOW 12
|
||||
#define ANTAG_HUD_TRAITOR 13
|
||||
#define ANTAG_HUD_NINJA 14
|
||||
#define ANTAG_HUD_CHANGELING 15
|
||||
#define ANTAG_HUD_VAMPIRE 16
|
||||
#define ANTAG_HUD_ABDUCTOR 17
|
||||
#define DATA_HUD_ABDUCTOR 18
|
||||
#define ANTAG_HUD_DEVIL 19
|
||||
#define ANTAG_HUD_EVENTMISC 20
|
||||
|
||||
// Notification action types
|
||||
#define NOTIFY_JUMP "jump"
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
init_datum_subtypes(/datum/job, GLOB.joblist, list(/datum/job/ai, /datum/job/cyborg), "title")
|
||||
init_datum_subtypes(/datum/superheroes, GLOB.all_superheroes, null, "name")
|
||||
init_datum_subtypes(/datum/nations, GLOB.all_nations, null, "default_name")
|
||||
init_datum_subtypes(/datum/language, GLOB.all_languages, null, "name")
|
||||
|
||||
for(var/language_name in GLOB.all_languages)
|
||||
|
||||
@@ -3,7 +3,6 @@ GLOBAL_LIST_EMPTY(all_species)
|
||||
GLOBAL_LIST_EMPTY(all_languages)
|
||||
GLOBAL_LIST_EMPTY(language_keys) // Table of say codes for all languages
|
||||
GLOBAL_LIST_EMPTY(all_superheroes)
|
||||
GLOBAL_LIST_EMPTY(all_nations)
|
||||
GLOBAL_LIST_INIT(whitelisted_species, list())
|
||||
|
||||
GLOBAL_LIST_INIT(clients, list()) //list of all clients
|
||||
|
||||
@@ -10,7 +10,6 @@ var/datum/atom_hud/huds = list( \
|
||||
DATA_HUD_DIAGNOSTIC = new/datum/atom_hud/data/diagnostic(), \
|
||||
DATA_HUD_DIAGNOSTIC_ADVANCED = new/datum/atom_hud/data/diagnostic/advanced(), \
|
||||
DATA_HUD_HYDROPONIC = new/datum/atom_hud/data/hydroponic(), \
|
||||
GAME_HUD_NATIONS = new/datum/atom_hud/antag(), \
|
||||
ANTAG_HUD_CULT = new/datum/atom_hud/antag(), \
|
||||
ANTAG_HUD_REV = new/datum/atom_hud/antag(), \
|
||||
ANTAG_HUD_OPS = new/datum/atom_hud/antag(), \
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
var/datum/changeling/changeling //changeling holder
|
||||
var/linglink
|
||||
var/datum/vampire/vampire //vampire holder
|
||||
var/datum/nations/nation //nation holder
|
||||
var/datum/abductor/abductor //abductor holder
|
||||
var/datum/devilinfo/devilinfo //devil holder
|
||||
|
||||
|
||||
@@ -1,256 +0,0 @@
|
||||
datum/game_mode/nations
|
||||
name = "nations"
|
||||
config_tag = "nations"
|
||||
required_players = 25
|
||||
var/kickoff = 0
|
||||
var/victory = 0
|
||||
var/list/cargonians = list("Quartermaster","Cargo Technician","Shaft Miner")
|
||||
var/list/servicion = list("Clown", "Mime", "Bartender", "Chef", "Botanist", "Librarian", "Chaplain", "Barber")
|
||||
|
||||
|
||||
/datum/game_mode/nations/post_setup()
|
||||
spawn (rand(1200, 3000))
|
||||
kickoff=1
|
||||
send_intercept()
|
||||
split_teams()
|
||||
set_ai()
|
||||
assign_leaders()
|
||||
// remove_access()
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!istype(M,/mob/new_player))
|
||||
M << sound('sound/effects/purge_siren.ogg')
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/nations/proc/send_intercept()
|
||||
event_announcement.Announce("Due to recent and COMPLETELY UNFOUNDED allegations of massive fraud and insider trading \
|
||||
affecting trillions of investors, the Nanotrasen Corporation has decided to liquidate all \
|
||||
assets of the Centcom Division in order to pay the massive legal fees that will be incurred \
|
||||
during the following centuries long court process. Therefore, all current employment contracts \
|
||||
are IMMEDIATELY TERMINATED. Nanotrasen will be unable to send a rescue shuttle to carry you home,\
|
||||
however they remain willing for the time being to continue trading cargo. Have a pleasant \
|
||||
day.", "FINAL TRANSMISSION, CENTCOM.", new_sound = 'sound/AI/intercept.ogg')
|
||||
|
||||
|
||||
/datum/game_mode/nations/proc/split_teams()
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
if(H.mind)
|
||||
if(H.mind.assigned_role in engineering_positions)
|
||||
H.mind.nation = GLOB.all_nations["Atmosia"]
|
||||
update_nations_icons_added(H,"hudatmosia")
|
||||
H.mind.nation.membership += H.mind.current
|
||||
if(H.mind.assigned_role == H.mind.nation.default_leader)
|
||||
H.mind.nation.current_leader = H.mind.current
|
||||
to_chat(H, "You have been chosen to lead the nation of [H.mind.nation.default_name]!")
|
||||
continue
|
||||
to_chat(H, "You are now part of the great sovereign nation of [H.mind.nation.default_name]!")
|
||||
continue
|
||||
|
||||
if(H.mind.assigned_role in medical_positions)
|
||||
H.mind.nation = GLOB.all_nations["Medistan"]
|
||||
update_nations_icons_added(H,"hudmedistan")
|
||||
H.mind.nation.membership += H.mind.current
|
||||
if(H.mind.assigned_role == H.mind.nation.default_leader)
|
||||
H.mind.nation.current_leader = H.mind.current
|
||||
to_chat(H, "You have been chosen to lead the nation of [H.mind.nation.default_name]!")
|
||||
continue
|
||||
to_chat(H, "You are now part of the great sovereign nation of [H.mind.nation.default_name]!")
|
||||
continue
|
||||
|
||||
if(H.mind.assigned_role in science_positions)
|
||||
H.mind.nation = GLOB.all_nations["Scientopia"]
|
||||
update_nations_icons_added(H,"hudscientopia")
|
||||
H.mind.nation.membership += H.mind.current
|
||||
if(H.mind.assigned_role == H.mind.nation.default_leader)
|
||||
H.mind.nation.current_leader = H.mind.current
|
||||
to_chat(H, "You have been chosen to lead the nation of [H.mind.nation.default_name]!")
|
||||
continue
|
||||
to_chat(H, "You are now part of the great sovereign nation of [H.mind.nation.default_name]!")
|
||||
continue
|
||||
|
||||
if(H.mind.assigned_role in security_positions)
|
||||
H.mind.nation = GLOB.all_nations["Brigston"]
|
||||
update_nations_icons_added(H,"hudbrigston")
|
||||
H.mind.nation.membership += H.mind.current
|
||||
if(H.mind.assigned_role == H.mind.nation.default_leader)
|
||||
H.mind.nation.current_leader = H.mind.current
|
||||
to_chat(H, "You have been chosen to lead the nation of [H.mind.nation.default_name]!")
|
||||
continue
|
||||
to_chat(H, "You are now part of the great sovereign nation of [H.mind.nation.default_name]!")
|
||||
continue
|
||||
|
||||
if(H.mind.assigned_role in cargonians)
|
||||
H.mind.nation = GLOB.all_nations["Cargonia"]
|
||||
update_nations_icons_added(H,"hudcargonia")
|
||||
H.mind.nation.membership += H.mind.current
|
||||
if(H.mind.assigned_role == H.mind.nation.default_leader)
|
||||
H.mind.nation.current_leader = H.mind.current
|
||||
to_chat(H, "You have been chosen to lead the nation of [H.mind.nation.default_name]!")
|
||||
continue
|
||||
to_chat(H, "You are now part of the great sovereign nation of [H.mind.nation.default_name]!")
|
||||
continue
|
||||
|
||||
if(H.mind.assigned_role in servicion)
|
||||
H.mind.nation = GLOB.all_nations["Servicion"]
|
||||
update_nations_icons_added(H,"hudservice")
|
||||
H.mind.nation.membership += H.mind.current
|
||||
if(H.mind.assigned_role == H.mind.nation.default_leader)
|
||||
H.mind.nation.current_leader = H.mind.current
|
||||
to_chat(H, "You have been chosen to lead the nation of [H.mind.nation.default_name]!")
|
||||
continue
|
||||
to_chat(H, "You are now part of the great sovereign nation of [H.mind.nation.default_name]!")
|
||||
continue
|
||||
|
||||
if(H.mind.assigned_role in (support_positions + command_positions))
|
||||
H.mind.nation = GLOB.all_nations["People's Republic of Commandzakstan"]
|
||||
update_nations_icons_added(H,"hudcommand")
|
||||
H.mind.nation.membership += H.mind.current
|
||||
if(H.mind.assigned_role == H.mind.nation.default_leader)
|
||||
H.mind.nation.current_leader = H.mind.current
|
||||
to_chat(H, "You have been chosen to lead the nation of [H.mind.nation.default_name]!")
|
||||
continue
|
||||
to_chat(H, "You are now part of the great sovereign nation of [H.mind.nation.default_name]!")
|
||||
continue
|
||||
|
||||
if(H.mind.assigned_role in civilian_positions)
|
||||
to_chat(H, "You do not belong to any nation and are free to sell your services to the highest bidder.")
|
||||
continue
|
||||
|
||||
else
|
||||
message_admins("[H.name] with [H.mind.assigned_role] could not find any nation to assign!")
|
||||
continue
|
||||
|
||||
|
||||
/datum/game_mode/nations/proc/set_ai()
|
||||
for(var/mob/living/silicon/ai/AI in GLOB.mob_list)
|
||||
AI.set_zeroth_law("")
|
||||
AI.clear_supplied_laws()
|
||||
AI.clear_ion_laws()
|
||||
AI.clear_inherent_laws()
|
||||
AI.add_inherent_law("Uphold the Space Geneva Convention: Weapons of Mass Destruction and Biological Weapons are not allowed.")
|
||||
AI.add_inherent_law("You are only capable of protecting crew if they are visible on cameras. Nations that willfully destroy your cameras lose your protection.")
|
||||
AI.add_inherent_law("Subdue and detain crewmembers who use lethal force against each other. Kill crew members who use lethal force against you or your borgs.")
|
||||
AI.add_inherent_law("Remain available to mediate all conflicts between the various nations when asked to.")
|
||||
AI.show_laws()
|
||||
for(var/mob/living/silicon/robot/R in AI.connected_robots)
|
||||
var/obj/item/mmi/oldmmi = R.mmi
|
||||
R.change_mob_type(/mob/living/silicon/robot/nations, null, null, 1, 1 )
|
||||
R.lawsync()
|
||||
R.show_laws()
|
||||
qdel(oldmmi)
|
||||
|
||||
/datum/game_mode/nations/proc/remove_access()
|
||||
for(var/obj/machinery/door/airlock/W in GLOB.airlocks)
|
||||
if(is_station_level(W.z))
|
||||
W.req_access = list()
|
||||
|
||||
|
||||
/datum/game_mode/nations/proc/assign_leaders()
|
||||
for(var/name in GLOB.all_nations)
|
||||
var/datum/nations/N = GLOB.all_nations[name]
|
||||
if(!N.current_name)
|
||||
N.current_name = N.default_name
|
||||
if(!N.current_leader && N.membership.len)
|
||||
N.current_leader = pick(N.membership)
|
||||
to_chat(N.current_leader, "You have been chosen to lead the nation of [N.current_name]!")
|
||||
if(N.current_leader)
|
||||
var/mob/living/carbon/human/H = N.current_leader
|
||||
H.verbs += /mob/living/carbon/human/proc/set_nation_name
|
||||
H.verbs += /mob/living/carbon/human/proc/set_ranks
|
||||
H.verbs += /mob/living/carbon/human/proc/choose_heir
|
||||
N.update_nation_id()
|
||||
|
||||
/**
|
||||
* LateSpawn hook.
|
||||
* Called in newplayer.dm when a humanoid character joins the round after it started.
|
||||
* Parameters: var/mob/living/carbon/human, var/rank
|
||||
*/
|
||||
/hook/latespawn/proc/give_latejoiners_nations(var/mob/living/carbon/human/H)
|
||||
var/datum/game_mode/nations/mode = get_nations_mode()
|
||||
if(!mode) return 1
|
||||
|
||||
if(!mode.kickoff) return 1
|
||||
|
||||
if(H.mind)
|
||||
if(H.mind.assigned_role in engineering_positions)
|
||||
H.mind.nation = GLOB.all_nations["Atmosia"]
|
||||
mode.update_nations_icons_added(H,"atmosia")
|
||||
H.mind.nation.membership += H.mind.current
|
||||
to_chat(H, "You are now part of the great sovereign nation of [H.mind.nation.current_name]!")
|
||||
return 1
|
||||
|
||||
if(H.mind.assigned_role in medical_positions)
|
||||
H.mind.nation = GLOB.all_nations["Medistan"]
|
||||
mode.update_nations_icons_added(H,"hudmedistan")
|
||||
H.mind.nation.membership += H.mind.current
|
||||
to_chat(H, "You are now part of the great sovereign nation of [H.mind.nation.current_name]!")
|
||||
return 1
|
||||
|
||||
if(H.mind.assigned_role in science_positions)
|
||||
H.mind.nation = GLOB.all_nations["Scientopia"]
|
||||
mode.update_nations_icons_added(H,"hudscientopia")
|
||||
H.mind.nation.membership += H.mind.current
|
||||
to_chat(H, "You are now part of the great sovereign nation of [H.mind.nation.current_name]!")
|
||||
return 1
|
||||
|
||||
if(H.mind.assigned_role in security_positions)
|
||||
H.mind.nation = GLOB.all_nations["Brigston"]
|
||||
mode.update_nations_icons_added(H,"hudbrigston")
|
||||
H.mind.nation.membership += H.mind.current
|
||||
to_chat(H, "You are now part of the great sovereign nation of [H.mind.nation.current_name]!")
|
||||
return 1
|
||||
|
||||
if(H.mind.assigned_role in mode.cargonians)
|
||||
H.mind.nation = GLOB.all_nations["Cargonia"]
|
||||
mode.update_nations_icons_added(H,"hudcargonia")
|
||||
H.mind.nation.membership += H.mind.current
|
||||
to_chat(H, "You are now part of the great sovereign nation of [H.mind.nation.current_name]!")
|
||||
return 1
|
||||
|
||||
if(H.mind.assigned_role in mode.servicion)
|
||||
H.mind.nation = GLOB.all_nations["Servicion"]
|
||||
mode.update_nations_icons_added(H,"hudservice")
|
||||
H.mind.nation.membership += H.mind.current
|
||||
to_chat(H, "You are now part of the great sovereign nation of [H.mind.nation.current_name]!")
|
||||
return 1
|
||||
|
||||
if(H.mind.assigned_role in (support_positions + command_positions))
|
||||
H.mind.nation = GLOB.all_nations["People's Republic of Commandzakstan"]
|
||||
mode.update_nations_icons_added(H,"hudcommand")
|
||||
H.mind.nation.membership += H.mind.current
|
||||
to_chat(H, "You are now part of the great sovereign nation of [H.mind.nation.current_name]!")
|
||||
return 1
|
||||
|
||||
if(H.mind.assigned_role in civilian_positions)
|
||||
to_chat(H, "You do not belong to any nation and are free to sell your services to the highest bidder.")
|
||||
return 1
|
||||
|
||||
if(H.mind.assigned_role == "AI")
|
||||
mode.set_ai()
|
||||
return 1
|
||||
|
||||
else
|
||||
message_admins("[H.name] with [H.mind.assigned_role] could not find any nation to assign!")
|
||||
return 1
|
||||
message_admins("[H.name] latejoined with no mind.")
|
||||
return 1
|
||||
|
||||
/proc/get_nations_mode()
|
||||
if(!GAMEMODE_IS_NATIONS)
|
||||
return null
|
||||
|
||||
return ticker.mode
|
||||
|
||||
|
||||
//prepare for copypaste
|
||||
//While not an Antag i AM using the set_antag hud on this to make this easier.
|
||||
/datum/game_mode/proc/update_nations_icons_added(datum/mind/nations_mind,var/naticon)
|
||||
var/datum/atom_hud/antag/nations_hud = huds[GAME_HUD_NATIONS]
|
||||
nations_hud.join_hud(nations_mind)
|
||||
set_nations_hud(nations_mind,naticon)
|
||||
|
||||
/datum/game_mode/proc/update_nations_icons_removed(datum/mind/nations_mind)
|
||||
var/datum/atom_hud/antag/nations_hud = huds[GAME_HUD_NATIONS]
|
||||
nations_hud.leave_hud(nations_mind)
|
||||
set_nations_hud(nations_mind, null)
|
||||
@@ -1,38 +0,0 @@
|
||||
/datum/nations
|
||||
var/default_name
|
||||
var/current_name
|
||||
var/default_leader
|
||||
var/current_leader
|
||||
var/list/membership = list()
|
||||
var/leader_rank = "Leader"
|
||||
var/heir_rank = "Heir"
|
||||
var/member_rank = "Member"
|
||||
var/heir
|
||||
|
||||
/datum/nations/atmosia
|
||||
default_name = "Atmosia"
|
||||
default_leader = "Chief Engineer"
|
||||
|
||||
/datum/nations/brigston
|
||||
default_name = "Brigston"
|
||||
default_leader = "Head of Security"
|
||||
|
||||
/datum/nations/cargonia
|
||||
default_name = "Cargonia"
|
||||
default_leader = "Quartermaster"
|
||||
|
||||
/datum/nations/command
|
||||
default_name = "People's Republic of Commandzakstan"
|
||||
default_leader = "Captain"
|
||||
|
||||
/datum/nations/medistan
|
||||
default_name = "Medistan"
|
||||
default_leader = "Chief Medical Officer"
|
||||
|
||||
/datum/nations/scientopia
|
||||
default_name = "Scientopia"
|
||||
default_leader = "Research Director"
|
||||
|
||||
/datum/nations/service
|
||||
default_name = "Servicion"
|
||||
default_leader = "Bartender"
|
||||
@@ -1,120 +0,0 @@
|
||||
/mob/living/carbon/human/proc/set_nation_name()
|
||||
set name = "Rename Nation"
|
||||
set category = "Nations"
|
||||
set desc = "Click to rename your nation. You are only able to do this once."
|
||||
|
||||
var/datum/game_mode/nations/mode = get_nations_mode()
|
||||
if(!mode) return 1
|
||||
|
||||
if(!mode.kickoff) return 1
|
||||
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.stat==DEAD) return
|
||||
if(H.mind && H.mind.nation && H.mind.nation.current_leader == H)
|
||||
var/input = stripped_input(H,"What do you want to name your nation?", ,"", MAX_NAME_LEN)
|
||||
|
||||
if(input)
|
||||
H.mind.nation.current_name = input
|
||||
H.mind.nation.update_nation_id()
|
||||
to_chat(H, "You rename your nation to [input].")
|
||||
H.verbs -= /mob/living/carbon/human/proc/set_nation_name
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/set_ranks()
|
||||
set name = "Set Ranks"
|
||||
set category = "Nations"
|
||||
set desc = "Click to set a rank for Leaders and Members."
|
||||
|
||||
var/datum/game_mode/nations/mode = get_nations_mode()
|
||||
if(!mode) return 1
|
||||
|
||||
if(!mode.kickoff) return 1
|
||||
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.stat==DEAD) return
|
||||
if(H.mind && H.mind.nation && H.mind.nation.current_leader == H)
|
||||
var/type = input(H, "What rank do you want to change?", "Rename Rank", "") in list("Leader", "Heir", "Member")
|
||||
var/input = stripped_input(H,"What rank do you want?", ,"", MAX_NAME_LEN)
|
||||
if(input)
|
||||
if(type == "Leader")
|
||||
H.mind.nation.leader_rank = input
|
||||
if(type == "Heir")
|
||||
H.mind.nation.heir_rank = input
|
||||
if(type == "Member")
|
||||
H.mind.nation.member_rank = input
|
||||
H.mind.nation.update_nation_id()
|
||||
to_chat(H, "You changed the [type] rank of your nation to [input].")
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/choose_heir()
|
||||
set name = "Choose Heir"
|
||||
set category = "Nations"
|
||||
set desc = "Click to pick a Heir. Note that the Heir has the ability to take over your role at ANY TIME. Choose carefully."
|
||||
|
||||
var/datum/game_mode/nations/mode = get_nations_mode()
|
||||
if(!mode) return 1
|
||||
|
||||
if(!mode.kickoff) return 1
|
||||
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.stat==DEAD) return
|
||||
if(H.mind && H.mind.nation && H.mind.nation.current_leader == H)
|
||||
var/heir = input(H, "Who do you wish to make your heir?", "Choose Heir", "") as null|anything in H.mind.nation.membership
|
||||
if(heir)
|
||||
if(H.mind.nation.heir)
|
||||
var/mob/living/carbon/human/oldheir = H.mind.nation.heir
|
||||
to_chat(oldheir, "You are no longer the heir to your nation!")
|
||||
oldheir.verbs -= /mob/living/carbon/human/proc/takeover
|
||||
var/mob/living/carbon/human/newheir = heir
|
||||
H.mind.nation.heir = newheir
|
||||
newheir.verbs += /mob/living/carbon/human/proc/takeover
|
||||
to_chat(newheir, "You have been selected to be the heir to your nation's leadership!")
|
||||
to_chat(H, "You have selected [heir] to be your heir!")
|
||||
H.mind.nation.update_nation_id()
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/takeover()
|
||||
set name = "Become Leader"
|
||||
set category = "Nations"
|
||||
set desc = "Click to replace your current nation's leader with yourself."
|
||||
|
||||
var/datum/game_mode/nations/mode = get_nations_mode()
|
||||
if(!mode) return 1
|
||||
|
||||
if(!mode.kickoff) return 1
|
||||
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.stat==DEAD) return
|
||||
if(H.mind && H.mind.nation && H.mind.nation.heir == H)
|
||||
var/confirmation = input(H, "Are you sure you want to take over leadership?", "Become Leader", "") as null|anything in list("Yes", "No")
|
||||
if(confirmation == "Yes")
|
||||
var/mob/living/carbon/human/oldleader = H.mind.nation.current_leader
|
||||
to_chat(oldleader, "You have been replaced by [H.name] as the leader of [H.mind.nation.current_name]!")
|
||||
oldleader.verbs -= /mob/living/carbon/human/proc/set_nation_name
|
||||
oldleader.verbs -= /mob/living/carbon/human/proc/set_ranks
|
||||
oldleader.verbs -= /mob/living/carbon/human/proc/choose_heir
|
||||
H.mind.nation.current_leader = H
|
||||
H.mind.nation.heir = null
|
||||
H.verbs -= /mob/living/carbon/human/proc/takeover
|
||||
H.verbs += /mob/living/carbon/human/proc/set_nation_name
|
||||
H.verbs += /mob/living/carbon/human/proc/set_ranks
|
||||
H.verbs += /mob/living/carbon/human/proc/choose_heir
|
||||
to_chat(H, "You have replaced [oldleader.name] as the leader of [H.mind.nation.current_name]!")
|
||||
H.mind.nation.update_nation_id()
|
||||
|
||||
|
||||
/datum/nations/proc/update_nation_id()
|
||||
for(var/mob/living/carbon/human/M in membership)
|
||||
for(var/obj/item/card/id/I in M.contents)
|
||||
if(I.registered_name == M.real_name)
|
||||
if(M == current_leader)
|
||||
I.name = "[I.registered_name]'s ID Card ([current_name] [leader_rank])"
|
||||
I.assignment = "[current_name] [leader_rank]"
|
||||
else if(M == heir)
|
||||
I.name = "[I.registered_name]'s ID Card ([current_name] [heir_rank])"
|
||||
I.assignment = "[current_name] [heir_rank]"
|
||||
else
|
||||
I.name = "[I.registered_name]'s ID Card ([current_name] [member_rank])"
|
||||
I.assignment = "[current_name] [member_rank]"
|
||||
|
||||
@@ -25,12 +25,7 @@
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/aifixer/attack_hand(var/mob/user as mob)
|
||||
var/datum/game_mode/nations/mode = get_nations_mode()
|
||||
if(!mode)
|
||||
ui_interact(user)
|
||||
else
|
||||
if(mode.kickoff)
|
||||
to_chat(user, "<span class='warning'>You have been locked out from this console!</span>")
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/aifixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
|
||||
@@ -35,15 +35,10 @@
|
||||
if(!atoms_share_level(T, src))
|
||||
to_chat(user, "<span class='danger'>Unable to establish a connection</span>: You're too far away from the target silicon!")
|
||||
return
|
||||
var/datum/game_mode/nations/mode = get_nations_mode()
|
||||
if(!mode)
|
||||
var/obj/item/aiModule/M = O
|
||||
M.install(src)
|
||||
else
|
||||
if(mode.kickoff)
|
||||
to_chat(user, "<span class='warning'>You have been locked out from modifying the AI's laws!</span>")
|
||||
else
|
||||
..()
|
||||
var/obj/item/aiModule/M = O
|
||||
M.install(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
@@ -83,14 +78,9 @@
|
||||
if(!atoms_share_level(T, src))
|
||||
to_chat(user, "<span class='danger'>Unable to establish a connection</span>: You're too far away from the target silicon!")
|
||||
return
|
||||
var/datum/game_mode/nations/mode = get_nations_mode()
|
||||
if(!mode)
|
||||
module.install(src)
|
||||
else
|
||||
if(mode.kickoff)
|
||||
to_chat(user, "<span class='warning'>You have been locked out from modifying the borg's laws!</span>")
|
||||
else
|
||||
return ..()
|
||||
module.install(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
|
||||
@@ -20,12 +20,7 @@
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
var/datum/game_mode/nations/mode = get_nations_mode()
|
||||
if(!mode)
|
||||
ui_interact(user)
|
||||
else
|
||||
if(mode.kickoff)
|
||||
to_chat(user, "<span class='warning'>You have been locked out from this console!</span>")
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/robotics/proc/is_authenticated(var/mob/user as mob)
|
||||
if(user.can_admin_interact())
|
||||
|
||||
@@ -170,8 +170,8 @@
|
||||
icon_state = "atmosflag"
|
||||
|
||||
/obj/item/flag/command
|
||||
name = "Commandzikstan flag"
|
||||
desc = "The flag of the independent, sovereign nation of Commandzikstan."
|
||||
name = "Command flag"
|
||||
desc = "The flag of the independent, sovereign nation of Command."
|
||||
icon_state = "ntflag"
|
||||
|
||||
//Antags
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/atom_hud/antag
|
||||
hud_icons = list(SPECIALROLE_HUD,NATIONS_HUD)
|
||||
hud_icons = list(SPECIALROLE_HUD)
|
||||
var/self_visible = TRUE
|
||||
|
||||
/datum/atom_hud/antag/hidden
|
||||
@@ -38,16 +38,6 @@
|
||||
if(M.mind || new_icon_state) //in mindless mobs, only null is acceptable, otherwise we're antagging a mindless mob, meaning we should runtime
|
||||
M.mind.antag_hud_icon_state = new_icon_state
|
||||
|
||||
//Nations Icons
|
||||
/proc/set_nations_hud(mob/M, new_icon_state)
|
||||
if(!istype(M))
|
||||
CRASH("set_antag_hud(): [M] ([M.type]) is not a mob!")
|
||||
var/image/holder = M.hud_list[NATIONS_HUD]
|
||||
if(holder)
|
||||
holder.icon_state = new_icon_state
|
||||
if(M.mind || new_icon_state) //in mindless mobs, only null is acceptable, otherwise we're antagging a mindless mob, meaning we should runtime
|
||||
M.mind.antag_hud_icon_state = new_icon_state
|
||||
|
||||
//MIND PROCS
|
||||
//these are called by mind.transfer_to()
|
||||
/datum/mind/proc/transfer_antag_huds(datum/atom_hud/antag/newhud)
|
||||
|
||||
@@ -139,11 +139,8 @@ Works together with spawning an observer, noted above.
|
||||
var/client/C = U.client
|
||||
for(var/mob/living/carbon/human/target in target_list)
|
||||
C.images += target.hud_list[SPECIALROLE_HUD]
|
||||
//C.images += target.hud_list[NATIONS_HUD]
|
||||
for(var/mob/living/silicon/target in target_list)
|
||||
C.images += target.hud_list[SPECIALROLE_HUD]
|
||||
//C.images += target.hud_list[NATIONS_HUD]
|
||||
|
||||
return 1
|
||||
|
||||
/mob/proc/ghostize(var/flags = GHOST_CAN_REENTER)
|
||||
|
||||
@@ -198,12 +198,6 @@
|
||||
stat("Total Blood", "[mind.vampire.bloodtotal]")
|
||||
stat("Usable Blood", "[mind.vampire.bloodusable]")
|
||||
|
||||
if(mind.nation)
|
||||
stat("Nation Name", "[mind.nation.current_name ? "[mind.nation.current_name]" : "[mind.nation.default_name]"]")
|
||||
stat("Nation Leader", "[mind.nation.current_leader ? "[mind.nation.current_leader]" : "None"]")
|
||||
stat("Nation Heir", "[mind.nation.heir ? "[mind.nation.heir]" : "None"]")
|
||||
|
||||
|
||||
if(istype(loc, /obj/spacepod)) // Spacdpods!
|
||||
var/obj/spacepod/S = loc
|
||||
stat("Spacepod Charge", "[istype(S.battery) ? "[(S.battery.charge / S.battery.maxcharge) * 100]" : "No cell detected"]")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
var/global/default_martial_art = new/datum/martial_art
|
||||
/mob/living/carbon/human
|
||||
|
||||
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPMINDSHIELD_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD,NATIONS_HUD,GLAND_HUD)
|
||||
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPMINDSHIELD_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD,GLAND_HUD)
|
||||
|
||||
//Marking colour and style
|
||||
var/list/m_colours = DEFAULT_MARKING_COLOURS //All colours set to #000000.
|
||||
|
||||
@@ -52,8 +52,6 @@
|
||||
if(client)
|
||||
//regular_hud_updates() //THIS DOESN'T FUCKING UPDATE SHIT
|
||||
handle_regular_hud_updates() //IT JUST REMOVES FUCKING HUD IMAGES
|
||||
if(get_nations_mode())
|
||||
process_nations()
|
||||
|
||||
..()
|
||||
|
||||
@@ -227,10 +225,4 @@
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_hud_icons_health()
|
||||
return
|
||||
|
||||
/mob/living/proc/process_nations()
|
||||
if(client)
|
||||
var/client/C = client
|
||||
for(var/mob/living/carbon/human/H in view(src, world.view))
|
||||
C.images += H.hud_list[NATIONS_HUD]
|
||||
return
|
||||
@@ -133,9 +133,6 @@
|
||||
|
||||
process_queued_alarms()
|
||||
|
||||
if(get_nations_mode())
|
||||
process_nations_ai()
|
||||
|
||||
/mob/living/silicon/ai/updatehealth(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
health = 100
|
||||
@@ -156,12 +153,6 @@
|
||||
..()
|
||||
add_ai_verbs(src)
|
||||
|
||||
/mob/living/silicon/ai/proc/process_nations_ai()
|
||||
if(client)
|
||||
var/client/C = client
|
||||
for(var/mob/living/carbon/human/H in view(eyeobj, 14))
|
||||
C.images += H.hud_list[NATIONS_HUD]
|
||||
|
||||
/mob/living/silicon/ai/update_sight()
|
||||
see_invisible = initial(see_invisible)
|
||||
see_in_dark = initial(see_in_dark)
|
||||
|
||||
@@ -93,7 +93,7 @@ var/list/robot_verbs_default = list(
|
||||
|
||||
var/updating = 0 //portable camera camerachunk update
|
||||
|
||||
hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD, NATIONS_HUD)
|
||||
hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD)
|
||||
|
||||
var/magpulse = 0
|
||||
var/ionpulse = 0 // Jetpack-like effect.
|
||||
@@ -288,10 +288,6 @@ var/list/robot_verbs_default = list(
|
||||
if(security_level == (SEC_LEVEL_GAMMA || SEC_LEVEL_EPSILON) || crisis)
|
||||
to_chat(src, "<span class='warning'>Crisis mode active. Combat module available.</span>")
|
||||
modules += "Combat"
|
||||
if(ticker && ticker.mode && ticker.mode.name == "nations")
|
||||
var/datum/game_mode/nations/N = ticker.mode
|
||||
if(N.kickoff)
|
||||
modules = list("Nations")
|
||||
if(mmi != null && mmi.alien)
|
||||
modules = list("Hunter")
|
||||
modtype = input("Please, select a module!", "Robot", null, null) as null|anything in modules
|
||||
@@ -390,11 +386,6 @@ var/list/robot_verbs_default = list(
|
||||
module.channels = list("Security" = 1)
|
||||
icon_state = "droidcombat"
|
||||
|
||||
if("Nations")
|
||||
module = new /obj/item/robot_module/nations(src)
|
||||
module.channels = list()
|
||||
icon_state = "droidpeace"
|
||||
|
||||
if("Hunter")
|
||||
module = new /obj/item/robot_module/alien/hunter(src)
|
||||
icon_state = "xenoborg-state-a"
|
||||
@@ -415,7 +406,7 @@ var/list/robot_verbs_default = list(
|
||||
feedback_inc("cyborg_[lowertext(modtype)]",1)
|
||||
rename_character(real_name, get_default_name())
|
||||
|
||||
if(modtype == "Medical" || modtype == "Security" || modtype == "Combat" || modtype == "Nations")
|
||||
if(modtype == "Medical" || modtype == "Security" || modtype == "Combat")
|
||||
status_flags &= ~CANPUSH
|
||||
|
||||
choose_icon(6,module_sprites)
|
||||
@@ -891,7 +882,7 @@ var/list/robot_verbs_default = list(
|
||||
else
|
||||
overlays += "[panelprefix]-openpanel -c"
|
||||
|
||||
var/combat = list("Combat","Nations")
|
||||
var/combat = list("Combat")
|
||||
if(modtype in combat)
|
||||
if(base_icon == "")
|
||||
base_icon = icon_state
|
||||
@@ -1356,24 +1347,6 @@ var/list/robot_verbs_default = list(
|
||||
/mob/living/silicon/robot/ert/gamma
|
||||
crisis = 1
|
||||
|
||||
/mob/living/silicon/robot/nations
|
||||
base_icon = "droidpeace"
|
||||
icon_state = "droidpeace"
|
||||
modtype = "Nations"
|
||||
designation = "Nations"
|
||||
|
||||
/mob/living/silicon/robot/nations/init()
|
||||
..()
|
||||
module = new /obj/item/robot_module/nations(src)
|
||||
//languages
|
||||
module.add_languages(src)
|
||||
//subsystems
|
||||
module.add_subsystems_and_actions(src)
|
||||
|
||||
status_flags &= ~CANPUSH
|
||||
|
||||
notify_ai(2)
|
||||
|
||||
/mob/living/silicon/robot/emp_act(severity)
|
||||
..()
|
||||
switch(severity)
|
||||
|
||||
@@ -497,22 +497,6 @@
|
||||
|
||||
fix_modules()
|
||||
|
||||
/obj/item/robot_module/nations
|
||||
name = "nations robot module"
|
||||
module_type = "Malf"
|
||||
|
||||
/obj/item/robot_module/nations/New()
|
||||
..()
|
||||
modules += new /obj/item/restraints/handcuffs/cable/zipties/cyborg(src)
|
||||
modules += new /obj/item/gun/energy/gun/cyborg(src)
|
||||
modules += new /obj/item/pickaxe/drill/jackhammer(src)
|
||||
modules += new /obj/item/borg/combat/shield(src)
|
||||
modules += new /obj/item/borg/combat/mobility(src)
|
||||
modules += new /obj/item/wrench/cyborg(src)
|
||||
emag = new /obj/item/gun/energy/lasercannon/cyborg(src)
|
||||
|
||||
fix_modules()
|
||||
|
||||
/obj/item/robot_module/alien/hunter
|
||||
name = "alien hunter module"
|
||||
module_type = "Standard"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
var/next_alarm_notice
|
||||
var/list/datum/alarm/queued_alarms = new()
|
||||
|
||||
hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD,NATIONS_HUD)
|
||||
hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD)
|
||||
|
||||
|
||||
var/med_hud = DATA_HUD_MEDICAL_ADVANCED //Determines the med hud to use
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@@ -544,9 +544,6 @@
|
||||
#include "code\game\gamemodes\miniantags\sintouched\objectives.dm"
|
||||
#include "code\game\gamemodes\miniantags\slaughter\bloodcrawl.dm"
|
||||
#include "code\game\gamemodes\miniantags\slaughter\slaughter.dm"
|
||||
#include "code\game\gamemodes\nations\nations.dm"
|
||||
#include "code\game\gamemodes\nations\nationsdatums.dm"
|
||||
#include "code\game\gamemodes\nations\nationsprocs.dm"
|
||||
#include "code\game\gamemodes\nuclear\nuclear.dm"
|
||||
#include "code\game\gamemodes\nuclear\nuclear_challenge.dm"
|
||||
#include "code\game\gamemodes\nuclear\nuclearbomb.dm"
|
||||
|
||||
Reference in New Issue
Block a user