mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-07-02 20:56:27 -04:00
Add custom collectible thing
This commit is contained in:
@@ -399,6 +399,9 @@ DrawItemTableEntry sDrawItemTable[] = {
|
||||
* Calls the corresponding draw function for the given draw ID
|
||||
*/
|
||||
void GetItem_Draw(PlayState* play, s16 drawId) {
|
||||
if (drawId < 0 || drawId >= GID_MAXIMUM) {
|
||||
return;
|
||||
}
|
||||
sDrawItemTable[drawId].drawFunc(play, drawId);
|
||||
}
|
||||
|
||||
|
||||
@@ -1873,9 +1873,19 @@ u8 Return_Item(u8 itemID, ModIndex modId, ItemID returnItem) {
|
||||
* @return u8
|
||||
*/
|
||||
u8 Item_Give(PlayState* play, u8 item) {
|
||||
// prevents getting sticks without the bag in case something got missed
|
||||
if (IS_RANDO && (item == ITEM_STICK || item == ITEM_STICKS_5 || item == ITEM_STICKS_10) &&
|
||||
Randomizer_GetSettingValue(RSK_SHUFFLE_DEKU_STICK_BAG) && CUR_UPG_VALUE(UPG_STICKS) == 0) {
|
||||
// TODO: Add ShouldItemGive
|
||||
// if (!GameInteractor_ShouldItemGive(item) || item == ITEM_SHIP) {
|
||||
if (item == ITEM_SHIP) {
|
||||
return ITEM_NONE;
|
||||
}
|
||||
|
||||
//prevents getting sticks without the bag in case something got missed
|
||||
if (
|
||||
IS_RANDO &&
|
||||
(item == ITEM_STICK || item == ITEM_STICKS_5 || item == ITEM_STICKS_10) &&
|
||||
Randomizer_GetSettingValue(RSK_SHUFFLE_DEKU_STICK_BAG) &&
|
||||
CUR_UPG_VALUE(UPG_STICKS) == 0
|
||||
) {
|
||||
return item;
|
||||
}
|
||||
|
||||
@@ -2476,6 +2486,11 @@ u8 Item_CheckObtainability(u8 item) {
|
||||
s16 slot = SLOT(item);
|
||||
s32 temp;
|
||||
|
||||
// SOH [Enhancements] Added to enable custom item gives
|
||||
if (item == ITEM_SHIP) {
|
||||
return ITEM_NONE;
|
||||
}
|
||||
|
||||
if (item >= ITEM_STICKS_5) {
|
||||
slot = SLOT(sExtraItemBases[item - ITEM_STICKS_5]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user