Skip to content

Commit

Permalink
stops structures from being built on dense objects
Browse files Browse the repository at this point in the history
  • Loading branch information
VileBeggar committed Jul 31, 2024
1 parent 22a7cd1 commit fb3ceb9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/game/objects/items/frames/table_rack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@
if(istype(get_area(loc), /area/shuttle)) //HANGAR/SHUTTLE BUILDING
to_chat(user, SPAN_WARNING("No. This area is needed for the dropship."))
return

for(var/obj/object in OT)
if(object.density)
to_chat(user, SPAN_WARNING("[object] is blocking you from constructing the table!"))
return
if(!do_after(user, 3 SECONDS, INTERRUPT_ALL, BUSY_ICON_BUILD))
to_chat(user, SPAN_WARNING("Hold still while you're constructing a table!"))
return
Expand Down
6 changes: 6 additions & 0 deletions code/game/objects/items/stacks/stack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ Also change the icon to reflect the amount of sheets, if possible.*/
to_chat(usr, SPAN_WARNING("The [R.title] cannot be constructed on a tunnel!"))
return

if(R.one_per_turf != ONE_TYPE_PER_BORDER) //all barricade-esque structures utilize this define and have their own check for object density. checking twice is unneeded.
for(var/obj/object in usr.loc)
if(object.density)
to_chat(usr, SPAN_WARNING("[object] is blocking you from constructing \the [R.title]."))
return

if((R.flags & RESULT_REQUIRES_SNOW) && !(istype(usr.loc, /turf/open/snow) || istype(usr.loc, /turf/open/auto_turf/snow)))
to_chat(usr, SPAN_WARNING("The [R.title] must be built on snow!"))
return
Expand Down

0 comments on commit fb3ceb9

Please sign in to comment.