kaibraaten / swrip-1.5 Goto Github PK
View Code? Open in Web Editor NEWStar Wars: Rise in Power 1.5 - Refactored version
Star Wars: Rise in Power 1.5 - Refactored version
This function is really an implementation detail of LegacyAreaRepository, yet it resides in src/build.cpp
because some other functions depend on it. Break that dependency!
The SmaugAffects on 'alertness' looks off. Investigate.
Title says it all.
Saving corpses should use the new file format.
Upon refactoring do_fuel it became appearant that it doesn't work correctly.
The syntax is: fuel <amount> <ship>
Trouble is, the fuel target (fuelTarget variable) is ONLY set if the target ship is NOT specified by the user. The code only searched for docked ships, but does not use the parameter at all.
This is almost certainly not the way it's supposed to work.
The text output in the config
command says +/- roomflags, but it's actually showroomflags.
Do practice doesn't work correctly. Specifically, some skill/force power names are truncated, newlines don't show up where they're supposed to, skill names bleed into eachother.
Currently I only see this on force powers, and only for imms. But that may be coincidental. It happens at the exact same spot in the list every time, which hopefully makes it easier to figure it out.
LuaLoadMobiles() is used by the player repository to load pets from pfile. Save saving is implemented, but not the loading.
Macros are hard to debug and not typesafe. Replace with functions or function templates where possible.
The following repositories still need to use tags when possible:
When you add someone as resident to your home, the room contents is saved twice. There will be a playername.home file for both even though it's the same room. This is a problem because the contents of the two files won't be in sync.
player1.home
file is written to disk.player2.home
is written to disk. Note that at this point player2.home
contains both a blaster and a helmet, while player1.home
contains just the blaster.player1.home
.What's the problem? After step 5 above, the helmet is gone.
A suggested solution is to change the filename from playername.home
to room_vnum.home
so that both owner and resident(s) save to the same file.
The Event class needs tests for the member function thing, and for using functors and lambdas.
In the newbie academy, scripts seem only partially executed.
Example 1: The sad student just repeats the line "My brother is dead".
Example 2: The academy student taking a break from his studies reacts to hi/hello by answering 'Hello', but does not produce the figure. Also, it responds to 'yes' saying 'Ok you can have it then.', but then nothing else happens.
The function merely allocates a chunk of memory for a Descriptor, and then starts using its Character pointer even though it's just nullptr! The character is never actually loaded. And no Character structure is allocated either. Very fishy!
Fix cloning in RawKill() and SaveClone().
The filename of the ship is not renamed. The ship will therefore be duplicated on next reboot.
Simply deleting the old file should do the trick.
The new LuaGetfieldString, LuaGetfieldInt, etc, functions makes the code both shorter and more readable. In addition, they reduce the likelyhood of bugs in loading code.
Just like commands and spells, generate table of specfuns using the make_lookup_table.py
script.
Implement SaveClanStoreroom() using new file format.
LoadAreaFile() is an implementation detail of LegacyAreaRepository, and as such do_loadarea should not have access to it. Find a workaround to this. do_loadarea has been disabled for now.
Both Character and PCData has the attribute std::shared_ptr<Character> Pet
. There's no reason for with. Pick on, and discard the other.
WhereHome should have extra checks. If player owns a home, use that. If not owns, but is resident, use that. Then continue as before.
Player homes don't use new file format.
Without giving it much thought I replaced uses of atoi() and strtol() with std::stoi(). What I didn't consider is that they behave differently in the face of invalid arguments. The old C functions will return zero, but std::stoi() throws std::invalid_argument exception. Problem is that the code doesn't always check the arguments, only the result. Therefor we now get lots of exceptions.
So I need to go through every use of std::stoi() and either change back to atoi/strtol, or use try/catch blocks.
Renaming file like this isn't supported, so the functionality has been removed. This must be fixed.
Create a class that these functions use internally. It should then be possible to substitute this class with a fake or mock during testing to get predictable results.
In the interest of plugins, save skill teachers with tags instead of vnum when available.
As the title says, a character's aliases are saved, but not loaded.
Void pointers is a relic from the past that causes some headaches. For instance, they make using smart pointers harder. And of course there's no such thing as type safety.
Fix at least the following places:
Act()
functionThere's a player vendor in room 4, which means something's wrong. Check it out.
When using slist
without arguments, it's supposed to show all skills for every ability class. But at current it only shows "general" (that is, skills with ability set to "none", which includes languages).
1. The schoolmaster gives you an infinite number of diplomas
2. Saying 'iamauthed' does nothing
Unclear if and how the two are related. Clearly they're not.
The formating option sometimes cuts off the end of the text. Using the AML implementation may be an option.
LoadAreaFile() is an implementation detail of LegacyAreaRepository, and as such do_unfoldarea should not have access to it. Find a workaround to this. do_unfoldarea has been disabled for now.
This is related to #30.
The code that handles docked "slave" ships looks odd at first glance. Shouldn't the slaves' coordinates be updated along with the "dockee" when leaving hyperspace?
Investigate this.
The mob in newbie school that's supposed to give the Luke Skywalker action figure fails to give the toy. It just drops it instead.
Use smart pointers as much as possible. Ideally everywhere.
Ideally everywhere, but at least as much as possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.