Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
Dec 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions code/__HELPERS/globalaccess.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions code/game/gamemodes/blob/powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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]")
5 changes: 3 additions & 2 deletions code/game/gamemodes/endgame/xmas/lights.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 14 additions & 0 deletions code/game/gamemodes/endgame/xmas/snow.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -33,6 +36,7 @@
"snowgrassall3",
)


/obj/structure/snow/New()
..()
if(prob(17))
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
128 changes: 128 additions & 0 deletions code/game/gamemodes/endgame/xmas/victorianstation.dm
Original file line number Diff line number Diff line change
@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure this'd mess up any flashlights in people's pockets or hands.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't and doesn't, as it wouldn't be in the areas contents, but in the humans contents, which isn't iterated through. Tested it, did not lose my flashlight I was holding.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, didn't catch that. Ok then.

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)
*/
5 changes: 3 additions & 2 deletions code/game/objects/items/candle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion code/game/turfs/unsimulated/snow.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
7 changes: 7 additions & 0 deletions code/modules/admin/topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 4 additions & 0 deletions code/modules/mining/mine_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions code/modules/mining/mine_structures.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
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()

..()

if(start_with_lantern)
lantern = new /obj/item/device/flashlight/lantern/on(src)
lantern = new start_with_lantern(src)

update()

Expand Down Expand Up @@ -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
59 changes: 31 additions & 28 deletions code/modules/mob/living/simple_animal/friendly/corgi.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions goon/code/datums/browserOutput.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Binary file modified icons/obj/flora/pinetrees.dmi
Binary file not shown.