mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Added random objects to configs. For now as separate "random handlers", should be merged into main handlers later
This commit is contained in:
parent
f63b1256d3
commit
f01e30a3b1
@ -64,26 +64,26 @@
|
||||
},
|
||||
|
||||
/// Random objects
|
||||
"randomResource" : { "index" :76, "handler": "resource" },
|
||||
"randomTown" : { "index" :77, "handler": "town" },
|
||||
"randomHero" : { "index" :70, "handler": "hero" },
|
||||
"randomResource" : { "index" :76, "handler": "randomResource", "types" : { "object" : { "index" : 0} } },
|
||||
"randomTown" : { "index" :77, "handler": "randomTown", "types" : { "object" : { "index" : 0} } },
|
||||
"randomHero" : { "index" :70, "handler": "randomHero", "types" : { "object" : { "index" : 0} } },
|
||||
|
||||
"randomDwelling" : { "index" :216, "handler": "dwelling" },
|
||||
"randomDwelling" : { "index" :216, "handler": "randomDwelling", "types" : { "object" : { "index" : 0} } },
|
||||
|
||||
"randomArtifact" : { "index" :65, "handler": "artifact" },
|
||||
"randomArtifactTreasure" : { "index" :66, "handler": "artifact" },
|
||||
"randomArtifactMinor" : { "index" :67, "handler": "artifact" },
|
||||
"randomArtifactMajor" : { "index" :68, "handler": "artifact" },
|
||||
"randomArtifactRelic" : { "index" :69, "handler": "artifact" },
|
||||
"randomArtifact" : { "index" :65, "handler": "randomArtifact", "types" : { "object" : { "index" : 0} } },
|
||||
"randomArtifactTreasure" : { "index" :66, "handler": "randomArtifact", "types" : { "object" : { "index" : 0} } },
|
||||
"randomArtifactMinor" : { "index" :67, "handler": "randomArtifact", "types" : { "object" : { "index" : 0} } },
|
||||
"randomArtifactMajor" : { "index" :68, "handler": "randomArtifact", "types" : { "object" : { "index" : 0} } },
|
||||
"randomArtifactRelic" : { "index" :69, "handler": "randomArtifact", "types" : { "object" : { "index" : 0} } },
|
||||
|
||||
"randomMonster" : { "index" :71, "handler": "monster" },
|
||||
"randomMonsterLevel1" : { "index" :72, "handler": "monster" },
|
||||
"randomMonsterLevel2" : { "index" :73, "handler": "monster" },
|
||||
"randomMonsterLevel3" : { "index" :74, "handler": "monster" },
|
||||
"randomMonsterLevel4" : { "index" :75, "handler": "monster" },
|
||||
"randomMonsterLevel5" : { "index" :162, "handler": "monster" },
|
||||
"randomMonsterLevel6" : { "index" :163, "handler": "monster" },
|
||||
"randomMonsterLevel7" : { "index" :164, "handler": "monster" },
|
||||
"randomMonster" : { "index" :71, "handler": "randomMonster", "types" : { "object" : { "index" : 0} } },
|
||||
"randomMonsterLevel1" : { "index" :72, "handler": "randomMonster", "types" : { "object" : { "index" : 0} } },
|
||||
"randomMonsterLevel2" : { "index" :73, "handler": "randomMonster", "types" : { "object" : { "index" : 0} } },
|
||||
"randomMonsterLevel3" : { "index" :74, "handler": "randomMonster", "types" : { "object" : { "index" : 0} } },
|
||||
"randomMonsterLevel4" : { "index" :75, "handler": "randomMonster", "types" : { "object" : { "index" : 0} } },
|
||||
"randomMonsterLevel5" : { "index" :162, "handler": "randomMonster", "types" : { "object" : { "index" : 0} } },
|
||||
"randomMonsterLevel6" : { "index" :163, "handler": "randomMonster", "types" : { "object" : { "index" : 0} } },
|
||||
"randomMonsterLevel7" : { "index" :164, "handler": "randomMonster", "types" : { "object" : { "index" : 0} } },
|
||||
|
||||
/// Classes without dedicated object
|
||||
"hillFort" : { "index" :35, "handler": "generic", "types" : { "object" : { "index" : 0} } },
|
||||
|
@ -236,10 +236,35 @@
|
||||
"seerHut" : { "index" :83, "handler": "seerHut" },
|
||||
|
||||
// subtype: level
|
||||
"randomDwellingLvl" : { "index" :217, "handler": "dwelling" },
|
||||
"randomDwellingLvl" : {
|
||||
"index" :217, "handler": "randomDwelling",
|
||||
"types" : {
|
||||
"objectLvl1" : { "index" : 0},
|
||||
"objectLvl2" : { "index" : 1},
|
||||
"objectLvl3" : { "index" : 2},
|
||||
"objectLvl4" : { "index" : 3},
|
||||
"objectLvl5" : { "index" : 4},
|
||||
"objectLvl6" : { "index" : 5},
|
||||
"objectLvl7" : { "index" : 6}
|
||||
}
|
||||
},
|
||||
|
||||
// subtype: faction ID
|
||||
"randomDwellingFaction" : { "index" :218, "handler": "dwelling" },
|
||||
"randomDwellingFaction" : {
|
||||
"index" :218,
|
||||
"handler": "randomDwelling",
|
||||
"types" : {
|
||||
"objectCastle" : { "index" : 0},
|
||||
"objectRampart" : { "index" : 1},
|
||||
"objectTower" : { "index" : 2},
|
||||
"objectInferno" : { "index" : 3},
|
||||
"objectNecropolis" : { "index" : 4},
|
||||
"objectDungeon" : { "index" : 5},
|
||||
"objectStronghold" : { "index" : 6},
|
||||
"objectFortress" : { "index" : 7},
|
||||
"objectCastle" : { "index" : 8},
|
||||
}
|
||||
},
|
||||
|
||||
// don't have subtypes (at least now), but closely connected to this objects
|
||||
"spellScroll" : { "index" :93, "handler": "artifact" },
|
||||
|
@ -40,6 +40,13 @@ CObjectClassesHandler::CObjectClassesHandler()
|
||||
SET_HANDLER_CLASS("static", CObstacleConstructor);
|
||||
SET_HANDLER_CLASS("", CObstacleConstructor);
|
||||
|
||||
SET_HANDLER("randomArtifact", CGArtifact);
|
||||
SET_HANDLER("randomHero", CGHeroInstance);
|
||||
SET_HANDLER("randomResource", CGResource);
|
||||
SET_HANDLER("randomTown", CGTownInstance);
|
||||
SET_HANDLER("randomMonster", CGCreature);
|
||||
SET_HANDLER("randomDwelling", CGDwelling);
|
||||
|
||||
SET_HANDLER("generic", CGObjectInstance);
|
||||
SET_HANDLER("market", CGMarket);
|
||||
SET_HANDLER("cartographer", CCartographer);
|
||||
@ -67,6 +74,7 @@ CObjectClassesHandler::CObjectClassesHandler()
|
||||
SET_HANDLER("pandora", CGPandoraBox);
|
||||
SET_HANDLER("pickable", CGPickable);
|
||||
SET_HANDLER("prison", CGHeroInstance);
|
||||
SET_HANDLER("prison", CGHeroInstance);
|
||||
SET_HANDLER("questGuard", CGQuestGuard);
|
||||
SET_HANDLER("resource", CGResource);
|
||||
SET_HANDLER("scholar", CGScholar);
|
||||
|
Loading…
Reference in New Issue
Block a user