mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-22 12:46:40 +01:00
Merge branch 'master' into PS_PORT_SCHEDULER
This commit is contained in:
@@ -130,9 +130,9 @@
|
||||
|
||||
var/offset = 0
|
||||
var/points = round((radius * 2 * M_PI) / arcLength)
|
||||
var/angle = round(ToDegrees(arcLength / radius), 1)
|
||||
var/angle = round(TODEGREES(arcLength / radius), 1)
|
||||
|
||||
if(!IsInteger(radius))
|
||||
if(!ISINTEGER(radius))
|
||||
offset = 45 //degrees
|
||||
|
||||
for(var/j = 0, j < points, j++)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
else
|
||||
new_overlays += "[initial(icon_state)]-powered"
|
||||
|
||||
var/ratio = Ceiling(bcell.percent()/25) * 25
|
||||
var/ratio = CEILING(bcell.percent()/25, 1) * 25
|
||||
new_overlays += "[initial(icon_state)]-charge[ratio]"
|
||||
else
|
||||
new_overlays += "[initial(icon_state)]-nocell"
|
||||
|
||||
@@ -95,6 +95,6 @@
|
||||
usr << "<span class='notice'>You are not adding enough telecrystals to fuel \the [src].</span>"
|
||||
return
|
||||
uses += T.amount/2 //Gives 5 uses per 10 TC
|
||||
uses = ceil(uses) //Ensures no decimal uses nonsense, rounds up to be nice
|
||||
uses = CEILING(uses, 1) //Ensures no decimal uses nonsense, rounds up to be nice
|
||||
usr << "<span class='notice'>You add \the [O] to \the [src]. Increasing the uses of \the [src] to [uses].</span>"
|
||||
qdel(O)
|
||||
@@ -120,10 +120,8 @@
|
||||
++burned_fuel_for
|
||||
if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL)
|
||||
remove_fuel(1)
|
||||
|
||||
if(get_fuel() < 1)
|
||||
setWelding(0)
|
||||
|
||||
//I'm not sure what this does. I assume it has to do with starting fires...
|
||||
//...but it doesnt check to see if the welder is on or not.
|
||||
var/turf/location = src.loc
|
||||
@@ -160,12 +158,8 @@
|
||||
L.IgniteMob()
|
||||
if (istype(location, /turf))
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/weldingtool/attack_self(mob/user as mob)
|
||||
setWelding(!welding, usr)
|
||||
return
|
||||
/obj/item/weapon/weldingtool/attack_self(mob/user)
|
||||
setWelding(!welding, user)
|
||||
|
||||
//Returns the amount of fuel in the welder
|
||||
/obj/item/weapon/weldingtool/proc/get_fuel()
|
||||
@@ -194,7 +188,7 @@
|
||||
|
||||
//Returns whether or not the welding tool is currently on.
|
||||
/obj/item/weapon/weldingtool/proc/isOn()
|
||||
return src.welding
|
||||
return welding
|
||||
|
||||
/obj/item/weapon/weldingtool/update_icon()
|
||||
..()
|
||||
@@ -210,7 +204,7 @@
|
||||
// Fuel counter overlay.
|
||||
if(change_icons && get_max_fuel())
|
||||
var/ratio = get_fuel() / get_max_fuel()
|
||||
ratio = Ceiling(ratio*4) * 25
|
||||
ratio = CEILING(ratio * 4, 1) * 25
|
||||
var/image/I = image(icon, src, "[icon_state][ratio]")
|
||||
overlays.Add(I)
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
// adjust locker size to hold all items with 5 units of free store room
|
||||
var/content_size = 0
|
||||
for(I in src.contents)
|
||||
content_size += Ceiling(I.w_class/2)
|
||||
content_size += CEILING(I.w_class/2, 1)
|
||||
if(content_size > storage_capacity-5)
|
||||
storage_capacity = content_size + 5
|
||||
update_icon()
|
||||
@@ -56,7 +56,7 @@
|
||||
var/content_size = 0
|
||||
for(var/obj/item/I in src.contents)
|
||||
if(!I.anchored)
|
||||
content_size += Ceiling(I.w_class/2)
|
||||
content_size += CEILING(I.w_class/2, 1)
|
||||
if(!content_size)
|
||||
to_chat(user, "It is empty.")
|
||||
else if(storage_capacity > content_size*4)
|
||||
@@ -153,7 +153,7 @@
|
||||
/obj/structure/closet/proc/store_items(var/stored_units)
|
||||
var/added_units = 0
|
||||
for(var/obj/item/I in src.loc)
|
||||
var/item_size = Ceiling(I.w_class / 2)
|
||||
var/item_size = CEILING(I.w_class / 2, 1)
|
||||
if(stored_units + added_units + item_size > storage_capacity)
|
||||
continue
|
||||
if(!I.anchored)
|
||||
|
||||
@@ -449,7 +449,7 @@
|
||||
|
||||
// Damage overlays.
|
||||
var/ratio = health / maxhealth
|
||||
ratio = Ceiling(ratio * 4) * 25
|
||||
ratio = CEILING(ratio * 4, 1) * 25
|
||||
|
||||
if(ratio > 75)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user