From 1bdda132e7571bdd9dd8b2f7e4485707e655ca01 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Thu, 8 Jun 2017 20:39:15 -0500 Subject: [PATCH 1/2] Adds Medal Commendations! --- code/_globalvars/lists/medals.dm | 1 + code/controllers/subsystem/ticker.dm | 0 code/controllers/subsystem/ticker.dm.rej | 15 +++++++++++++++ code/datums/outfit.dm | 8 ++++++++ code/modules/jobs/job_types/captain.dm | 4 ++-- tgstation.dme | 1 + 6 files changed, 27 insertions(+), 2 deletions(-) create mode 100755 code/_globalvars/lists/medals.dm mode change 100644 => 100755 code/controllers/subsystem/ticker.dm create mode 100644 code/controllers/subsystem/ticker.dm.rej mode change 100644 => 100755 code/datums/outfit.dm mode change 100644 => 100755 code/modules/jobs/job_types/captain.dm diff --git a/code/_globalvars/lists/medals.dm b/code/_globalvars/lists/medals.dm new file mode 100755 index 0000000000..0d7903ef7e --- /dev/null +++ b/code/_globalvars/lists/medals.dm @@ -0,0 +1 @@ +GLOBAL_LIST_EMPTY(commendations) \ No newline at end of file diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm old mode 100644 new mode 100755 diff --git a/code/controllers/subsystem/ticker.dm.rej b/code/controllers/subsystem/ticker.dm.rej new file mode 100644 index 0000000000..e2d04fe7a2 --- /dev/null +++ b/code/controllers/subsystem/ticker.dm.rej @@ -0,0 +1,15 @@ +diff a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm (rejected hunks) +@@ -613,6 +615,13 @@ SUBSYSTEM_DEF(ticker) + mode.declare_station_goal_completion() + + CHECK_TICK ++ //medals, placed far down so that people can actually see the commendations. ++ if(GLOB.commendations) ++ to_chat(world, "Medal Commendations:") ++ for (var/com in GLOB.commendations) ++ to_chat(world, com) ++ ++ CHECK_TICK + + //Collects persistence features + SSpersistence.CollectData() diff --git a/code/datums/outfit.dm b/code/datums/outfit.dm old mode 100644 new mode 100755 index 4c39d11691..1cced13cb4 --- a/code/datums/outfit.dm +++ b/code/datums/outfit.dm @@ -22,6 +22,7 @@ var/internals_slot = null //ID of slot containing a gas tank var/list/backpack_contents = null // In the list(path=count,otherpath=count) format var/list/implants = null + var/accessory = null var/can_be_admin_equipped = TRUE // Set to FALSE if your outfit requires runtime parameters @@ -64,6 +65,13 @@ if(suit_store) H.equip_to_slot_or_del(new suit_store(H),slot_s_store) + if(accessory) + var/obj/item/clothing/under/U = H.w_uniform + if(U) + U.attach_accessory(new accessory(H)) + else + WARNING("Unable to equip accessory [accessory] in outfit [name]. No uniform present!") + if(l_hand) H.put_in_l_hand(new l_hand(H)) if(r_hand) diff --git a/code/modules/jobs/job_types/captain.dm b/code/modules/jobs/job_types/captain.dm old mode 100644 new mode 100755 index 25ae27f769..a8a5532b4b --- a/code/modules/jobs/job_types/captain.dm +++ b/code/modules/jobs/job_types/captain.dm @@ -46,8 +46,8 @@ Captain dufflebag = /obj/item/weapon/storage/backpack/dufflebag/captain implants = list(/obj/item/weapon/implant/mindshield) - - + accessory = /obj/item/clothing/accessory/medal/gold/captain + /* Head of Personnel */ diff --git a/tgstation.dme b/tgstation.dme index 0d035a36f3..f8aa3db8de 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -111,6 +111,7 @@ #include "code\_globalvars\lists\flavor_misc.dm" #include "code\_globalvars\lists\maintenance_loot.dm" #include "code\_globalvars\lists\mapping.dm" +#include "code\_globalvars\lists\medals.dm" #include "code\_globalvars\lists\mobs.dm" #include "code\_globalvars\lists\names.dm" #include "code\_globalvars\lists\objects.dm" From 47687a6d1a071a755fec7bb420d4e1bc44ab1621 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sat, 10 Jun 2017 09:42:08 -0500 Subject: [PATCH 2/2] cleanup --- code/controllers/subsystem/ticker.dm | 8 ++++++++ code/controllers/subsystem/ticker.dm.rej | 15 --------------- code/modules/clothing/under/accessories.dm | 10 ++++++++++ code/modules/jobs/job_types/captain.dm | 5 +++-- tgstation.dme.rej | 10 ---------- 5 files changed, 21 insertions(+), 27 deletions(-) delete mode 100644 code/controllers/subsystem/ticker.dm.rej delete mode 100644 tgstation.dme.rej diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index e335669acc..afff0cdf59 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -583,6 +583,14 @@ SUBSYSTEM_DEF(ticker) mode.declare_station_goal_completion() + //medals, placed far down so that people can actually see the commendations. + if(GLOB.commendations) + to_chat(world, "Medal Commendations:") + for (var/com in GLOB.commendations) + to_chat(world, com) + + CHECK_TICK + CHECK_TICK //Adds the del() log to world.log in a format condensable by the runtime condenser found in tools diff --git a/code/controllers/subsystem/ticker.dm.rej b/code/controllers/subsystem/ticker.dm.rej deleted file mode 100644 index e2d04fe7a2..0000000000 --- a/code/controllers/subsystem/ticker.dm.rej +++ /dev/null @@ -1,15 +0,0 @@ -diff a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm (rejected hunks) -@@ -613,6 +615,13 @@ SUBSYSTEM_DEF(ticker) - mode.declare_station_goal_completion() - - CHECK_TICK -+ //medals, placed far down so that people can actually see the commendations. -+ if(GLOB.commendations) -+ to_chat(world, "Medal Commendations:") -+ for (var/com in GLOB.commendations) -+ to_chat(world, com) -+ -+ CHECK_TICK - - //Collects persistence features - SSpersistence.CollectData() diff --git a/code/modules/clothing/under/accessories.dm b/code/modules/clothing/under/accessories.dm index 3653d7a395..93321a053a 100644 --- a/code/modules/clothing/under/accessories.dm +++ b/code/modules/clothing/under/accessories.dm @@ -85,6 +85,7 @@ item_color = "bronze" materials = list(MAT_METAL=1000) resistance_flags = FIRE_PROOF + var/commended = FALSE //Pinning medals on people /obj/item/clothing/accessory/medal/attack(mob/living/carbon/human/M, mob/living/user) @@ -103,6 +104,9 @@ else user.visible_message("[user] is trying to pin [src] on [M]'s chest.", \ "You try to pin [src] on [M]'s chest.") + var/input + if(!commended && user != M) + input = stripped_input(user,"Please input a reason for this commendation, it will be recorded by Nanotrasen.", ,"", 140) if(do_after(user, delay, target = M)) if(U.attach_accessory(src, user, 0)) //Attach it, do not notify the user of the attachment if(user == M) @@ -110,6 +114,12 @@ else user.visible_message("[user] pins \the [src] on [M]'s chest.", \ "You pin \the [src] on [M]'s chest.") + if(input) + SSblackbox.add_details("commendation", json_encode(list("commender" = "[user.real_name]", "commendee" = "[M.real_name]", "medal" = "[src]", "reason" = input))) + GLOB.commendations += "[user.real_name] awarded [M.real_name] the [name]! \n- [input]" + commended = TRUE + log_game("[key_name(M)] was given the following commendation by [key_name(user)]: [input]") + message_admins("[key_name(M)] was given the following commendation by [key_name(user)]: [input]") else to_chat(user, "Medals can only be pinned on jumpsuits!") else ..() diff --git a/code/modules/jobs/job_types/captain.dm b/code/modules/jobs/job_types/captain.dm index a8a5532b4b..da7e3da6b3 100755 --- a/code/modules/jobs/job_types/captain.dm +++ b/code/modules/jobs/job_types/captain.dm @@ -46,8 +46,9 @@ Captain dufflebag = /obj/item/weapon/storage/backpack/dufflebag/captain implants = list(/obj/item/weapon/implant/mindshield) - accessory = /obj/item/clothing/accessory/medal/gold/captain - + + accessory = /obj/item/clothing/accessory/medal/gold/captain + /* Head of Personnel */ diff --git a/tgstation.dme.rej b/tgstation.dme.rej deleted file mode 100644 index 64015ccf29..0000000000 --- a/tgstation.dme.rej +++ /dev/null @@ -1,10 +0,0 @@ -diff a/tgstation.dme b/tgstation.dme (rejected hunks) -@@ -1169,7 +1169,7 @@ - #include "code\modules\clothing\masks\gasmask.dm" - #include "code\modules\clothing\masks\hailer.dm" - #include "code\modules\clothing\masks\miscellaneous.dm" --#include "code\modules\clothing\neck\ties.dm" -+#include "code\modules\clothing\neck\neck.dm" - #include "code\modules\clothing\outfits\ert.dm" - #include "code\modules\clothing\outfits\standard.dm" - #include "code\modules\clothing\shoes\bananashoes.dm"