room 3 changes
chest, tiny jump and run with moving platforms
This commit is contained in:
@@ -348,6 +348,8 @@
|
||||
if(Array.isArray(rect.path)) out.path = deepClone(rect.path);
|
||||
if(rect.speed !== undefined) out.speed = +rect.speed;
|
||||
if(rect.name) out.name = String(rect.name);
|
||||
if(rect.quest) out.quest = String(rect.quest);
|
||||
if(rect.quest_complete) out.quest_complete = String(rect.quest_complete);
|
||||
if(Array.isArray(rect.respawn)) out.respawn = deepClone(rect.respawn);
|
||||
return out;
|
||||
}
|
||||
@@ -466,7 +468,7 @@
|
||||
const type = p.type || p.kind || "light_source";
|
||||
const object_id = p.object_id || p.objectId || null;
|
||||
const radius = +p.radius || getDefaultRadiusForType(type, object_id);
|
||||
r.props.push({ x, y, type, radius, object_id, layer: +(p.layer||0), quest_id: p.quest_id || p.questId || "" });
|
||||
r.props.push({ x, y, type, radius, object_id, layer: +(p.layer||0), quest_id: p.quest_id || p.questId || "", coins: Array.isArray(p.coins) ? deepClone(p.coins) : undefined });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2133,6 +2135,14 @@ Cancel = Choose whether to remove without saving`);
|
||||
<div style="margin-top:8px;">
|
||||
<div class="mini">name</div>
|
||||
<input id="ptname" type="text" value="${p.name||""}" placeholder="e.g. opens_bridge"/>
|
||||
</div>
|
||||
<div style="margin-top:8px;">
|
||||
<div class="mini">unlock when quest accepted (id)</div>
|
||||
<input id="ptquest" type="text" value="${p.quest||""}" placeholder="e.g. quest_first_kills"/>
|
||||
</div>
|
||||
<div style="margin-top:8px;">
|
||||
<div class="mini">unlock when quest complete (id)</div>
|
||||
<input id="ptqcomplete" type="text" value="${p.quest_complete||""}" placeholder="e.g. quest_first_kills"/>
|
||||
</div>` : ""}
|
||||
${(p.group||"ground") === "hazard" ? `
|
||||
<div style="margin-top:8px;">
|
||||
@@ -2358,6 +2368,14 @@ Cancel = Choose whether to remove without saving`);
|
||||
const v = ptname.value.trim();
|
||||
if(v){ p.name = v; } else { delete p.name; }
|
||||
}));
|
||||
const ptquest=q("ptquest"); if(ptquest) ptquest.addEventListener("change", ()=>pushAnd(()=>{
|
||||
const v = ptquest.value.trim();
|
||||
if(v){ p.quest = v; } else { delete p.quest; }
|
||||
}));
|
||||
const ptqcomplete=q("ptqcomplete"); if(ptqcomplete) ptqcomplete.addEventListener("change", ()=>pushAnd(()=>{
|
||||
const v = ptqcomplete.value.trim();
|
||||
if(v){ p.quest_complete = v; } else { delete p.quest_complete; }
|
||||
}));
|
||||
const ptspeed=q("ptspeed"); if(ptspeed) ptspeed.addEventListener("change", ()=>pushAnd(()=>{ p.speed = Math.max(1, num(ptspeed.value)); }));
|
||||
const hzrespawn=q("hzrespawn");
|
||||
if(hzrespawn){
|
||||
@@ -3259,6 +3277,8 @@ Cancel = Choose whether to remove without saving`);
|
||||
if(p.speed !== undefined) obj.speed = p.speed;
|
||||
}
|
||||
if(p.name) obj.name = p.name;
|
||||
if(p.quest) obj.quest = p.quest;
|
||||
if(p.quest_complete) obj.quest_complete = p.quest_complete;
|
||||
if(Array.isArray(p.respawn)) obj.respawn = p.respawn;
|
||||
platforms[group].push(obj);
|
||||
} else {
|
||||
@@ -3311,6 +3331,7 @@ Cancel = Choose whether to remove without saving`);
|
||||
if(p.object_id) out.object_id = p.object_id;
|
||||
if(p.layer) out.layer = p.layer;
|
||||
if(p.quest_id) out.quest_id = p.quest_id;
|
||||
if(Array.isArray(p.coins)) out.coins = p.coins;
|
||||
return out;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user