Delay advancement granting by one tick
This commit is contained in:
parent
5c3f0e54c1
commit
75b7614fdf
@ -212,8 +212,10 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
access.write(value)
|
access.write(value)
|
||||||
|
|
||||||
if (value && ply is ServerPlayer) {
|
if (value && ply is ServerPlayer) {
|
||||||
|
tickList.once {
|
||||||
ExopackObtainedTrigger.trigger(ply)
|
ExopackObtainedTrigger.trigger(ply)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}).property
|
}).property
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -326,9 +328,11 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
_exoPackMenu = null
|
_exoPackMenu = null
|
||||||
|
|
||||||
if (value && ply is ServerPlayer) {
|
if (value && ply is ServerPlayer) {
|
||||||
|
tickList.once {
|
||||||
ExopackGainedCraftingTrigger.trigger(ply)
|
ExopackGainedCraftingTrigger.trigger(ply)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}).property
|
}).property
|
||||||
|
|
||||||
var isExopackEnderAccessInstalled by publicSynchronizer.bool(setter = setter@{ value, access, _ ->
|
var isExopackEnderAccessInstalled by publicSynchronizer.bool(setter = setter@{ value, access, _ ->
|
||||||
@ -337,9 +341,11 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
_exoPackMenu = null
|
_exoPackMenu = null
|
||||||
|
|
||||||
if (value && ply is ServerPlayer) {
|
if (value && ply is ServerPlayer) {
|
||||||
|
tickList.once {
|
||||||
ExopackGainedEnderAccessTrigger.trigger(ply)
|
ExopackGainedEnderAccessTrigger.trigger(ply)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}).property
|
}).property
|
||||||
|
|
||||||
private var _exoPackMenu: ExopackInventoryMenu? = null
|
private var _exoPackMenu: ExopackInventoryMenu? = null
|
||||||
@ -443,9 +449,11 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
_exoPackMenu = null
|
_exoPackMenu = null
|
||||||
|
|
||||||
if (value && ply is ServerPlayer) {
|
if (value && ply is ServerPlayer) {
|
||||||
|
tickList.once {
|
||||||
ExopackGainedSmeltingTrigger.trigger(ply)
|
ExopackGainedSmeltingTrigger.trigger(ply)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}).property
|
}).property
|
||||||
|
|
||||||
inner class SmelterBelt(index: Int) : MachineJobEventLoop<ItemJob>(ItemJob.CODEC) {
|
inner class SmelterBelt(index: Int) : MachineJobEventLoop<ItemJob>(ItemJob.CODEC) {
|
||||||
@ -609,9 +617,11 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
wasInLiquid = false
|
wasInLiquid = false
|
||||||
|
|
||||||
if (ply is ServerPlayer) {
|
if (ply is ServerPlayer) {
|
||||||
|
tickList.once {
|
||||||
BecomeAndroidTrigger.trigger(ply)
|
BecomeAndroidTrigger.trigger(ply)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [becomeAndroid] plus instantly kills the player
|
* [becomeAndroid] plus instantly kills the player
|
||||||
@ -662,8 +672,10 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
wasInLiquid = false
|
wasInLiquid = false
|
||||||
|
|
||||||
if (ply is ServerPlayer) {
|
if (ply is ServerPlayer) {
|
||||||
|
tickList.once {
|
||||||
BecomeHumaneTrigger.trigger(ply)
|
BecomeHumaneTrigger.trigger(ply)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (feature in featureMap.values) {
|
for (feature in featureMap.values) {
|
||||||
feature.removeModifiers()
|
feature.removeModifiers()
|
||||||
@ -928,7 +940,9 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ply is ServerPlayer && hasExopack)
|
if (ply is ServerPlayer && hasExopack)
|
||||||
|
tickList.once {
|
||||||
ExopackSlotsExpandedTrigger.trigger(ply, 0, exopackContainer.containerSize)
|
ExopackSlotsExpandedTrigger.trigger(ply, 0, exopackContainer.containerSize)
|
||||||
|
}
|
||||||
|
|
||||||
for (filter in regularSlotFilters) {
|
for (filter in regularSlotFilters) {
|
||||||
filter.value = null
|
filter.value = null
|
||||||
@ -998,7 +1012,7 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
this.research[research] = instance
|
this.research[research] = instance
|
||||||
|
|
||||||
if (instance.isResearched && ply is ServerPlayer) {
|
if (instance.isResearched && ply is ServerPlayer) {
|
||||||
tickList.timer(20) {
|
tickList.once {
|
||||||
if (!ply.hasDisconnected())
|
if (!ply.hasDisconnected())
|
||||||
AndroidResearchTrigger.trigger(ply, instance.type)
|
AndroidResearchTrigger.trigger(ply, instance.type)
|
||||||
}
|
}
|
||||||
@ -1007,7 +1021,7 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isAndroid && ply is ServerPlayer) {
|
if (isAndroid && ply is ServerPlayer) {
|
||||||
tickList.timer(20) {
|
tickList.once {
|
||||||
if (!ply.hasDisconnected())
|
if (!ply.hasDisconnected())
|
||||||
BecomeAndroidTrigger.trigger(ply)
|
BecomeAndroidTrigger.trigger(ply)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user