fixes some severe frame bugs (#6478)

This commit is contained in:
silicons
2024-05-31 12:22:16 +02:00
committed by GitHub
parent 72a17fbcf6
commit 8a0019d214
2 changed files with 8 additions and 11 deletions
+7 -10
View File
@@ -416,6 +416,9 @@ GLOBAL_LIST_INIT(frame_datum_lookup, init_frame_datums())
return FALSE
if(!frame_step.check_consumption(actor, using_item, src, frame))
return FALSE
if(frame_step.stage == FRAME_STAGE_FINISH)
if(!completion_checks(frame, frame.loc, frame.dir, actor))
return FALSE
frame_step.feedback_begin(
actor,
src,
@@ -429,6 +432,9 @@ GLOBAL_LIST_INIT(frame_datum_lookup, init_frame_datums())
return FALSE
if(!frame_step.handle_consumption(actor, using_item, src, frame))
return FALSE
if(frame_step.stage == FRAME_STAGE_FINISH)
if(!completion_checks(frame, frame.loc, frame.dir, actor))
return FALSE
frame_step.feedback_finish(
actor,
src,
@@ -440,15 +446,6 @@ GLOBAL_LIST_INIT(frame_datum_lookup, init_frame_datums())
move_frame_to(frame, stage_we_were_in, frame_step.stage, actor)
return TRUE
/**
* @return finished product if finished
*/
/datum/frame2/proc/try_finish_frame(obj/structure/frame2/frame, datum/event_args/actor/actor, destroy_structure = TRUE)
ASSERT(isturf(frame.loc))
if(!completion_checks(frame, frame.loc, frame.dir, actor))
return
return finish_frame(frame, destroy_structure)
/**
* ran only on deployment, not completion
* * also ran when anchoring a frame down
@@ -482,7 +479,7 @@ GLOBAL_LIST_INIT(frame_datum_lookup, init_frame_datums())
else
if(other_frame.dir == frame.dir)
return FALSE
return TRUE
return valid_location(frame, location, dir, actor, silent)
/**
* ran on deployment as well as completion
+1 -1
View File
@@ -21,7 +21,7 @@
. = ..()
if(!isnull(frame))
src.frame = frame
else if(ispath(src.frame))
if(ispath(src.frame))
src.frame = fetch_frame_datum(src.frame)
sync_frame(src.frame)