-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added Active Transformer Explosion Core - Added Insurance Counter and its things - Fixed localization problems
- Loading branch information
Showing
23 changed files
with
1,046 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package cn.taskeren.op.forge.config | ||
|
||
import net.minecraftforge.common.config.Configuration | ||
import kotlin.properties.ReadWriteProperty | ||
import kotlin.reflect.KProperty | ||
|
||
object OP_Config { | ||
|
||
lateinit var config: Configuration | ||
|
||
var allowRefundByCommand by boolean("allow-refund-by-command", "insurance", false, "Set to true if allows refund by command. The command still requires permission of level 4.") | ||
|
||
fun init(config: Configuration) { | ||
this.config = config | ||
} | ||
|
||
private fun boolean(name: String, category: String, defaultValue: Boolean, comment: String): ReadWriteProperty<Any, Boolean> { | ||
return object : ReadWriteProperty<Any, Boolean> { | ||
override fun getValue(thisRef: Any, property: KProperty<*>): Boolean { | ||
return config.getBoolean(name, category, defaultValue, comment) | ||
} | ||
|
||
override fun setValue(thisRef: Any, property: KProperty<*>, value: Boolean) { | ||
config.getCategory(category)[name]?.set(value) | ||
config.save() | ||
} | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.