Skip to content

Commit

Permalink
n_ceil() to Ceiling()
Browse files Browse the repository at this point in the history
replace n_ceil() use with Ceiling() define
  • Loading branch information
Doubleumc committed Jan 14, 2024
1 parent c044b78 commit 862c224
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions code/__HELPERS/#maths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4,

return rotated_point

// Round up
/proc/n_ceil(num)
if(isnum(num))
return round(num)+1

///Format a power value in W, kW, MW, or GW.
/proc/display_power(powerused)
if(powerused < 1000) //Less than a kW
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

name = lowertext("[fullname] sandwich")
if(length(name) > 80) name = "[pick(list("absurd","colossal","enormous","ridiculous"))] sandwich"
w_class = n_ceil(clamp((ingredients.len/2),1,3))
w_class = Ceiling(clamp((ingredients.len/2),1,3))

/obj/item/reagent_container/food/snacks/csandwich/Destroy()
QDEL_NULL_LIST(ingredients)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/xenomorph/hive_status.dm
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@
if(is_mainship_level(turf?.z))
shipside_humans_weighted_count += GLOB.RoleAuthority.calculate_role_weight(job)
hijack_burrowed_surge = TRUE
hijack_burrowed_left = max(n_ceil(shipside_humans_weighted_count * 0.5) - xenos_count, 5)
hijack_burrowed_left = max(Ceiling(shipside_humans_weighted_count * 0.5) - xenos_count, 5)
hivecore_cooldown = FALSE
xeno_message(SPAN_XENOBOLDNOTICE("The weeds have recovered! A new hive core can be built!"),3,hivenumber)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@
for(var/datum/chem_property/P in creation_template)
creation_cost += max(abs(P.value), 1) * P.level
if(P.level > 5) // a penalty is added at each level above 5 (+1 at 6, +2 at 7, +4 at 8, +5 at 9, +7 at 10)
creation_cost += P.level - 6 + n_ceil((P.level - 5) / 2)
creation_cost += P.level - 6 + Ceiling((P.level - 5) / 2)
creation_cost += ((new_od_level - 10) / 5) * 3 //3 cost for every 5 units above 10
for(var/rarity in creation_complexity)
switch(rarity)
Expand Down

0 comments on commit 862c224

Please sign in to comment.