From 1b677a7ceec6c5808e5d1414090336dde6285af2 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Tue, 29 Sep 2015 20:41:22 -0700 Subject: [PATCH 1/3] Candycorn --- code/modules/clothing/head/jobs.dm | 14 +++++++++++ html/changelogs/Kor-PR-candycorn.yml | 36 ++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 html/changelogs/Kor-PR-candycorn.yml diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index 7d2d81b6fa9..c7cb9339d65 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -55,6 +55,20 @@ desc = "There's only one man who can sniff out the dirty stench of crime, and he's likely wearing this hat." icon_state = "detective" armor = list(melee = 25, bullet = 5, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) + var/candy_cooldown = 0 + +/obj/item/clothing/head/det_hat/AltClick() + ..() + if(ismob(loc)) + if(candy_cooldown+120 < world.time) + var/obj/item/weapon/reagent_containers/food/snacks/candy_corn/CC = new /obj/item/weapon/reagent_containers/food/snacks/candy_corn(src) + var/mob/M = loc + M.put_in_hands(CC) + M << "You slip a candy corn from your hat." + candy_cooldown = world.time + else + M << "You just took a candy corn! You should wait a couple minutes, lest you burn through your stash." + //Mime /obj/item/clothing/head/beret diff --git a/html/changelogs/Kor-PR-candycorn.yml b/html/changelogs/Kor-PR-candycorn.yml new file mode 100644 index 00000000000..6b016c7cda6 --- /dev/null +++ b/html/changelogs/Kor-PR-candycorn.yml @@ -0,0 +1,36 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# spellcheck (typo fixes) +# experiment +# tgs (TG-ported fixes?) +################################# + +# Your name. +author: Kor + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "An important function, accessible via alt+click, has been restored to the detectives hat." From b267807d00040a928e556aa7e8ca01f48bd959ad Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Tue, 29 Sep 2015 20:47:26 -0700 Subject: [PATCH 2/3] Var definition in wrong place --- code/modules/clothing/head/jobs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index c7cb9339d65..7589c0fcfae 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -60,9 +60,9 @@ /obj/item/clothing/head/det_hat/AltClick() ..() if(ismob(loc)) + var/mob/M = loc if(candy_cooldown+120 < world.time) var/obj/item/weapon/reagent_containers/food/snacks/candy_corn/CC = new /obj/item/weapon/reagent_containers/food/snacks/candy_corn(src) - var/mob/M = loc M.put_in_hands(CC) M << "You slip a candy corn from your hat." candy_cooldown = world.time From f9604f8f8a35de8fd540e6bfcf0725b92ee6caea Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Wed, 30 Sep 2015 09:23:40 -0700 Subject: [PATCH 3/3] 2 minute cooldown --- code/modules/clothing/head/jobs.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index 7589c0fcfae..89cdef457a4 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -61,11 +61,11 @@ ..() if(ismob(loc)) var/mob/M = loc - if(candy_cooldown+120 < world.time) + if(candy_cooldown < world.time) var/obj/item/weapon/reagent_containers/food/snacks/candy_corn/CC = new /obj/item/weapon/reagent_containers/food/snacks/candy_corn(src) M.put_in_hands(CC) M << "You slip a candy corn from your hat." - candy_cooldown = world.time + candy_cooldown = world.time+1200 else M << "You just took a candy corn! You should wait a couple minutes, lest you burn through your stash."