/*
* /d/Podziemie/std/bron.c
* Przeciazenie standardowego obiektu broni.
* Dzieki temu bron nie znika z ekwipunku gracza, 
* zarowno po apokalipsie jak i po wylogowaniu.
* Simon, 23 Kwiecien 2003
*/
#pragma strict_types
#pragma save_binary

inherit "/std/weapon";
 
#include <config.h>
#include <cmdparse.h>
#include <files.h>
#include <macros.h>
#include <stdproperties.h>
#include <pl.h>

int auto_load;

void
set_autoload()
{
    auto_load = 1;
}
public void
init_arg(string arg)
{
    string foobar;
    int    broken;

    sscanf(arg, "%s#WEP#%d#%d#%d#%d#%d#%d#%s", foobar,
	hits, dull, corroded, repair_dull, repair_corr, broken, foobar);

    if (broken != 0)
    {
	add_prop(OBJ_I_BROKEN, broken);
    }
    auto_load = 1;
}
string
query_wep_recover()
{
    return ("#WEP#" + hits + "#" + dull + "#" + corroded + "#" +
	repair_dull + "#" + repair_corr + "#" + query_prop(OBJ_I_BROKEN) +
	"#");
}
public string
query_auto_load()
{
    if (auto_load)
    return MASTER_OB(this_object()) + ":" + query_wep_recover();
}
string
query_recover()
{
	return 0;
}