makes the station christmassy at the press of a button! (#16841)

* makes the station christmassy at the press of a button!

* addresses concerns, turns a corgi into a santas helper, adds sounds, makes it all comfier

* scraps the old idea entirely, removes un-necessary variables.

* lamps become candles now

* optimizations, reparations

* changes the zlevel check from looking at an integer to looking at the map datums zlevel list. Much more sensible

* some more verticality
This commit is contained in:
MadmanMartian
2017-12-24 23:58:40 +00:00
committed by Pieter-Jan Briers
parent 157b0eafe1
commit 89839c727e
15 changed files with 212 additions and 46 deletions

View File

@@ -1049,6 +1049,8 @@
return global.halloween_spawns;
if("snow_recipes")
return global.snow_recipes;
if("snowsound")
return global.snowsound;
if("Holiday")
return global.Holiday;
if("blob_candidates")
@@ -2942,6 +2944,8 @@
global.halloween_spawns=newval
if("snow_recipes")
global.snow_recipes=newval
if("snowsound")
global.snowsound=newval
if("Holiday")
global.Holiday=newval
if("blob_candidates")

View File

@@ -321,9 +321,9 @@
if(!can_buy(BLOBTAUNTCOST))
return
to_chat(src.z, "<span class='warning'>Your vision becomes cloudy, and your mind becomes clear.</span>")
var/current_zlevel = get_z_level(src)
to_chat(current_zlevel, "<span class='warning'>Your vision becomes cloudy, and your mind becomes clear.</span>")
spawn(5)
to_chat(src.z, "<span class='blob'>[message]</span>") //Only sends messages to things on its own z level
to_chat(current_zlevel, "<span class='blob'>[message]</span>") //Only sends messages to things on its own z level
add_gamelogs(src, "used blob telepathy to convey \"[message]\"", tp_link = TRUE)
log_blobtelepathy("[key_name(usr)]: [message]")

View File

@@ -33,9 +33,10 @@
)
/obj/machinery/xmas_light/New(loc)
/obj/machinery/xmas_light/New(loc, var/newdir)
..()
if(newdir)
dir = newdir
lights = image(icon, icon_state = "overlay_big", dir = dir)
var/list/cl = list(0, 0, 0, 0)
for (var/x = 1 to 4)

View File

