This repository was archived by the owner on Feb 8, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,8 +162,8 @@ fn gmod13_open(_lua: State) -> i32 {
162162 // Save dependency versions
163163 save_version_cache ( & version_cache) ;
164164
165- // Continue with main integration update
166- print_log ( "Checking main integration ..." ) ;
165+ // Continue with gmod integration update
166+ print_log ( "Checking Gmod Integration ..." ) ;
167167
168168 let res = match client
169169 . get ( "https://api.github.com/repos/gmod-integration/gmod-integration/releases/latest" )
@@ -186,13 +186,21 @@ fn gmod13_open(_lua: State) -> i32 {
186186 } ;
187187
188188 // Check if main integration needs update
189+ let addon_exists = Path :: new ( "./garrysmod/addons/_gmod_integration_latest" ) . exists ( ) ;
190+
189191 if let Some ( current) = & version_cache. gmod_integration {
190- if current == & release. tag_name {
191- print_log ( & format ! ( "Main integration is up to date ({})" , release. tag_name) ) ;
192+ if current == & release. tag_name && addon_exists {
193+ print_log ( & format ! ( "Gmod integration is up to date ({})" , release. tag_name) ) ;
192194 return 0 ;
193195 }
194196 }
195197
198+ if !addon_exists {
199+ print_log ( "Addon folder missing, downloading..." ) ;
200+ } else {
201+ print_log ( "Version mismatch, updating..." ) ;
202+ }
203+
196204 print_log ( "Downloading latest version..." ) ;
197205
198206 // Construct the direct GitHub archive URL instead of using the API's zipball_url
You can’t perform that action at this time.
0 commit comments