mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Fixes runtime when thermiting a wall
Fixes not being able to put down a chair on a tile with a border window. Fixes Borg module cycling not working when the first module is empty.
This commit is contained in:
@@ -253,7 +253,7 @@
|
||||
if(istype(A,/obj/structure/chair))
|
||||
user << "<span class='danger'>There is already a chair here.</span>"
|
||||
return
|
||||
if(A.density)
|
||||
if(A.density && !(A.flags & ON_BORDER))
|
||||
user << "<span class='danger'>There is already something here.</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -226,11 +226,12 @@
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
if(thermite >= 50)
|
||||
var/burning_time = max(100,300 - thermite)
|
||||
var/turf/open/floor/F = ChangeTurf(/turf/open/floor/plating)
|
||||
F.burn_tile()
|
||||
F.icon_state = "wall_thermite"
|
||||
F.add_hiddenprint(user)
|
||||
spawn(max(100,300-thermite))
|
||||
spawn(burning_time)
|
||||
if(O)
|
||||
qdel(O)
|
||||
else
|
||||
|
||||
@@ -198,25 +198,25 @@
|
||||
//cycle_modules() - Cycles through the list of selected modules.
|
||||
/mob/living/silicon/robot/proc/cycle_modules()
|
||||
var/slot_start = get_selected_module()
|
||||
if(slot_start) deselect_module(slot_start) //Only deselect if we have a selected slot.
|
||||
if(slot_start)
|
||||
deselect_module(slot_start) //Only deselect if we have a selected slot.
|
||||
|
||||
var/slot_num
|
||||
if(slot_start == 0)
|
||||
slot_num = 1
|
||||
slot_start = 2
|
||||
slot_start = 4
|
||||
else
|
||||
slot_num = slot_start + 1
|
||||
|
||||
while(slot_start != slot_num) //If we wrap around without finding any free slots, just give up.
|
||||
while(slot_num != slot_start) //If we wrap around without finding any free slots, just give up.
|
||||
if(module_active(slot_num))
|
||||
select_module(slot_num)
|
||||
return
|
||||
slot_num++
|
||||
if(slot_num > 3) slot_num = 1 //Wrap around.
|
||||
if(slot_num > 4) // not >3 otherwise cycling with just one item on module 3 wouldn't work
|
||||
slot_num = 1 //Wrap around.
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/robot/swap_hand()
|
||||
cycle_modules()
|
||||
return
|
||||
Reference in New Issue
Block a user