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

Add Winter holiday event models to the lobby #768

Merged
merged 8 commits into from
Dec 14, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Northstar.Custom/mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
{
"Name": "ns_force_melee",
"DefaultValue": ""
},
{
"Name": "ns_show_event_models",
"DefaultValue": "1",
"Flags": "ARCHIVE_PLAYERPROFILE"
}
],
"Scripts": [
Expand Down Expand Up @@ -434,6 +439,20 @@
{
"Path": "sh_northstar_safe_io.gnut",
"RunOn": "CLIENT || SERVER || UI"
},
{
"Path": "_event_models.gnut",
"RunOn": "SERVER && LOBBY",
"ServerCallback": {
"Before": "EventModelsInit"
}
},
{
"Path": "ui/ns_custom_mod_settings.gnut",
"RunOn": "UI",
"UICallback":{
"Before": "NSCustomModSettings"
}
}
],

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"UnlitTexture"
{
$basetexture "models/northstartree/lightsflicker"
$color "[1.5 1.5 1.5]"

Proxies
{

TextureScroll
{
texturescrollvar $basetexturetransform
texturescrollrate 0.33
texturescrollangle 45
}

}

}
Binary file not shown.
Binary file not shown.
Binary file not shown.
21 changes: 21 additions & 0 deletions Northstar.Custom/mod/scripts/vscripts/_event_models.gnut
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
global function EventModelsInit

void function EventModelsInit()
{
if( !GetConVarBool( "ns_show_event_models" ) )
return

table timeParts = GetUnixTimeParts()
int month = expect int( timeParts[ "month" ] )
int day = expect int( timeParts[ "day" ] )

// 18th December to 6th January
if( ( ( month == 12 ) && ( day >= 18 ) ) || ( ( month == 1 ) && ( day <= 6 ) ) )
GeckoEidechse marked this conversation as resolved.
Show resolved Hide resolved
{
PrecacheModel( $"models/northstartee/winter_holiday_tree.mdl" )
PrecacheModel( $"models/northstartree/winter_holiday_floor.mdl" )

CreatePropDynamic( $"models/northstartree/winter_holiday_tree.mdl", < -60, 740, 30 >, < 0, 0, 0 >, SOLID_VPHYSICS, 1000 )
CreatePropDynamic( $"models/northstartree/winter_holiday_floor.mdl", < -60, 740, 30 >, < 0, 0, 0 >, SOLID_VPHYSICS, 1000 )
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
global function NSCustomModSettings

void function NSCustomModSettings()
{
ModSettings_AddModTitle( "Northstar Custom" , 2 )
ModSettings_AddModCategory( "Event Models" )
ModSettings_AddEnumSetting( "ns_show_event_models", "Show Event Models", [ "#SETTING_OFF", "#SETTING_ON" ], 2 )
}
Binary file added Northstar.Custom/paks/bt.rpak
Binary file not shown.
Binary file added Northstar.Custom/paks/bt.starpak
Binary file not shown.
Binary file added Northstar.Custom/paks/giftwrap.rpak
Binary file not shown.
Binary file added Northstar.Custom/paks/giftwrap.starpak
Binary file not shown.
Binary file added Northstar.Custom/paks/leaves.rpak
Binary file not shown.
Binary file added Northstar.Custom/paks/leaves.starpak
Binary file not shown.
9 changes: 7 additions & 2 deletions Northstar.Custom/paks/rpak.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"Postload": {
"mp_weapon_shotgun_doublebarrel.rpak": "common.rpak"
"mp_weapon_shotgun_doublebarrel.rpak": "common.rpak",
"leaves.rpak": "common.rpak",
"tree_stump.rpak": "common.rpak",
"bt.rpak": "common.rpak",
"giftwrap.rpak": "common.rpak",
"snow.rpak": "common.rpak"
}
}
}
Binary file added Northstar.Custom/paks/snow.rpak
Binary file not shown.
Binary file added Northstar.Custom/paks/snow.starpak
Binary file not shown.
Binary file added Northstar.Custom/paks/tree_stump.rpak
Binary file not shown.
Binary file added Northstar.Custom/paks/tree_stump.starpak
Binary file not shown.
Loading