Skip to content

Commit

Permalink
Add allow_item_dropping keyvalue to Monster baseclass
Browse files Browse the repository at this point in the history
Add test map for allow_item_dropping keyvalue
twhl-community/halflife-op4-updated#72
  • Loading branch information
SamVanheer committed Aug 3, 2022
1 parent 498f7f8 commit 84746ae
Show file tree
Hide file tree
Showing 3 changed files with 175 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fgdsrc/halflife-unified.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,12 @@
256: "Pre-Disaster" : 0
512: "Fade Corpse" : 0
]

allow_item_dropping(choices) : "Allow Item Dropping" : 1 : "This controls whether this NPC will drop items on death" =
[
0 : "No"
1 : "Yes"
]
]

@BaseClass = TalkMonster
Expand Down
Binary file not shown.
169 changes: 169 additions & 0 deletions mapsrc/test_allow_item_dropping/test_allow_item_dropping.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
{
"classname" "worldspawn"
"defaultteam" "0"
"newunit" "0"
"gametitle" "0"
"startdark" "0"
"MaxRange" "4096"
"sounds" "1"
"mapversion" "220"
"wad" "\Program Files (x86)\Steam\steamapps\common\Half-Life\valve\halflife.wad;\Program Files (x86)\Steam\steamapps\common\Half-Life\valve\liquids.wad;\Program Files (x86)\Steam\steamapps\common\Half-Life\valve\xeno.wad;\Program Files (x86)\Steam\steamapps\common\Half-Life\valve\decals.wad;\Users\Sam\Documents\Half-Life\Vluzacn_ZHLT_v34\tools\zhlt.wad"
"_generator" "J.A.C.K. 1.1.1064 (vpHalfLife)"
{
( 256 -256 160 ) ( 256 -256 0 ) ( 256 256 160 ) C1A0_WX [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 288 256 160 ) ( 288 256 0 ) ( 288 -256 160 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 256 256 160 ) ( 256 256 0 ) ( 288 256 160 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 288 -256 160 ) ( 288 -256 0 ) ( 256 -256 160 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 256 256 0 ) ( 256 -256 0 ) ( 288 256 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( 288 -256 160 ) ( 256 -256 160 ) ( 288 256 160 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
}
{
( -288 -256 160 ) ( -288 -256 0 ) ( -288 256 160 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -256 256 160 ) ( -256 256 0 ) ( -256 -256 160 ) C1A0_WX [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -288 256 160 ) ( -288 256 0 ) ( -256 256 160 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -256 -256 160 ) ( -256 -256 0 ) ( -288 -256 160 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -288 256 0 ) ( -288 -256 0 ) ( -256 256 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -256 -256 160 ) ( -288 -256 160 ) ( -256 256 160 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
}
{
( -256 256 160 ) ( -256 256 0 ) ( -256 288 160 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 256 288 160 ) ( 256 288 0 ) ( 256 256 160 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -256 288 160 ) ( -256 288 0 ) ( 256 288 160 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 256 256 160 ) ( 256 256 0 ) ( -256 256 160 ) C1A0_WX [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -256 288 0 ) ( -256 256 0 ) ( 256 288 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( 256 256 160 ) ( -256 256 160 ) ( 256 288 160 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
}
{
( -256 -288 160 ) ( -256 -288 0 ) ( -256 -256 160 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 256 -256 160 ) ( 256 -256 0 ) ( 256 -288 160 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -256 -256 160 ) ( -256 -256 0 ) ( 256 -256 160 ) C1A0_WX [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 256 -288 160 ) ( 256 -288 0 ) ( -256 -288 160 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -256 -256 0 ) ( -256 -288 0 ) ( 256 -256 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( 256 -288 160 ) ( -256 -288 160 ) ( 256 -256 160 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
}
{
( -256 -256 192 ) ( -256 -256 160 ) ( -256 256 192 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 256 256 192 ) ( 256 256 160 ) ( 256 -256 192 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -256 256 192 ) ( -256 256 160 ) ( 256 256 192 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 256 -256 192 ) ( 256 -256 160 ) ( -256 -256 192 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -256 256 160 ) ( -256 -256 160 ) ( 256 256 160 ) C2A4E_W1 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( 256 -256 192 ) ( -256 -256 192 ) ( 256 256 192 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
}
{
( -256 -256 0 ) ( -256 -256 -32 ) ( -256 256 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 256 256 0 ) ( 256 256 -32 ) ( 256 -256 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -256 256 0 ) ( -256 256 -32 ) ( 256 256 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 256 -256 0 ) ( 256 -256 -32 ) ( -256 -256 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -256 256 -32 ) ( -256 -256 -32 ) ( 256 256 -32 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( 256 -256 0 ) ( -256 -256 0 ) ( 256 256 0 ) C1A0_LABFLRC [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
}
}
{
"classname" "info_player_start"
"angles" "0 0 0"
"origin" "-192 0 37"
}
{
"classname" "light"
"_falloff" "0"
"_fade" "1.0"
"style" "0"
"_light" "255 255 128 200"
"light" "255 255 128 200"
"origin" "0 0 128"
}
{
"classname" "monster_barney"
"TriggerCondition" "0"
"angles" "0 0 0"
"rendercolor" "0 0 0"
"rendermode" "0"
"renderfx" "0"
"allow_item_dropping" "0"
"origin" "0 128 8"
}
{
"classname" "item_suit"
"delay" "0"
"angles" "0 0 0"
"spawnflags" "0"
"origin" "-160 0 0.0635414"
}
{
"classname" "weapon_shotgun"
"delay" "0"
"angles" "0 0 0"
"origin" "-120 9.53674e-007 0.376411"
}
{
"classname" "monster_barney"
"TriggerCondition" "0"
"angles" "0 0 0"
"rendercolor" "0 0 0"
"rendermode" "0"
"renderfx" "0"
"allow_item_dropping" "1"
"origin" "0 -128 8"
}
{
"classname" "trigger_multiple"
"wait" "1"
"delay" "0"
"sounds" "0"
"target" "msg_no"
{
( 64 192 160 ) ( 64 192 0 ) ( 64 64 160 ) AAATRIGGER [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -64 64 160 ) ( -64 64 0 ) ( -64 192 160 ) AAATRIGGER [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 64 64 160 ) ( 64 64 0 ) ( -64 64 160 ) AAATRIGGER [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -64 192 160 ) ( -64 192 0 ) ( 64 192 160 ) AAATRIGGER [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -64 192 0 ) ( -64 64 0 ) ( 64 192 0 ) AAATRIGGER [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( 64 64 160 ) ( -64 64 160 ) ( 64 192 160 ) AAATRIGGER [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
}
}
{
"classname" "game_text"
"channel" "1"
"fxtime" "0.25"
"holdtime" "1.2"
"fadeout" "0.5"
"fadein" "1.5"
"color2" "240 110 0"
"color" "100 100 100"
"effect" "0"
"y" "-1"
"x" "-1"
"targetname" "msg_no"
"message" "This Barney will not drop a pistol"
"origin" "-96 128 64"
}
{
"classname" "game_text"
"channel" "1"
"fxtime" "0.25"
"holdtime" "1.2"
"fadeout" "0.5"
"fadein" "1.5"
"color2" "240 110 0"
"color" "100 100 100"
"effect" "0"
"y" "-1"
"x" "-1"
"targetname" "msg_yes"
"message" "This Barney will drop a pistol"
"origin" "-96 -128 64"
}
{
"classname" "trigger_multiple"
"wait" "1"
"delay" "0"
"sounds" "0"
"target" "msg_yes"
{
( 64 -64 160 ) ( 64 -64 0 ) ( 64 -192 160 ) AAATRIGGER [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -64 -192 160 ) ( -64 -192 0 ) ( -64 -64 160 ) AAATRIGGER [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 64 -192 160 ) ( 64 -192 0 ) ( -64 -192 160 ) AAATRIGGER [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -64 -64 160 ) ( -64 -64 0 ) ( 64 -64 160 ) AAATRIGGER [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -64 -64 0 ) ( -64 -192 0 ) ( 64 -64 0 ) AAATRIGGER [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1
( 64 -192 160 ) ( -64 -192 160 ) ( 64 -64 160 ) AAATRIGGER [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1
}
}

0 comments on commit 84746ae

Please sign in to comment.