Conversation
# Conflicts: # app/Helpers/AssetHelpers.php # resources/views/admin/prompts/create_edit_prompt.blade.php # resources/views/prompts/_prompt_entry.blade.php
…pr/rewardmaker-core # Conflicts: # app/Helpers/Helpers.php
|
Could the tables included in this to be swapped over to a responsive div format? |
i just woke up so i might be short a few braincells ahahaha but i'm not getting what you're meaning by this, could you explain? |
In your code I saw a block looking like this, in A sort-of equivalent would be this, for example, from Basically: Use bootstrap for the rows and columns. |
OH RIGHT yeah i can do that for sure! 🫡 |
ScuffedNewt
left a comment
There was a problem hiding this comment.
small review for now will look in more detail later
|
|
||
| foreach ($rewards as $reward) { | ||
| switch ($reward->object_type) { | ||
| case 'Questline': |
There was a problem hiding this comment.
definitely don't include questlines in this in the final PR
| case 'Questline': | ||
| $objmodel = 'App\Models\Questline\Questline'; | ||
| break; | ||
| case 'Prompt': |
There was a problem hiding this comment.
You also dont need to do this at all and can instead use an object relation on the ObjectReward model
| * Get the object. | ||
| */ | ||
| public function object() { | ||
| return $this->morphTo(__FUNCTION__, 'object_type', 'object_id'); |
There was a problem hiding this comment.
whats the purpose of the __FUNCTION__ ?
There was a problem hiding this comment.
instead of having an object reward model why not just have the stored assets array?
app/Models/Prompt/Prompt.php
Outdated
| public function rewards() { | ||
| return $this->hasMany(PromptReward::class, 'prompt_id'); | ||
| public function objectRewards() { | ||
| return $this->hasMany('App\Models\ObjectReward', 'object_id')->where([ |
There was a problem hiding this comment.
ideally this would use the ::class
There was a problem hiding this comment.
since this is pulled from claymores, why not just pull the migration filename so that the migration errors dont happen?
…dmaker-core # Conflicts: # database/migrations/2024_10_14_165017_add_character_prompt_rewards.php
…eeper into pr/rewardmaker-core
it's basically an ext that allows for easier rewarding for loot like through prompts, also replaces the existing prompt reward system to streamline it
worth noting that this is a very VERY rough draft because i wanted to get feedback and see what the general opinion was-- it's a bit of mix of the old default char rewards PR + my reward maker ext (edited + added reward_key so a model can theoretically have multiple different "reward sets"
things i believe i will have to edit/add:
this was a suggestion i got so i'm definitely feeling like i may have fumbled along the way somewhere, but like i said-- just looking for proper feedback so i can see where to take all of this (do we even want to replace prompt rewards with this or think it's a good idea???????)