Difference between revisions of "User:Inutt/CodingIdeas"
From Flexible Survival
(Parts list) |
(Tickboxes) |
||
Line 6: | Line 6: | ||
</p> | </p> | ||
</div> | </div> | ||
+ | <span style="color:#03fcfc; font-weight:bold">☐</span> | ||
+ | <span style="color:#20fc03; font-weight:bold">☑</span> | ||
+ | <span style="color:#fc2003; font-weight:bold">☒</span> | ||
+ | <css> ul { list-style-type: none } </css> | ||
− | * Make indentation consistent <span style="color:#20fc03; font-weight:bold">[Happening as I edit code]</span> | + | * <span style="color:#20fc03; font-weight:bold">☑</span> Make indentation consistent <span style="color:#20fc03; font-weight:bold">[Happening as I edit code]</span> |
:- It just makes code easier to read, enables code folding, and lining up corresponding if/then statements makes the code vastly easier to parse! (Yes, I know two of those points are the same, but it's an important one) | :- It just makes code easier to read, enables code folding, and lining up corresponding if/then statements makes the code vastly easier to parse! (Yes, I know two of those points are the same, but it's an important one) | ||
− | * Add prop to players that have womb/other private rooms so they can be found without looping through all room objects - it would just make more sense and improve efficiency | + | * <span style="color:#03fcfc; font-weight:bold">☐</span> Add prop to players that have womb/other private rooms so they can be found without looping through all room objects - it would just make more sense and improve efficiency |
− | * Write a parameter checking function - basically an improved <code>checkargs</code> to highlight more clearly when incorrect parameters are passed | + | * <span style="color:#03fcfc; font-weight:bold">☐</span> Write a parameter checking function - basically an improved <code>checkargs</code> to highlight more clearly when incorrect parameters are passed |
** Check number of supplied parameters is actually on the stack | ** Check number of supplied parameters is actually on the stack | ||
** Check type of arguments | ** Check type of arguments | ||
Line 20: | Line 24: | ||
*** Split on ':' into type,name | *** Split on ':' into type,name | ||
*** If top of stack matches type, add to dict of parameters by name | *** If top of stack matches type, add to dict of parameters by name | ||
− | * Unify <code>use</code> and <code>+use</code> | + | * <span style="color:#03fcfc; font-weight:bold">☐</span> Unify <code>use</code> and <code>+use</code> |
− | * Merge/replace hasBoxItem with findBoxItem - they both seem to do the same thing | + | * <span style="color:#03fcfc; font-weight:bold">☐</span> Merge/replace hasBoxItem with findBoxItem - they both seem to do the same thing |
** hasBoxItem returns 0 or 1 | ** hasBoxItem returns 0 or 1 | ||
** findBoxItem returns the slot the item is found in or 0 | ** findBoxItem returns the slot the item is found in or 0 | ||
** findBoxItem could therefore be used for any binary checks that hasBoxItem is currently used for | ** findBoxItem could therefore be used for any binary checks that hasBoxItem is currently used for | ||
− | * Find the various places the bodypart list ({ "arms" "ass" "legs" "cock" "head" "torso" "skin" }) is referenced and centralise it. | + | * <span style="color:#03fcfc; font-weight:bold">☐</span> Find the various places the bodypart list ({ "arms" "ass" "legs" "cock" "head" "torso" "skin" }) is referenced and centralise it. |
Revision as of 10:48, 20 August 2019
Coding ideas
Please note: These are just ideas that I've had and are not necessarily well thought out, are in no particular order, have no guarantee of ever actually happening, may be either impossible or inadvisable, and may contain nuts.
☐ ☑ ☒
- ☑ Make indentation consistent [Happening as I edit code]
- - It just makes code easier to read, enables code folding, and lining up corresponding if/then statements makes the code vastly easier to parse! (Yes, I know two of those points are the same, but it's an important one)
- ☐ Add prop to players that have womb/other private rooms so they can be found without looping through all room objects - it would just make more sense and improve efficiency
- ☐ Write a parameter checking function - basically an improved
checkargs
to highlight more clearly when incorrect parameters are passed- Check number of supplied parameters is actually on the stack
- Check type of arguments
- Something like
"str:foo int:bar dbref:baz any:qux" checkparams
- Check stack depth
- Split on ' ' and foreach in reverse order
- Split on ':' into type,name
- If top of stack matches type, add to dict of parameters by name
- ☐ Unify
use
and+use
- ☐ Merge/replace hasBoxItem with findBoxItem - they both seem to do the same thing
- hasBoxItem returns 0 or 1
- findBoxItem returns the slot the item is found in or 0
- findBoxItem could therefore be used for any binary checks that hasBoxItem is currently used for
- ☐ Find the various places the bodypart list ({ "arms" "ass" "legs" "cock" "head" "torso" "skin" }) is referenced and centralise it.