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
makes the station christmassy at the press of a button! #16841
Conversation
jesus christ what |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hoo boy we got some problems
for(var/obj/machinery/light/L in to_snow) | ||
qdel(L) | ||
|
||
for(var/turf/T in world) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no
do not loop through all turfs in world
there are better ways to do this
var/area/to_snow = locate(A) | ||
if(to_snow) | ||
for(var/turf/simulated/floor/F in to_snow) | ||
F.ChangeTurf(/turf/unsimulated/floor/snow, tell_universe = 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're turning literally every simulated turf on the station into unsimulated
why would you do this
don't do this
if(/obj/structure/closet/secure_closet/hop2) | ||
new /obj/item/clothing/suit/wintercoat/hop(S) | ||
if(/obj/structure/closet/secure_closet/hos) | ||
new /obj/item/clothing/suit/wintercoat/security/hos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot location
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot location
code/modules/admin/admin.dm
Outdated
@@ -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 old-timey and christmasy</A><BR> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean really only one of these applies
🤔 |
was at a bit of a low point last night, sorry. I'll get it done |
I was sad that no one is gonna make a christmas version of the maps like last year, but this is even better |
qdel(L) | ||
|
||
for(var/area/A in areas) | ||
if(A.z == target_zlevel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does anyone know if this will work for things that are in space on zlevel 1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The z coordinate here is set to the first turf on the map, so the entire space area will be counted for example (unless that's excluded in this list)
But yes, this will work @gbasood .
var/mob/catch_the_dog = locate(/mob/living/simple_animal/corgi/Ian) in santadog | ||
if(catch_the_dog) | ||
new /mob/living/simple_animal/corgi/Ian/santa(get_turf(catch_the_dog)) | ||
qdel(catch_the_dog) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what have you done to Ian you monster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw there was a subtype of Ian called santa Ian, so pupsnatched them and replaced them with a doppelganger.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing that subtype does is change the hat he has. Meanwhile you'll delete any other hats or clothing items ian has by doing this. Not amazing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The performance changes look much better to me this time around. I'll try to nag another collab to take a look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RIP christmas.
Also space your damn code out vertically we're not TG clockcult.
/datum/universal_state/auldlangsyne/OnEnter() | ||
var/target_zlevel = map.zMainStation | ||
|
||
to_chat(target_zlevel, "<span class='sinister'>There is a certain chill to the air, as bells ring faintly in the distance...</span>") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This... doesn't work. zMainStation
is a number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check to_chat, you can give it an integer and it will to_chat things only on that z level. #15589
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What the fuck. That's horrible code.
@Intigracy I'm putting you responsive for merging that shitcode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're not using it on my watch though because that's just a giant train wreck waiting to spam everybody's client because of a type error.
//Snow up the halls | ||
for(var/A in typesof(/area/hallway)) | ||
var/area/to_snow = locate(A) | ||
if(to_snow) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid indentation:
if (!to_snow)
continue
qdel(L) | ||
|
||
for(var/area/A in areas) | ||
if(A.z == target_zlevel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The z coordinate here is set to the first turf on the map, so the entire space area will be counted for example (unless that's excluded in this list)
But yes, this will work @gbasood .
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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/turf/T = get_turf(L) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use get_turf
instead of loc
?
for(var/obj/structure/closet/secure_closet/S in A) | ||
switch(S.type) | ||
if(/obj/structure/closet/secure_closet/captains) | ||
new /obj/item/clothing/suit/wintercoat/captain(S) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These spawns like this won't work properly if the locker's open.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you then close it, and open it again.
Magic of christmas!
(Can't find anything that can help 'place' something in a locker)
for(var/turf/simulated/floor/F in christmas_bar) | ||
if(!F.has_dense_content() && istype(F, /turf/simulated/floor/wood)) | ||
valid.Add(F) | ||
new/obj/structure/snow_flora/tree/pine/xmas/vg/(pick(valid)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This'll runtime if there's no valid positions.
new/obj/structure/snow_flora/tree/pine/xmas/vg/(pick(valid)) | ||
|
||
|
||
var/area/santadog = locate(/area/crew_quarters/hop) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just locate ian in world?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would that not be expensive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.536 2.834 2.873 - checking corgi in world
1.540 2.694 2.731 - checking corgi in HoP office
var/mob/catch_the_dog = locate(/mob/living/simple_animal/corgi/Ian) in santadog | ||
if(catch_the_dog) | ||
new /mob/living/simple_animal/corgi/Ian/santa(get_turf(catch_the_dog)) | ||
qdel(catch_the_dog) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing that subtype does is change the hat he has. Meanwhile you'll delete any other hats or clothing items ian has by doing this. Not amazing.
goon/code/datums/browserOutput.dm
Outdated
@@ -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 (IsInteger(target)) //Passing it to an entire z level |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just waaay too dangerous and error prone. Make it do this when it's passed an actual z level datum only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A zLevel datum is just stats used to construct that z level in /datum/map/proc/addZLevel(), it's not used for storage or logging, so can't be referred or used to reference back to a mob or target
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They definitely are not. See
vgstation13/code/__HELPERS/unsorted.dm
Lines 1327 to 1337 in bd4f283
/proc/get_z_level(var/atom/A) | |
var/z | |
if(istype(A, /atom/movable)) | |
var/turf/T = get_turf(A) | |
if(!T) | |
return null | |
z = T.z | |
else | |
z = A.z | |
. = map.zLevels[z] |
… map datums zlevel list. Much more sensible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's still issues but I'll let it slide because christmas I guess.
Will this be merged in time for christmas? |
Well it needs to be merged within the next 4 minutes in that case |
Makes any station christmassy at the press of a button!