package Boots import ItemObject import ChannelAbilityPreset public constant BOOTS_DUMMY_ID = compiletime(UNIT_ID_GEN.next()) public class Boots extends ItemObject boolean picked = false boolean followWalkable = true construct(vec2 pos, player owner) super(pos, CreateItem(BOOTS_ID, pos.x, pos.y), CreateUnit(owner, BOOTS_DUMMY_ID, pos.x, pos.y, 0)) override function onUse(UnitEntity user) override function onPickup(UnitEntity holder) picked = true this.holder = holder actor.setEntity(null) actor = null terminate() override function onDrop(UnitEntity e) override function update() override function serialize() returns Json let json = super.serialize() json..addProperty(new Property(KEY_TYPE, BOOTS_INDEX.toString())) return json @objectgen function genTome() new UnitDefinition(BOOTS_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") //which icon? ..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("Boots Dummy") ..setUpgradesUsed("") ..setBuildTime(1) ..setUnitClassification("mechanical") ..setHitPointsMaximumBase(100000000) ..setHideMinimapDisplay(true) ..setIsaBuilding(true) ..setShadowImageUnit("")