Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New item function, CARVECORPSE #1351

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3962,4 +3962,9 @@ Added: 'H' shortcut for variables to get the value as hexadecimal.
2. No damage amount can be less than 1.

4-12-2024, canerksk
- Fixed: Sphere crash troubleshooting if a player has no CHATNAME value and remove a channel
- Fixed: Sphere crash troubleshooting if a player has no CHATNAME value and remove a channel

5-12-2024, canerksk
- Added: New item function, CARVECORPSE
It was not possible to cut a corpse from the outside and reveal the resources inside, this could not be done with a script or it required very long operations. .xCARVECORPSE command that can be used on corpses has been added, it directly carves the corpse.

7 changes: 7 additions & 0 deletions src/game/items/CItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3526,6 +3526,13 @@ bool CItem::r_Verb( CScript & s, CTextConsole * pSrc ) // Execute command from s
return false;
pCharSrc->ItemBounce( this );
break;
case CIV_CARVECORPSE:
if (!pCharSrc)
return false;
if (!IsType(IT_CORPSE))
return false;
pCharSrc->Use_CarveCorpse(dynamic_cast<CItemCorpse *>(this), this);
break;
case CIV_CONSUME:
ConsumeAmount( s.HasArgs() ? s.GetArgWVal() : 1 );
break;
Expand Down
1 change: 1 addition & 0 deletions src/tables/CItem_functions.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
//

ADD(BOUNCE, "BOUNCE")
ADD(CARVECORPSE, "CARVECORPSE")
ADD(CONSUME, "CONSUME")
ADD(CONTCONSUME, "CONTCONSUME")
ADD(DECAY, "DECAY")
Expand Down