Ofunniku / dwarftherapist

Automatically exported from code.google.com/p/dwarftherapist
Other
0 stars 0 forks source link

Filter scripting not working. #310

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add filter to new script
2. Create or copy example code
3. Hit apply script

What is the expected output? What do you see instead?

I'd expect it to filter the Dwarf view by whatever I put in the code, instead 
it doesn't do anything.

What version of the product are you using? On what operating system?

Windows 7 x64, DF is 31.18, DT is 0.6.7

Please provide the "run.log" file in the "log" directory of DwarfTherapist
when this error occurred.

If this is a truly "crazy" issue, please also attach a copy of your save-
game.

Original issue reported on code.google.com by tought...@gmail.com on 18 Dec 2010 at 5:19

Attachments:

GoogleCodeExporter commented 9 years ago
Filter scripting seems to work for some data but not all on 0.6.10.

Working:
is_male()
nice_name()
get_raw_happiness()
active_military()
can_set_labors()
labor_enabled()
is_labor_state_dirty()
get_rating_by_labor()
trait()

Scripting broken (all dwarves match all values):
profession()
raw_profession()
custom_profession_name()

Data broken (scripting works, but all dwarves have values of -1):
strength()
agility()
toughness()

Original comment by dave.l.m...@gmail.com on 10 Apr 2011 at 8:43

GoogleCodeExporter commented 9 years ago
The filtering wouldn't do _anything_ if the "Don't display children or babies" 
option is checked.

I have a fix for it here: 
http://code.google.com/r/paulbrinkmann-minor-tweaks/source/detail?r=1d8582baaae9
0c6d5775f50798a498b14f4b6f5d

Original comment by paul.bri...@gmail.com on 26 May 2011 at 6:36

GoogleCodeExporter commented 9 years ago

Original comment by ehler...@gmail.com on 6 Mar 2012 at 2:55

GoogleCodeExporter commented 9 years ago
Issue 325 has been merged into this issue.

Original comment by ehler...@gmail.com on 6 Mar 2012 at 3:02

GoogleCodeExporter commented 9 years ago
Issue 331 has been merged into this issue.

Original comment by ehler...@gmail.com on 6 Mar 2012 at 3:03

GoogleCodeExporter commented 9 years ago
Maybe I should open a new bug, this seems like I might be bug morphing. Anyway:

Version used: Windows 7 x64, DF 34.05, DT 0.6.12

Problem: The "Scripting->Edit Filter Scripts..." menu item does not unfold to 
show the scripts available to edit. Some scripting methods do not appear to 
function, the issue may be related to the manner in which Java handles equality 
on objects versus primitive data types.

FAILS:
string profession() with [d.profession().equals("Miner")] and [d.profession() 
== "Miner"]

string custom_profession_name() with 
[d.custom_profession_name().equals("Vampire")] and [d.custom_profession_name() 
== "Vampire"]

WORKS:
bool is_male()
int raw_profession()
int get_raw_happiness()
bool active_military()
bool can_set_labors()
bool labor_enabled(int labor_id)
int trait(int trait_id)

UNTESTED: I was unable to find documentation on most of these, and I'm not sure 
of the attribute ones are supposed to work.
string nice_name()
int strength()
int agility()
int toughness()
bool is_labor_state_dirty(int labor_id) 
int get_rating_by_labor(int labor_id)

Original comment by mitch.sh...@gmail.com on 14 Mar 2012 at 3:29

Attachments:

GoogleCodeExporter commented 9 years ago
One last part I forgot to add to my previous comment: the scripts do not work 
at all if the option to hide children is checked off.

Original comment by mitch.sh...@gmail.com on 14 Mar 2012 at 4:12