diff --git a/code/game/objects/effects/contraband.dm b/code/game/objects/effects/poster.dm similarity index 98% rename from code/game/objects/effects/contraband.dm rename to code/game/objects/effects/poster.dm index 8fd26a8a4f6..6ee0fab39e9 100644 --- a/code/game/objects/effects/contraband.dm +++ b/code/game/objects/effects/poster.dm @@ -14,7 +14,7 @@ /obj/item/poster name = "poorly coded poster" desc = "You probably shouldn't be holding this." - icon = 'icons/obj/contraband.dmi' + icon = 'icons/obj/poster.dmi' force = 0 resistance_flags = FLAMMABLE var/poster_type @@ -101,7 +101,7 @@ name = "poster" var/original_name desc = "A large piece of space-resistant printed paper." - icon = 'icons/obj/contraband.dmi' + icon = 'icons/obj/poster.dmi' anchored = TRUE buildable_sign = FALSE //Cannot be unwrenched from a wall. var/ruined = FALSE @@ -149,14 +149,11 @@ /obj/structure/sign/poster/proc/randomise(base_type) var/list/poster_types = subtypesof(base_type) var/list/approved_types = list() - for(var/t in poster_types) - var/obj/structure/sign/poster/T = t - if(initial(T.icon_state) && !initial(T.never_random)) - approved_types |= T + for(var/obj/structure/sign/poster/type_of_poster as anything in poster_types) + if(initial(type_of_poster.icon_state) && !initial(type_of_poster.never_random)) + approved_types |= type_of_poster var/obj/structure/sign/poster/selected = pick(approved_types) - if(length(GLOB.holidays) && prob(30)) // its the holidays! lets get festive - selected = /obj/structure/sign/poster/official/festive name = initial(selected.name) desc = initial(selected.desc) @@ -165,11 +162,26 @@ poster_item_desc = initial(selected.poster_item_desc) poster_item_icon_state = initial(selected.poster_item_icon_state) ruined = initial(selected.ruined) + if(length(GLOB.holidays) && prob(30)) // its the holidays! lets get festive + apply_holiday() update_appearance() -/obj/structure/sign/poster/attackby(obj/item/I, mob/user, params) - if(I.tool_behaviour == TOOL_WIRECUTTER) - I.play_tool_sound(src, 100) +/// allows for posters to become festive posters during holidays +/obj/structure/sign/poster/proc/apply_holiday() + if(!length(GLOB.holidays)) + return + var/active_holiday = pick(GLOB.holidays) + var/datum/holiday/holi_data = GLOB.holidays[active_holiday] + + if(holi_data.poster_name == "generic celebration poster") + return + name = holi_data.poster_name + desc = holi_data.poster_desc + icon_state = holi_data.poster_icon + +/obj/structure/sign/poster/attackby(obj/item/tool, mob/user, params) + if(tool.tool_behaviour == TOOL_WIRECUTTER) + tool.play_tool_sound(src, 100) if(ruined) to_chat(user, span_notice("You remove the remnants of the poster.")) qdel(src) @@ -1048,15 +1060,4 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sign/poster/official/random, 32) desc = "A poster that informs of active holidays. None are today, so you should get back to work." icon_state = "holiday_none" -/obj/structure/sign/poster/official/festive/Initialize() - . = ..() - if(!length(GLOB.holidays)) - return - var/active_holiday = pick(GLOB.holidays) - var/datum/holiday/holi_data = GLOB.holidays[active_holiday] - - name = holi_data.poster_name - desc = holi_data.poster_desc - icon_state = holi_data.poster_icon - #undef PLACE_SPEED diff --git a/code/game/objects/effects/wanted_poster.dm b/code/game/objects/effects/wanted_poster.dm index c5608a567d6..6859a185d6e 100644 --- a/code/game/objects/effects/wanted_poster.dm +++ b/code/game/objects/effects/wanted_poster.dm @@ -8,7 +8,7 @@ */ /obj/item/poster/wanted - icon_state = "rolled_poster" + icon_state = "rolled_poster_legit" var/postHeaderText = "WANTED" // MAX 7 Characters var/postHeaderColor = "#FF0000" var/background = "wanted_background" @@ -67,8 +67,8 @@ print_across_top(the_icon, postHeaderText, postHeaderColor) the_icon.Insert(the_icon, "wanted") - the_icon.Insert(icon('icons/obj/contraband.dmi', "poster_being_set"), "poster_being_set") - the_icon.Insert(icon('icons/obj/contraband.dmi', "poster_ripped"), "poster_ripped") + the_icon.Insert(icon('icons/obj/poster.dmi', "poster_being_set"), "poster_being_set") + the_icon.Insert(icon('icons/obj/poster.dmi', "poster_ripped"), "poster_ripped") icon = the_icon diff --git a/code/modules/antagonists/traitor/objectives/demoralise_poster.dm b/code/modules/antagonists/traitor/objectives/demoralise_poster.dm index b3df603db8f..5cb76d26ca2 100644 --- a/code/modules/antagonists/traitor/objectives/demoralise_poster.dm +++ b/code/modules/antagonists/traitor/objectives/demoralise_poster.dm @@ -91,13 +91,19 @@ /// Proximity sensor to make people sad if they're nearby var/datum/proximity_monitor/advanced/demoraliser/demoraliser +/obj/structure/sign/poster/traitor/apply_holiday() + var/obj/structure/sign/poster/traitor/holi_data = /obj/structure/sign/poster/traitor/festive + name = initial(holi_data.name) + desc = initial(holi_data.desc) + icon_state = initial(holi_data.icon_state) + /obj/structure/sign/poster/traitor/on_placed_poster(mob/user) var/datum/demoralise_moods/poster/mood_category = new() demoraliser = new(src, 7, TRUE, mood_category) return ..() -/obj/structure/sign/poster/traitor/attackby(obj/item/I, mob/user, params) - if (I.tool_behaviour == TOOL_WIRECUTTER) +/obj/structure/sign/poster/traitor/attackby(obj/item/tool, mob/user, params) + if (tool.tool_behaviour == TOOL_WIRECUTTER) QDEL_NULL(demoraliser) return ..() @@ -155,3 +161,10 @@ name = "They Are Poisoning You" desc = "This poster claims that in the modern age it is impossible to die of starvation. 'That feeling you get when you haven't eaten in a while isn't hunger, it's withdrawal.'" icon_state = "traitor_hungry" + +/// syndicate can get festive too +/obj/structure/sign/poster/traitor/festive + name = "Working For The Holidays." + desc = "Don't you know it's a holiday? What are you doing at work?" + icon_state = "traitor_festive" + never_random = TRUE diff --git a/icons/obj/contraband.dmi b/icons/obj/contraband.dmi deleted file mode 100644 index 139fea8d8e4..00000000000 Binary files a/icons/obj/contraband.dmi and /dev/null differ diff --git a/icons/obj/poster.dmi b/icons/obj/poster.dmi new file mode 100644 index 00000000000..855e3f3edea Binary files /dev/null and b/icons/obj/poster.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 5e3e6ecccee..8af4b4f3c05 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1567,7 +1567,6 @@ #include "code\game\objects\effects\anomaly_dimensional_themes.dm" #include "code\game\objects\effects\blessing.dm" #include "code\game\objects\effects\bump_teleporter.dm" -#include "code\game\objects\effects\contraband.dm" #include "code\game\objects\effects\countdown.dm" #include "code\game\objects\effects\effects.dm" #include "code\game\objects\effects\forcefields.dm" @@ -1580,6 +1579,7 @@ #include "code\game\objects\effects\particle_holder.dm" #include "code\game\objects\effects\phased_mob.dm" #include "code\game\objects\effects\portals.dm" +#include "code\game\objects\effects\poster.dm" #include "code\game\objects\effects\powerup.dm" #include "code\game\objects\effects\spiderwebs.dm" #include "code\game\objects\effects\step_triggers.dm"