payam Posted September 9, 2009 Share Posted September 9, 2009 (edited) Nome Script Descrizione Inserite qui il testo Autore Krosk Allegati Istruzioni per l'uso Inserire sopra Main # -------------------------------------------------------- # Anti-"No such file" # ou comment dédramatiser le manque d'une ressource # par Krosk # -------------------------------------------------------- # Ce script permet de continuer le jeu malgré # l'absence d'une ressource graphique ou audio # que le projet soit crypté ou non. # # Il n'empêche pas le crash en cas # de manque d'une map ou d'un fichier data... # # L'image manquante est substituée par # une image vide, mais vous pouvez # à la place utiliser une image de substitution. # # Le son manquant n'est tout simplement pas joué. # # Par ailleurs, personnalisez vous même le message # NOSUCHTEXT pour signaler au joueur la conduite à adopter. # (utilisez \n pour sauter une ligne) # # Vous pouvez aussi couper les messages d'avertissement # en commentant les lignes de print dans ce script. # (en placant # en tete de ligne) # -------------------------------------------------------- NOSUCHTEXT = "Veuillez me contacter pour me prévenir\nque cette ressource est manquante." module RPG module Cache def self.load_bitmap(folder_name, filename, hue = 0) path = folder_name + filename if not @cache.include?(path) or @cache[path].disposed? if filename != "" begin @cache[path] = Bitmap.new(path) rescue print "La ressource #{path} manque.\n" + NOSUCHTEXT @cache[path] = Bitmap.new(32, 32) end else @cache[path] = Bitmap.new(32, 32) end end if hue == 0 @cache[path] else key = [path, hue] if not @cache.include?(key) or @cache[key].disposed? @cache[key] = @cache[path].clone @cache[key].hue_change(hue) end @cache[key] end end end end module Audio class << self alias_method :temp_se_play, :se_play unless method_defined?(:temp_se_play) alias_method :temp_me_play, :me_play unless method_defined?(:temp_me_play) alias_method :temp_bgm_play, :bgm_play unless method_defined?(:temp_bgm_play) alias_method :temp_bgs_play, :bgs_play unless method_defined?(:temp_bgs_play) end def self.se_play(filename, volume = 100, pitch = 100) begin self.temp_se_play(filename, volume, pitch) rescue print "La ressource #{filename} manque.\n" + NOSUCHTEXT end end def self.me_play(filename, volume = 100, pitch = 100) begin self.temp_me_play(filename, volume, pitch) rescue print "La ressource #{filename} manque.\n" + NOSUCHTEXT end end def self.bgm_play(filename, volume = 100, pitch = 100) begin self.temp_bgm_play(filename, volume, pitch) rescue print "La ressource #{filename} manque.\n" + NOSUCHTEXT end end def self.bgs_play(filename, volume = 100, pitch = 100) begin self.temp_bgs_play(filename, volume, pitch) rescue print "La ressource #{filename} manque.\n" + NOSUCHTEXT end end end Bugs e Conflitti Noti N/A Edited April 26, 2013 by Dilos Applicato tag code. Bazar:Clicca qui!! Link to comment Share on other sites More sharing options...
Kingartur2 Posted September 9, 2009 Share Posted September 9, 2009 Mi spiace deluderti ma esiste gia Per qualsiasi motivo non aprite questo spoiler. Ho detto di non aprirlo ! Se lo apri ancora esplode il mondo. Aaaaaa è un vizio. Contento? Il mondo è esploso, sono tutti morti per colpa della tua curiosità . Vuoi che ti venga anche il morbillo, la varicella e l'AIDS??? O bravo ora sei un malato terminale e nessuno ti puo curare, sono tutti morti ! Se clicchi ancora una volta il PC esplode. E dai smettila !! Uff!! Hai cliccato tante volte che ho dovuto sostituirlo con un codebox. http://s8.postimg.org/yntv9nxld/Banner.png http://img204.imageshack.us/img204/8039/sccontest3octpl3.gif Link to comment Share on other sites More sharing options...
kekkorider Posted September 9, 2009 Share Posted September 9, 2009 beh non mi pare che l'abbia fatto lui visto che le istruzioni sono in francese,solo che non mi ricordo se è già stato postato in questo forum... Bisogno di creare un sito internet?Vai a visitare il White Rabbit ;DScreen contest #23http://rpg2s.net/gif/SCContest3Oct.gifPartecipante al Rpg2s.net Game Contest 2008/2009http://www.rpg2s.net/contest/GameContest0809/gc0809-bannerino.jpgGioco in Sviluppo: Restricted : Project 15 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now