Ofunniku / dwarftherapist

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

Can't delete custom profession if it has the same name as standard profession #144

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a Custom Profession with the same name as a standard profession 
which one of your dwarves has (e.g. Peasant, Weaver, Butcher, Miner, 
Miller etc)
2. Make sure no dwarves have been set to your custom profession.
3. Try to delete this custom profession using the list on the right side 
of the dialog. You will be told a dwarf is still using it & you should 
change that dwarf to another profession first.

What is the expected output? What do you see instead?
Should be able to delete a custom profession without being blocked. The 
only work around is to set your dwarf or dwarves with the standard 
profession of the same name to a temporary custom profession, then delete 
the original custom profession, set that dwarf or dwarves back to default 
profession & then delete the temporary profession too which is rather 
convoluted.

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

Please provide the "run.log" file in the "log" directory of DwarfTherapist
when this error occurred.
not relevant, no errors listed as it's not an error being experienced, 
it's expected behaviour since it's checking the list of professions for 
matches & getting one so it's blocking the delete as it should only in 
this case the match isn't a match that should matter.

Original issue reported on code.google.com by pally.sa...@gmail.com on 22 Oct 2009 at 11:55

GoogleCodeExporter commented 9 years ago
Yeah that is bad news. You really shouldn't be able to create a custom prof 
that uses 
the name of a default profession.

Original comment by treyst...@gmail.com on 24 Oct 2009 at 12:05

GoogleCodeExporter commented 9 years ago

Original comment by treyst...@gmail.com on 24 Oct 2009 at 12:05

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r332.

Original comment by treyst...@gmail.com on 25 Oct 2009 at 11:46

GoogleCodeExporter commented 9 years ago
The fix was to disallow new custom professions that share a name with a default 
profession. For legacy professions you will have to rename them

Original comment by treyst...@gmail.com on 25 Oct 2009 at 11:47

GoogleCodeExporter commented 9 years ago
That's pretty annoying tbh. It's quite useful to be able to set custom 
professions 
to a default profession so they show up with the default professions as you can 
then 
easily set the same labor preferences on them all.

I tend to have more Stonecrafters & Bonecarvers than I need due to strange 
moods & I 
generally want those dwarves to be doing something else (such as the profession 
they 
were doing before they had their strange mood) rather than sitting around idle 
so it 
is very helpful to set their custom profession to the default profession you 
would 
like.

It is also helpful when you have a dwarf whom does 2 tasks such as 
Brewer/Farmer or 
Cook/Farmer etc. In my case some of those dwarves show up as "Planter" along 
with my 
normal Farmers but I want to be able to change the labor preferences for the 
Brewers 
& Cooks collectively in an easy way so assigning the custom profession 
accordingly 
allows me to do this.

This is actually one of the things I much prefer over Dwarf Manager. In DM 
dwarves 
with custom professions (regardless of whether they are the same as default 
proefessions) show up at the end of the list of dwarves & if you look at that 
dwarves properties it shows and edit box for Profession & a text box with "Real 
Profession" so there is a way of differentiating them on a per-dwarf basis.

A more elegant solution would be to allow custom professions the same as 
default 
professions (as in 0.4.1) but modify the delete code to check if any dwarves 
custom 
professions are set to the custom profession being deleted & throw the error 
(preferably with a handy list of the dwarves in question) appropriately.

I expect I'm not the only user who will be affected by this change.

Original comment by pally.sa...@gmail.com on 26 Oct 2009 at 11:20

GoogleCodeExporter commented 9 years ago
Re-opening. You have some good points. All that really needs changing is the 
delete-
checking.

Original comment by treyst...@gmail.com on 26 Oct 2009 at 9:20

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r334.

Original comment by treyst...@gmail.com on 26 Oct 2009 at 9:51