@@ -6,6 +6,9 @@
#define TICK_JIGGLE(X) rand(((X)-((X)*0.1)),((X)+((X)*0.1)))
var/list/snowsound = list('sound/misc/snow1.ogg', 'sound/misc/snow2.ogg', 'sound/misc/snow3.ogg', 'sound/misc/snow4.ogg', 'sound/misc/snow5.ogg', 'sound/misc/snow6.ogg')
/obj/structure/snow
name = "snow"
layer = SNOW_LAYER
@@ -33,6 +36,7 @@
"snowgrassall3",
)
/obj/structure/snow/New()
..()
if(prob(17))
@@ -70,6 +74,11 @@
processing_objects.Remove(src)
next_update=world.time + TICK_JIGGLE(300) // 30 seconds
/obj/structure/snow/Crossed(mob/user)
..()
if(isliving(user) && !user.locked_to && !user.lying && !user.flying)
playsound(get_turf(src), pick(snowsound), 10, 1, -1, channel = 123)
/obj/structure/snow/attack_hand(mob/user)
if(snow_amount != SNOWCOVERING_FULL)
@@ -618,6 +627,11 @@ var/global/list/datum/stack_recipe/snow_recipes = list (
for(var/i=1,i<=rand(1,3),i++)
call(/obj/item/weapon/winter_gift/proc/pick_a_gift)(T,5)
/obj/structure/snow_flora/tree/pine/xmas/vg/New()
..()
icon_state = "spessmastree"
#undef SNOWCOVERING_FULL
#undef SNOWCOVERING_MEDIUM
#undef SNOWCOVERING_LITTLE

View File

@@ -0,0 +1,128 @@
/**
Victorianize your station
At one press of a button, turn every wall on the station to wood, all lighting to lanterns, all lamps to candles,
And the main hallways to snow.
Additionally, the bar becomes much more festive, with the addition of a christmas tree!
Also piss off your server host and set the entire server on fire.
*/
/datum/universal_state/auldlangsyne
name = "Older times"
desc = "The clock's ticking backwards!"
/datum/universal_state/auldlangsyne/OnEnter()
var/target_zlevel = map.zMainStation
to_chat(map.zLevels[target_zlevel], "<span class='sinister'>There is a certain chill to the air, as bells ring faintly in the distance...</span>")
//Snow up the halls
for(var/A in typesof(/area/hallway))
var/area/to_snow = locate(A)
if(!to_snow)
continue
for(var/turf/simulated/floor/F in to_snow)
new /obj/structure/snow(F)
for(var/cdir in cardinal)
var/turf/TT = get_step(F,cdir)
if(istype(TT,/turf/simulated/wall))
new/obj/machinery/xmas_light(TT,cdir)
for(var/obj/machinery/light/L in to_snow)
qdel(L)
for(var/area/A in areas)
if(!istype(A, /turf/space) && A.z == target_zlevel)
for(var/turf/T in A)
if(istype(T, /turf/simulated/wall) && !istype(T, /turf/simulated/wall/r_wall))
T.ChangeTurf(/turf/simulated/wall/mineral/wood, tell_universe = 0)
for(var/obj/item/device/flashlight/F in A)
var/obj/item/candle/C = new /obj/item/candle(F.loc)
C.light(quiet = 1)
qdel(F)
for(var/obj/machinery/light/L in A)
var/obj/structure/hanging_lantern/HL = new /obj/structure/hanging_lantern/dim(L.loc)
HL.dir = L.dir
HL.update()
qdel(L)
for(var/obj/structure/closet/secure_closet/S in A)
switch(S.type)
//Captains locker
if(/obj/structure/closet/secure_closet/captains)
new /obj/item/clothing/suit/wintercoat/captain(S)
//HoPs attire
if(/obj/structure/closet/secure_closet/hop2)
new /obj/item/clothing/suit/wintercoat/hop(S)
//Head of security's ling-hunting gear
if(/obj/structure/closet/secure_closet/hos)
new /obj/item/clothing/suit/wintercoat/security/hos(S)
if(/obj/structure/closet/secure_closet/warden)
new /obj/item/clothing/suit/wintercoat/security/warden(S)
if(/obj/structure/closet/secure_closet/security)
new /obj/item/clothing/suit/wintercoat/security(S)
if(/obj/structure/closet/secure_closet/brig)
new /obj/item/clothing/suit/wintercoat/prisoner(S)
new /obj/item/clothing/suit/wintercoat/prisoner(S)
if(/obj/structure/closet/secure_closet/scientist)
new /obj/item/clothing/suit/wintercoat/science(S)
new /obj/item/clothing/suit/wintercoat/science(S)
if(/obj/structure/closet/secure_closet/RD)
new /obj/item/clothing/suit/wintercoat/science(S)
if(/obj/structure/closet/secure_closet/medical3 || /obj/structure/closet/secure_closet/paramedic)
new /obj/item/clothing/suit/wintercoat/medical(S)
new /obj/item/clothing/suit/wintercoat/medical(S)
if(/obj/structure/closet/secure_closet/CMO)
new /obj/item/clothing/suit/wintercoat/cmo(S)
if(/obj/structure/closet/secure_closet/engineering_chief)
new /obj/item/clothing/suit/wintercoat/ce(S)
if(/obj/structure/closet/secure_closet/engineering_personal || /obj/structure/closet/secure_closet/engineering_mechanic)
new /obj/item/clothing/suit/wintercoat/engineering(S)
new /obj/item/clothing/suit/wintercoat/engineering(S)
if(/obj/structure/closet/secure_closet/engineering_atmos)
new /obj/item/clothing/suit/wintercoat/engineering/atmos(S)
new /obj/item/clothing/suit/wintercoat/engineering/atmos(S)
else
if(prob(50))
new /obj/item/clothing/suit/wintercoat(S)
if(prob(80))
new /obj/item/clothing/suit/wintercoat(S)
var/area/christmas_bar = locate(/area/crew_quarters/bar)
if(christmas_bar)
var/list/turf/simulated/floor/valid = list()
//Loop through each floor in the supply drop area
for(var/turf/simulated/floor/F in christmas_bar)
if(!F.has_dense_content() && istype(F, /turf/simulated/floor/wood))
valid.Add(F)
if(valid.len)
new/obj/structure/snow_flora/tree/pine/xmas/vg/(pick(valid))
var/area/santadog = locate(/area/crew_quarters/hop)
if(santadog)
var/mob/living/simple_animal/corgi/corg = locate(/mob/living/simple_animal/corgi/Ian) in santadog
if(corg)
corg.remove_inventory("head")
corg.remove_inventory("back")
var/obj/item/I = new/obj/item/clothing/head/christmas/santahat/red
corg.place_on_head(I)
/*
var/mob/living/simple_animal/corgi/corg = locate(/mob/living/simple_animal/corgi/Ian) in world
if(corg)
corg.remove_inventory("head")
corg.remove_inventory("back")
var/obj/item/I = new/obj/item/clothing/head/christmas/santahat/red
corg.place_on_head(I)
*/

View File

@@ -27,10 +27,11 @@
if(W.is_hot() || W.sharpness_flags & (HOT_EDGE))
light("<span class='notice'>[user] lights [src] with [W].</span>")
/obj/item/candle/proc/light(var/flavor_text = "<span class='notice'>[usr] lights [src].</span>")
/obj/item/candle/proc/light(var/flavor_text = "<span class='notice'>[usr] lights [src].</span>", var/quiet = 0)
if(!src.lit)
src.lit = 1
visible_message(flavor_text)
if(!quiet)
visible_message(flavor_text)
set_light(CANDLE_LUM)
processing_objects.Add(src)

View File

@@ -22,7 +22,6 @@
var/snowballs = 0
var/global/list/snow_layers = list()
var/global/list/dirt_layers = list()
var/list/snowsound = list('sound/misc/snow1.ogg', 'sound/misc/snow2.ogg', 'sound/misc/snow3.ogg', 'sound/misc/snow4.ogg', 'sound/misc/snow5.ogg', 'sound/misc/snow6.ogg')
/turf/unsimulated/floor/snow/New()

View File

@@ -850,6 +850,7 @@ var/global/floorIsLava = 0
<A href='?src=\ref[src];secretsfun=supermattercascade'>Start a Supermatter Cascade</A><BR>
<A href='?src=\ref[src];secretsfun=meteorstorm'>Trigger an undending Meteor Storm</A><BR>
<A href='?src=\ref[src];secretsfun=halloween'>Awaken the damned for some spooky shenanigans</A><BR>
<A href='?src=\ref[src];secretsfun=christmas_vic'>Make the station christmasy</A><BR>
"}
if(check_rights(R_SERVER,0))

View File

@@ -3310,6 +3310,13 @@
if(choice != "Cancel")
SetUniversalState(/datum/universal_state/halloween, 1, 1)
message_admins("[key_name_admin(usr)] has pressed the halloween fun button. Truly [key_name_admin(usr)] is the spookiest.")
if("christmas_vic")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","XMS")
var/choice = input("Are you sure you want to do time-related shenanigans and send the station back to the victorian era?") in list("What's the worst that could happen?", "Cancel")
if(choice != "Cancel")
SetUniversalState(/datum/universal_state/auldlangsyne, 1, 1)
message_admins("[key_name_admin(usr)] has pressed the \"Other\" Christmas button. Go ahead and ask him why the station's got wood.")
if("mobswarm")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","MS")

View File

@@ -175,6 +175,10 @@ proc/move_mining_shuttle()
on = 1
update_brightness()
/obj/item/device/flashlight/lantern/on/dim
name = "dim lantern"
light_power = 0.6
/*****************************Pickaxe********************************/
//Dig constants defined in setup.dm

View File

@@ -22,7 +22,7 @@
layer = LIGHTBULB_LAYER
var/tmp/flickering = 0 //SPOOK
var/obj/item/device/flashlight/lantern/lantern = null
var/start_with_lantern = 1
var/start_with_lantern = /obj/item/device/flashlight/lantern/on
var/busy = 0
/obj/structure/hanging_lantern/New()
@@ -30,7 +30,7 @@
..()
if(start_with_lantern)
lantern = new /obj/item/device/flashlight/lantern/on(src)
lantern = new start_with_lantern(src)
update()
@@ -171,4 +171,7 @@
/obj/structure/hanging_lantern/hook
icon_state = "hanginglantern-construct"
start_with_lantern = 0
start_with_lantern = 0
/obj/structure/hanging_lantern/dim
start_with_lantern = /obj/item/device/flashlight/lantern/on/dim

View File

@@ -143,34 +143,7 @@
if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
return
var/remove_from = href_list["remove_inv"]
switch(remove_from)
if("head")
if(inventory_head)
name = real_name
desc = initial(desc)
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
speak_emote = list("barks", "woofs")
emote_hear = list("barks", "woofs", "yaps","pants")
emote_see = list("shakes its head", "shivers")
min_oxy = initial(min_oxy)
minbodytemp = initial(minbodytemp)
maxbodytemp = initial(maxbodytemp)
set_light(0)
inventory_head.forceMove(src.loc)
inventory_head = null
regenerate_icons()
else
to_chat(usr, "<span class='warning'>There is nothing to remove from its [remove_from].</span>")
return
if("back")
if(inventory_back)
inventory_back.forceMove(src.loc)
inventory_back = null
regenerate_icons()
else
to_chat(usr, "<span class='warning'>There is nothing to remove from its [remove_from].</span>")
return
remove_inventory(remove_from,usr)
show_inv(usr)
//Adding things to inventory
@@ -448,6 +421,36 @@
dir = i
sleep(1)
/mob/living/simple_animal/corgi/proc/remove_inventory(var/remove_from = "head", mob/user)
switch(remove_from)
if("head")
if(inventory_head)
name = real_name
desc = initial(desc)
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
speak_emote = list("barks", "woofs")
emote_hear = list("barks", "woofs", "yaps","pants")
emote_see = list("shakes its head", "shivers")
min_oxy = initial(min_oxy)
minbodytemp = initial(minbodytemp)
maxbodytemp = initial(maxbodytemp)
set_light(0)
inventory_head.forceMove(src.loc)
inventory_head = null
regenerate_icons()
else
if(user)
to_chat(user, "<span class='warning'>There is nothing to remove from its [remove_from].</span>")
return
if("back")
if(inventory_back)
inventory_back.forceMove(src.loc)
inventory_back = null
regenerate_icons()
else
if(user)
to_chat(user, "<span class='warning'>There is nothing to remove from its [remove_from].</span>")
return
//IAN! SQUEEEEEEEEE~
/mob/living/simple_animal/corgi/Ian

View File

@@ -250,14 +250,14 @@ For the main html chat area
/proc/to_chat(target, message)
//Ok so I did my best but I accept that some calls to this will be for shit like sound and images
//It stands that we PROBABLY don't want to output those to the browser output so just handle them here
if (istype(message, /image) || istype(message, /sound) || istype(target, /savefile) || !(ismob(target) || islist(target) || isclient(target) || istype(target, /datum/log) || target == world))
if (istype(target, /datum/zLevel)) //Passing it to an entire z level
for(var/mob/M in player_list) //List of all mobs with clients, excluding new_player
if(!istype(get_z_level(M),target))
continue
to_chat(M, message)
return
if (IsInteger(target)) //Passing it to an entire z level
for(var/mob/M in player_list) //List of all mobs with clients, excluding new_player
if(M.z != target)
continue
to_chat(M, message)
return
if (istype(message, /image) || istype(message, /sound) || istype(target, /savefile) || !(ismob(target) || islist(target) || isclient(target) || istype(target, /datum/log) || target == world))
target << message
if (!isatom(target)) // Really easy to mix these up, and not having to make sure things are mobs makes the code cleaner.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 89 KiB

View File

@@ -377,6 +377,7 @@
#include "code\game\gamemodes\endgame\xmas\lights.dm"
#include "code\game\gamemodes\endgame\xmas\snow.dm"
#include "code\game\gamemodes\endgame\xmas\snowman.dm"
#include "code\game\gamemodes\endgame\xmas\victorianstation.dm"
#include "code\game\gamemodes\endgame\xmas\xmas.dm"
#include "code\game\gamemodes\events\biomass.dm"
#include "code\game\gamemodes\events\black_hole.dm"