package Tome import ItemObject import ChannelAbilityPreset public constant TOME_DUMMY_ID = compiletime(UNIT_ID_GEN.next()) public class Tome extends ItemObject construct(vec2 pos, player owner) super(pos, CreateItem(TOME_ID, pos.x, pos.y), CreateUnit(owner, TOME_DUMMY_ID, pos.x, pos.y, 0)) override function onPickup(UnitEntity holder) terminate() override function serialize() returns Json let json = super.serialize() json..addProperty(new Property(KEY_TYPE, TOME_INDEX.toString())) return json @objectgen function genTome() new UnitDefinition(TOME_DUMMY_ID, 'hfoo') ..setAttacksEnabled(0) ..setTargetedAs("structure") ..setAnimationBlendTimeseconds(0) ..setAnimationCastBackswing(0) ..setAnimationCastPoint(0) ..setScalingValue(0.35) ..setShadowImageUnit("") ..setShadowImageCenterX(0) ..setShadowImageCenterY(0) ..setShadowImageWidth(0) ..setShadowImageHeight(0) ..setIconGameInterface("ReplaceableTextures\\CommandButtons\\BTNTomeRed.blp") ..setModelFile("models\\tcBox.mdl") ..setSelectionScale(0.4) ..setSpeedBase(0) ..setTurnRate(0) ..setMovementType(MovementType.None) ..setUnitSoundSet("") ..setCollisionSize(0) ..setNormalAbilities(commaList(REMOVE_OBJECT_ID, GHOST_INVIS_ID, INVULNERABILITY_ID)) ..setName("Tome Dummy") ..setUpgradesUsed("") ..setBuildTime(1) ..setUnitClassification("mechanical") ..setHitPointsMaximumBase(100000000) ..setHideMinimapDisplay(true) ..setIsaBuilding(true) ..setShadowImageUnit("")