Skip to content

Commit

Permalink
Refines some stuff
Browse files Browse the repository at this point in the history
Cleaned up some shitty code and improved the repair process
  • Loading branch information
BogCreature committed Nov 6, 2023
1 parent 7bdfe74 commit 5bf7c13
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
3 changes: 3 additions & 0 deletions code/datums/components/spawner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
START_PROCESSING(SSprocessing, src)

/datum/component/spawner/process()
if(!parent) //Sanity check for instances where the spawner may be sleeping while the parent is destroyed
Destroy(TRUE,FALSE)
return
if(spawning_paused)
sleep(wave_downtime)
spawning_paused = FALSE
Expand Down
2 changes: 0 additions & 2 deletions code/game/objects/items/pinpointer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
. = ..()
if(!active)
return
if(target.loc == null)
return
if(!target)
. += "pinon[alert ? "alert" : ""]null[icon_suffix]"
return
Expand Down
26 changes: 16 additions & 10 deletions code/modules/mining/drill.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,23 @@
break
return
if(tool.tool_behaviour == TOOL_MULTITOOL && malfunction == MALF_CALIBRATE)
playsound()
do_after(user,(100*tool.toolspeed),src)
malfunction = null
obj_integrity = max_integrity
return
user.visible_message("<span class='notice'>[user] begins recalibrating [src].</span>", \
"<span class='notice'>You begin recalibrating [src]...</span>")
if(tool.use_tool(src, user, 100, volume=50))
malfunction = null
obj_integrity = max_integrity
return
if(tool.tool_behaviour == TOOL_WELDER && malfunction == MALF_STRUCTURAL)
playsound()
do_after(user,(100*tool.toolspeed),src)
malfunction = null
obj_integrity = max_integrity
return
if(!tool.tool_start_check(user, amount=0))
return
user.visible_message("<span class='notice'>[user] begins repairing [src].</span>", \
"<span class='notice'>You begin repairing [src]...</span>", \
"<span class='hear'>You hear welding.</span>")
if(tool.use_tool(src, user, 100, volume=50))
playsound()
malfunction = null
obj_integrity = max_integrity
return
if(istype(tool, /obj/item/stock_parts/cell))
var/obj/item/stock_parts/cell/battery = tool
if(cell)
Expand Down
2 changes: 0 additions & 2 deletions code/modules/mining/ore_veins.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ GLOBAL_LIST_EMPTY(ore_veins)
/mob/living/simple_animal/hostile/asteroid/goliath/beast = 60,
/mob/living/simple_animal/hostile/asteroid/hivelord/legion/tendril = 20,
/mob/living/simple_animal/hostile/asteroid/brimdemon = 20,
/mob/living/simple_animal/hostile/asteroid/goliath/beast/ancient/crystal = 1,
/mob/living/simple_animal/hostile/asteroid/hivelord/legion/crystal = 1,
)
var/spawn_text = "emerges from"
var/faction = list("hostile","mining")
Expand Down

0 comments on commit 5bf7c13

Please sign in to comment.