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:
@@ -239,7 +239,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
|
||||
// Display the notes on the current page
|
||||
var/number_pages = note_keys.len / PLAYER_NOTES_ENTRIES_PER_PAGE
|
||||
// Emulate ceil(why does BYOND not have ceil)
|
||||
// Emulate CEILING(why does BYOND not have ceil, 1)
|
||||
if(number_pages != round(number_pages))
|
||||
number_pages = round(number_pages) + 1
|
||||
var/page_index = page - 1
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
can_flee = TRUE
|
||||
violent_breakthrough = FALSE
|
||||
|
||||
// Won't wander away, ideal for event-spawned mobs like carp or drones.
|
||||
// Won't wander away as quickly, ideal for event-spawned mobs like carp or drones.
|
||||
/datum/ai_holder/simple_mob/event
|
||||
wander = FALSE
|
||||
base_wander_delay = 8
|
||||
|
||||
// Doesn't really act until told to by something on the outside.
|
||||
/datum/ai_holder/simple_mob/inert
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
// For event-spawned malf drones.
|
||||
/datum/ai_holder/simple_mob/ranged/kiting/threatening/event
|
||||
wander = FALSE
|
||||
base_wander_delay = 8
|
||||
|
||||
/datum/ai_holder/simple_mob/ranged/kiting/no_moonwalk
|
||||
moonwalk = FALSE
|
||||
@@ -96,6 +96,11 @@
|
||||
/datum/ai_holder/simple_mob/restrained
|
||||
violent_breakthrough = FALSE
|
||||
conserve_ammo = TRUE
|
||||
destructive = FALSE
|
||||
|
||||
// This does the opposite of the above subtype.
|
||||
/datum/ai_holder/simple_mob/destructive
|
||||
destructive = TRUE
|
||||
|
||||
// Melee mobs.
|
||||
|
||||
|
||||
@@ -12,13 +12,16 @@
|
||||
|
||||
var/always_stun = FALSE // If true, the slime will elect to attempt to permastun the target.
|
||||
|
||||
var/last_discipline_decay = null // Last world.time discipline was reduced from decay.
|
||||
var/discipline_decay_time = 5 SECONDS // Earliest that one discipline can decay.
|
||||
|
||||
/datum/ai_holder/simple_mob/xenobio_slime/sapphire
|
||||
always_stun = TRUE // They know that stuns are godly.
|
||||
intelligence_level = AI_SMART // Also knows not to walk while confused if it risks death.
|
||||
|
||||
/datum/ai_holder/simple_mob/xenobio_slime/light_pink
|
||||
discipline = 5
|
||||
obedience = 5
|
||||
discipline = 10
|
||||
obedience = 10
|
||||
|
||||
/datum/ai_holder/simple_mob/xenobio_slime/passive/New() // For Kendrick.
|
||||
..()
|
||||
@@ -89,9 +92,10 @@
|
||||
|
||||
// Handles decay of discipline.
|
||||
/datum/ai_holder/simple_mob/xenobio_slime/proc/discipline_decay()
|
||||
if(discipline > 0)
|
||||
if(discipline > 0 && last_discipline_decay + discipline_decay_time < world.time)
|
||||
if(!prob(75 + (obedience * 5)))
|
||||
adjust_discipline(-1)
|
||||
last_discipline_decay = world.time
|
||||
|
||||
/datum/ai_holder/simple_mob/xenobio_slime/handle_special_tactic()
|
||||
evolve_and_reproduce()
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
var/lose_target_time = 0 // world.time when a target was lost.
|
||||
var/lose_target_timeout = 5 SECONDS // How long until a mob 'times out' and stops trying to find the mob that disappeared.
|
||||
|
||||
var/list/attackers = list() // List of strings of names of people who attacked us before in our life.
|
||||
// This uses strings and not refs to allow for disguises, and to avoid needing to use weakrefs.
|
||||
var/list/attackers = list() // List of strings of names of people who attacked us before in our life.
|
||||
// This uses strings and not refs to allow for disguises, and to avoid needing to use weakrefs.
|
||||
var/destructive = FALSE // Will target 'neutral' structures/objects and not just 'hostile' ones.
|
||||
|
||||
// A lot of this is based off of /TG/'s AI code.
|
||||
|
||||
@@ -111,6 +112,7 @@
|
||||
var/obj/mecha/M = the_target
|
||||
if(M.occupant)
|
||||
return can_attack(M.occupant)
|
||||
return destructive // Empty mechs are 'neutral'.
|
||||
|
||||
if(istype(the_target, /obj/machinery/porta_turret))
|
||||
var/obj/machinery/porta_turret/P = the_target
|
||||
|
||||
@@ -240,4 +240,21 @@
|
||||
|
||||
/datum/gear/accessory/locket
|
||||
display_name = "locket"
|
||||
path = /obj/item/clothing/accessory/locket
|
||||
path = /obj/item/clothing/accessory/locket
|
||||
|
||||
/datum/gear/accessory/asym
|
||||
display_name = "asymmetric jacket selection"
|
||||
path = /obj/item/clothing/accessory/asymmetric
|
||||
cost = 1
|
||||
|
||||
/datum/gear/accessory/asym/New()
|
||||
..()
|
||||
var/list/asyms = list()
|
||||
for(var/asym in typesof(/obj/item/clothing/accessory/asymmetric))
|
||||
var/obj/item/clothing/accessory/asymmetric_type = asym
|
||||
asyms[initial(asymmetric_type.name)] = asymmetric_type
|
||||
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(asyms))
|
||||
|
||||
/datum/gear/accessory/cowledvest
|
||||
display_name = "cowled vest"
|
||||
path = /obj/item/clothing/accessory/cowledvest
|
||||
@@ -124,4 +124,20 @@
|
||||
|
||||
/datum/gear/eyes/circuitry
|
||||
display_name = "goggles, circuitry (empty)"
|
||||
path = /obj/item/clothing/glasses/circuitry
|
||||
path = /obj/item/clothing/glasses/circuitry
|
||||
|
||||
/datum/gear/eyes/glasses/rimless
|
||||
display_name = "Glasses, rimless"
|
||||
path = /obj/item/clothing/glasses/rimless
|
||||
|
||||
/datum/gear/eyes/glasses/prescriptionrimless
|
||||
display_name = "Glasses, prescription rimless"
|
||||
path = /obj/item/clothing/glasses/regular/rimless
|
||||
|
||||
/datum/gear/eyes/glasses/thin
|
||||
display_name = "Glasses, thin frame"
|
||||
path = /obj/item/clothing/glasses/thin
|
||||
|
||||
/datum/gear/eyes/glasses/prescriptionrimless
|
||||
display_name = "Glasses, prescription thin frame"
|
||||
path = /obj/item/clothing/glasses/regular/thin
|
||||
@@ -371,3 +371,12 @@
|
||||
/datum/gear/head/circuitry
|
||||
display_name = "headwear, circuitry (empty)"
|
||||
path = /obj/item/clothing/head/circuitry
|
||||
|
||||
/datum/gear/head/maangtikka
|
||||
display_name = "maang tikka"
|
||||
path = /obj/item/clothing/head/maangtikka
|
||||
|
||||
/datum/gear/head/jingasa
|
||||
display_name = "jingasa"
|
||||
path = /obj/item/clothing/head/jingasa
|
||||
|
||||
|
||||
@@ -463,6 +463,10 @@ datum/gear/suit/duster
|
||||
..()
|
||||
gear_tweaks = list(gear_tweak_free_color_choice)
|
||||
|
||||
/datum/gear/suit/miscellaneous/kamishimo
|
||||
display_name = "kamishimo"
|
||||
path = /obj/item/clothing/suit/kamishimo
|
||||
|
||||
/datum/gear/suit/snowsuit
|
||||
display_name = "snowsuit"
|
||||
path = /obj/item/clothing/suit/storage/snowsuit
|
||||
|
||||
@@ -462,4 +462,25 @@
|
||||
|
||||
/datum/gear/uniform/circuitry
|
||||
display_name = "jumpsuit, circuitry (empty)"
|
||||
path = /obj/item/clothing/under/circuitry
|
||||
path = /obj/item/clothing/under/circuitry
|
||||
|
||||
/datum/gear/uniform/sleekoverall
|
||||
display_name = "sleek overalls"
|
||||
path = /obj/item/clothing/under/overalls/sleek
|
||||
|
||||
/datum/gear/uniform/sarired
|
||||
display_name = "sari, red"
|
||||
path = /obj/item/clothing/under/dress/sari
|
||||
|
||||
/datum/gear/uniform/sarigreen
|
||||
display_name = "sari, green"
|
||||
path = /obj/item/clothing/under/dress/sari/green
|
||||
|
||||
/datum/gear/uniform/wrappedcoat
|
||||
display_name = "modern wrapped coat"
|
||||
path = /obj/item/clothing/under/moderncoat
|
||||
|
||||
/datum/gear/uniform/ascetic
|
||||
display_name = "plain ascetic garb"
|
||||
path = /obj/item/clothing/under/ascetic
|
||||
|
||||
|
||||
@@ -232,6 +232,31 @@ BLIND // can't see anything
|
||||
item_state_slots = list(slot_r_hand_str = "glasses", slot_l_hand_str = "glasses")
|
||||
body_parts_covered = 0
|
||||
|
||||
/obj/item/clothing/glasses/regular/rimless
|
||||
name = "prescription rimless glasses"
|
||||
desc = "Sleek modern glasses with a single sculpted lens."
|
||||
icon_state = "glasses_rimless"
|
||||
prescription = 1
|
||||
|
||||
/obj/item/clothing/glasses/rimless
|
||||
name = "rimless glasses"
|
||||
desc = "Sleek modern glasses with a single sculpted lens."
|
||||
icon_state = "glasses_rimless"
|
||||
prescription = 0
|
||||
|
||||
/obj/item/clothing/glasses/regular/thin
|
||||
name = "prescription thin-rimmed glasses"
|
||||
desc = "Glasses with frames are so last century."
|
||||
icon_state = "glasses_thin"
|
||||
prescription = 1
|
||||
|
||||
/obj/item/clothing/glasses/thin
|
||||
name = "thin-rimmed glasses"
|
||||
desc = "Glasses with frames are so last century."
|
||||
icon_state = "glasses_thin"
|
||||
prescription = 0
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses
|
||||
name = "sunglasses"
|
||||
desc = "Strangely ancient technology used to help provide rudimentary eye cover. Enhanced shielding blocks many flashes."
|
||||
|
||||
@@ -413,4 +413,17 @@
|
||||
name = "maid headband"
|
||||
desc = "Keeps hair out of the way for important... jobs."
|
||||
icon_state = "maid"
|
||||
body_parts_covered = 0
|
||||
body_parts_covered = 0
|
||||
|
||||
/obj/item/clothing/head/maangtikka
|
||||
name = "maang tikka"
|
||||
desc = "A jeweled headpiece originating in India."
|
||||
icon_state = "maangtikka"
|
||||
body_parts_covered = 0
|
||||
|
||||
/obj/item/clothing/head/jingasa
|
||||
name = "jingasa"
|
||||
desc = "A wide, flat rain hat originally from Japan."
|
||||
icon_state = "jingasa"
|
||||
body_parts_covered = 0
|
||||
item_state_slots = list(slot_r_hand_str = "taq", slot_l_hand_str = "taq")
|
||||
@@ -545,7 +545,7 @@
|
||||
|
||||
data["charge"] = cell ? round(cell.charge,1) : 0
|
||||
data["maxcharge"] = cell ? cell.maxcharge : 0
|
||||
data["chargestatus"] = cell ? Floor((cell.charge/cell.maxcharge)*50) : 0
|
||||
data["chargestatus"] = cell ? FLOOR((cell.charge/cell.maxcharge)*50, 1) : 0
|
||||
|
||||
data["emagged"] = subverted
|
||||
data["coverlock"] = locked
|
||||
|
||||
@@ -255,6 +255,11 @@ obj/item/clothing/suit/kimono
|
||||
icon_state = "kimono"
|
||||
addblends = "kimono_a"
|
||||
|
||||
obj/item/clothing/suit/kamishimo
|
||||
name = "kamishimo"
|
||||
desc = "Traditional Japanese menswear."
|
||||
icon_state = "kamishimo"
|
||||
|
||||
/*
|
||||
* coats
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
desc = "Lucky suit jacket."
|
||||
icon_state = "checkered_jacket"
|
||||
|
||||
|
||||
/obj/item/clothing/accessory/chaps
|
||||
name = "brown chaps"
|
||||
desc = "A pair of loose, brown leather chaps."
|
||||
@@ -342,3 +341,23 @@
|
||||
name = "Christmas turtleneck"
|
||||
desc = "A really cheesy holiday sweater, it actually kinda itches."
|
||||
icon_state = "turtleneck_winterred"
|
||||
|
||||
/obj/item/clothing/accessory/cowledvest
|
||||
name = "cowled vest"
|
||||
desc = "A body warmer for the 26th century."
|
||||
icon_state = "cowled_vest"
|
||||
|
||||
/obj/item/clothing/accessory/asymmetric
|
||||
name = "blue asymmetrical jacket"
|
||||
desc = "Insultingly avant-garde in prussian blue."
|
||||
icon_state = "asym_blue"
|
||||
|
||||
/obj/item/clothing/accessory/asymmetric/purple
|
||||
name = "purple asymmetrical jacket"
|
||||
desc = "Insultingly avant-garde in mauve."
|
||||
icon_state = "asym_purple"
|
||||
|
||||
/obj/item/clothing/accessory/asymmetric/green
|
||||
name = "green asymmetrical jacket"
|
||||
desc = "Insultingly avant-garde in aqua."
|
||||
icon_state = "asym_green"
|
||||
@@ -242,6 +242,11 @@
|
||||
icon_state = "overalls"
|
||||
item_state_slots = list(slot_r_hand_str = "cargo", slot_l_hand_str = "cargo")
|
||||
|
||||
/obj/item/clothing/under/overalls/sleek
|
||||
name = "sleek overalls"
|
||||
desc = "A set of modern pleather reinforced overalls."
|
||||
icon_state = "overalls_sleek"
|
||||
|
||||
/obj/item/clothing/under/pirate
|
||||
name = "pirate outfit"
|
||||
desc = "Yarr."
|
||||
@@ -283,6 +288,19 @@
|
||||
item_state_slots = list(slot_r_hand_str = "yellow", slot_l_hand_str = "yellow")
|
||||
body_parts_covered = LOWER_TORSO
|
||||
|
||||
/obj/item/clothing/under/moderncoat
|
||||
name = "modern wrapped coat"
|
||||
desc = "The cutting edge of fashion."
|
||||
icon_state = "moderncoat"
|
||||
item_state_slots = list(slot_r_hand_str = "red", slot_l_hand_str = "red")
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS
|
||||
|
||||
/obj/item/clothing/under/ascetic
|
||||
name = "plain ascetic garb"
|
||||
desc = "Popular with freshly grown vatborn and new age cultists alike."
|
||||
icon_state = "ascetic"
|
||||
item_state_slots = list(slot_r_hand_str = "white", slot_l_hand_str = "white")
|
||||
|
||||
/*
|
||||
* dress
|
||||
*/
|
||||
@@ -404,6 +422,18 @@
|
||||
desc = "A western bustle dress from Earth's late 1800's."
|
||||
icon_state = "westernbustle"
|
||||
|
||||
/obj/item/clothing/under/dress/sari
|
||||
name = "red sari"
|
||||
desc = "A colorful traditional dress originating from India."
|
||||
icon_state = "sari_red"
|
||||
item_state_slots = list(slot_r_hand_str = "darkreddress", slot_l_hand_str = "darkreddress")
|
||||
|
||||
/obj/item/clothing/under/dress/sari/green
|
||||
name = "green sari"
|
||||
icon_state = "sari_green"
|
||||
item_state_slots = list(slot_r_hand_str = "dress_green", slot_l_hand_str = "dress_green")
|
||||
|
||||
|
||||
/*
|
||||
* wedding stuff
|
||||
*/
|
||||
|
||||
@@ -189,4 +189,29 @@
|
||||
/obj/item/clothing/under/pants/baggy/camo
|
||||
name = "baggy camo pants"
|
||||
desc = "A pair of woodland camouflage pants. Probably not the best choice for a space station."
|
||||
icon_state = "baggy_camopants"
|
||||
icon_state = "baggy_camopants"
|
||||
|
||||
/obj/item/clothing/under/pants/utility
|
||||
name = "green utility pants"
|
||||
desc = "A pair of pleather reinforced green work pants."
|
||||
icon_state = "workpants_green"
|
||||
|
||||
/obj/item/clothing/under/pants/utility/orange
|
||||
name = "orange utility pants"
|
||||
desc = "A pair of pleather reinforced orange work pants."
|
||||
icon_state = "workpants_orange"
|
||||
|
||||
/obj/item/clothing/under/pants/utility/blue
|
||||
name = "blue utility pants"
|
||||
desc = "A pair of pleather reinforced blue work pants."
|
||||
icon_state = "workpants_blue"
|
||||
|
||||
/obj/item/clothing/under/pants/utility/white
|
||||
name = "white utility pants"
|
||||
desc = "A pair of pleather reinforced white work pants."
|
||||
icon_state = "workpants_white"
|
||||
|
||||
/obj/item/clothing/under/pants/utility/red
|
||||
name = "red utility pants"
|
||||
desc = "A pair of pleather reinforced red work pants."
|
||||
icon_state = "workpants_red"
|
||||
@@ -33,7 +33,7 @@
|
||||
kill()
|
||||
return
|
||||
|
||||
if(IsMultiple(activeFor, 5))
|
||||
if(ISMULTIPLE(activeFor, 5))
|
||||
if(prob(15))
|
||||
var/obj/machinery/vending/infectedMachine = pick(vendingMachines)
|
||||
vendingMachines.Remove(infectedMachine)
|
||||
@@ -41,7 +41,7 @@
|
||||
infectedMachine.shut_up = 0
|
||||
infectedMachine.shoot_inventory = 1
|
||||
|
||||
if(IsMultiple(activeFor, 12))
|
||||
if(ISMULTIPLE(activeFor, 12))
|
||||
originMachine.speak(pick("Try our aggressive new marketing strategies!", \
|
||||
"You should buy products to feed your lifestyle obsession!", \
|
||||
"Consume!", \
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
cooking_obj = null
|
||||
else
|
||||
var/failed
|
||||
var/overcook_period = max(Floor(cook_time/5),1)
|
||||
var/overcook_period = max(FLOOR(cook_time/5, 1),1)
|
||||
cooking_obj = result
|
||||
var/count = overcook_period
|
||||
while(1)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
var/activeness = ((metric.assess_department(ROLE_SECURITY) + metric.assess_department(ROLE_ENGINEERING) + metric.assess_department(ROLE_MEDICAL)) / 3)
|
||||
activeness = max(activeness, 20)
|
||||
|
||||
carp_amount = Ceiling(station_strength * (activeness / 100) + 1)
|
||||
carp_amount = CEILING(station_strength * (activeness / 100) + 1, 1)
|
||||
|
||||
/datum/gm_action/carp_migration/start()
|
||||
..()
|
||||
|
||||
@@ -413,7 +413,7 @@
|
||||
overlays += I
|
||||
return
|
||||
|
||||
var/offset = Floor(20/cards.len)
|
||||
var/offset = FLOOR(20/cards.len, 1)
|
||||
|
||||
var/matrix/M = matrix()
|
||||
if(direction)
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
pull_data()
|
||||
var/incoming = get_pin_data(IC_INPUT, 1)
|
||||
if(!isnull(incoming))
|
||||
result = ToDegrees(incoming)
|
||||
result = TODEGREES(incoming)
|
||||
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
@@ -283,7 +283,7 @@
|
||||
pull_data()
|
||||
var/incoming = get_pin_data(IC_INPUT, 1)
|
||||
if(!isnull(incoming))
|
||||
result = ToRadians(incoming)
|
||||
result = TORADIANS(incoming)
|
||||
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
var/result = null
|
||||
var/A = get_pin_data(IC_INPUT, 1)
|
||||
if(!isnull(A))
|
||||
result = Tan(A)
|
||||
result = TAN(A)
|
||||
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
@@ -91,7 +91,7 @@
|
||||
var/result = null
|
||||
var/A = get_pin_data(IC_INPUT, 1)
|
||||
if(!isnull(A))
|
||||
result = Csc(A)
|
||||
result = CSC(A)
|
||||
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
@@ -112,7 +112,7 @@
|
||||
var/result = null
|
||||
var/A = get_pin_data(IC_INPUT, 1)
|
||||
if(!isnull(A))
|
||||
result = Sec(A)
|
||||
result = SEC(A)
|
||||
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
@@ -133,7 +133,7 @@
|
||||
var/result = null
|
||||
var/A = get_pin_data(IC_INPUT, 1)
|
||||
if(!isnull(A))
|
||||
result = Cot(A)
|
||||
result = COT(A)
|
||||
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
|
||||
@@ -202,7 +202,7 @@ var/list/mining_overlay_cache = list()
|
||||
if(severity <= 2) // Now to expose the ore lying under the sand.
|
||||
spawn(1) // Otherwise most of the ore is lost to the explosion, which makes this rather moot.
|
||||
for(var/ore in resources)
|
||||
var/amount_to_give = rand(Ceiling(resources[ore]/2), resources[ore]) // Should result in at least one piece of ore.
|
||||
var/amount_to_give = rand(CEILING(resources[ore]/2, 1), resources[ore]) // Should result in at least one piece of ore.
|
||||
for(var/i=1, i <= amount_to_give, i++)
|
||||
var/oretype = ore_types[ore]
|
||||
new oretype(src)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
for(var/i = 0;i<name_count;i++)
|
||||
new_name = ""
|
||||
for(var/x = rand(Floor(syllable_count/syllable_divisor),syllable_count);x>0;x--)
|
||||
for(var/x = rand(FLOOR(syllable_count/syllable_divisor, 1),syllable_count);x>0;x--)
|
||||
new_name += pick(syllables)
|
||||
full_name += " [capitalize(lowertext(new_name))]"
|
||||
|
||||
|
||||
@@ -363,7 +363,7 @@
|
||||
stop_pulling()
|
||||
src << "<span class='warning'>You slipped on [slipped_on]!</span>"
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
Weaken(Floor(stun_duration/2))
|
||||
Weaken(FLOOR(stun_duration/2, 1))
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/add_chemical_effect(var/effect, var/magnitude = 1)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
chargen_value_descriptors = list()
|
||||
for(var/i = 1 to LAZYLEN(standalone_value_descriptors))
|
||||
chargen_value_descriptors[standalone_value_descriptors[i]] = i
|
||||
default_value = ceil(LAZYLEN(standalone_value_descriptors) * 0.5)
|
||||
default_value = CEILING(LAZYLEN(standalone_value_descriptors) * 0.5, 1)
|
||||
..()
|
||||
|
||||
/datum/mob_descriptor/proc/get_third_person_message_start(var/datum/gender/my_gender)
|
||||
@@ -99,10 +99,10 @@
|
||||
|
||||
/datum/mob_descriptor/proc/get_comparative_value_string_smaller(var/value, var/datum/gender/my_gender, var/datum/gender/other_gender)
|
||||
var/maxval = LAZYLEN(comparative_value_descriptors_smaller)
|
||||
value = Clamp(ceil(value * maxval), 1, maxval)
|
||||
value = Clamp(CEILING(value * maxval, 1), 1, maxval)
|
||||
return comparative_value_descriptors_smaller[value]
|
||||
|
||||
/datum/mob_descriptor/proc/get_comparative_value_string_larger(var/value, var/datum/gender/my_gender, var/datum/gender/other_gender)
|
||||
var/maxval = LAZYLEN(comparative_value_descriptors_larger)
|
||||
value = Clamp(ceil(value * maxval), 1, maxval)
|
||||
value = Clamp(CEILING(value * maxval, 1), 1, maxval)
|
||||
return comparative_value_descriptors_larger[value]
|
||||
|
||||
@@ -165,4 +165,4 @@
|
||||
else
|
||||
src << "<span class='notice'>I am not ready to reproduce yet...</span>"
|
||||
else
|
||||
src << "<span class='notice'>I am not old enough to reproduce yet...</span>"
|
||||
src << "<span class='notice'>I am not old enough to reproduce yet...</span>"
|
||||
|
||||
@@ -36,6 +36,11 @@
|
||||
adjustHalLoss(damage * blocked)
|
||||
if(ELECTROCUTE)
|
||||
electrocute_act(damage, used_weapon, 1.0, def_zone)
|
||||
if(BIOACID)
|
||||
if(isSynthetic())
|
||||
adjustFireLoss(damage * blocked)
|
||||
else
|
||||
adjustToxLoss(damage * blocked)
|
||||
flash_weak_pain()
|
||||
updatehealth()
|
||||
return 1
|
||||
|
||||
@@ -674,7 +674,7 @@
|
||||
|
||||
//Robots take half damage from basic attacks.
|
||||
/mob/living/silicon/robot/attack_generic(var/mob/user, var/damage, var/attack_message)
|
||||
return ..(user,Floor(damage/2),attack_message)
|
||||
return ..(user,FLOOR(damage/2, 1),attack_message)
|
||||
|
||||
/mob/living/silicon/robot/proc/allowed(mob/M)
|
||||
//check if it doesn't require any access at all
|
||||
|
||||
@@ -188,9 +188,9 @@ Nurse Family
|
||||
for(var/I = 1 to spiderling_count)
|
||||
if(prob(10) && src)
|
||||
var/mob/living/simple_animal/hostile/giant_spider/swarmling = new swarmling_type(src.loc)
|
||||
var/swarm_health = Floor(swarmling.maxHealth * 0.4)
|
||||
var/swarm_dam_lower = Floor(melee_damage_lower * 0.4)
|
||||
var/swarm_dam_upper = Floor(melee_damage_upper * 0.4)
|
||||
var/swarm_health = FLOOR(swarmling.maxHealth * 0.4, 1)
|
||||
var/swarm_dam_lower = FLOOR(melee_damage_lower * 0.4, 1)
|
||||
var/swarm_dam_upper = FLOOR(melee_damage_upper * 0.4, 1)
|
||||
swarmling.name = "spiderling"
|
||||
swarmling.maxHealth = swarm_health
|
||||
swarmling.health = swarm_health
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
return FALSE
|
||||
|
||||
visible_message("<span class='danger'><b>\The [src]</b> fires at \the [A]!</span>")
|
||||
shoot(A, src.loc, src)
|
||||
shoot(A)
|
||||
if(casingtype)
|
||||
new casingtype(loc)
|
||||
|
||||
@@ -112,21 +112,22 @@
|
||||
return TRUE
|
||||
|
||||
|
||||
//Shoot a bullet at someone (idk why user is an argument when src would fit???)
|
||||
/mob/living/simple_mob/proc/shoot(atom/A, turf/start, mob/living/user, bullet = 0)
|
||||
if(A == start)
|
||||
// Shoot a bullet at something.
|
||||
/mob/living/simple_mob/proc/shoot(atom/A)
|
||||
if(A == get_turf(src))
|
||||
return
|
||||
|
||||
face_atom(A)
|
||||
|
||||
var/obj/item/projectile/P = new projectiletype(user.loc)
|
||||
var/obj/item/projectile/P = new projectiletype(src.loc)
|
||||
if(!P)
|
||||
return
|
||||
|
||||
// If the projectile has its own sound, use it.
|
||||
// Otherwise default to the mob's firing sound.
|
||||
playsound(user, P.fire_sound ? P.fire_sound : projectilesound, 80, 1)
|
||||
playsound(src, P.fire_sound ? P.fire_sound : projectilesound, 80, 1)
|
||||
|
||||
P.firer = src // So we can't shoot ourselves.
|
||||
P.launch(A)
|
||||
if(needs_reload)
|
||||
reload_count++
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
for(var/i = 1 to spiderling_count)
|
||||
if(prob(swarmling_prob) && src)
|
||||
var/mob/living/simple_mob/animal/giant_spider/swarmling = new swarmling_type(src.loc)
|
||||
var/swarm_health = Floor(swarmling.maxHealth * 0.4)
|
||||
var/swarm_dam_lower = Floor(melee_damage_lower * 0.4)
|
||||
var/swarm_dam_upper = Floor(melee_damage_upper * 0.4)
|
||||
var/swarm_health = FLOOR(swarmling.maxHealth * 0.4, 1)
|
||||
var/swarm_dam_lower = FLOOR(melee_damage_lower * 0.4, 1)
|
||||
var/swarm_dam_upper = FLOOR(melee_damage_upper * 0.4, 1)
|
||||
swarmling.name = "spiderling"
|
||||
swarmling.maxHealth = swarm_health
|
||||
swarmling.health = swarm_health
|
||||
|
||||
@@ -20,17 +20,40 @@
|
||||
var/number = 0 // This is used to make the slime semi-unique for indentification.
|
||||
var/harmless = FALSE // Set to true when pacified. Makes the slime harmless, not get hungry, and not be able to grow/reproduce.
|
||||
|
||||
/mob/living/simple_mob/slime/xenobio/initialize()
|
||||
/mob/living/simple_mob/slime/xenobio/initialize(mapload, var/mob/living/simple_mob/slime/xenobio/my_predecessor)
|
||||
ASSERT(ispath(ai_holder_type, /datum/ai_holder/simple_mob/xenobio_slime))
|
||||
number = rand(1, 1000)
|
||||
update_name()
|
||||
return ..()
|
||||
|
||||
. = ..() // This will make the AI and do the other mob constructor things. It will also return the default hint at the end.
|
||||
|
||||
if(my_predecessor)
|
||||
inherit_information(my_predecessor)
|
||||
|
||||
|
||||
/mob/living/simple_mob/slime/xenobio/Destroy()
|
||||
if(victim)
|
||||
stop_consumption() // Unbuckle us from our victim.
|
||||
return ..()
|
||||
|
||||
// Called when a slime makes another slime by splitting. The predecessor slime will be deleted shortly afterwards.
|
||||
/mob/living/simple_mob/slime/xenobio/proc/inherit_information(var/mob/living/simple_mob/slime/xenobio/predecessor)
|
||||
if(!predecessor)
|
||||
return
|
||||
|
||||
var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder
|
||||
var/datum/ai_holder/simple_mob/xenobio_slime/previous_AI = predecessor.ai_holder
|
||||
ASSERT(istype(AI))
|
||||
ASSERT(istype(previous_AI))
|
||||
|
||||
// Now to transfer the information.
|
||||
// Newly made slimes are bit more rebellious than their predecessors, but they also somewhat forget the atrocities the xenobiologist may have done.
|
||||
AI.discipline = max(previous_AI.discipline - 1, 0)
|
||||
AI.obedience = max(previous_AI.obedience - 1, 0)
|
||||
AI.resentment = max(previous_AI.resentment - 1, 0)
|
||||
AI.rabid = previous_AI.rabid
|
||||
|
||||
|
||||
/mob/living/simple_mob/slime/xenobio/update_icon()
|
||||
icon_living = "[icon_state_override ? "[icon_state_override] slime" : "slime"] [is_adult ? "adult" : "baby"][victim ? " eating" : ""]"
|
||||
icon_dead = "[icon_state_override ? "[icon_state_override] slime" : "slime"] [is_adult ? "adult" : "baby"] dead"
|
||||
@@ -212,14 +235,12 @@
|
||||
t = /mob/living/simple_mob/slime/xenobio/rainbow
|
||||
else if(prob(mutation_chance) && slime_mutation.len)
|
||||
t = slime_mutation[rand(1, slime_mutation.len)]
|
||||
var/mob/living/simple_mob/slime/xenobio/baby = new t(loc)
|
||||
var/mob/living/simple_mob/slime/xenobio/baby = new t(loc, src)
|
||||
|
||||
// Handle 'inheriting' from parent slime.
|
||||
baby.mutation_chance = mutation_chance
|
||||
baby.power_charge = round(power_charge / 4)
|
||||
|
||||
pass_on_data(baby) // Transfer the AI stuff slowly, sadly.
|
||||
|
||||
if(!istype(baby, /mob/living/simple_mob/slime/xenobio/rainbow))
|
||||
baby.unity = unity
|
||||
baby.faction = faction
|
||||
@@ -228,33 +249,6 @@
|
||||
step_away(baby, src)
|
||||
return baby
|
||||
|
||||
/mob/living/simple_mob/slime/xenobio/proc/pass_on_data(mob/living/simple_mob/slime/xenobio/baby)
|
||||
// This is superdumb but the AI datum won't exist until the new slime's initialize() finishes.
|
||||
var/new_discipline = 0
|
||||
var/new_obedience = 0
|
||||
var/new_resentment = 0
|
||||
var/new_rabid = FALSE
|
||||
|
||||
// First, get this slime's AI values since they are likely to be deleted in a moment.
|
||||
if(src && src.has_AI())
|
||||
var/datum/ai_holder/simple_mob/xenobio_slime/our_AI = ai_holder
|
||||
new_discipline = max(our_AI.discipline - 1, 0)
|
||||
new_obedience = max(our_AI.obedience - 1, 0)
|
||||
new_resentment = max(our_AI.resentment - 1, 0)
|
||||
new_rabid = our_AI.rabid
|
||||
|
||||
spawn(2) // Race conditions are fun, but with the first two letters capitalized.
|
||||
if(istype(baby) && baby.has_AI())
|
||||
var/datum/ai_holder/simple_mob/xenobio_slime/their_AI = baby.ai_holder
|
||||
|
||||
if(!istype(baby, /mob/living/simple_mob/slime/xenobio/light_pink))
|
||||
their_AI.discipline = new_discipline
|
||||
their_AI.obedience = new_obedience
|
||||
|
||||
their_AI.resentment = new_resentment
|
||||
|
||||
their_AI.rabid = new_rabid
|
||||
|
||||
/mob/living/simple_mob/slime/xenobio/get_description_interaction()
|
||||
var/list/results = list()
|
||||
|
||||
@@ -281,4 +275,4 @@
|
||||
lines.Add(null)
|
||||
|
||||
lines.Add(description_info)
|
||||
return lines.Join("\n")
|
||||
return lines.Join("\n")
|
||||
|
||||
@@ -275,5 +275,5 @@ var/list/robot_hud_colours = list("#CFCFCF","#AFAFAF","#8F8F8F","#6F6F6F","#4F4F
|
||||
dam_state = min_dam_state
|
||||
// Apply colour and return product.
|
||||
var/list/hud_colours = (robotic < ORGAN_ROBOT) ? flesh_hud_colours : robot_hud_colours
|
||||
hud_damage_image.color = hud_colours[max(1,min(ceil(dam_state*hud_colours.len),hud_colours.len))]
|
||||
hud_damage_image.color = hud_colours[max(1,min(CEILING(dam_state*hud_colours.len, 1),hud_colours.len))]
|
||||
return hud_damage_image
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
else
|
||||
icon_state = "shredder-off"
|
||||
// Fullness overlay
|
||||
overlays += "shredder-[max(0,min(5,Floor(paperamount/max_paper*5)))]"
|
||||
overlays += "shredder-[max(0,min(5,FLOOR(paperamount/max_paper*5, 1)))]"
|
||||
if (panel_open)
|
||||
overlays += "panel_open"
|
||||
|
||||
|
||||
@@ -70,12 +70,12 @@ var/datum/planet/sif/planet_sif = null
|
||||
high_color = "#FFFFFF"
|
||||
min = 0.70
|
||||
|
||||
var/lerp_weight = (abs(min - sun_position)) * 4
|
||||
var/interpolate_weight = (abs(min - sun_position)) * 4
|
||||
var/weather_light_modifier = 1
|
||||
if(weather_holder && weather_holder.current_weather)
|
||||
weather_light_modifier = weather_holder.current_weather.light_modifier
|
||||
|
||||
var/new_brightness = (Interpolate(low_brightness, high_brightness, weight = lerp_weight) ) * weather_light_modifier
|
||||
var/new_brightness = (LERP(low_brightness, high_brightness, interpolate_weight) ) * weather_light_modifier
|
||||
|
||||
var/new_color = null
|
||||
if(weather_holder && weather_holder.current_weather && weather_holder.current_weather.light_color)
|
||||
@@ -91,9 +91,9 @@ var/datum/planet/sif/planet_sif = null
|
||||
var/high_g = high_color_list[2]
|
||||
var/high_b = high_color_list[3]
|
||||
|
||||
var/new_r = Interpolate(low_r, high_r, weight = lerp_weight)
|
||||
var/new_g = Interpolate(low_g, high_g, weight = lerp_weight)
|
||||
var/new_b = Interpolate(low_b, high_b, weight = lerp_weight)
|
||||
var/new_r = LERP(low_r, high_r, interpolate_weight)
|
||||
var/new_g = LERP(low_g, high_g, interpolate_weight)
|
||||
var/new_b = LERP(low_b, high_b, interpolate_weight)
|
||||
|
||||
new_color = rgb(new_r, new_g, new_b)
|
||||
|
||||
|
||||
@@ -54,15 +54,15 @@
|
||||
var/seconds = remaining_hour % seconds_in_minute / 10
|
||||
|
||||
|
||||
var/hour_text = num2text(Floor(hours))
|
||||
var/hour_text = num2text(FLOOR(hours, 1))
|
||||
if(length(hour_text) < 2)
|
||||
hour_text = "0[hour_text]" // Add padding if needed, to look more like time2text().
|
||||
|
||||
var/minute_text = num2text(Floor(minutes))
|
||||
var/minute_text = num2text(FLOOR(minutes, 1))
|
||||
if(length(minute_text) < 2)
|
||||
minute_text = "0[minute_text]"
|
||||
|
||||
var/second_text = num2text(Floor(seconds))
|
||||
var/second_text = num2text(FLOOR(seconds, 1))
|
||||
if(length(second_text) < 2)
|
||||
second_text = "0[second_text]"
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
visuals.icon_state = current_weather.icon_state
|
||||
|
||||
/datum/weather_holder/proc/update_temperature()
|
||||
temperature = Interpolate(current_weather.temp_low, current_weather.temp_high, weight = our_planet.sun_position)
|
||||
temperature = LERP(current_weather.temp_low, current_weather.temp_high, our_planet.sun_position)
|
||||
our_planet.needs_work |= PLANET_PROCESS_TEMP
|
||||
|
||||
/datum/weather_holder/proc/get_weather_datum(desired_type)
|
||||
|
||||
@@ -532,7 +532,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
if(!S || S.robotic < ORGAN_ROBOT || S.open == 3)
|
||||
return ..()
|
||||
|
||||
var/use_amt = min(src.amount, ceil(S.burn_dam/5), 5)
|
||||
var/use_amt = min(src.amount, CEILING(S.burn_dam/5, 1), 5)
|
||||
if(can_use(use_amt))
|
||||
if(S.robo_repair(5*use_amt, BURN, "some damaged wiring", src, user))
|
||||
src.use(use_amt)
|
||||
|
||||
@@ -171,8 +171,8 @@
|
||||
use_power = light_max_power
|
||||
else
|
||||
var/temp_mod = ((plasma_temperature-5000)/20000)
|
||||
use_range = light_min_range + ceil((light_max_range-light_min_range)*temp_mod)
|
||||
use_power = light_min_power + ceil((light_max_power-light_min_power)*temp_mod)
|
||||
use_range = light_min_range + CEILING((light_max_range-light_min_range)*temp_mod, 1)
|
||||
use_power = light_min_power + CEILING((light_max_power-light_min_power)*temp_mod, 1)
|
||||
|
||||
if(last_range != use_range || last_power != use_power)
|
||||
set_light(use_range,use_power)
|
||||
@@ -318,8 +318,8 @@
|
||||
|
||||
/obj/effect/fusion_em_field/proc/Radiate()
|
||||
if(istype(loc, /turf))
|
||||
var/empsev = max(1, min(3, ceil(size/2)))
|
||||
for(var/atom/movable/AM in range(max(1,Floor(size/2)), loc))
|
||||
var/empsev = max(1, min(3, CEILING(size/2, 1)))
|
||||
for(var/atom/movable/AM in range(max(1,FLOOR(size/2, 1)), loc))
|
||||
|
||||
if(AM == src || AM == owned_core || !AM.simulated)
|
||||
continue
|
||||
@@ -386,7 +386,7 @@
|
||||
//determine a random amount to actually react this cycle, and remove it from the standard pool
|
||||
//this is a hack, and quite nonrealistic :(
|
||||
for(var/reactant in react_pool)
|
||||
react_pool[reactant] = rand(Floor(react_pool[reactant]/2),react_pool[reactant])
|
||||
react_pool[reactant] = rand(FLOOR(react_pool[reactant]/2, 1),react_pool[reactant])
|
||||
dormant_reactant_quantities[reactant] -= react_pool[reactant]
|
||||
if(!react_pool[reactant])
|
||||
react_pool -= reactant
|
||||
@@ -574,7 +574,7 @@
|
||||
/obj/effect/fusion_em_field/proc/Rupture()
|
||||
visible_message("<span class='danger'>\The [src] shudders like a dying animal before flaring to eye-searing brightness and rupturing!</span>")
|
||||
set_light(15, 15, "#CCCCFF")
|
||||
empulse(get_turf(src), ceil(plasma_temperature/1000), ceil(plasma_temperature/300))
|
||||
empulse(get_turf(src), CEILING(plasma_temperature/1000, 1), CEILING(plasma_temperature/300, 1))
|
||||
global_announcer.autosay("WARNING: FIELD RUPTURE IMMINENT!", "Containment Monitor")
|
||||
RadiateAll()
|
||||
var/list/things_in_range = range(10, owned_core)
|
||||
@@ -584,7 +584,7 @@
|
||||
turfs_in_range.Add(T)
|
||||
|
||||
explosion(pick(things_in_range), -1, 5, 5, 5)
|
||||
empulse(pick(things_in_range), ceil(plasma_temperature/1000), ceil(plasma_temperature/300))
|
||||
empulse(pick(things_in_range), CEILING(plasma_temperature/1000, 1), CEILING(plasma_temperature/300, 1))
|
||||
spawn(25)
|
||||
explosion(pick(things_in_range), -1, 5, 5, 5)
|
||||
spawn(25)
|
||||
@@ -655,7 +655,7 @@
|
||||
/obj/effect/fusion_em_field/proc/BluespaceQuenchEvent() //!!FUN!! causes a number of explosions in an area around the core. Will likely destory or heavily damage the reactor.
|
||||
visible_message("<span class='danger'>\The [src] shudders like a dying animal before flaring to eye-searing brightness and rupturing!</span>")
|
||||
set_light(15, 15, "#CCCCFF")
|
||||
empulse(get_turf(src), ceil(plasma_temperature/1000), ceil(plasma_temperature/300))
|
||||
empulse(get_turf(src), CEILING(plasma_temperature/1000, 1), CEILING(plasma_temperature/300, 1))
|
||||
global_announcer.autosay("WARNING: FIELD RUPTURE IMMINENT!", "Containment Monitor")
|
||||
RadiateAll()
|
||||
var/list/things_in_range = range(10, owned_core)
|
||||
@@ -665,7 +665,7 @@
|
||||
turfs_in_range.Add(T)
|
||||
for(var/loopcount = 1 to 10)
|
||||
explosion(pick(things_in_range), -1, 5, 5, 5)
|
||||
empulse(pick(things_in_range), ceil(plasma_temperature/1000), ceil(plasma_temperature/300))
|
||||
empulse(pick(things_in_range), CEILING(plasma_temperature/1000, 1), CEILING(plasma_temperature/300, 1))
|
||||
Destroy()
|
||||
owned_core.Shutdown()
|
||||
return
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
return PROCESS_KILL
|
||||
|
||||
if(istype(loc, /turf))
|
||||
radiation_repository.radiate(src, max(1,ceil(radioactivity/30)))
|
||||
radiation_repository.radiate(src, max(1,CEILING(radioactivity/30, 1)))
|
||||
|
||||
/obj/item/weapon/fuel_assembly/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/stack/material) && W.get_material_name() == DEFAULT_WALL_MATERIAL)
|
||||
var/amt = Ceiling(( initial(integrity) - integrity)/10)
|
||||
var/amt = CEILING(( initial(integrity) - integrity)/10, 1)
|
||||
if(!amt)
|
||||
to_chat(user, "<span class='notice'>\The [src] is already fully repaired.</span>")
|
||||
return
|
||||
|
||||
@@ -584,7 +584,7 @@
|
||||
|
||||
if(one_handed_penalty)
|
||||
if(!held_twohanded)
|
||||
acc_mod += -ceil(one_handed_penalty/2)
|
||||
acc_mod += -CEILING(one_handed_penalty/2, 1)
|
||||
disp_mod += one_handed_penalty*0.5 //dispersion per point of two-handedness
|
||||
|
||||
//Accuracy modifiers
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
damage_type = BURN
|
||||
agony = 10
|
||||
check_armour = "bio"
|
||||
armor_penetration = 25 // It's acid
|
||||
|
||||
combustion = FALSE
|
||||
|
||||
@@ -130,9 +131,10 @@
|
||||
name = "neurotoxic spit"
|
||||
icon_state = "neurotoxin"
|
||||
damage = 5
|
||||
damage_type = TOX
|
||||
damage_type = BIOACID
|
||||
agony = 80
|
||||
check_armour = "bio"
|
||||
armor_penetration = 25 // It's acid-based
|
||||
|
||||
combustion = FALSE
|
||||
|
||||
@@ -140,9 +142,10 @@
|
||||
name = "neurotoxic spit"
|
||||
icon_state = "neurotoxin"
|
||||
damage = 20
|
||||
damage_type = TOX
|
||||
damage_type = BIOACID
|
||||
agony = 20
|
||||
check_armour = "bio"
|
||||
armor_penetration = 25 // It's acid-based
|
||||
|
||||
/obj/item/projectile/energy/phoron
|
||||
name = "phoron bolt"
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
/datum/random_map/noise/set_map_size()
|
||||
// Make sure the grid is a square with limits that are
|
||||
// (n^2)+1, otherwise diamond-square won't work.
|
||||
if(!IsPowerOfTwo((limit_x-1)))
|
||||
limit_x = RoundUpToPowerOfTwo(limit_x) + 1
|
||||
if(!IsPowerOfTwo((limit_y-1)))
|
||||
limit_y = RoundUpToPowerOfTwo(limit_y) + 1
|
||||
if(!ISPOWEROFTWO((limit_x-1)))
|
||||
limit_x = ROUNDUPTOPOWEROFTWO(limit_x) + 1
|
||||
if(!ISPOWEROFTWO((limit_y-1)))
|
||||
limit_y = ROUNDUPTOPOWEROFTWO(limit_y) + 1
|
||||
// Sides must be identical lengths.
|
||||
if(limit_x > limit_y)
|
||||
limit_y = limit_x
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
/datum/reagent/toxin/hydrophoron/touch_turf(var/turf/simulated/T)
|
||||
if(!istype(T))
|
||||
return
|
||||
T.assume_gas("phoron", ceil(volume/2), T20C)
|
||||
T.assume_gas("phoron", CEILING(volume/2, 1), T20C)
|
||||
for(var/turf/simulated/floor/target_tile in range(0,T))
|
||||
target_tile.assume_gas("phoron", volume/2, 400+T0C)
|
||||
spawn (0) target_tile.hotspot_expose(700, 400)
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
user.setClickCooldown(user.get_attack_speed(src)) //puts a limit on how fast people can eat/drink things
|
||||
self_feed_message(user)
|
||||
reagents.trans_to_mob(user, issmall(user) ? ceil(amount_per_transfer_from_this/2) : amount_per_transfer_from_this, CHEM_INGEST)
|
||||
reagents.trans_to_mob(user, issmall(user) ? CEILING(amount_per_transfer_from_this/2, 1) : amount_per_transfer_from_this, CHEM_INGEST)
|
||||
feed_sound(user)
|
||||
return 1
|
||||
else
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
// Makes shields become gradually more red as the projector's health decreases.
|
||||
/obj/item/shield_projector/proc/update_shield_colors()
|
||||
// This is done at the projector instead of the shields themselves to avoid needing to calculate this more than once every update.
|
||||
var/lerp_weight = shield_health / max_shield_health
|
||||
var/interpolate_weight = shield_health / max_shield_health
|
||||
|
||||
var/list/low_color_list = hex2rgb(low_color)
|
||||
var/low_r = low_color_list[1]
|
||||
@@ -166,9 +166,9 @@
|
||||
var/high_g = high_color_list[2]
|
||||
var/high_b = high_color_list[3]
|
||||
|
||||
var/new_r = Interpolate(low_r, high_r, weight = lerp_weight)
|
||||
var/new_g = Interpolate(low_g, high_g, weight = lerp_weight)
|
||||
var/new_b = Interpolate(low_b, high_b, weight = lerp_weight)
|
||||
var/new_r = LERP(low_r, high_r, interpolate_weight)
|
||||
var/new_g = LERP(low_g, high_g, interpolate_weight)
|
||||
var/new_b = LERP(low_b, high_b, interpolate_weight)
|
||||
|
||||
var/new_color = rgb(new_r, new_g, new_b)
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
if(autopilot_delay % 10 == 0) // Every ten ticks.
|
||||
var/seconds_left = autopilot_delay * 2
|
||||
if(seconds_left >= 60) // A minute
|
||||
var/minutes_left = Floor(seconds_left / 60)
|
||||
var/minutes_left = FLOOR(seconds_left / 60, 1)
|
||||
seconds_left = seconds_left % 60
|
||||
autopilot_say("Departing in [minutes_left] minute\s[seconds_left ? ", [seconds_left] seconds":""].")
|
||||
else
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
if(NORTH)
|
||||
|
||||
int_panel_x = ux + Floor(lift_size_x/2)
|
||||
int_panel_x = ux + FLOOR(lift_size_x/2, 1)
|
||||
int_panel_y = uy + 1
|
||||
ext_panel_x = ux
|
||||
ext_panel_y = ey + 2
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
if(SOUTH)
|
||||
|
||||
int_panel_x = ux + Floor(lift_size_x/2)
|
||||
int_panel_x = ux + FLOOR(lift_size_x/2, 1)
|
||||
int_panel_y = ey - 1
|
||||
ext_panel_x = ex
|
||||
ext_panel_y = uy - 2
|
||||
@@ -93,7 +93,7 @@
|
||||
if(EAST)
|
||||
|
||||
int_panel_x = ux+1
|
||||
int_panel_y = uy + Floor(lift_size_y/2)
|
||||
int_panel_y = uy + FLOOR(lift_size_y/2, 1)
|
||||
ext_panel_x = ex+2
|
||||
ext_panel_y = ey
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
if(WEST)
|
||||
|
||||
int_panel_x = ex-1
|
||||
int_panel_y = uy + Floor(lift_size_y/2)
|
||||
int_panel_y = uy + FLOOR(lift_size_y/2, 1)
|
||||
ext_panel_x = ux-2
|
||||
ext_panel_y = uy
|
||||
|
||||
|
||||
Reference in New Issue
Block a user