| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Sometimes, they're there to emphasize a break between two sections of code,
which is good. In a majority of cases, though, they're just inconsistent.
|
|
|
|
| |
Previously this couldn't be done so materials would be random in Dis.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I had to rename distance() (in coord.h) to distance2() because it conflicts
with the STL function to compare 2 iterators. Not a bad change given how it
returns the square of the distance anyway.
I also had to rename the message global variable (in message.cc) to buffer.
I tried to fix and improve the coding style has much as I could, but I
probably missed a few given how huge and tedious it is.
I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool
and util/levcomp.*, because I have no clue about those.
|
|
|
|
|
|
|
|
|
| |
This avoids unnecessary non-inlined copies.
Also, we had a few large functions that had no reason for inlining, let's
have them be regular ones.
I also made "static inline" always use the same order, for easier grepping.
|
| |
|
| |
|
|
|
|
|
|
| |
In portable code, basically every use of long or %ld/%lu/%lx is a bug.
A legitimate use in Crawl is the bit array: storing it in-memory should be
preferably done a word at a time.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Like full_describe_view(), we get the extra items from the stash
tracker; on untracked levels we can get only the top.
Difficulties arise because the stash tracker returns item_defs on the
stack where they cannot safely be pointed to. To handle this properly,
item_wrapper gains a new boolean member indicating whether the item_def
is a temporary copy (as opposed to an element of mitm, for example); a
new C function clua_push_item_temp() allocates a copy of an item_def and
creates such a wrapper. If the temporary flag is true, the item_def
will be freed when the wrapper is GCed.
|
| | |
|
|\| |
|
| | |
|
|/ |
|
|
|
|
|
|
|
| |
"File:" is shown in your editor's status bar.
"Written by:" was used only for the first person who changed a file. We got
git for that now, and pre-DCSS history is so woefully inaccurate it doesn't
really matter.
|
|
|
|
|
|
| |
I did review it manually to find places where they made sense (like some
tables), but for a massive sed job like this there might be places that
I missed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add item property CORPSE_NO_DECAY to disallow decay on
corpses/skeletons/chunks.
Wizmode &% now creates an item using the .des file item name parser; &o remains
the old wizmode item-gen command.
Corpse decay for corpses placed by maps can be controlled using
dgn.delayed_decay.
|
| |
|
|
|
|
| |
only on the same turn the items were wrapped for Lua by the core C++ code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Like the monster library, the item library now uses a metatable to store
its functions. Instead of using lightuserdata, as before, and passing
this to the different item.* functions, the functions are now members of
the actual item.
The item library has also been renamed to "items": this allows for its
use in Vault definitions without it clashing with the item specifier and
dgn.item function.
Example:
* Previously, you would use:
local x = item.inventory()[1]
print(item.name(x, false))
* Now, you would use:
local x = items.inventory()[1]
print(x.name(false))
This will have an impact on end-user scripts that use the old version of
the item library. I have already updated the uses of the items library
in the dat/lua scripts, as well as vault definitions and marker
definitions. I think I've caught them all.
There may be bugs or issues, but hopefully that's everything. (Does
cause issues with annotations such as {artefact}, will be fixed
shortly.)
|
|
|
|
|
|
| |
entrances could be blocked by rock.
shoal-hut.lua test generates 1k Shoal:$ levels and verifies that the levels pass sanity tests.
|
|
|
|
|
|
|
| |
This lets regular vaults use the same Lua functions that layout vaults
do. Convert functions in l_dgnbld that acted on grd. Update layout
vaults to use these new functions. Also, remove l_dgn_bf, as all of
its functionality is now in l_dgnbld.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
simultaneously.
synchronized_markers() takes a marker, and a list of method names to override,
and returns a set of markers that fire simultaneously, to allow, say, fog
machines that fire at random intervals, but always fire in unison. lm_mslav.lua
has details. volcano.des has an example volcano entry vault that uses this.
Allow fetching a list of Lua markers/marker positions by property value.
Renamed dgn.find_marker_prop -> dgn.find_marker_position_by_prop.
s/helper/listener/ for fog machine listeners.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
cluautil.cc should eventually contain all of the functions
for passing objects from and to lua, at least the shared
ones.
Also cut down on clua.cc include list.
|