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

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

merged 7 commits into from Dec 24, 2017

Conversation

MadmanMartian
Copy link
Contributor

@MadmanMartian MadmanMartian commented Dec 22, 2017

Makes any station christmassy at the press of a button!

  • Turns the hallways to snow, and decorates the walls along them with christmas lights
  • Adds a vg-themed christmas tree to the bar, sprite courtesy of @SkowronX
  • adds nice winter coats to most secure lockers!
  • fucks with all the lights on station, turning them to slightly dim lanterns!
  • sticks a santa hat on the corgi
  • only with minimal™️ lag!

@IconDiffBot
Copy link

Icons with diff:

icons/obj/flora/pinetrees.dmi
Key Old New Status
spessmastree35 spessmastree35 Created
spessmastree3 spessmastree3 Created
spessmastree4 spessmastree4 Created
spessmastree_off spessmastree_off Created
spessmastree6 spessmastree6 Created
spessmastree24 spessmastree24 Created
spessmastree14 spessmastree14 Created
spessmastree8 spessmastree8 Created
spessmastree25 spessmastree25 Created
spessmastree11 spessmastree11 Created
spessmastree2 spessmastree2 Created
spessmastree32 spessmastree32 Created
spessmastree47 spessmastree47 Created
spessmastree29 spessmastree29 Created
spessmastree12 spessmastree12 Created
spessmastree40 spessmastree40 Created
spessmastree33 spessmastree33 Created
spessmastree38 spessmastree38 Created
spessmastree17 spessmastree17 Created
spessmastree28 spessmastree28 Created
spessmastree spessmastree Created
spessmastree43 spessmastree43 Created
spessmastree23 spessmastree23 Created
spessmastree15 spessmastree15 Created
spessmastree36 spessmastree36 Created
spessmastree34 spessmastree34 Created
spessmastree13 spessmastree13 Created
spessmastree18 spessmastree18 Created
spessmastree10 spessmastree10 Created
spessmastree39 spessmastree39 Created
spessmastree31 spessmastree31 Created
spessmastree45 spessmastree45 Created
spessmastree21 spessmastree21 Created
spessmastree27 spessmastree27 Created
spessmastree41 spessmastree41 Created
spessmastree42 spessmastree42 Created
spessmastree5 spessmastree5 Created
spessmastree7 spessmastree7 Created
spessmastree30 spessmastree30 Created
spessmastree37 spessmastree37 Created
spessmastree46 spessmastree46 Created
spessmastree9 spessmastree9 Created
spessmastree19 spessmastree19 Created
spessmastree22 spessmastree22 Created
spessmastree20 spessmastree20 Created
spessmastree1 spessmastree1 Created
spessmastree16 spessmastree16 Created
spessmastree44 spessmastree44 Created
spessmastree26 spessmastree26 Created

@gbasood
Copy link
Contributor

gbasood commented Dec 22, 2017

jesus christ what
you're going to change the entire station to unsimulated turfs?

@gbasood gbasood added the Content Adds something. Neat! label Dec 22, 2017
Copy link
Contributor

@gbasood gbasood left a 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)
Copy link
Contributor

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)
Copy link
Contributor

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
Copy link
Contributor

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)
Copy link
Contributor

Choose a reason for hiding this comment

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

forgot location

@@ -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>
Copy link
Contributor

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

@MadmanMartian MadmanMartian deleted the vg_christmas branch December 22, 2017 03:01
@gbasood
Copy link
Contributor

gbasood commented Dec 22, 2017

🤔
You could have fixed this to be usable easily

@MadmanMartian
Copy link
Contributor Author

was at a bit of a low point last night, sorry. I'll get it done

@MadmanMartian MadmanMartian restored the vg_christmas branch December 22, 2017 11:45
@MadmanMartian MadmanMartian reopened this Dec 22, 2017
@jknpj jknpj added the Mapping (General 🗺️) This applies to every map really. label Dec 22, 2017
@small-boss
Copy link
Contributor

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)
Copy link
Contributor

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?

Copy link
Contributor

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)
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

@gbasood gbasood left a 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

Copy link
Contributor

@PJB3005 PJB3005 left a 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>")
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor

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)
Copy link
Contributor

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)
Copy link
Contributor

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)
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/turf/T = get_turf(L)
Copy link
Contributor

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)
Copy link
Contributor

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.

Copy link
Contributor Author

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))
Copy link
Contributor

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)
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor Author

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)
Copy link
Contributor

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.

@@ -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
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

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

/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]
and its usages.

Copy link
Contributor

@PJB3005 PJB3005 left a 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.

@Blithering
Copy link
Contributor

Will this be merged in time for christmas?

@MadmanMartian
Copy link
Contributor Author

Well it needs to be merged within the next 4 minutes in that case

@PJB3005 PJB3005 merged commit 89839c7 into vgstation-coders:Bleeding-Edge Dec 24, 2017
@MadmanMartian MadmanMartian deleted the vg_christmas branch December 25, 2017 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content Adds something. Neat! Mapping (General 🗺️) This applies to every map really.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants