From 69a6ce2e5db7885cc5483b67ed37a8952bb6e002 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Tue, 7 Jun 2016 00:14:39 -0500 Subject: [PATCH 1/3] Captain's Charter --- .../gamemodes/nuclear/nuclear_challenge.dm | 1 - code/game/objects/items/charter.dm | 24 +++++++++++++++++++ code/modules/jobs/job_types/captain.dm | 2 +- tgstation.dme | 1 + 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 code/game/objects/items/charter.dm diff --git a/code/game/gamemodes/nuclear/nuclear_challenge.dm b/code/game/gamemodes/nuclear/nuclear_challenge.dm index c3fc7c9bf25..26cef14b637 100644 --- a/code/game/gamemodes/nuclear/nuclear_challenge.dm +++ b/code/game/gamemodes/nuclear/nuclear_challenge.dm @@ -49,6 +49,5 @@ #undef CHALLENGE_TELECRYSTALS -#undef CHALLENGE_TIME_LIMIT #undef CHALLENGE_MIN_PLAYERS #undef CHALLENGE_SHUTTLE_DELAY diff --git a/code/game/objects/items/charter.dm b/code/game/objects/items/charter.dm new file mode 100644 index 00000000000..ff0bb40cad4 --- /dev/null +++ b/code/game/objects/items/charter.dm @@ -0,0 +1,24 @@ +/obj/item/station_charter + name = "station charter" + icon = 'icons/obj/wizard.dmi' + icon_state = "scroll2" + desc = "An official document entrusting the governance of the station and surrounding space to the Captain. " + var/used = FALSE + +/obj/item/station_charter/attack_self(mob/living/user) + if(used) + user << "The station has already been named." + return + used = TRUE + if(world.time > CHALLENGE_TIME_LIMIT) //5 minutes + user << "The crew has already settled into the shift. It probably wouldn't be good to rename the station right now." + return + + var/new_name = reject_bad_name( input(user, "What do you want to name [station_name()]?") as text|null ) + if(new_name) + world.name = new_name + minor_announce("[user.real_name] has designated your station as [world.name]", "Captain's Charter", 0) + + else + user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ." + used = FALSE diff --git a/code/modules/jobs/job_types/captain.dm b/code/modules/jobs/job_types/captain.dm index 7f7d5312e29..66056a25dd0 100644 --- a/code/modules/jobs/job_types/captain.dm +++ b/code/modules/jobs/job_types/captain.dm @@ -35,7 +35,7 @@ Captain suit = /obj/item/clothing/suit/armor/vest/capcarapace shoes = /obj/item/clothing/shoes/sneakers/brown head = /obj/item/clothing/head/caphat - backpack_contents = list(/obj/item/weapon/melee/classic_baton/telescopic=1) + backpack_contents = list(/obj/item/weapon/melee/classic_baton/telescopic=1, /obj/item/station_charter=1) backpack = /obj/item/weapon/storage/backpack/captain satchel = /obj/item/weapon/storage/backpack/satchel_cap diff --git a/tgstation.dme b/tgstation.dme index 2f3858e6137..980f16c68c5 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -569,6 +569,7 @@ #include "code\game\objects\items\body_egg.dm" #include "code\game\objects\items\bodybag.dm" #include "code\game\objects\items\candle.dm" +#include "code\game\objects\items\charter.dm" #include "code\game\objects\items\control_wand.dm" #include "code\game\objects\items\crayons.dm" #include "code\game\objects\items\dehy_carp.dm" From 51d7f86e6aa1c585a4b9c0c9084a4a5f73ba88e5 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Tue, 7 Jun 2016 01:57:33 -0500 Subject: [PATCH 2/3] Admin Override --- code/game/objects/items/charter.dm | 2 +- code/modules/admin/secrets.dm | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/charter.dm b/code/game/objects/items/charter.dm index ff0bb40cad4..9ab1d6924c3 100644 --- a/code/game/objects/items/charter.dm +++ b/code/game/objects/items/charter.dm @@ -14,7 +14,7 @@ user << "The crew has already settled into the shift. It probably wouldn't be good to rename the station right now." return - var/new_name = reject_bad_name( input(user, "What do you want to name [station_name()]?") as text|null ) + var/new_name = reject_bad_name( input(user, "What do you want to name [station_name()]? Keep in mind particularly terrible names may attract the attention of your employers.") as text|null ) if(new_name) world.name = new_name minor_announce("[user.real_name] has designated your station as [world.name]", "Captain's Charter", 0) diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 7300e294879..70ca299624b 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -28,6 +28,7 @@ List Fingerprints
Enable/Disable CTF

Reset Thunderdome to default state
+ Reset Station Name

Shuttles

@@ -145,6 +146,13 @@ for(var/datum/disease/D in SSdisease.processing) D.cure(D) + if("reset_name") + if(!check_rights(R_ADMIN)) + return + world.name = "Space Station 13" + log_admin("[key_name(usr)] reset the station name.") + message_admins("[key_name_admin(usr)] reset the station name.") + if("list_bombers") if(!check_rights(R_ADMIN)) return From 576c215270fb3ecdea6721adefb3a42df1f73538 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Wed, 8 Jun 2016 21:04:01 -0500 Subject: [PATCH 3/3] Fixes charter --- code/game/objects/items/charter.dm | 4 ++-- code/modules/admin/secrets.dm | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/charter.dm b/code/game/objects/items/charter.dm index 9ab1d6924c3..59c26499ac1 100644 --- a/code/game/objects/items/charter.dm +++ b/code/game/objects/items/charter.dm @@ -14,11 +14,11 @@ user << "The crew has already settled into the shift. It probably wouldn't be good to rename the station right now." return - var/new_name = reject_bad_name( input(user, "What do you want to name [station_name()]? Keep in mind particularly terrible names may attract the attention of your employers.") as text|null ) + var/new_name = input(user, "What do you want to name [station_name()]? Keep in mind particularly terrible names may attract the attention of your employers.") as text|null if(new_name) world.name = new_name + station_name = new_name minor_announce("[user.real_name] has designated your station as [world.name]", "Captain's Charter", 0) else - user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ." used = FALSE diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 70ca299624b..ce178888a7e 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -149,7 +149,8 @@ if("reset_name") if(!check_rights(R_ADMIN)) return - world.name = "Space Station 13" + world.name = new_station_name() + station_name = world.name log_admin("[key_name(usr)] reset the station name.") message_admins("[key_name_admin(usr)] reset the station name.")