Skip to content

Commit

Permalink
Shipbreaker blueshift bugfix (#5201)
Browse files Browse the repository at this point in the history
* fixed some shitbreaker buigs

* im a dumb idiot

* linter fixes
  • Loading branch information
ThePooba authored Jan 31, 2025
1 parent 89f96db commit 1118b24
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
26 changes: 13 additions & 13 deletions _maps/map_files/BoxStation/BoxStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -94874,7 +94874,7 @@ sxb
ksa
uoo
ksa
aVH
vCp
ksa
gwf
txb
Expand Down Expand Up @@ -95131,7 +95131,7 @@ sxb
uoo
uoo
uoo
aVH
vCp
uoo
gwf
gwf
Expand Down Expand Up @@ -95386,9 +95386,9 @@ uoo
ksa
uoo
ksa
ksa
ksa
aVH
jra
vCp
vCp
ksa
ksa
ksa
Expand Down Expand Up @@ -95643,9 +95643,9 @@ fdt
fdt
fdt
ksa
uoo
ksa
ksa
aVH
vCp
uoo
uoo
uoo
Expand Down Expand Up @@ -95900,9 +95900,9 @@ ksa
ksa
ksa
ksa
uoo
ksa
ksa
aVH
vCp
ksa
ksa
ksa
Expand Down Expand Up @@ -96157,9 +96157,9 @@ ksa
ksa
ksa
ksa
ksa
ksa
aVH
jra
vCp
vCp
ksa
ksa
ksa
Expand Down Expand Up @@ -96414,7 +96414,7 @@ ksa
ksa
ksa
ksa
ksa
uoo
ksa
aVH
ksa
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
var/ship_health = 0
///our initial turf count
var/turf_count = 0
var/ship_part = 0
var/total_turf = 0

/obj/machinery/computer/shipbreaker/Initialize(mapload)
..()
Expand Down Expand Up @@ -56,7 +58,7 @@

/obj/machinery/computer/shipbreaker/proc/area_clear_check()
for(var/turf/t in linked)
if(!isspaceturf(t))
if(!isgroundlessturf(t))
spawn_area_clear = FALSE
say("FLOORING OR WALL DETECTED")
return
Expand Down Expand Up @@ -108,14 +110,18 @@

/obj/machinery/computer/shipbreaker/proc/setup_health_tracker()
for(var/turf/turf in linked)
if(!isspaceturf(turf))
if(!isgroundlessturf(turf))
turf_count++
RegisterSignal(turf, COMSIG_TURF_CHANGE, PROC_REF(modify_health))
total_turf = turf_count
ship_part = (100 / turf_count)
ship_health = 100

/obj/machinery/computer/shipbreaker/proc/modify_health(turf/source)
ship_health -= (100 / turf_count)
ship_health -= ((total_turf - turf_count) * ship_part)
ship_health = max(ship_health, 0)
if(ship_health < 1)
ship_health = 0


/obj/machinery/computer/shipbreaker/proc/damage_ship()
Expand Down

0 comments on commit 1118b24

Please sign in to comment.