Files
Anphillia_PRC8/_module/nss/cnr_property_inc.nss
Jaysyn904 28cdb617b3 Initial commit
Adding all of the current content for Anphillia Unlimited.
2024-01-04 07:49:38 -05:00

53 lines
1.7 KiB
Plaintext

/////////////////////////////////////////////////////////
//
// Craftable Natural Resources (CNR) by Festyx
//
// Name: cnr_property_inc
//
// Desc: Misc property initialization functions.
// Basically creates a lookup table.
//
// Author: David Bobeck 24Apr03
//
/////////////////////////////////////////////////////////
//#include "cnr_persist_inc"
void CnrSetPropertyString(string sKey, string sProperty, string sValue)
{
//CnrSetPersistentString(GetModule(), "CnrProperty_" + sKey + "_" + sProperty, sValue);
SetLocalString(GetModule(), "CnrProperty_" + sKey + "_" + sProperty, sValue);
}
void CnrSetPropertyInt(string sKey, string sProperty, int nValue)
{
//CnrSetPersistentInt(GetModule(), "CnrProperty_" + sKey + "_" + sProperty, nValue);
SetLocalInt(GetModule(), "CnrProperty_" + sKey + "_" + sProperty, nValue);
}
string CnrGetPropertyString(string sKey, string sProperty)
{
//return CnrGetPersistentString(GetModule(), "CnrProperty_" + sKey + "_" + sProperty);
return GetLocalString(GetModule(), "CnrProperty_" + sKey + "_" + sProperty);
}
int CnrGetPropertyInt(string sKey, string sProperty)
{
//return CnrGetPersistentInt(GetModule(), "CnrProperty_" + sKey + "_" + sProperty);
return GetLocalInt(GetModule(), "CnrProperty_" + sKey + "_" + sProperty);
}
string CnrGetHcrCompatibleTag(string sOrigTag)
{
string sSubstituteHcrTag;
if (GetStringLeft(sOrigTag, 3) == "cnr" && GetStringRight(sOrigTag, 5) == "Bread")
sSubstituteHcrTag = "Food";
if (GetStringLeft(sOrigTag, 3) == "cnr" && GetStringRight(sOrigTag, 3) == "Pie")
sSubstituteHcrTag = "Food";
//string sSubstituteHcrTag = CnrGetPropertyString(sOrigTag, "HCHTF_TAG");
if (sSubstituteHcrTag != "")
{
return sSubstituteHcrTag;
}
return sOrigTag;
}