2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
6 // $Header: r:/t2repos/thief2/src/shock/shkprop.cpp,v 1.87 2000/02/19 13:25:58 toml Exp $
33 #include <dbmem.h> // must be last header!
35 /////////////////////////////////////////////////////////////
36 // Object Name Type Property
37 /////////////////////////////////////////////////////////////
38 IIntProperty
*gPropObjNameType
;
40 static char *NameTypeNames
[] = { "Normal", "Stack Count", "Log Title", "Weapon" };
41 #define PROP_NAMETYPE_DESC "NameType"
43 static sPropertyDesc NameTypeDesc
=
45 PROP_NAMETYPE_DESC
, 0,
46 NULL
, 0, 0, // constraints, versions
47 { "Obj", "Object Name Type" },
50 static sFieldDesc NameTypeFields
[] =
52 { "", kFieldTypeEnum
, sizeof(int), 0, kFieldFlagUnsigned
, 0, 4, 4, NameTypeNames
},
55 static sStructDesc NameTypeStructDesc
=
60 sizeof(NameTypeFields
)/sizeof(NameTypeFields
[0]),
64 static sPropertyTypeDesc NameTypeTypeDesc
= {PROP_NAMETYPE_DESC
, sizeof(int)};
66 /////////////////////////////////////////////////////////////
67 // Object Name Property
68 /////////////////////////////////////////////////////////////
70 IStringProperty
* gPropObjName
;
72 static sPropertyDesc ObjNameDesc
=
75 NULL
, 2, 1, // constraints, versions
76 { "Obj", "Object name" },
79 #define OBJ_NAME_IMPL kPropertyImplHash
81 // careful about overflow!!
82 void ObjGetObjNameSubst(ObjID obj
, char *text
, int buflen
)
86 eObjState objstate
= ObjGetObjState(obj
);
88 if (objstate
== kObjStateUnresearched
)
90 ShockStringFetch(text
,buflen
,"NameUnresearched","research");
94 AutoAppIPtr(GameStrings
);
95 str
= pGameStrings
->FetchObjString(obj
, PROP_OBJNAME_NAME
);
97 if (buflen
< str
.GetLength())
99 Warning(("ObjGetObjNameSubst: buffer len %d is too small!\n",buflen
));
104 if (gPropMapText
->IsRelevant(obj
))
107 gPropMapText
->Get(obj
,&pStr
);
112 if (IProperty_IsRelevant(gPropObjNameType
, obj
))
115 gPropObjNameType
->Get(obj
, &val
);
118 case 1: // %d for stack count
119 if (IProperty_IsRelevant(gStackCountProp
, obj
) && IProperty_IsRelevant(gCombineTypeProp
, obj
))
122 gStackCountProp
->Get(obj
,&val
);
123 sprintf(text
, str
, val
);
126 case 2: // %d for log title
128 int usetype
= 1; // logs
130 if (ShockFindLogData(obj
, usetype
, &level
, &which
) == S_OK
)
134 sprintf(levelname
,"level%02d",level
+ 1);
135 ShockStringFetch(temp
,sizeof(temp
),"logname",levelname
,which
+1);
137 sprintf(text
, str
, temp
);
141 case 3: // %s for weapon condition
144 GunGetConditionString(obj
,temp
,sizeof(temp
));
145 sprintf(text
,str
,temp
); //(int)GunGetCondition(obj));
151 // generic case if no name type, or we fail within our name type
152 if (strlen(text
) == 0)
157 if ((objstate
!= kObjStateNormal
) && (objstate
!= kObjStateUnresearched
))
160 ShockStringFetch(temp
,sizeof(temp
),"ObjState","misc",objstate
);
166 /////////////////////////////////////////////////////////////
167 // Object Name Property
168 /////////////////////////////////////////////////////////////
169 IStringProperty
* gPropObjShortName
;
171 static sPropertyDesc ObjShortNameDesc
=
173 PROP_OBJSHORTNAME_NAME
, 0,
174 NULL
, 0, 0, // constraints, versions
175 { "Obj", "Object short name" },
178 // careful about overflow!!
179 void ObjGetObjShortNameSubst(ObjID obj
, char *text
, int buflen
)
183 eObjState objstate
= ObjGetObjState(obj
);
185 if (objstate
== kObjStateUnresearched
)
187 ShockStringFetch(text
,buflen
,"NameUnresearched","research");
191 AutoAppIPtr(GameStrings
);
192 str
= pGameStrings
->FetchObjString(obj
, PROP_OBJSHORTNAME_NAME
);
194 if (buflen
< str
.GetLength())
196 Warning(("ObjGetObjNameSubst: buffer len %d is too small!\n",buflen
));
201 if (IProperty_IsRelevant(gPropObjNameType
, obj
))
204 gPropObjNameType
->Get(obj
, &val
);
207 case 1: // %d for stack count
208 if (IProperty_IsRelevant(gStackCountProp
, obj
) && IProperty_IsRelevant(gCombineTypeProp
, obj
))
211 gStackCountProp
->Get(obj
,&val
);
212 sprintf(text
, str
, val
);
215 case 2: // %d for log title
217 int usetype
= 1; // logs
219 if (ShockFindLogData(obj
, usetype
, &level
, &which
) == S_OK
)
223 sprintf(levelname
,"level%02d",level
+ 1);
224 ShockStringFetch(temp
,sizeof(temp
),"logname",levelname
,which
+1);
226 sprintf(text
, str
, temp
);
230 case 3: // %s for weapon condition
233 GunGetConditionString(obj
,temp
,sizeof(temp
));
234 sprintf(text
,str
,temp
); //(int)GunGetCondition(obj));
240 // generic case if no name type, or we fail within our name type
241 if (strlen(text
) == 0)
246 if ((objstate != kObjStateNormal) && (objstate != kObjStateUnresearched))
249 ShockStringFetch(temp,sizeof(temp),"ObjState","misc",objstate);
255 /////////////////////////////////////////////////////////////
256 // Look String Property
257 /////////////////////////////////////////////////////////////
258 IStringProperty
* gPropObjLookString
;
260 static sPropertyDesc ObjLookStringDesc
=
262 PROP_OBJLOOKSTRING_NAME
, 0,
263 NULL
, 0, 0, // constraints, versions
264 { "Obj", "Object Look string" },
267 BOOL
ObjGetObjLookString(ObjID obj
, const char **ppString
)
269 Assert_(gPropObjLookString
);
270 return gPropObjLookString
->Get(obj
, ppString
);
273 /////////////////////////////////////////////////////////////
275 /////////////////////////////////////////////////////////////
277 IIntProperty
* gPropExp
;
279 static sPropertyDesc ExpDesc
=
282 NULL
, 0, 0, // constraints, versions
283 { "GameSys", "Exp" },
286 #define EXP_IMPL kPropertyImplHash
288 int ObjGetExp(ObjID obj
)
290 int exp
= 0; // default value
291 gPropExp
->Get(obj
,&exp
);
295 /////////////////////////////////////////////////////////////
296 // Object Icon Property
297 /////////////////////////////////////////////////////////////
299 ILabelProperty
* gPropObjIcon
;
301 static sPropertyDesc ObjIconDesc
=
303 PROP_OBJICON_NAME
, 0,
304 NULL
, 0, 0, // constraints, versions
305 { "Obj", "Object icon" },
308 #define OBJ_ICON_IMPL kPropertyImplLlist
310 BOOL
ObjGetObjIcon(ObjID obj
, Label
**ppName
)
312 Assert_(gPropObjIcon
);
313 Assert_(gPropObjBrokenIcon
);
316 objstate
= ObjGetObjState(obj
);
317 if (objstate
== kObjStateBroken
)
319 if (gPropObjBrokenIcon
->Get(obj
, ppName
))
322 return(gPropObjIcon
->Get(obj
, ppName
));
325 return gPropObjIcon
->Get(obj
, ppName
);
329 void ObjSetObjIcon(ObjID obj
, Label
*pName
)
331 Assert_(gPropObjIcon
);
332 gPropObjIcon
->Set(obj
, pName
);
335 ILabelProperty
* gPropObjBrokenIcon
;
337 static sPropertyDesc ObjBrokenIconDesc
=
339 PROP_OBJBROKENICON_NAME
, 0,
340 NULL
, 0, 0, // constraints, versions
341 { "Obj", "Broken icon" },
344 /////////////////////////////////////////////////////////////
345 // Tech hacking / difficulty properties
346 /////////////////////////////////////////////////////////////
348 ITechInfoProperty
* gPropHackDiff
;
349 ITechInfoProperty
* gPropRepairDiff
;
350 ITechInfoProperty
* gPropModifyDiff
;
351 ITechInfoProperty
* gPropModify2Diff
;
352 IStringProperty
* gPropModify1Text
;
353 IStringProperty
* gPropModify2Text
;
354 IStringProperty
* gPropHackText
;
356 static sPropertyDesc HackDiffDesc
=
358 PROP_HACKDIFF_NAME
, 0,
359 NULL
, 0, 0, // constraints, versions
360 { "GameSys", "HackDiff" },
363 static sPropertyDesc RepairDiffDesc
=
365 PROP_REPAIRDIFF_NAME
, 0,
366 NULL
, 0, 0, // constraints, versions
367 { "GameSys", "RepairDiff" },
370 static sPropertyDesc ModifyDiffDesc
=
372 PROP_MODIFYDIFF_NAME
, 0,
373 NULL
, 0, 0, // constraints, versions
374 { "GameSys", "ModifyDiff" },
377 static sPropertyDesc Modify2DiffDesc
=
379 PROP_MODIFY2DIFF_NAME
, 0,
380 NULL
, 0, 0, // constraints, versions
381 { "GameSys", "Modify 2 Diff" },
384 static sPropertyDesc Modify1TextDesc
=
386 PROP_MODIFY1TEXT_NAME
, 0,
387 NULL
, 0, 0, // constraints, versions
388 { "GameSys", "Modification #1 Text" },
391 static sPropertyDesc Modify2TextDesc
=
393 PROP_MODIFY2TEXT_NAME
, 0,
394 NULL
, 0, 0, // constraints, versions
395 { "GameSys", "Modification #2 Text" },
398 static sPropertyDesc HackTextDesc
=
400 PROP_HACKTEXT_NAME
, 0,
401 NULL
, 0, 0, // constraints, versions
402 { "GameSys", "Hack Text" },
405 #define HACKDIFF_IMPL kPropertyImplLlist
406 #define REPAIRDIFF_IMPL kPropertyImplLlist
407 #define MODIFYDIFF_IMPL kPropertyImplLlist
408 #define MODIFY2DIFF_IMPL kPropertyImplLlist
409 #define MODIFY1TEXT_IMPL kPropertyImplLlist
410 #define MODIFY2TEXT_IMPL kPropertyImplLlist
411 #define HACKTEXT_IMPL kPropertyImplLlist
413 /////////////////////////////////////////////////////////////
415 /////////////////////////////////////////////////////////////
417 ILootInfoProperty
* gPropLoot
;
419 static sPropertyDesc LootDesc
=
422 NULL
, 0, 0, // constraints, versions
426 #define LOOT_IMPL kPropertyImplLlist
428 ILabelProperty
* gPropGuaranteedLoot
;
430 static sPropertyDesc GuaranteedLootDesc
=
432 PROP_GUARANTEEDLOOT_NAME
, 0,
433 NULL
, 0, 0, // constraints, versions
434 { "AI", "Borg Loot" },
437 ILabelProperty
* gPropReallyGuaranteedLoot
;
439 static sPropertyDesc ReallyGuaranteedLootDesc
=
441 PROP_REALLYGUARANTEEDLOOT_NAME
, 0,
442 NULL
, 0, 0, // constraints, versions
443 { "AI", "Guarantee Loot" },
446 /////////////////////////////////////////////////////////////
448 /////////////////////////////////////////////////////////////
450 ILabelProperty
* gPropMapObjIcon
;
452 static sPropertyDesc MapObjIconDesc
=
455 NULL
, 0, 0, // constraints, versions
456 { "Obj", "Map Icon" },
459 IBoolProperty
* gPropMapObjRotate
;
461 static sPropertyDesc MapObjRotateDesc
=
464 NULL
, 0, 0, // constraints, versions
465 { "Obj", "Map Icon Rotated?" },
468 IStringProperty
* gPropMapText
;
470 static sPropertyDesc MapTextDesc
=
473 NULL
, 0, 0, // constraints, versions
474 { "Obj", "Map Text" },
477 /////////////////////////////////////////////////////////////
478 // Use Message Property
479 /////////////////////////////////////////////////////////////
481 IStringProperty
* gPropUseMessage
;
483 static sPropertyDesc UseMessageDesc
=
485 PROP_USEMESSAGE_NAME
, 0,
486 NULL
, 0, 0, // constraints, versions
487 { "Script", "Use Message" },
490 /////////////////////////////////////////////////////////////
491 // Use Message Property
492 /////////////////////////////////////////////////////////////
494 IIntProperty
* gPropMessageTime
;
496 static sPropertyDesc MessageTimeDesc
=
499 NULL
, 0, 0, // constraints, versions
500 { "Script", "Message Time" },
503 /////////////////////////////////////////////////////////////
504 // Stack Increment Property
505 /////////////////////////////////////////////////////////////
507 IIntProperty
* gPropStackIncrem
;
509 static sPropertyDesc StackIncremDesc
=
512 NULL
, 0, 0, // constraints, versions
513 { "Obj", "Stack Increment" },
516 /////////////////////////////////////////////////////////////
517 // Recycler Value Property
518 /////////////////////////////////////////////////////////////
519 IIntProperty
* gPropRecycle
;
521 static sPropertyDesc RecycleDesc
=
524 NULL
, 0, 0, // constraints, versions
525 { "Obj", "Recycle Value" },
528 /////////////////////////////////////////////////////////////
529 // Locked Message Property
530 /////////////////////////////////////////////////////////////
532 IStringProperty
* gPropLockedMessage
;
534 static sPropertyDesc LockedMessageDesc
=
536 PROP_LOCKEDMESSAGE_NAME
, 0,
537 NULL
, 0, 0, // constraints, versions
538 { "Script", "Locked Message" },
541 /////////////////////////////////////////////////////////////
542 // HUD Duration property
543 /////////////////////////////////////////////////////////////
545 IIntProperty
* gPropHUDTime
;
547 static sPropertyDesc HUDTimeDesc
=
549 PROP_HUDTIME_NAME
, 0,
550 NULL
, 0, 0, // constraints, versions
551 { "Renderer", "HUD Duration" },
552 kPropertyChangeLocally
,
555 /////////////////////////////////////////////////////////////
556 // Allow HUD property
557 /////////////////////////////////////////////////////////////
559 IBoolProperty
* gPropAllowHUDSelect
;
561 static sPropertyDesc HUDSelectDesc
=
563 PROP_HUDSELECT_NAME
, 0,
564 NULL
, 0, 0, // constraints, versions
565 { "Obj", "HUD Selectable?" },
568 /////////////////////////////////////////////////////////////
569 // Hack Duration property
570 /////////////////////////////////////////////////////////////
572 IBoolProperty
* gPropShowHP
;
574 static sPropertyDesc ShowHPDesc
=
577 NULL
, 0, 0, // constraints, versions
578 { "Obj", "Show HP?" },
581 /////////////////////////////////////////////////////////////
582 // Hack Duration property
583 /////////////////////////////////////////////////////////////
585 IIntProperty
* gPropHackTime
;
587 static sPropertyDesc HackTimeDesc
=
589 PROP_HACKTIME_NAME
, 0,
590 NULL
, 0, 0, // constraints, versions
591 { "Player", "Hack Duration" },
594 /////////////////////////////////////////////////////////////
595 // Block frob property
596 /////////////////////////////////////////////////////////////
598 IBoolProperty
* gPropBlockFrob
;
600 static sPropertyDesc BlockFrobDesc
=
602 PROP_BLOCKFROB_NAME
, 0,
603 NULL
, 0, 0, // constraints, versions
604 { "Obj", "Block Frob?" },
607 /////////////////////////////////////////////////////////////
609 /////////////////////////////////////////////////////////////
611 IBoolProperty
* gPropAlarm
;
613 static sPropertyDesc AlarmDesc
=
616 NULL
, 0, 0, // constraints, versions
617 { "Gamesys", "Alarm On?" },
620 /////////////////////////////////////////////////////////////
621 // Use Message Property
622 /////////////////////////////////////////////////////////////
624 IIntProperty
* gPropMiniGames
;
626 #define PROP_MINIGAMES_NAME "MiniGames"
627 static sPropertyDesc MiniGamesDesc
=
629 PROP_MINIGAMES_NAME
, 0,
630 NULL
, 0, 0, // constraints, versions
631 { "Player", "Mini Games" },
634 char *minigameflag_names
[] = {
635 "Index", "Slots", "Ping", "Swinekeeper", "OverWorld",
636 "KaBacon", "Abyss", "Hogger", "TicTacToe", "Swine Hunter",
637 "Pig Stacker", "Burro Hog", "Golf", "13", "14",
640 static sFieldDesc miniGamesFields
[] =
642 { "", kFieldTypeBits
, sizeof(int), 0, kFieldFlagUnsigned
, 0, 15, 15, minigameflag_names
},
645 static sStructDesc miniGamesStructDesc
=
650 sizeof(miniGamesFields
)/sizeof(miniGamesFields
[0]),
654 static sPropertyTypeDesc miniGamesTypeDesc
= {PROP_MINIGAMES_NAME
, sizeof(int)};
656 /////////////////////////////////////////////////////////////
657 // Object State property
658 /////////////////////////////////////////////////////////////
660 IIntProperty
* gPropObjState
;
662 static char* objStateNames
[] =
664 "Normal", "Broken", "Destroyed", "Unresearched", "Locked"
667 static sPropertyDesc objStateDesc
=
669 PROP_OBJ_STATE_NAME
, 0,
670 NULL
, 0, 0, // constraints, versions
672 kPropertyProxyChangable
,
675 static sFieldDesc objStateFields
[] =
677 { "", kFieldTypeEnum
, sizeof(int), 0, kFieldFlagUnsigned
, 0, 5, 5, objStateNames
},
680 static sStructDesc objStateStructDesc
=
685 sizeof(objStateFields
)/sizeof(objStateFields
[0]),
689 eObjState
ObjGetObjState(ObjID objID
)
691 eObjState state
= kObjStateNormal
;
693 gPropObjState
->Get(objID
, &state
);
697 void ObjSetObjState(ObjID objID
, eObjState state
)
699 char temp
[255], text
[255];
702 gPropObjState
->Set(objID
, state
);
704 if (state
== kObjStateBroken
)
707 AutoAppIPtr(GameStrings
);
708 str
= pGameStrings
->FetchObjString(objID
,PROP_OBJSHORTNAME_NAME
);
709 ShockStringFetch(temp
,sizeof(temp
),"WeaponBreaks","misc");
710 sprintf(text
,temp
,str
);
711 ShockOverlayAddText(text
, DEFAULT_MSG_TIME
);
714 ESndPlay(&cTagSet("Event Breaking"), objID
, OBJ_NULL
);
718 static sPropertyTypeDesc objStateTypeDesc
= {PROP_OBJ_STATE_NAME
, sizeof(int)};
720 /////////////////////////////////////////////////////////////
722 /////////////////////////////////////////////////////////////
724 static char *software_names
[] =
725 { "PDA", "Hack", "Modify", "Repair", "Research" };
727 IIntProperty
* gPropSoftwareLevel
;
728 IIntProperty
* gPropSoftwareType
;
730 static sPropertyDesc SoftwareLevelDesc
=
732 PROP_SOFTWARELEVEL_NAME
, 0,
733 NULL
, 0, 0, // constraints, versions
734 { "Obj", "Software Level" },
737 static sPropertyDesc SoftwareTypeDesc
=
739 PROP_SOFTWARETYPE_NAME
, 0,
740 NULL
, 0, 0, // constraints, versions
741 { "Obj", "Software Type" },
744 static sFieldDesc softwareTypeFields
[] =
746 { "", kFieldTypeEnum
, sizeof(int), 0, kFieldFlagUnsigned
, 0, 5, 5, software_names
},
749 static sStructDesc softwareTypeStructDesc
=
751 PROP_SOFTWARETYPE_NAME
,
754 sizeof(softwareTypeFields
)/sizeof(softwareTypeFields
[0]),
758 static sPropertyTypeDesc softwareTypeTypeDesc
= {PROP_SOFTWARETYPE_NAME
, sizeof(int)};
760 /////////////////////////////////////////////////////////////
761 IFloatProperty
*gPropDelayTime
;
763 static sPropertyDesc DelayTimeDesc
=
765 PROP_DELAYTIME_NAME
, 0,
766 NULL
, 0, 0, // constraints, versions
767 { "Script", "Delay Time" },
769 /////////////////////////////////////////////////////////////
771 IEcologyInfoProperty
*gPropEcology
;
773 static sPropertyDesc EcologyDesc
=
775 PROP_ECOLOGY_NAME
, 0,
776 NULL
, 0, 0, // constraints, versions
777 { "Script", "Ecology" },
780 IIntProperty
*gPropEcoType
;
782 static sPropertyDesc EcoTypeDesc
=
784 PROP_ECOTYPE_NAME
, 0,
785 NULL
, 0, 0, // constraints, versions
786 { "Script", "EcoType" },
789 IIntProperty
*gPropEcoState
;
791 static sPropertyDesc EcoStateDesc
=
793 PROP_ECOSTATE_NAME
, 0,
794 NULL
, 0, 0, // constraints, versions
795 { "Script", "EcoState" },
798 /////////////////////////////////////////////////////////////
800 ISpawnInfoProperty
*gPropSpawn
;
802 static sPropertyDesc SpawnDesc
=
805 NULL
, 0, 0, // constraints, versions
806 { "Script", "Spawn" },
809 /////////////////////////////////////////////////////////////
811 IVectorProperty
*gPropShove
;
813 static sPropertyDesc ShoveDesc
=
816 NULL
, 0, 0, // constraints, versions
817 { "Script", "Shove" },
820 /////////////////////////////////////////////////////////////
822 IStringProperty
*gPropHUDUse
;
824 static sPropertyDesc HUDUseDesc
=
827 NULL
, 0, 0, // constraints, versions
828 { "Obj", "HUD Use String" },
831 /////////////////////////////////////////////////////////////
833 IFloatProperty
*gPropRadAmbient
;
835 static sPropertyDesc RadAmbientDesc
=
837 PROP_RADAMBIENT_NAME
, 0,
838 NULL
, 0, 0, // constraints, versions
839 { "Player: Hazard", "Rad Ambient" },
842 /////////////////////////////////////////////////////////////
844 IFloatProperty
*gPropRadLevel
;
846 static sPropertyDesc RadLevelDesc
=
848 PROP_RADLEVEL_NAME
, 0,
849 NULL
, 0, 0, // constraints, versions
850 { "Gamesys", "Radiation Level" },
853 /////////////////////////////////////////////////////////////
855 IFloatProperty
*gPropRadDrain
;
857 static sPropertyDesc RadDrainDesc
=
859 PROP_RADDRAIN_NAME
, 0,
860 NULL
, 0, 0, // constraints, versions
861 { "Player: Hazard", "Rad Drain" },
864 /////////////////////////////////////////////////////////////
866 IFloatProperty
*gPropRadAbsorb
;
868 static sPropertyDesc RadAbsorbDesc
=
870 PROP_RADABSORB_NAME
, 0,
871 NULL
, 0, 0, // constraints, versions
872 { "Player: Hazard", "Rad Base Absorb" },
875 /////////////////////////////////////////////////////////////
877 IFloatProperty
*gPropRadRecover
;
879 static sPropertyDesc RadRecoverDesc
=
881 PROP_RADRECOVER_NAME
, 0,
882 NULL
, 0, 0, // constraints, versions
883 { "Player: Hazard", "Rad Recover Rate" },
886 /////////////////////////////////////////////////////////////
888 IFloatProperty
*gPropToxin
;
890 static sPropertyDesc ToxinDesc
=
893 NULL
, 0, 0, // constraints, versions
894 { "Player: Hazard", "Toxin" },
897 /////////////////////////////////////////////////////////////
899 IStringProperty
*gPropWorldCursor
;
901 static sPropertyDesc WorldCursorDesc
=
903 PROP_WORLDCURSOR_NAME
, 0,
904 NULL
, 0, 0, // constraints, versions
905 { "Obj: Cursor", "World Cursor String" },
908 IStringProperty
*gPropInvCursor
;
910 static sPropertyDesc InvCursorDesc
=
912 PROP_INVCURSOR_NAME
, 0,
913 NULL
, 0, 0, // constraints, versions
914 { "Obj: Cursor", "Inv Cursor String" },
917 IStringProperty
*gPropUseCursor
;
919 static sPropertyDesc UseCursorDesc
=
921 PROP_USECURSOR_NAME
, 0,
922 NULL
, 0, 0, // constraints, versions
923 { "Obj: Cursor", "Use Cursor String" },
926 static char *use_names
[] =
927 { "Generic", "Ammo", "Tech" };
929 IIntProperty
*gPropUseType
;
931 static sPropertyDesc UseTypeDesc
=
933 PROP_USETYPE_NAME
, 0,
934 NULL
, 0, 0, // constraints, versions
935 { "Obj: Cursor", "Use Type" },
938 static sFieldDesc useTypeFields
[] =
940 { "", kFieldTypeEnum
, sizeof(int), 0, kFieldFlagUnsigned
, 0, 3, 3, use_names
},
943 static sStructDesc useTypeStructDesc
=
948 sizeof(useTypeFields
)/sizeof(useTypeFields
[0]),
952 static sPropertyTypeDesc useTypeTypeDesc
= {PROP_USETYPE_NAME
, sizeof(int)};
954 /////////////////////////////////////////////////////////////
955 IStringProperty
*gPropConsumeType
;
957 static sPropertyDesc ConsumeTypeDesc
=
959 PROP_CONSUMETYPE_NAME
, 0,
960 NULL
, 0, 0, // constraints, versions
961 { "Script", "Consume Type" },
964 /////////////////////////////////////////////////////////////
965 IStringProperty
*gPropMetapropType
;
967 static sPropertyDesc MetapropTypeDesc
=
969 PROP_METAPROPTYPE_NAME
, 0,
970 NULL
, 0, 0, // constraints, versions
971 { "Script", "Metaprop Type" },
974 /////////////////////////////////////////////////////////////
975 IStringProperty
*gPropObjList
;
977 static sPropertyDesc ObjListDesc
=
979 PROP_OBJLIST_NAME
, 0,
980 NULL
, 0, 0, // constraints, versions
981 { "Script", "Objlist Arg" },
984 /////////////////////////////////////////////////////////////
985 IStringProperty
*gPropSignalType
;
987 static sPropertyDesc SignalTypeDesc
=
989 PROP_SIGNALTYPE_NAME
, 0,
990 NULL
, 0, 0, // constraints, versions
991 { "Script", "Signal Type" },
994 /////////////////////////////////////////////////////////////
996 IStringProperty
*gPropQBName
;
998 static sPropertyDesc QBNameDesc
=
1000 PROP_QBNAME_NAME
, 0,
1001 NULL
, 0, 0, // constraints, versions
1002 { "Script", "QB Name" },
1005 IIntProperty
*gPropQBVal
;
1007 static sPropertyDesc QBValDesc
=
1010 NULL
, 0, 0, // constraints, versions
1011 { "Script", "QB Val" },
1014 /////////////////////////////////////////////////////////////
1015 IIntProperty
*gPropShakeAmt
;
1017 static sPropertyDesc ShakeAmtDesc
=
1020 NULL
, 0, 0, // constraints, versions
1021 { "Script", "Shake Strength" },
1024 /////////////////////////////////////////////////////////////
1025 IMapRefProperty
*gPropMapRef
;
1027 static sPropertyDesc MapRefDesc
=
1030 NULL
, 0, 0, // constraints, versions
1031 { "Obj", "Map Ref Info" },
1035 /////////////////////////////////////////////////////////////
1036 /* ------------------------------------------------------------ */
1037 // Tech Info (H,R,M) property description
1040 class cTechInfoDataOps
: public cClassDataOps
<sTechInfo
>
1045 class cTechInfoStore
: public cHashPropertyStore
<cTechInfoDataOps
>
1049 // property implementation class
1050 class cTechInfoProperty
: public cSpecificProperty
<ITechInfoProperty
, &IID_ITechInfoProperty
, sTechInfo
*, cTechInfoStore
>
1052 typedef cSpecificProperty
<ITechInfoProperty
, &IID_ITechInfoProperty
, sTechInfo
*, cTechInfoStore
> cParent
;
1055 cTechInfoProperty(const sPropertyDesc
* desc
)
1060 STANDARD_DESCRIBE_TYPE(sTechInfo
);
1064 ITechInfoProperty
*g_TechInfoProperty
;
1066 static sFieldDesc TechInfoFields
[] =
1068 {"Success %", kFieldTypeInt
, FieldLocation(sTechInfo
, m_success
), },
1069 {"Critical Fail %", kFieldTypeInt
, FieldLocation(sTechInfo
, m_critfail
),},
1070 {"Cost", kFieldTypeFloat
, FieldLocation(sTechInfo
, m_cost
),},
1073 static sStructDesc TechInfoStructDesc
=
1074 StructDescBuild(sTechInfo
, kStructFlagNone
, TechInfoFields
);
1076 ITechInfoProperty
*CreateTechInfoProperty(sPropertyDesc
*desc
,
1079 StructDescRegister(&TechInfoStructDesc
);
1080 return new cTechInfoProperty(desc
);
1083 /* ------------------------------------------------------------ */
1084 // Map Reference marker data
1087 class cMapRefDataOps
: public cClassDataOps
<sMapRef
>
1092 class cMapRefStore
: public cHashPropertyStore
<cMapRefDataOps
>
1096 // property implementation class
1097 class cMapRefProperty
: public cSpecificProperty
<IMapRefProperty
, &IID_IMapRefProperty
, sMapRef
*, cMapRefStore
>
1099 typedef cSpecificProperty
<IMapRefProperty
, &IID_IMapRefProperty
, sMapRef
*, cMapRefStore
> cParent
;
1102 cMapRefProperty(const sPropertyDesc
* desc
)
1107 STANDARD_DESCRIBE_TYPE(sMapRef
);
1111 IMapRefProperty
*g_MapRefProperty
;
1113 static sFieldDesc MapRefFields
[] =
1115 {"Map X", kFieldTypeInt
, FieldLocation(sMapRef
, m_x
), },
1116 {"Map Y", kFieldTypeInt
, FieldLocation(sMapRef
, m_y
), },
1117 {"Frame", kFieldTypeInt
, FieldLocation(sMapRef
, m_frame
), },
1120 static sStructDesc MapRefStructDesc
=
1121 StructDescBuild(sMapRef
, kStructFlagNone
, MapRefFields
);
1123 IMapRefProperty
*CreateMapRefProperty(sPropertyDesc
*desc
,
1126 StructDescRegister(&MapRefStructDesc
);
1127 return new cMapRefProperty(desc
);
1129 /* ------------------------------------------------------------ */
1130 // Loot Info property description
1133 class cLootInfoDataOps
: public cClassDataOps
<sLootInfo
>
1138 class cLootInfoStore
: public cHashPropertyStore
<cLootInfoDataOps
>
1142 // property implementation class
1143 class cLootInfoProperty
: public cSpecificProperty
<ILootInfoProperty
, &IID_ILootInfoProperty
, sLootInfo
*, cLootInfoStore
>
1145 typedef cSpecificProperty
<ILootInfoProperty
, &IID_ILootInfoProperty
, sLootInfo
*, cLootInfoStore
> cParent
;
1148 cLootInfoProperty(const sPropertyDesc
* desc
)
1153 STANDARD_DESCRIBE_TYPE(sLootInfo
);
1157 ILootInfoProperty
*g_LootInfoProperty
;
1159 static sFieldDesc LootInfoFields
[] =
1161 {"Number of Picks", kFieldTypeInt
, FieldLocation(sLootInfo
, m_numpicks
), },
1162 {"1 - Item", kFieldTypeString
, FieldLocation(sLootInfo
, m_items
[0]), },
1163 {"1 - Rarity", kFieldTypeInt
, FieldLocation(sLootInfo
, m_rarity
[0]),},
1164 //{"1 - Value", kFieldTypeFloat, FieldLocation(sLootInfo, m_value[0]),},
1165 {"2 - Item", kFieldTypeString
, FieldLocation(sLootInfo
, m_items
[1]), },
1166 {"2 - Rarity", kFieldTypeInt
, FieldLocation(sLootInfo
, m_rarity
[1]),},
1167 //{"2 - Value", kFieldTypeFloat, FieldLocation(sLootInfo, m_value[1]),},
1168 {"3 - Item", kFieldTypeString
, FieldLocation(sLootInfo
, m_items
[2]), },
1169 {"3 - Rarity", kFieldTypeInt
, FieldLocation(sLootInfo
, m_rarity
[2]),},
1170 //{"3 - Value", kFieldTypeFloat, FieldLocation(sLootInfo, m_value[2]),},
1171 {"4 - Item", kFieldTypeString
, FieldLocation(sLootInfo
, m_items
[3]), },
1172 {"4 - Rarity", kFieldTypeInt
, FieldLocation(sLootInfo
, m_rarity
[3]),},
1173 //{"4 - Value", kFieldTypeFloat, FieldLocation(sLootInfo, m_value[3]),},
1174 {"5 - Item", kFieldTypeString
, FieldLocation(sLootInfo
, m_items
[4]), },
1175 {"5 - Rarity", kFieldTypeInt
, FieldLocation(sLootInfo
, m_rarity
[4]),},
1176 //{"5 - Value", kFieldTypeFloat, FieldLocation(sLootInfo, m_value[4]),},
1177 {"6 - Item", kFieldTypeString
, FieldLocation(sLootInfo
, m_items
[5]), },
1178 {"6 - Rarity", kFieldTypeInt
, FieldLocation(sLootInfo
, m_rarity
[5]),},
1179 //{"6 - Value", kFieldTypeFloat, FieldLocation(sLootInfo, m_value[5]),},
1182 static sStructDesc LootInfoStructDesc
=
1183 StructDescBuild(sLootInfo
, kStructFlagNone
, LootInfoFields
);
1185 ILootInfoProperty
*CreateLootInfoProperty(sPropertyDesc
*desc
,
1188 StructDescRegister(&LootInfoStructDesc
);
1189 return new cLootInfoProperty(desc
);
1192 /////////////////////////////////////////////////////////////
1194 IStringProperty
* gPropSettingText1
;
1195 IStringProperty
* gPropSettingText2
;
1196 IStringProperty
* gPropSettingHead1
;
1197 IStringProperty
* gPropSettingHead2
;
1199 static sPropertyDesc SettingText1Desc
=
1201 PROP_SETTINGTEXT1_NAME
, 0,
1202 NULL
, 0, 0, // constraints, versions
1203 { "Gun", "Setting Text 1" },
1206 static sPropertyDesc SettingText2Desc
=
1208 PROP_SETTINGTEXT2_NAME
, 0,
1209 NULL
, 0, 0, // constraints, versions
1210 { "Gun", "Setting Text 2" },
1213 static sPropertyDesc SettingHead1Desc
=
1215 PROP_SETTINGHEAD1_NAME
, 0,
1216 NULL
, 0, 0, // constraints, versions
1217 { "Gun", "Setting Header 1" },
1220 static sPropertyDesc SettingHead2Desc
=
1222 PROP_SETTINGHEAD2_NAME
, 0,
1223 NULL
, 0, 0, // constraints, versions
1224 { "Gun", "Setting Header 2" },
1227 /////////////////////////////////////////////////////////////
1228 IIntProperty
* gPropResearchTime
;
1229 static sPropertyDesc ResearchTimeDesc
=
1231 PROP_RESEARCHTIME_NAME
, 0,
1232 NULL
, 0, 0, // constraints, versions
1233 { "Gamesys", "Research Time" },
1236 IStringProperty
*gPropResearchText
;
1237 static sPropertyDesc ResearchTextDesc
=
1239 PROP_RESEARCHTEXT_NAME
, 0,
1240 NULL
, 0, 0, // constraints, versions
1241 { "Gamesys", "Research Text" },
1244 /////////////////////////////////////////////////////////////
1245 IFloatProperty
*gPropHackVisibility
;
1246 static sPropertyDesc HackVisibilityDesc
=
1248 PROP_HACKVISIBILITY_NAME
, 0,
1249 NULL
, 0, 0, // constraints, versions
1250 { "Player", "Hack Visibility" },
1253 /////////////////////////////////////////////////////////////
1254 IFloatProperty
*gPropEnergy
;
1255 static sPropertyDesc EnergyDesc
=
1257 PROP_ENERGY_NAME
, 0,
1258 NULL
, 0, 0, // constraints, versions
1259 { "Obj: Energy", "Stored Energy" },
1262 IFloatProperty
*gPropDrainRate
;
1263 static sPropertyDesc DrainRateDesc
=
1265 PROP_DRAINRATE_NAME
, 0,
1266 NULL
, 0, 0, // constraints, versions
1267 { "Obj: Energy", "Drain Rate" },
1270 IFloatProperty
*gPropDrainAmt
;
1271 static sPropertyDesc DrainAmtDesc
=
1273 PROP_DRAINAMT_NAME
, 0,
1274 NULL
, 0, 0, // constraints, versions
1275 { "Obj: Energy", "Drain Amount" },
1278 /////////////////////////////////////////////////////////////
1280 IIntProperty
*gPropTripFlags
;
1281 static sPropertyDesc tripFlagsDesc
=
1283 PROP_TRIPFLAGS_NAME
, 0,
1285 { "Script", "Trap Control Flags" },
1288 char *tripflag_names
[] =
1289 { "Enter", "Exit", "Mono", "Once", "Invert", "Player", "Alarm", "Shove", "ZapInside", "EasterEgg 1"};
1291 static sFieldDesc tripFlagsFields
[] =
1293 { "", kFieldTypeBits
, sizeof(int), 0, kFieldFlagUnsigned
, 0, 10, 10, tripflag_names
},
1296 static sStructDesc tripFlagsStructDesc
=
1298 PROP_TRIPFLAGS_NAME
,
1301 sizeof(tripFlagsFields
)/sizeof(tripFlagsFields
[0]),
1305 static sPropertyTypeDesc tripFlagsTypeDesc
= {PROP_TRIPFLAGS_NAME
, sizeof(int)};
1307 /* ------------------------------------------------------------ */
1308 // Chem Info property description
1311 class cChemInfoDataOps
: public cClassDataOps
<sChemInfo
>
1316 class cChemInfoStore
: public cHashPropertyStore
<cChemInfoDataOps
>
1320 // property implementation class
1321 class cChemInfoProperty
: public cSpecificProperty
<IChemInfoProperty
, &IID_IChemInfoProperty
, sChemInfo
*, cChemInfoStore
>
1323 typedef cSpecificProperty
<IChemInfoProperty
, &IID_IChemInfoProperty
, sChemInfo
*, cChemInfoStore
> cParent
;
1326 cChemInfoProperty(const sPropertyDesc
* desc
)
1331 STANDARD_DESCRIBE_TYPE(sChemInfo
);
1335 static sFieldDesc ChemInfoFields
[] =
1337 {"1 - Item", kFieldTypeString
, FieldLocation(sChemInfo
, m_chem
[0]), },
1338 {"1 - Time", kFieldTypeInt
, FieldLocation(sChemInfo
, m_time
[0]),},
1339 {"2 - Item", kFieldTypeString
, FieldLocation(sChemInfo
, m_chem
[1]), },
1340 {"2 - Time", kFieldTypeInt
, FieldLocation(sChemInfo
, m_time
[1]),},
1341 {"3 - Item", kFieldTypeString
, FieldLocation(sChemInfo
, m_chem
[2]), },
1342 {"3 - Time", kFieldTypeInt
, FieldLocation(sChemInfo
, m_time
[2]),},
1343 {"4 - Item", kFieldTypeString
, FieldLocation(sChemInfo
, m_chem
[3]), },
1344 {"4 - Time", kFieldTypeInt
, FieldLocation(sChemInfo
, m_time
[3]),},
1345 {"5 - Item", kFieldTypeString
, FieldLocation(sChemInfo
, m_chem
[4]), },
1346 {"5 - Time", kFieldTypeInt
, FieldLocation(sChemInfo
, m_time
[4]),},
1347 {"6 - Item", kFieldTypeString
, FieldLocation(sChemInfo
, m_chem
[5]), },
1348 {"6 - Time", kFieldTypeInt
, FieldLocation(sChemInfo
, m_time
[5]),},
1349 {"7 - Item", kFieldTypeString
, FieldLocation(sChemInfo
, m_chem
[6]), },
1350 {"7 - Time", kFieldTypeInt
, FieldLocation(sChemInfo
, m_time
[6]),},
1353 static sStructDesc ChemInfoStructDesc
=
1354 StructDescBuild(sChemInfo
, kStructFlagNone
, ChemInfoFields
);
1356 IChemInfoProperty
*CreateChemInfoProperty(sPropertyDesc
*desc
,
1359 StructDescRegister(&ChemInfoStructDesc
);
1360 return new cChemInfoProperty(desc
);
1363 static sPropertyDesc ChemDesc
=
1365 PROP_CHEMNEED_NAME
, 0,
1366 NULL
, 0, 0, // constraints, versions
1367 { "Gamesys", "Chemicals Needed" },
1370 IChemInfoProperty
*gPropChemNeeded
;
1372 /* ------------------------------------------------------------ */
1373 // Ecology Info property description
1376 class cEcologyInfoDataOps
: public cClassDataOps
<sEcologyInfo
>
1381 class cEcologyInfoStore
: public cHashPropertyStore
<cEcologyInfoDataOps
>
1385 // property implementation class
1386 class cEcologyInfoProperty
: public cSpecificProperty
<IEcologyInfoProperty
, &IID_IEcologyInfoProperty
, sEcologyInfo
*, cEcologyInfoStore
>
1388 typedef cSpecificProperty
<IEcologyInfoProperty
, &IID_IEcologyInfoProperty
, sEcologyInfo
*, cEcologyInfoStore
> cParent
;
1391 cEcologyInfoProperty(const sPropertyDesc
* desc
)
1396 STANDARD_DESCRIBE_TYPE(sEcologyInfo
);
1400 IEcologyInfoProperty
*g_EcologyInfoProperty
;
1402 static sFieldDesc EcologyInfoFields
[] =
1404 {"Period", kFieldTypeFloat
, FieldLocation(sEcologyInfo
, m_period
), },
1405 {"Normal Min", kFieldTypeInt
, FieldLocation(sEcologyInfo
,m_mincount
[0]), },
1406 {"Normal Max", kFieldTypeInt
, FieldLocation(sEcologyInfo
,m_maxcount
[0]), },
1407 {"Normal Rand", kFieldTypeInt
, FieldLocation(sEcologyInfo
, m_randval
[0]), },
1409 {"Hacked Min", kFieldTypeInt, FieldLocation(sEcologyInfo,m_mincount[1]), },
1410 {"Hacked Max", kFieldTypeInt, FieldLocation(sEcologyInfo,m_maxcount[1]), },
1411 {"Hacked Recovery", kFieldTypeFloat, FieldLocation(sEcologyInfo,m_recovery[1]), },
1412 {"Hacked Rand", kFieldTypeInt, FieldLocation(sEcologyInfo, m_randval[1]), },
1414 {"Alert Min", kFieldTypeInt
, FieldLocation(sEcologyInfo
,m_mincount
[2]), },
1415 {"Alert Max", kFieldTypeInt
, FieldLocation(sEcologyInfo
,m_maxcount
[2]), },
1416 {"Alert Recovery", kFieldTypeFloat
, FieldLocation(sEcologyInfo
,m_recovery
[2]), },
1417 {"Alert Rand", kFieldTypeInt
, FieldLocation(sEcologyInfo
, m_randval
[2]), },
1420 static sStructDesc EcologyInfoStructDesc
=
1421 StructDescBuild(sEcologyInfo
, kStructFlagNone
, EcologyInfoFields
);
1423 IEcologyInfoProperty
*CreateEcologyInfoProperty(sPropertyDesc
*desc
,
1426 StructDescRegister(&EcologyInfoStructDesc
);
1427 return new cEcologyInfoProperty(desc
);
1430 /////////////////////////////////////////////////////////////
1431 // Spawn Info property description
1434 class cSpawnInfoDataOps
: public cClassDataOps
<sSpawnInfo
>
1439 class cSpawnInfoStore
: public cHashPropertyStore
<cSpawnInfoDataOps
>
1443 // property implementation class
1444 class cSpawnInfoProperty
: public cSpecificProperty
<ISpawnInfoProperty
, &IID_ISpawnInfoProperty
, sSpawnInfo
*, cSpawnInfoStore
>
1446 typedef cSpecificProperty
<ISpawnInfoProperty
, &IID_ISpawnInfoProperty
, sSpawnInfo
*, cSpawnInfoStore
> cParent
;
1449 cSpawnInfoProperty(const sPropertyDesc
* desc
)
1454 STANDARD_DESCRIBE_TYPE(sSpawnInfo
);
1458 ISpawnInfoProperty
*g_SpawnInfoProperty
;
1460 static char *flagBits
[] =
1470 static sFieldDesc SpawnInfoFields
[] =
1472 {"Type 1", kFieldTypeString
, FieldLocation(sSpawnInfo
, m_objs
[0]), },
1473 {"Rarity 1", kFieldTypeInt
, FieldLocation(sSpawnInfo
, m_odds
[0]),},
1474 {"Type 2", kFieldTypeString
, FieldLocation(sSpawnInfo
, m_objs
[1]), },
1475 {"Rarity 2", kFieldTypeInt
, FieldLocation(sSpawnInfo
, m_odds
[1]),},
1476 {"Type 3", kFieldTypeString
, FieldLocation(sSpawnInfo
, m_objs
[2]), },
1477 {"Rarity 3", kFieldTypeInt
, FieldLocation(sSpawnInfo
, m_odds
[2]),},
1478 {"Type 4", kFieldTypeString
, FieldLocation(sSpawnInfo
, m_objs
[3]), },
1479 {"Rarity 4", kFieldTypeInt
, FieldLocation(sSpawnInfo
, m_odds
[3]),},
1480 {"Flags", kFieldTypeBits
, FieldLocation(sSpawnInfo
, m_flags
),kFieldFlagNone
, 0, 6, 6, flagBits
,},
1481 {"Supply", kFieldTypeInt
, FieldLocation(sSpawnInfo
, m_supply
),},
1484 static sStructDesc SpawnInfoStructDesc
=
1485 StructDescBuild(sSpawnInfo
, kStructFlagNone
, SpawnInfoFields
);
1487 ISpawnInfoProperty
*CreateSpawnInfoProperty(sPropertyDesc
*desc
,
1490 StructDescRegister(&SpawnInfoStructDesc
);
1491 return new cSpawnInfoProperty(desc
);
1494 /////////////////////////////////////////////////////////////
1495 // Automatically Pickupable object property
1496 /////////////////////////////////////////////////////////////
1498 IBoolProperty
* gPropAutoPickup
;
1500 static sPropertyDesc AutoPickupDesc
=
1502 PROP_AUTOPICKUP_NAME
, 0,
1503 NULL
, 0, 0, // constraints, versions
1504 { "Obj", "AutoPickup?" },
1507 /////////////////////////////////////////////////////////////
1508 // Plot critical object (prevent corpse deletion)
1509 /////////////////////////////////////////////////////////////
1511 IBoolProperty
* gPropPlotCritical
;
1513 static sPropertyDesc plotCriticalDesc
=
1515 PROP_PLOTCRITICAL_NAME
, 0,
1516 NULL
, 0, 0, // constraints, versions
1517 { "Obj", "Plot Critical?" },
1520 /////////////////////////////////////////////////////////////
1521 // Transluce Rate property
1522 /////////////////////////////////////////////////////////////
1524 static sPropertyDesc transluceRateDesc
=
1526 PROP_TRANSLUCE_RATE
, 0,
1527 NULL
, 0, 0, // constraints, versions
1528 { "Renderer", "Transluce Rate" },
1531 /////////////////////////////////////////////////////////////
1532 void ShockPropertiesInit(void)
1534 AutoAppIPtr(GameStrings
);
1536 gPropObjName
= CreateStringProperty(&ObjNameDesc
,OBJ_NAME_IMPL
);
1537 pGameStrings
->RegisterProp(PROP_OBJNAME_NAME
,gPropObjName
);
1539 StructDescRegister(&NameTypeStructDesc
);
1540 gPropObjNameType
= CreateIntegralProperty(&NameTypeDesc
, &NameTypeTypeDesc
, kPropertyImplHash
);
1542 gPropObjShortName
= CreateStringProperty(&ObjShortNameDesc
,kPropertyImplHash
);
1543 pGameStrings
->RegisterProp(PROP_OBJSHORTNAME_NAME
,gPropObjShortName
);
1545 gPropObjLookString
= CreateStringProperty(&ObjLookStringDesc
,kPropertyImplHash
);
1546 pGameStrings
->RegisterProp(PROP_OBJLOOKSTRING_NAME
,gPropObjLookString
);
1548 gPropExp
= CreateIntProperty(&ExpDesc
,EXP_IMPL
);
1549 gPropObjIcon
= CreateLabelProperty(&ObjIconDesc
,OBJ_ICON_IMPL
);
1550 gPropObjBrokenIcon
= CreateLabelProperty(&ObjBrokenIconDesc
,kPropertyImplHash
);
1552 gPropMapRef
= CreateMapRefProperty(&MapRefDesc
, kPropertyImplHash
);
1554 gPropHackDiff
= CreateTechInfoProperty(&HackDiffDesc
,HACKDIFF_IMPL
);
1555 gPropRepairDiff
= CreateTechInfoProperty(&RepairDiffDesc
,REPAIRDIFF_IMPL
);
1556 gPropModifyDiff
= CreateTechInfoProperty(&ModifyDiffDesc
,MODIFYDIFF_IMPL
);
1557 gPropModify2Diff
= CreateTechInfoProperty(&Modify2DiffDesc
,MODIFY2DIFF_IMPL
);
1559 gPropModify1Text
= CreateStringProperty(&Modify1TextDesc
,MODIFY1TEXT_IMPL
);
1560 pGameStrings
->RegisterProp(PROP_MODIFY1TEXT_NAME
, gPropModify1Text
);
1561 gPropModify2Text
= CreateStringProperty(&Modify2TextDesc
,MODIFY2TEXT_IMPL
);
1562 pGameStrings
->RegisterProp(PROP_MODIFY2TEXT_NAME
, gPropModify2Text
);
1564 gPropHackText
= CreateStringProperty(&HackTextDesc
, HACKTEXT_IMPL
);
1565 pGameStrings
->RegisterProp(PROP_HACKTEXT_NAME
, gPropHackText
);
1567 gPropUseMessage
= CreateStringProperty(&UseMessageDesc
, kPropertyImplHash
);
1568 pGameStrings
->RegisterProp(PROP_USEMESSAGE_NAME
,gPropUseMessage
);
1569 gPropMessageTime
= CreateIntProperty(&MessageTimeDesc
, kPropertyImplHash
);
1571 gPropStackIncrem
= CreateIntProperty(&StackIncremDesc
, kPropertyImplHash
);
1573 gPropLockedMessage
= CreateStringProperty(&LockedMessageDesc
, kPropertyImplHash
);
1574 pGameStrings
->RegisterProp(PROP_LOCKEDMESSAGE_NAME
,gPropLockedMessage
);
1576 gPropHUDTime
= CreateIntProperty(&HUDTimeDesc
, kPropertyImplHash
);
1577 gPropAllowHUDSelect
= CreateBoolProperty(&HUDSelectDesc
, kPropertyImplHash
);
1578 gPropShowHP
= CreateBoolProperty(&ShowHPDesc
, kPropertyImplHash
);
1579 gPropHackTime
= CreateIntProperty(&HackTimeDesc
, kPropertyImplHash
);
1581 gPropAlarm
= CreateBoolProperty(&AlarmDesc
, kPropertyImplHash
);
1582 gPropBlockFrob
= CreateBoolProperty(&BlockFrobDesc
, kPropertyImplHash
);
1584 StructDescRegister(&objStateStructDesc
);
1585 gPropObjState
= CreateIntegralProperty(&objStateDesc
, &objStateTypeDesc
, kPropertyImplHash
);
1587 StructDescRegister(&softwareTypeStructDesc
);
1588 gPropSoftwareType
= CreateIntegralProperty(&SoftwareTypeDesc
, &softwareTypeTypeDesc
, kPropertyImplHash
);
1589 gPropSoftwareLevel
= CreateIntProperty(&SoftwareLevelDesc
, kPropertyImplHash
);
1591 gPropDelayTime
= CreateFloatProperty(&DelayTimeDesc
, kPropertyImplHash
);
1593 gPropLoot
= CreateLootInfoProperty(&LootDesc
,LOOT_IMPL
);
1594 gPropGuaranteedLoot
= CreateLabelProperty(&GuaranteedLootDesc
,kPropertyImplLlist
);
1595 gPropReallyGuaranteedLoot
= CreateLabelProperty(&ReallyGuaranteedLootDesc
,kPropertyImplLlist
);
1597 gPropMapObjIcon
= CreateLabelProperty(&MapObjIconDesc
,kPropertyImplHash
);
1598 gPropMapObjRotate
= CreateBoolProperty(&MapObjRotateDesc
,kPropertyImplHash
);
1599 gPropMapText
= CreateStringProperty(&MapTextDesc
,kPropertyImplHash
);
1601 gPropSettingText1
= CreateStringProperty(&SettingText1Desc
,kPropertyImplHash
);
1602 gPropSettingText2
= CreateStringProperty(&SettingText2Desc
,kPropertyImplHash
);
1603 pGameStrings
->RegisterProp(PROP_SETTINGTEXT1_NAME
,gPropSettingText1
);
1604 pGameStrings
->RegisterProp(PROP_SETTINGTEXT2_NAME
,gPropSettingText2
);
1606 gPropSettingHead1
= CreateStringProperty(&SettingHead1Desc
,kPropertyImplHash
);
1607 gPropSettingHead2
= CreateStringProperty(&SettingHead2Desc
,kPropertyImplHash
);
1608 pGameStrings
->RegisterProp(PROP_SETTINGHEAD1_NAME
,gPropSettingHead1
);
1609 pGameStrings
->RegisterProp(PROP_SETTINGHEAD2_NAME
,gPropSettingHead2
);
1611 gPropResearchTime
= CreateIntProperty(&ResearchTimeDesc
, kPropertyImplHash
);
1612 gPropResearchText
= CreateStringProperty(&ResearchTextDesc
, kPropertyImplHash
);
1613 pGameStrings
->RegisterProp(PROP_RESEARCHTEXT_NAME
, gPropResearchText
);
1615 gPropChemNeeded
= CreateChemInfoProperty(&ChemDesc
,kPropertyImplHash
);
1617 gPropEcology
= CreateEcologyInfoProperty(&EcologyDesc
, kPropertyImplHash
);
1618 gPropEcoType
= CreateIntProperty(&EcoTypeDesc
, kPropertyImplHash
);
1619 gPropEcoState
= CreateIntProperty(&EcoStateDesc
, kPropertyImplHash
);
1621 gPropSpawn
= CreateSpawnInfoProperty(&SpawnDesc
, kPropertyImplHash
);
1623 gPropHackVisibility
= CreateFloatProperty(&HackVisibilityDesc
, kPropertyImplHash
);
1624 gPropShove
= CreateVectorProperty(&ShoveDesc
, kPropertyImplHash
);
1626 gPropHUDUse
= CreateStringProperty(&HUDUseDesc
, kPropertyImplHash
);
1627 pGameStrings
->RegisterProp(PROP_HUDUSE_NAME
, gPropHUDUse
);
1629 gPropRadAmbient
= CreateFloatProperty(&RadAmbientDesc
, kPropertyImplLlist
);
1630 gPropRadLevel
= CreateFloatProperty(&RadLevelDesc
, kPropertyImplHash
);
1631 gPropToxin
= CreateFloatProperty(&ToxinDesc
, kPropertyImplHash
);
1632 gPropRadDrain
= CreateFloatProperty(&RadDrainDesc
, kPropertyImplLlist
);
1633 gPropRadAbsorb
= CreateFloatProperty(&RadAbsorbDesc
, kPropertyImplLlist
);
1634 gPropRadRecover
= CreateFloatProperty(&RadRecoverDesc
, kPropertyImplLlist
);
1636 gPropWorldCursor
= CreateStringProperty(&WorldCursorDesc
, kPropertyImplHash
);
1637 pGameStrings
->RegisterProp(PROP_WORLDCURSOR_NAME
, gPropWorldCursor
);
1638 gPropInvCursor
= CreateStringProperty(&InvCursorDesc
, kPropertyImplHash
);
1639 pGameStrings
->RegisterProp(PROP_INVCURSOR_NAME
, gPropInvCursor
);
1640 gPropUseCursor
= CreateStringProperty(&UseCursorDesc
, kPropertyImplHash
);
1641 pGameStrings
->RegisterProp(PROP_USECURSOR_NAME
, gPropUseCursor
);
1643 StructDescRegister(&useTypeStructDesc
);
1644 gPropUseType
= CreateIntegralProperty(&UseTypeDesc
, &useTypeTypeDesc
, kPropertyImplHash
);
1645 gPropAutoPickup
= CreateBoolProperty(&AutoPickupDesc
, kPropertyImplHash
);
1647 gPropEnergy
= CreateFloatProperty(&EnergyDesc
, kPropertyImplHash
);
1648 gPropDrainRate
= CreateFloatProperty(&DrainRateDesc
, kPropertyImplHash
);
1649 gPropDrainAmt
= CreateFloatProperty(&DrainAmtDesc
, kPropertyImplHash
);
1651 gPropConsumeType
= CreateStringProperty(&ConsumeTypeDesc
, kPropertyImplHash
);
1652 gPropSignalType
= CreateStringProperty(&SignalTypeDesc
, kPropertyImplHash
);
1653 gPropMetapropType
= CreateStringProperty(&MetapropTypeDesc
, kPropertyImplHash
);
1654 gPropObjList
= CreateStringProperty(&ObjListDesc
, kPropertyImplHash
);
1656 gPropQBName
= CreateStringProperty(&QBNameDesc
, kPropertyImplHash
);
1657 gPropQBVal
= CreateIntProperty(&QBValDesc
, kPropertyImplHash
);
1659 gPropShakeAmt
= CreateIntProperty(&ShakeAmtDesc
, kPropertyImplSparseHash
);
1661 gPropRecycle
= CreateIntProperty(&RecycleDesc
, kPropertyImplHash
);
1663 StructDescRegister(&tripFlagsStructDesc
);
1664 gPropTripFlags
= CreateIntegralProperty(&tripFlagsDesc
, &tripFlagsTypeDesc
, kPropertyImplHash
);
1666 StructDescRegister(&miniGamesStructDesc
);
1667 gPropMiniGames
= CreateIntegralProperty(&MiniGamesDesc
, &miniGamesTypeDesc
, kPropertyImplLlist
);
1669 gPropPlotCritical
= CreateBoolProperty(&plotCriticalDesc
, kPropertyImplHash
);
1671 CreateIntProperty(&transluceRateDesc
, kPropertyImplHash
);