internal void SetupMount(Mount.MountData mountData) { ModMount newMountData = (ModMount)MemberwiseClone(); newMountData.MountData = mountData; mountData.ModMount = newMountData; newMountData.Mod = Mod; newMountData.SetDefaults(); }
public int MountType(string name) { ModMount mount = GetMount(name); if (mount == null) { return(0); } return(mount.mount.Type); }
public void AddMount(string name, ModMount mount, string texture) { int id = MountLoader.ReserveMountID(); mount.mount.Reset(); mounts[name] = mount; MountLoader.Mounts[id] = mount; mount.texture = texture; mount.mod = this; }
private void AutoloadMount(Type type) { ModMount mount = (ModMount)Activator.CreateInstance(type); mount.mod = this; string name = type.Name; string texture = (type.Namespace + "." + type.Name).Replace('.', '/'); if (mount.Autoload(ref name, ref texture)) { AddMount(name, mount, texture); } }
internal void SetupModMount(Mount mount) { ModMount newMount = (ModMount)Activator.CreateInstance(GetType()); newMount.mount = mount; mount.modMount = newMount; newMount.mod = mod; newMount.mount.setMountData(index, spawnDust, heightBoost, runSpeed, dashSpeed, acceleration, jumpHeight, jumpSpeed, bodyFrame, xOffset, yOffset, playerHeadOffset, standingFrameCount, standingFrameDelay, standingFrameStart, runningFrameCount, runningFrameDelay, runningFrameStart, flyingFrameCount, flyingFrameDelay, flyingFrameStart, inAirFrameCount, inAirFrameDelay, inAirFrameStart, idleFrameCount, idleFrameDelay, idleFrameStart, swimFrameCount, swimFrameDelay, swimFrameStart, idleFrameLoop, backTexture, array, fallDamage, dashingFrameCount, dashingFrameDelay, dashingFrameStart, buff, flightTimeMax); }