Gambling with what breaks and how badly is our pasttime now (#16079)

This commit is contained in:
Fluffy
2023-03-23 22:58:38 +00:00
committed by GitHub
parent f996a324dc
commit 478fe120b2
5 changed files with 58 additions and 4 deletions
+2
View File
@@ -77,6 +77,7 @@
#include "code\__defines\spatial_gridmap.dm"
#include "code\__defines\species.dm"
#include "code\__defines\species_languages.dm"
#include "code\__defines\stack_trace.dm"
#include "code\__defines\subsystem-defines.dm"
#include "code\__defines\subsystem-priority.dm"
#include "code\__defines\targeting.dm"
@@ -118,6 +119,7 @@
#include "code\_helpers\sanitize_values.dm"
#include "code\_helpers\spatial_info.dm"
#include "code\_helpers\spawn_sync.dm"
#include "code\_helpers\stack_trace.dm"
#include "code\_helpers\text.dm"
#include "code\_helpers\time.dm"
#include "code\_helpers\turfs.dm"
+2
View File
@@ -0,0 +1,2 @@
/// gives us the stack trace from CRASH() without ending the current proc.
#define stack_trace(message) _stack_trace(message, __FILE__, __LINE__)
+4
View File
@@ -0,0 +1,4 @@
/// gives us the stack trace from CRASH() without ending the current proc.
/// Do not call directly, use the [stack_trace] macro instead.
/proc/_stack_trace(message, file, line)
CRASH("[message] ([file]:[line])")
+8 -4
View File
@@ -26,12 +26,16 @@
/obj/structure/lattice/Initialize()
. = ..()
// TG does not have this, and it seems to trigger on the horizon, I do not know what this is supposed to do, perhaps we could get rid of it?
if (restrict_placement)
if(!(istype(loc, /turf/space) || isopenturf(loc) || istype(loc, /turf/unsimulated/floor/asteroid)))
return INITIALIZE_HINT_QDEL
for(var/obj/structure/lattice/LAT in loc)
if(LAT != src)
qdel(LAT)
if(LAT == src)
continue
stack_trace("multiple lattices found in ([loc.x], [loc.y], [loc.z])")
return INITIALIZE_HINT_QDEL
if(isturf(loc))
var/turf/turf = loc
turf.is_hole = FALSE
@@ -136,7 +140,7 @@
damaged = TRUE
/obj/structure/lattice/catwalk/indoor/grate/damaged/Initialize()
.=..()
. = ..()
icon_state = "[base_icon_state]_dam[rand(0,3)]"
/obj/structure/lattice/catwalk/indoor/grate/light
@@ -152,7 +156,7 @@
damaged = TRUE
/obj/structure/lattice/catwalk/indoor/grate/light/damaged/Initialize()
.=..()
. = ..()
icon_state = "[base_icon_state]_dam[rand(0,3)]"
/obj/structure/lattice/catwalk/indoor/grate/attackby(obj/item/C, mob/user)
@@ -0,0 +1,42 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: Fluffyghost
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "Fix lattice Initialize, as it was QDELing directly instead of returning a QDEL HINT."
- backend: "Implemented stack_trace(), a version of CRASH() that does not end the current proc, from /tg/."