2012-05-11 15:18:26 -04:00
|
|
|
/*
|
2013-03-07 19:25:48 -05:00
|
|
|
* Forge Mod Loader
|
|
|
|
|
* Copyright (c) 2012-2013 cpw.
|
|
|
|
|
* All rights reserved. This program and the accompanying materials
|
|
|
|
|
* are made available under the terms of the GNU Lesser Public License v2.1
|
|
|
|
|
* which accompanies this distribution, and is available at
|
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
2013-09-27 10:45:20 -04:00
|
|
|
*
|
2013-03-07 19:25:48 -05:00
|
|
|
* Contributors:
|
|
|
|
|
* cpw - implementation
|
2012-05-11 15:18:26 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package cpw.mods.fml.common;
|
|
|
|
|
|
2012-05-15 15:52:19 -04:00
|
|
|
import java.util.List;
|
2012-08-23 13:43:25 -04:00
|
|
|
import java.util.Set;
|
2012-07-22 11:56:38 -02:30
|
|
|
|
|
|
|
|
import com.google.common.base.Joiner;
|
|
|
|
|
import com.google.common.collect.Lists;
|
2013-12-02 23:46:42 -05:00
|
|
|
import com.google.gson.annotations.SerializedName;
|
2012-07-22 11:56:38 -02:30
|
|
|
|
|
|
|
|
import cpw.mods.fml.common.functions.ModNameFunction;
|
2012-07-30 17:01:27 -04:00
|
|
|
import cpw.mods.fml.common.versioning.ArtifactVersion;
|
2012-07-22 11:56:38 -02:30
|
|
|
|
2012-05-11 15:18:26 -04:00
|
|
|
/**
|
|
|
|
|
* @author cpw
|
2012-07-30 17:01:27 -04:00
|
|
|
*
|
2012-05-11 15:18:26 -04:00
|
|
|
*/
|
|
|
|
|
public class ModMetadata
|
|
|
|
|
{
|
2013-12-02 23:46:42 -05:00
|
|
|
@SerializedName("modid")
|
2012-07-22 11:56:38 -02:30
|
|
|
public String modId;
|
2012-05-11 15:18:26 -04:00
|
|
|
public String name;
|
2013-09-27 10:45:20 -04:00
|
|
|
public String description = "";
|
2012-07-22 11:56:38 -02:30
|
|
|
|
|
|
|
|
public String url = "";
|
|
|
|
|
public String updateUrl = "";
|
|
|
|
|
|
|
|
|
|
public String logoFile = "";
|
|
|
|
|
public String version = "";
|
|
|
|
|
public List<String> authorList = Lists.newArrayList();
|
|
|
|
|
public String credits = "";
|
|
|
|
|
public String parent = "";
|
2012-05-15 15:52:19 -04:00
|
|
|
public String[] screenshots;
|
2012-07-22 11:56:38 -02:30
|
|
|
|
2012-05-25 15:25:35 -04:00
|
|
|
public ModContainer parentMod;
|
2012-07-22 11:56:38 -02:30
|
|
|
public List<ModContainer> childMods = Lists.newArrayList();
|
|
|
|
|
|
|
|
|
|
public boolean useDependencyInformation;
|
2012-08-23 13:43:25 -04:00
|
|
|
public Set<ArtifactVersion> requiredMods;
|
2012-07-30 17:01:27 -04:00
|
|
|
public List<ArtifactVersion> dependencies;
|
|
|
|
|
public List<ArtifactVersion> dependants;
|
2012-07-23 16:33:17 -02:30
|
|
|
public boolean autogenerated;
|
2012-05-11 15:18:26 -04:00
|
|
|
|
2012-08-04 22:51:57 -07:00
|
|
|
public ModMetadata()
|
2012-07-22 11:56:38 -02:30
|
|
|
{
|
2012-05-25 15:25:35 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getChildModCountString()
|
|
|
|
|
{
|
2012-07-22 11:56:38 -02:30
|
|
|
return String.format("%d child mod%s", childMods.size(), childMods.size() != 1 ? "s" : "");
|
2012-05-25 15:25:35 -04:00
|
|
|
}
|
|
|
|
|
|
2012-07-22 11:56:38 -02:30
|
|
|
public String getAuthorList()
|
|
|
|
|
{
|
|
|
|
|
return Joiner.on(", ").join(authorList);
|
2012-05-25 15:25:35 -04:00
|
|
|
}
|
2012-07-22 11:56:38 -02:30
|
|
|
|
2012-05-25 15:25:35 -04:00
|
|
|
public String getChildModList()
|
|
|
|
|
{
|
2012-07-22 11:56:38 -02:30
|
|
|
return Joiner.on(", ").join(Lists.transform(childMods, new ModNameFunction()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String printableSortingRules()
|
|
|
|
|
{
|
2012-08-16 13:55:42 -04:00
|
|
|
return "";
|
2012-05-25 15:25:35 -04:00
|
|
|
}
|
2012-05-11 15:18:26 -04:00
|
|
|
}
|