From f4df3144adbd45d48d812d102cfaf7cef474824e Mon Sep 17 00:00:00 2001 From: Maya <11448698+RoyalBlue1@users.noreply.github.com> Date: Thu, 14 Dec 2023 01:31:37 +0100 Subject: Add Winter holiday event models to the lobby (#768) Adds decorative models to the lobby map that will only display during winter holiday season. --- .../mod/scripts/vscripts/_event_models.gnut | 21 +++++++++++++++++++++ .../scripts/vscripts/ui/ns_custom_mod_settings.gnut | 8 ++++++++ 2 files changed, 29 insertions(+) create mode 100644 Northstar.Custom/mod/scripts/vscripts/_event_models.gnut create mode 100644 Northstar.Custom/mod/scripts/vscripts/ui/ns_custom_mod_settings.gnut (limited to 'Northstar.Custom/mod/scripts/vscripts') diff --git a/Northstar.Custom/mod/scripts/vscripts/_event_models.gnut b/Northstar.Custom/mod/scripts/vscripts/_event_models.gnut new file mode 100644 index 000000000..0802d7698 --- /dev/null +++ b/Northstar.Custom/mod/scripts/vscripts/_event_models.gnut @@ -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 ) ) ) + { + 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 ) + } +} diff --git a/Northstar.Custom/mod/scripts/vscripts/ui/ns_custom_mod_settings.gnut b/Northstar.Custom/mod/scripts/vscripts/ui/ns_custom_mod_settings.gnut new file mode 100644 index 000000000..5a7d80b76 --- /dev/null +++ b/Northstar.Custom/mod/scripts/vscripts/ui/ns_custom_mod_settings.gnut @@ -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 ) +} -- cgit v1.2.3