mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-18 14:12:20 +00:00
Fixfix World
This commit is contained in:
@@ -105,7 +105,6 @@
|
|||||||
//handle charge
|
//handle charge
|
||||||
if(world.time - last_activation > interval)
|
if(world.time - last_activation > interval)
|
||||||
if(inserted_battery.battery_effect.effect == EFFECT_TOUCH)
|
if(inserted_battery.battery_effect.effect == EFFECT_TOUCH)
|
||||||
world << "Effect Touch"
|
|
||||||
if(interval > 0)
|
if(interval > 0)
|
||||||
//apply the touch effect to the holder
|
//apply the touch effect to the holder
|
||||||
if(holder)
|
if(holder)
|
||||||
@@ -117,7 +116,6 @@
|
|||||||
inserted_battery.use_power(energy_consumed_on_touch)
|
inserted_battery.use_power(energy_consumed_on_touch)
|
||||||
else
|
else
|
||||||
//consume power equal to time passed
|
//consume power equal to time passed
|
||||||
world << world.time - last_process
|
|
||||||
inserted_battery.use_power(world.time - last_process)
|
inserted_battery.use_power(world.time - last_process)
|
||||||
|
|
||||||
inserted_battery.battery_effect.DoEffectTouch(holder)
|
inserted_battery.battery_effect.DoEffectTouch(holder)
|
||||||
@@ -126,12 +124,10 @@
|
|||||||
inserted_battery.battery_effect.chargelevel = inserted_battery.battery_effect.chargelevelmax
|
inserted_battery.battery_effect.chargelevel = inserted_battery.battery_effect.chargelevelmax
|
||||||
|
|
||||||
//consume power relative to the time the artifact takes to charge and the effect range
|
//consume power relative to the time the artifact takes to charge and the effect range
|
||||||
world << (inserted_battery.battery_effect.effectrange * inserted_battery.battery_effect.chargelevelmax) / 2
|
|
||||||
inserted_battery.use_power((inserted_battery.battery_effect.effectrange * inserted_battery.battery_effect.chargelevelmax) / 2)
|
inserted_battery.use_power((inserted_battery.battery_effect.effectrange * inserted_battery.battery_effect.chargelevelmax) / 2)
|
||||||
|
|
||||||
else
|
else
|
||||||
//consume power equal to time passed
|
//consume power equal to time passed
|
||||||
world << world.time - last_process
|
|
||||||
inserted_battery.use_power(world.time - last_process)
|
inserted_battery.use_power(world.time - last_process)
|
||||||
|
|
||||||
last_activation = world.time
|
last_activation = world.time
|
||||||
|
|||||||
Reference in New Issue
Block a user