Moves to BYOND 513 (#13650)

* Fixes Orbiting

* moves to 513

* travis update

* check for minor version too
This commit is contained in:
Fox McCloud
2020-06-26 03:15:59 -04:00
committed by GitHub
parent 1b6292de88
commit b3d69aac9b
123 changed files with 427 additions and 421 deletions
@@ -383,7 +383,7 @@
/obj/item/ammo_box/magazine/m12g/update_icon()
..()
icon_state = "[initial(icon_state)]-[Ceiling(ammo_count(0)/8)*8]"
icon_state = "[initial(icon_state)]-[CEILING(ammo_count(0)/8, 1)*8]"
/obj/item/ammo_box/magazine/m12g/buckshot
name = "shotgun magazine (12g buckshot slugs)"
@@ -494,7 +494,7 @@
/obj/item/ammo_box/magazine/laser/update_icon()
..()
icon_state = "[initial(icon_state)]-[Ceiling(ammo_count(0)/20)*20]"
icon_state = "[initial(icon_state)]-[CEILING(ammo_count(0)/20, 1)*20]"
/obj/item/ammo_box/magazine/toy/smgm45
name = "donksoft SMG magazine"
+1 -1
View File
@@ -96,7 +96,7 @@
var/ox = round(screenview/2) //"origin" x
var/oy = round(screenview/2) //"origin" y
var/angle = Atan2(y - oy, x - ox)
var/angle = ATAN2(y - oy, x - ox)
Angle = angle
if(spread)
Angle += spread
+1 -1
View File
@@ -136,7 +136,7 @@
/obj/item/gun/energy/update_icon()
overlays.Cut()
var/ratio = Ceiling((cell.charge / cell.maxcharge) * charge_sections)
var/ratio = CEILING((cell.charge / cell.maxcharge) * charge_sections, 1)
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
var/iconState = "[icon_state]_charge"
var/itemState = null
+2 -2
View File
@@ -12,9 +12,9 @@
/obj/item/gun/magic/wand/New()
if(prob(75) && variable_charges) //25% chance of listed max charges, 50% chance of 1/2 max charges, 25% chance of 1/3 max charges
if(prob(33))
max_charges = Ceiling(max_charges / 3)
max_charges = CEILING(max_charges / 3, 1)
else
max_charges = Ceiling(max_charges / 2)
max_charges = CEILING(max_charges / 2, 1)
..()
/obj/item/gun/magic/wand/examine(mob/user)
@@ -112,7 +112,7 @@
/obj/item/gun/projectile/automatic/c20r/update_icon()
..()
icon_state = "c20r[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
icon_state = "c20r[magazine ? "-[CEILING(get_ammo(0)/4, 1)*4]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
//WT550//
/obj/item/gun/projectile/automatic/wt550
@@ -134,7 +134,7 @@
/obj/item/gun/projectile/automatic/wt550/update_icon()
..()
icon_state = "wt550[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""]"
icon_state = "wt550[magazine ? "-[CEILING(get_ammo(0)/4, 1)*4]" : ""]"
//Type-U3 Uzi//
/obj/item/gun/projectile/automatic/mini_uzi
@@ -194,8 +194,8 @@
overlays += "[initial(icon_state)]gren"
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
if(magazine)
overlays += image(icon = icon, icon_state = "m90-[Ceiling(get_ammo(0)/6)*6]")
item_state = "m90-[Ceiling(get_ammo(0)/7.5)]"
overlays += image(icon = icon, icon_state = "m90-[CEILING(get_ammo(0)/6, 1)*6]")
item_state = "m90-[CEILING(get_ammo(0)/7.5, 1)]"
else
item_state = "m90-0"
return
@@ -303,4 +303,4 @@
/obj/item/gun/projectile/automatic/lasercarbine/update_icon()
..()
icon_state = "lasercarbine[magazine ? "-[Ceiling(get_ammo(0)/5)*5]" : ""]"
icon_state = "lasercarbine[magazine ? "-[CEILING(get_ammo(0)/5, 1)*5]" : ""]"
@@ -23,7 +23,7 @@
update_icon()
/obj/item/gun/projectile/automatic/l6_saw/update_icon()
icon_state = "l6[cover_open ? "open" : "closed"][magazine ? Ceiling(get_ammo(0)/12.5)*25 : "-empty"][suppressed ? "-suppressed" : ""]"
icon_state = "l6[cover_open ? "open" : "closed"][magazine ? CEILING(get_ammo(0)/12.5, 1)*25 : "-empty"][suppressed ? "-suppressed" : ""]"
item_state = "l6[cover_open ? "openmag" : "closedmag"]"
/obj/item/gun/projectile/automatic/l6_saw/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params) //what I tried to do here is just add a check to see if the cover is open or not and add an icon_state change because I can't figure out how c-20rs do it with overlays
@@ -132,13 +132,13 @@
switch(choice)
if(XBOW_TENSION_20)
drawtension = Ceiling(0.2 * maxtension)
drawtension = CEILING(0.2 * maxtension, 1)
if(XBOW_TENSION_40)
drawtension = Ceiling(0.4 * maxtension)
drawtension = CEILING(0.4 * maxtension, 1)
if(XBOW_TENSION_60)
drawtension = Ceiling(0.6 * maxtension)
drawtension = CEILING(0.6 * maxtension, 1)
if(XBOW_TENSION_80)
drawtension = Ceiling(0.8 * maxtension)
drawtension = CEILING(0.8 * maxtension, 1)
if(XBOW_TENSION_FULL)
drawtension = maxtension
+5 -5
View File
@@ -175,7 +175,7 @@
/obj/item/projectile/proc/vol_by_damage()
if(damage)
return Clamp((damage) * 0.67, 30, 100)// Multiply projectile damage by 0.67, then clamp the value between 30 and 100
return clamp((damage) * 0.67, 30, 100)// Multiply projectile damage by 0.67, then clamp the value between 30 and 100
else
return 50 //if the projectile doesn't do damage, play its hitsound at 50% volume
@@ -199,7 +199,7 @@
def_zone = ran_zone(def_zone, max(100-(7*distance), 5)) //Lower accurancy/longer range tradeoff. 7 is a balanced number to use.
if(isturf(A) && hitsound_wall)
var/volume = Clamp(vol_by_damage() + 20, 0, 100)
var/volume = clamp(vol_by_damage() + 20, 0, 100)
if(suppressed)
volume = 5
playsound(loc, hitsound_wall, volume, 1, -1)
@@ -239,7 +239,7 @@
while(loc)
if(!paused)
if((!( current ) || loc == current))
current = locate(Clamp(x+xo,1,world.maxx),Clamp(y+yo,1,world.maxy),z)
current = locate(clamp(x+xo,1,world.maxx),clamp(y+yo,1,world.maxy),z)
if(isnull(Angle))
Angle=round(Get_Angle(src,current))
if(spread)
@@ -292,7 +292,7 @@
while(loc)
if(!paused)
if((!( current ) || loc == current))
current = locate(Clamp(x+xo,1,world.maxx),Clamp(y+yo,1,world.maxy),z)
current = locate(clamp(x+xo,1,world.maxx),clamp(y+yo,1,world.maxy),z)
step_towards(src, current)
if(original && (original.layer>=2.75) || ismob(original))
if(loc == get_turf(original))
@@ -311,7 +311,7 @@ obj/item/projectile/proc/reflect_back(atom/source, list/position_modifiers = lis
firer = source // The reflecting mob will be the new firer
else
firer = null // Reflected by something other than a mob so firer will be null
// redirect the projectile
original = locate(new_x, new_y, z)
starting = curloc