[5654] Makes this PR Compile

This one made me cry.
This commit is contained in:
Unknown
2019-02-23 12:30:16 -05:00
parent fc178c1e04
commit a4317b1910
19 changed files with 36 additions and 679 deletions
@@ -60,7 +60,7 @@
/datum/category_item/player_setup_item/vore/size/OnTopic(var/href, var/list/href_list, var/mob/user)
if(href_list["size_multiplier"])
var/new_size = input(user, "Choose your character's size, ranging from 25% to 200%", "Set Size") as num|null
if (!IsInRange(new_size,25,200))
if (!ISINRANGE(new_size,25,200))
pref.size_multiplier = 1
user << "<span class='notice'>Invalid size.</span>"
return TOPIC_REFRESH_UPDATE_PREVIEW
@@ -85,7 +85,7 @@
H.update_icons() //Just want the matrix transform
return
if (!IsInRange(new_size,25,200))
if (!ISINRANGE(new_size,25,200))
to_chat(H,"<span class='notice'>The safety features of the uniform prevent you from choosing this size.</span>")
return
+1 -5
View File
@@ -58,12 +58,8 @@
infectedMachine.shut_up = 0
infectedMachine.shoot_inventory = 1
<<<<<<< HEAD
if(IsMultiple(activeFor, 12))
/* VORESTATION Removal - Using the pick below.
=======
if(ISMULTIPLE(activeFor, 12))
>>>>>>> 8da11c1... Makes math helpers defines for performance (#5654)
/* VORESTATION Removal - Using the pick below.
originMachine.speak(pick("Try our aggressive new marketing strategies!", \
"You should buy products to feed your lifestyle obsession!", \
"Consume!", \
+2 -2
View File
@@ -213,7 +213,7 @@
var/amount_to_take = min(I.reagents.get_reagent_amount(reagent_id), qty_need)
if(amount_to_take >= 1)
I.reagents.remove_reagent(reagent_id, amount_to_take, safety = 1)
qty_need = Ceiling(qty_need - amount_to_take)
qty_need = CEILING((qty_need - amount_to_take), 1)
return 1
else
log_debug("supply_demand event: not taking reagent '[reagent_id]': [amount_to_take]")
@@ -342,6 +342,6 @@
var/datum/alloy/A = pick(types)
types -= A // Don't pick the same thing twice
var/chosen_path = initial(A.product)
var/chosen_qty = Floor(rand(5, 100) * initial(A.product_mod))
var/chosen_qty = FLOOR(rand(5, 100) * initial(A.product_mod), 1)
required_items += new /datum/supply_demand_order/thing(chosen_qty, chosen_path)
return
@@ -213,7 +213,7 @@
return //Quietly fail
var/actually_added = refactory.add_stored_material(substance,howmuch*matstack.perunit)
matstack.use(Ceiling(actually_added/matstack.perunit))
matstack.use(CEILING((actually_added/matstack.perunit), 1))
if(actually_added && actually_added < howmuch)
to_chat(src,"<span class='warning'>Your refactory module is now full, so only [actually_added] units were stored.</span>")
visible_message("<span class='notice'>[src] nibbles some of the [substance] right off the stack!</span>")
@@ -283,7 +283,7 @@
var/nagmessage = "Adjust your mass to be a size between 25 to 200%. Up-sizing consumes metal, downsizing returns metal."
var/new_size = input(user, nagmessage, "Pick a Size", user.size_multiplier*100) as num|null
if(!new_size || !IsInRange(new_size,25,200))
if(!new_size || !ISINRANGE(new_size,25,200))
return
var/size_factor = new_size/100
+4 -4
View File
@@ -64,14 +64,14 @@
#define MAX_HUGE_MESSAGE_LEN 8192
#define POST_DELIMITER_STR "\<\>"
/proc/sanitize_or_reflect(message,user)
/proc/sanitize_or_reflect(message,user)
//Way too long to send
if(length(message) > MAX_HUGE_MESSAGE_LEN)
fail_to_chat(user)
return
message = sanitize(message, max_length = MAX_HUGE_MESSAGE_LEN)
//Came back still too long to send
if(length(message) > MAX_MESSAGE_LEN)
fail_to_chat(user,message)
@@ -83,9 +83,9 @@
if(!message)
to_chat(user,"<span class='danger'>Your message was NOT SENT, either because it was FAR too long, or sanitized to nothing at all.</span>")
return
var/length = length(message)
var/posts = Ceiling(length/MAX_MESSAGE_LEN)
var/posts = CEILING((length/MAX_MESSAGE_LEN), 1)
to_chat(user,message)
to_chat(user,"<span class='danger'>^ This message was NOT SENT ^ -- It was [length] characters, and the limit is [MAX_MESSAGE_LEN]. It would fit in [posts] separate messages.</span>")
#undef MAX_HUGE_MESSAGE_LEN
+2 -2
View File
@@ -71,7 +71,7 @@
return FALSE
stat_text()
return "[active ? "Active" : "Disabled"] (Stored Heat: [Floor(used/20)]%)"
return "[active ? "Active" : "Disabled"] (Stored Heat: [FLOOR((used/20), 1)]%)"
life()
if((. = ..()))
@@ -129,7 +129,7 @@
if((. = ..()))
var/new_size = input("Put the desired size (25-200%)", "Set Size", 200) as num
if (!IsInRange(new_size,25,200))
if (!ISINRANGE(new_size,25,200))
to_chat(nif.human,"<span class='notice'>The safety features of the NIF Program prevent you from choosing this size.</span>")
return
else
+1 -1
View File
@@ -310,7 +310,7 @@
if(href_list["size_multiplier"])
var/new_size = input(user, "Choose your character's size, ranging from 25% to 200%", "Character Preference") as num|null
if(new_size && IsInRange(new_size,25,200))
if(new_size && ISINRANGE(new_size,25,200))
active_br.sizemult = (new_size/100)
preview_icon = null
return 1
+1 -1
View File
@@ -138,7 +138,7 @@
occupant.adjustCloneLoss(-2 * heal_rate)
//Premature clones may have brain damage.
occupant.adjustBrainLoss(-(ceil(0.5*heal_rate)))
occupant.adjustBrainLoss(-(CEILING((0.5*heal_rate), 1)))
//So clones don't die of oxyloss in a running pod.
if(occupant.reagents.get_reagent_amount("inaprovaline") < 30)
+3 -3
View File
@@ -73,7 +73,7 @@
return ..()
/obj/machinery/computer/telescience/proc/get_max_allowed_distance()
return Floor(crystals.len * telepad.efficiency * powerCoefficient)
return FLOOR((crystals.len * telepad.efficiency * powerCoefficient), 1)
/obj/machinery/computer/telescience/attack_ai(mob/user)
src.attack_hand(user)
@@ -97,7 +97,7 @@
data["cooldown"] = max(0, min(100, round(teleport_cooldown - world.time) / 10))
data["crystalCount"] = crystals.len
data["maxCrystals"] = max_crystals
data["maxPossibleDistance"] = Floor(max_crystals * powerCoefficient * 6); // max efficiency is 6
data["maxPossibleDistance"] = FLOOR((max_crystals * powerCoefficient * 6), 1); // max efficiency is 6
data["maxAllowedDistance"] = get_max_allowed_distance()
data["distance"] = distance
@@ -328,7 +328,7 @@
if(..()) // Check after we input a value, as they could've moved after they entered something
return
distance = Clamp(new_pow, 1, get_max_allowed_distance())
distance = Floor(distance)
distance = FLOOR(distance, 1)
if(href_list["setz"])
var/new_z = text2num(href_list["setz"])
-20
View File
@@ -59,13 +59,8 @@
if(NORTH)
<<<<<<< HEAD
int_panel_x = ux + Floor(lift_size_x/2)
int_panel_y = uy + (make_walls ? 1 : 0)
=======
int_panel_x = ux + FLOOR(lift_size_x/2, 1)
int_panel_y = uy + 1
>>>>>>> 8da11c1... Makes math helpers defines for performance (#5654)
ext_panel_x = ux
ext_panel_y = ey + 2
@@ -81,13 +76,8 @@
if(SOUTH)
<<<<<<< HEAD
int_panel_x = ux + Floor(lift_size_x/2)
int_panel_y = ey - (make_walls ? 1 : 0)
=======
int_panel_x = ux + FLOOR(lift_size_x/2, 1)
int_panel_y = ey - 1
>>>>>>> 8da11c1... Makes math helpers defines for performance (#5654)
ext_panel_x = ex
ext_panel_y = uy - 2
@@ -103,13 +93,8 @@
if(EAST)
<<<<<<< HEAD
int_panel_x = ux + (make_walls ? 1 : 0)
int_panel_y = uy + Floor(lift_size_y/2)
=======
int_panel_x = ux+1
int_panel_y = uy + FLOOR(lift_size_y/2, 1)
>>>>>>> 8da11c1... Makes math helpers defines for performance (#5654)
ext_panel_x = ex+2
ext_panel_y = ey
@@ -125,13 +110,8 @@
if(WEST)
<<<<<<< HEAD
int_panel_x = ex - (make_walls ? 1 : 0)
int_panel_y = uy + Floor(lift_size_y/2)
=======
int_panel_x = ex-1
int_panel_y = uy + FLOOR(lift_size_y/2, 1)
>>>>>>> 8da11c1... Makes math helpers defines for performance (#5654)
ext_panel_x = ux-2
ext_panel_y = uy
+2 -2
View File
@@ -634,7 +634,7 @@
if(new_bulge == 0) //Disable.
selected.bulge_size = 0
to_chat(user,"<span class='notice'>Your stomach will not be seen on examine.</span>")
else if (!IsInRange(new_bulge,25,200))
else if (!ISINRANGE(new_bulge,25,200))
selected.bulge_size = 0.25 //Set it to the default.
to_chat(user,"<span class='notice'>Invalid size.</span>")
else if(new_bulge)
@@ -644,7 +644,7 @@
var/new_grow = input(user, "Choose the size that prey will be grown/shrunk to, ranging from 25% to 200%", "Set Growth Shrink Size.", selected.shrink_grow_size) as num|null
if (new_grow == null)
return
if (!IsInRange(new_grow,25,200))
if (!ISINRANGE(new_grow,25,200))
selected.shrink_grow_size = 1 //Set it to the default
to_chat(user,"<span class='notice'>Invalid size.</span>")
else if(new_grow)
+2 -2
View File
@@ -134,7 +134,7 @@
add_overlay(barrel_color)
//Charge bar
var/ratio = Ceiling((charge_left / max_charge) * charge_sections)
var/ratio = CEILING(((charge_left / max_charge) * charge_sections), 1)
for(var/i = 0, i < ratio, i++)
var/image/charge_bar = image(icon, icon_state = "[initial(icon_state)]_charge")
charge_bar.pixel_x = i
@@ -174,7 +174,7 @@
add_overlay(cap)
if(batt.shots_left)
var/ratio = Ceiling((batt.shots_left / initial(batt.shots_left)) * 4) //4 is how many lights we have a sprite for
var/ratio = CEILING(((batt.shots_left / initial(batt.shots_left)) * 4), 1) //4 is how many lights we have a sprite for
var/image/charge = image(icon, icon_state = "[initial(icon_state)]_charge-[ratio]")
charge.color = "#29EAF4" //Could use battery color but eh.
charge.pixel_x = current * x_offset
@@ -72,7 +72,7 @@
itemState += "[modifystate]"
*/
if(power_supply)
ratio = Ceiling((power_supply.charge / power_supply.maxcharge) * charge_sections)
ratio = CEILING(((power_supply.charge / power_supply.maxcharge) * charge_sections), 1)
if(power_supply.charge < charge_cost)
overlays += "[icon_state]_empty"
+1 -1
View File
@@ -109,7 +109,7 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
var/nagmessage = "Adjust your mass to be a size between 25 to 200% (DO NOT ABUSE)"
var/new_size = input(nagmessage, "Pick a Size") as num|null
if(new_size && IsInRange(new_size,25,200))
if(new_size && ISINRANGE(new_size,25,200))
src.resize(new_size/100)
message_admins("[key_name(src)] used the resize command in-game to be [new_size]% size. \
([src ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>" : "null"])")