SphereServer BugTracker - SphereServer
View Issue Details
0002311SphereServerexecutable - windows buildpublic20-04-14 22:0422-04-14 02:01
Coruja 
Ben 
normalminorhave not tried
resolvedfixed 
 
0.56c Nightly 
Automated (specify build number)
None
None
0002311: TYPEDEF t_light_lit not decaying
when an item with ATTR=attr_decay reach TIMER=0, the normal behavior is decay this item

but there's a problem on items with TYPEDEF t_light_lit because they wont decay. Instead decay, it will decrease "-1 light charge", will change ATTR=attr_decay (02) to attr_move_never (010) and goes back to TIMER=600

when the light lit charge goes to 0 the item will decay. But now there's another problem: the item ATTR is 010 (attr_move_never) but it will decay even without attr_decay set
No tags attached.
Issue History
20-04-14 22:04CorujaNew Issue
21-04-14 02:52BenNote Added: 0002065
21-04-14 06:25CorujaNote Added: 0002066
21-04-14 17:14FeehNote Added: 0002069
22-04-14 02:01BenNote Added: 0002070
22-04-14 02:01BenStatusnew => resolved
22-04-14 02:01BenFixed in Version => 0.56c Nightly
22-04-14 02:01BenResolutionopen => fixed
22-04-14 02:01BenAssigned To => Ben

Notes
(0002065)
Ben   
21-04-14 02:52   
So with all this... what do you suggest the behavior be?
(0002066)
Coruja   
21-04-14 06:25   
[TYPEDEF t_light_lit]
ON=@Timer
IF (<ATTR> & attr_decay)
 REMOVE
ELSE
 proceed with light charges (without change attr and without remove the item when light charges = 0)
ENDIF
(0002069)
Feeh   
21-04-14 17:14   
What Coruja said makes sense. The flag is there to make things decay; that whats the name suggests
(0002070)
Ben   
22-04-14 02:01   
Ok, changed things around a little for t_light_lit and it seems to work properly now.
Charges will decrease on timer like it used too.
When charges reach 0, few things can happen (these were already available options, except for attr_decay not working right)
1 - if (ATTR_DECAY) || (TDATA4 == 0)...burn out (torches do this)
2 - if (TDATA4 == ID same as defname)...It turns into infinite charges
3 - If (TDATA4 == some other ID)...turn into that ID (lanterns do this)