[2023/09/18: ①] Move content handle to `lib.init.parsex`.
This commit is contained in:
parent
09479829fd
commit
897f993409
33
game/game.js
33
game/game.js
|
@ -28513,39 +28513,8 @@
|
|||
setContent:function(item){
|
||||
switch(typeof item){
|
||||
case "object":
|
||||
if(Array.isArray(item)){
|
||||
let lastEvent=null;
|
||||
this.content=(event,step,source,player,target,targets,card,cards,skill,forced,num,trigger,result,_status,lib,game,ui,get,ai)=>{
|
||||
if(step>=item.length) return event.finish();
|
||||
var current=item[step];
|
||||
lastEvent=current(event,{
|
||||
event:event,
|
||||
step:step,
|
||||
source:source,
|
||||
player:player,
|
||||
target:target,
|
||||
targets:targets,
|
||||
card:card,
|
||||
cards:cards,
|
||||
skill:skill,
|
||||
forced:forced,
|
||||
num:num,
|
||||
trigger:trigger,
|
||||
result:result
|
||||
},(lastEvent&&("result" in lastEvent))?lastEvent.result:null);
|
||||
}
|
||||
}
|
||||
else{
|
||||
// TODO: Parse Common Object
|
||||
throw new Error("NYI: Parse Common Object");
|
||||
}
|
||||
break;
|
||||
case "function":
|
||||
if (gnc.is.generatorFunc(item)) {
|
||||
// TODO: Parse Generator Function
|
||||
throw new Error("NYI: Pase Generator Function");
|
||||
}
|
||||
else this.content=lib.init.parsex(item);
|
||||
this.content=lib.init.parsex(item);
|
||||
break;
|
||||
default:
|
||||
if(!lib.element.content[item]._parsed){
|
||||
|
|
Loading…
Reference in New Issue