Delay advancement granting by one tick
This commit is contained in:
parent
5c3f0e54c1
commit
75b7614fdf
@ -212,7 +212,9 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
access.write(value)
|
access.write(value)
|
||||||
|
|
||||||
if (value && ply is ServerPlayer) {
|
if (value && ply is ServerPlayer) {
|
||||||
ExopackObtainedTrigger.trigger(ply)
|
tickList.once {
|
||||||
|
ExopackObtainedTrigger.trigger(ply)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}).property
|
}).property
|
||||||
|
|
||||||
@ -326,7 +328,9 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
_exoPackMenu = null
|
_exoPackMenu = null
|
||||||
|
|
||||||
if (value && ply is ServerPlayer) {
|
if (value && ply is ServerPlayer) {
|
||||||
ExopackGainedCraftingTrigger.trigger(ply)
|
tickList.once {
|
||||||
|
ExopackGainedCraftingTrigger.trigger(ply)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).property
|
}).property
|
||||||
@ -337,7 +341,9 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
_exoPackMenu = null
|
_exoPackMenu = null
|
||||||
|
|
||||||
if (value && ply is ServerPlayer) {
|
if (value && ply is ServerPlayer) {
|
||||||
ExopackGainedEnderAccessTrigger.trigger(ply)
|
tickList.once {
|
||||||
|
ExopackGainedEnderAccessTrigger.trigger(ply)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).property
|
}).property
|
||||||
@ -443,7 +449,9 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
_exoPackMenu = null
|
_exoPackMenu = null
|
||||||
|
|
||||||
if (value && ply is ServerPlayer) {
|
if (value && ply is ServerPlayer) {
|
||||||
ExopackGainedSmeltingTrigger.trigger(ply)
|
tickList.once {
|
||||||
|
ExopackGainedSmeltingTrigger.trigger(ply)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).property
|
}).property
|
||||||
@ -609,7 +617,9 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
wasInLiquid = false
|
wasInLiquid = false
|
||||||
|
|
||||||
if (ply is ServerPlayer) {
|
if (ply is ServerPlayer) {
|
||||||
BecomeAndroidTrigger.trigger(ply)
|
tickList.once {
|
||||||
|
BecomeAndroidTrigger.trigger(ply)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -662,7 +672,9 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
wasInLiquid = false
|
wasInLiquid = false
|
||||||
|
|
||||||
if (ply is ServerPlayer) {
|
if (ply is ServerPlayer) {
|
||||||
BecomeHumaneTrigger.trigger(ply)
|
tickList.once {
|
||||||
|
BecomeHumaneTrigger.trigger(ply)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (feature in featureMap.values) {
|
for (feature in featureMap.values) {
|
||||||
@ -928,7 +940,9 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ply is ServerPlayer && hasExopack)
|
if (ply is ServerPlayer && hasExopack)
|
||||||
ExopackSlotsExpandedTrigger.trigger(ply, 0, exopackContainer.containerSize)
|
tickList.once {
|
||||||
|
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