def setDL(): dl = Downloadables() dl.add_directory('sound/round_end_sound')
## IMPORTS from engines.precache import Model from stringtables.downloads import Downloadables from vmchanger import viewmodel_manager, worldmodel_manager ## GLOBALS downloadables = Downloadables() downloadables.add_directory('models/weapons/futuristicgrenades') decoy_view_model = Model('models/weapons/futuristicgrenades/v_eq_decoy.mdl') decoy_world_model = Model('models/weapons/futuristicgrenades/w_eq_decoy.mdl') ## def load(): viewmodel_manager.add_weapon_remodel('weapon_decoy', decoy_view_model) worldmodel_manager.add_weapon_remodel('decoy_projectile', decoy_world_model) viewmodel_manager.add_weapon_remodel('weapon_flashbang', decoy_view_model) worldmodel_manager.add_weapon_remodel('flashbang_projectile', decoy_world_model) def unload(): del viewmodel_manager['weapon_decoy'] del worldmodel_manager['decoy_projectile'] del viewmodel_manager['weapon_flashbang'] del worldmodel_manager['flashbang_projectile']
from stringtables.downloads import Downloadables from paths import GAME_PATH from os import listdir from os.path import isfile, join, isdir from engines.precache import Model downloads = Downloadables() paths_to_add = [ GAME_PATH + '/materials/sprites', GAME_PATH + '/materials/particle', GAME_PATH + '/materials/effects', GAME_PATH + '/sound/wcs' ] for mypath in paths_to_add: if isdir(mypath): downloads.add_directory(mypath) for mypath in paths_to_add: if isdir(mypath): files = [f for f in listdir(mypath) if isfile(join(mypath, f))] for x in files: Model(x, True)