Merge branch 'master' into cube-world

This commit is contained in:
TrilbySpaceClone
2020-04-23 02:04:56 -04:00
374 changed files with 5466 additions and 3233 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
target = get_turf(src)
if(acid_amt)
acid_level = min( (CLAMP(round(acid_amt, 1), 0, INFINITY)) *acid_pwr, 12000) //capped so the acid effect doesn't last a half hour on the floor.
acid_level = min( (clamp(round(acid_amt, 1), 0, INFINITY)) *acid_pwr, 12000) //capped so the acid effect doesn't last a half hour on the floor.
//handle APCs and newscasters and stuff nicely
pixel_x = target.pixel_x + rand(-4,4)
+2
View File
@@ -36,6 +36,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark)
var/jobspawn_override = FALSE
var/delete_after_roundstart = TRUE
var/used = FALSE
var/job_spawnpoint = TRUE //Is it a potential job spawnpoint or should we skip it?
/obj/effect/landmark/start/proc/after_round_start()
if(delete_after_roundstart)
@@ -281,6 +282,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
name = "bomb or clown beacon spawner"
var/nukie_path = /obj/item/sbeacondrop/bomb
var/clown_path = /obj/item/sbeacondrop/clownbomb
job_spawnpoint = FALSE
/obj/effect/landmark/start/nuclear_equipment/after_round_start()
var/npath = nukie_path
@@ -521,7 +521,7 @@
/obj/item/gun/ballistic/automatic/toy/pistol = 5,
/obj/item/firing_pin = 5,
/obj/item/grenade/empgrenade = 15,
/obj/item/clothing/gloves/combat = 10,
/obj/item/clothing/gloves/tackler/combat/insulated = 10,
/obj/item/clothing/shoes/sneakers/noslip = 10
)
+1 -1
View File
@@ -52,7 +52,7 @@
var/list/affecting = list()
/obj/effect/step_trigger/thrower/Trigger(atom/A)
if(!A || !ismovableatom(A))
if(!A || !ismovable(A))
return
var/atom/movable/AM = A
var/curtiles = 0
+1 -1
View File
@@ -193,7 +193,7 @@
/obj/effect/chrono_field/update_icon()
var/ttk_frame = 1 - (tickstokill / initial(tickstokill))
ttk_frame = CLAMP(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
ttk_frame = clamp(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
if(ttk_frame != RPpos)
RPpos = ttk_frame
mob_underlay.icon_state = "frame[RPpos]"
@@ -804,7 +804,7 @@
var/new_cloud = input("Set the public nanite chamber's Cloud ID (1-100).", "Cloud ID", cloud_id) as num|null
if(new_cloud == null)
return
cloud_id = CLAMP(round(new_cloud, 1), 1, 100)
cloud_id = clamp(round(new_cloud, 1), 1, 100)
/obj/item/circuitboard/machine/public_nanite_chamber/examine(mob/user)
. = ..()
+2 -2
View File
@@ -346,8 +346,8 @@
var/clicky
if(click_params && click_params["icon-x"] && click_params["icon-y"])
clickx = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
clicky = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
clickx = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
clicky = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
if(!instant)
to_chat(user, "<span class='notice'>You start drawing a [temp] on the [target.name]...</span>")
@@ -39,7 +39,7 @@
var/new_duration = input(user, "Set the duration (5-300):", "Desynchronizer", duration / 10) as null|num
if(new_duration)
new_duration = new_duration SECONDS
new_duration = CLAMP(new_duration, 50, max_duration)
new_duration = clamp(new_duration, 50, max_duration)
duration = new_duration
to_chat(user, "<span class='notice'>You set the duration to [DisplayTimeText(duration)].</span>")
return TRUE
@@ -324,7 +324,7 @@
cleaning_cycles--
cleaning = TRUE
for(var/mob/living/carbon/C in (touchable_items))
if((C.status_flags & GODMODE) || !C.digestable)
if((C.status_flags & GODMODE) || !CHECK_BITFIELD(C.vore_flags, DIGESTABLE))
items_preserved += C
else
C.adjustBruteLoss(2)
@@ -333,7 +333,7 @@
var/atom/target = pick(touchable_items)
if(iscarbon(target)) //Handle the target being a mob
var/mob/living/carbon/T = target
if(T.stat == DEAD && T.digestable) //Mob is now dead
if(T.stat == DEAD && CHECK_BITFIELD(T.vore_flags, DIGESTABLE)) //Mob is now dead
message_admins("[key_name(hound)] has digested [key_name(T)] as a dogborg. ([hound ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[hound.x];Y=[hound.y];Z=[hound.z]'>JMP</a>" : "null"])")
to_chat(hound,"<span class='notice'>You feel your belly slowly churn around [T], breaking them down into a soft slurry to be used as power for your systems.</span>")
to_chat(T,"<span class='notice'>You feel [hound]'s belly slowly churn around your form, breaking you down into a soft slurry to be used as power for [hound]'s systems.</span>")
@@ -445,7 +445,7 @@
var/mob/living/silicon/robot/hound = get_host()
if(!hound || !istype(target) || !proximity || target.anchored)
return
if (!target.devourable)
if (!CHECK_BITFIELD(target.vore_flags,DEVOURABLE))
to_chat(user, "The target registers an error code. Unable to insert into [src].")
return
if(patient)
@@ -509,7 +509,7 @@
if(iscarbon(target) || issilicon(target))
var/mob/living/trashman = target
if(!trashman.devourable)
if(!CHECK_BITFIELD(trashman.vore_flags,DEVOURABLE))
to_chat(user, "<span class='warning'>[target] registers an error code to your [src]</span>")
return
if(patient)
@@ -528,4 +528,4 @@
/obj/item/dogborg/sleeper/K9/flavour
name = "Recreational Sleeper"
desc = "A mounted, underslung sleeper, intended for holding willing occupants for leisurely purposes."
desc = "A mounted, underslung sleeper, intended for holding willing occupants for leisurely purposes."
+1 -1
View File
@@ -75,7 +75,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
if(!ui)
// Variable window height, depending on how many GPS units there are
// to show, clamped to relatively safe range.
var/gps_window_height = CLAMP(325 + GLOB.GPS_list.len * 14, 325, 700)
var/gps_window_height = clamp(325 + GLOB.GPS_list.len * 14, 325, 700)
ui = new(user, src, ui_key, "gps", "Global Positioning System", 470, gps_window_height, master_ui, state) //width, height
ui.open()
@@ -171,7 +171,7 @@
// Negative numbers will subtract
/obj/item/lightreplacer/proc/AddUses(amount = 1)
uses = CLAMP(uses + amount, 0, max_uses)
uses = clamp(uses + amount, 0, max_uses)
/obj/item/lightreplacer/proc/AddShards(amount = 1, user)
bulb_shards += amount
@@ -81,7 +81,7 @@
if(!usr.canUseTopic(src, BE_CLOSE))
return
new_code = round(new_code)
new_code = CLAMP(new_code, 1, 100)
new_code = clamp(new_code, 1, 100)
code = new_code
if(href_list["set"] == "power")
@@ -232,7 +232,7 @@ effective or pretty fucking useless.
charge = max(0,charge - 25)//Quick decrease in light
else
charge = min(max_charge,charge + 50) //Charge in the dark
animate(user,alpha = CLAMP(255 - charge,0,255),time = 10)
animate(user,alpha = clamp(255 - charge,0,255),time = 10)
/obj/item/jammer
+1 -1
View File
@@ -170,7 +170,7 @@
/obj/item/dice/proc/diceroll(mob/user)
result = roll(sides)
if(rigged && result != rigged)
if(prob(CLAMP(1/(sides - 1) * 100, 25, 80)))
if(prob(clamp(1/(sides - 1) * 100, 25, 80)))
result = rigged
var/fake_result = roll(sides)//Daredevil isn't as good as he used to be
var/comment = ""
+1 -1
View File
@@ -94,7 +94,7 @@
return
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
if(user.get_active_held_item() == src)
newtime = CLAMP(newtime, 10, 60000)
newtime = clamp(newtime, 10, 60000)
det_time = newtime
to_chat(user, "Timer set for [det_time] seconds.")
+2 -2
View File
@@ -197,9 +197,9 @@
/obj/item/his_grace/proc/adjust_bloodthirst(amt)
prev_bloodthirst = bloodthirst
if(prev_bloodthirst < HIS_GRACE_CONSUME_OWNER && !ascended)
bloodthirst = CLAMP(bloodthirst + amt, HIS_GRACE_SATIATED, HIS_GRACE_CONSUME_OWNER)
bloodthirst = clamp(bloodthirst + amt, HIS_GRACE_SATIATED, HIS_GRACE_CONSUME_OWNER)
else if(!ascended)
bloodthirst = CLAMP(bloodthirst + amt, HIS_GRACE_CONSUME_OWNER, HIS_GRACE_FALL_ASLEEP)
bloodthirst = clamp(bloodthirst + amt, HIS_GRACE_CONSUME_OWNER, HIS_GRACE_FALL_ASLEEP)
update_stats()
/obj/item/his_grace/proc/update_stats()
+27 -2
View File
@@ -239,19 +239,29 @@
if(user.mind && (user.mind.isholy) && !reskinned)
reskin_holy_weapon(user)
/**
* reskin_holy_weapon: Shows a user a list of all available nullrod reskins and based on his choice replaces the nullrod with the reskinned version
*
* Arguments:
* * M The mob choosing a nullrod reskin
*/
/obj/item/nullrod/proc/reskin_holy_weapon(mob/living/L)
if(GLOB.holy_weapon_type)
return
var/obj/item/holy_weapon
var/list/holy_weapons_list = subtypesof(/obj/item/nullrod) + list(HOLY_WEAPONS)
var/list/display_names = list()
var/list/nullrod_icons = list()
for(var/V in holy_weapons_list)
var/obj/item/nullrod/rodtype = V
if (initial(rodtype.chaplain_spawnable))
display_names[initial(rodtype.name)] = rodtype
nullrod_icons += list(initial(rodtype.name) = image(icon = initial(rodtype.icon), icon_state = initial(rodtype.icon_state)))
var/choice = input(L, "What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
if(QDELETED(src) || !choice || !in_range(L, src) || !CHECK_MOBILITY(L, MOBILITY_USE) || reskinned)
nullrod_icons = sortList(nullrod_icons)
var/choice = show_radial_menu(L, src , nullrod_icons, custom_check = CALLBACK(src, .proc/check_menu, L), radius = 42, require_near = TRUE)
if(!choice || !check_menu(L))
return
var/A = display_names[choice] // This needs to be on a separate var as list member access is not allowed for new
@@ -266,6 +276,21 @@
qdel(src)
L.put_in_active_hand(holy_weapon)
/**
* check_menu: Checks if we are allowed to interact with a radial menu
*
* Arguments:
* * user The mob interacting with a menu
*/
/obj/item/nullrod/proc/check_menu(mob/user)
if(!istype(user))
return FALSE
if(QDELETED(src) || reskinned)
return FALSE
if(user.incapacitated() || !user.is_holding(src))
return FALSE
return TRUE
/obj/item/nullrod/proc/jedi_spin(mob/living/user)
for(var/i in list(NORTH,SOUTH,EAST,WEST,EAST,SOUTH,NORTH,SOUTH,EAST,WEST,EAST,SOUTH))
user.setDir(i)
+1 -1
View File
@@ -74,7 +74,7 @@
L.SetAllImmobility(0)
L.SetSleeping(0)
L.SetUnconscious(0)
L.reagents.add_reagent(/datum/reagent/medicine/muscle_stimulant, CLAMP(5 - L.reagents.get_reagent_amount(/datum/reagent/medicine/muscle_stimulant), 0, 5)) //If you don't have legs or get bola'd, tough luck!
L.reagents.add_reagent(/datum/reagent/medicine/muscle_stimulant, clamp(5 - L.reagents.get_reagent_amount(/datum/reagent/medicine/muscle_stimulant), 0, 5)) //If you don't have legs or get bola'd, tough luck!
colorize(L)
/obj/item/hot_potato/examine(mob/user)
+2 -2
View File
@@ -201,8 +201,8 @@
return target
var/x_o = (target.x - starting.x)
var/y_o = (target.y - starting.y)
var/new_x = CLAMP((starting.x + (x_o * range_multiplier)), 0, world.maxx)
var/new_y = CLAMP((starting.y + (y_o * range_multiplier)), 0, world.maxy)
var/new_x = clamp((starting.x + (x_o * range_multiplier)), 0, world.maxx)
var/new_y = clamp((starting.y + (y_o * range_multiplier)), 0, world.maxy)
var/turf/newtarget = locate(new_x, new_y, starting.z)
return newtarget
+2 -2
View File
@@ -649,7 +649,7 @@
continue
usage += projectile_tick_speed_ecost
usage += (tracked[I] * projectile_damage_tick_ecost_coefficient)
energy = CLAMP(energy - usage, 0, maxenergy)
energy = clamp(energy - usage, 0, maxenergy)
if(energy <= 0)
deactivate_field()
visible_message("<span class='warning'>[src] blinks \"ENERGY DEPLETED\".</span>")
@@ -659,7 +659,7 @@
if(iscyborg(host.loc))
host = host.loc
else
energy = CLAMP(energy + energy_recharge, 0, maxenergy)
energy = clamp(energy + energy_recharge, 0, maxenergy)
return
if(host.cell && (host.cell.charge >= (host.cell.maxcharge * cyborg_cell_critical_percentage)) && (energy < maxenergy))
host.cell.use(energy_recharge*energy_recharge_cyborg_drain_coefficient)
+3 -3
View File
@@ -35,14 +35,14 @@
if(TH.force_wielded > initial(TH.force_wielded))
to_chat(user, "<span class='warning'>[TH] has already been refined before. It cannot be sharpened further!</span>")
return
TH.force_wielded = CLAMP(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
TH.force_wielded = clamp(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
if(I.force > initial(I.force))
to_chat(user, "<span class='warning'>[I] has already been refined before. It cannot be sharpened further!</span>")
return
user.visible_message("<span class='notice'>[user] sharpens [I] with [src]!</span>", "<span class='notice'>You sharpen [I], making it much more deadly than before.</span>")
I.sharpness = IS_SHARP_ACCURATE
I.force = CLAMP(I.force + increment, 0, max)
I.throwforce = CLAMP(I.throwforce + increment, 0, max)
I.force = clamp(I.force + increment, 0, max)
I.throwforce = clamp(I.throwforce + increment, 0, max)
I.name = "[prefix] [I.name]"
name = "worn out [name]"
desc = "[desc] At least, it used to."
+13 -15
View File
@@ -33,11 +33,11 @@
return TRUE
/obj/item/shield/alt_pre_attack(atom/A, mob/living/user, params)
user_shieldbash(user, A, user.a_intent != INTENT_HARM)
user_shieldbash(user, A, user.a_intent == INTENT_HARM)
return TRUE
/obj/item/shield/altafterattack(atom/target, mob/user, proximity_flag, click_parameters)
user_shieldbash(user, target, user.a_intent != INTENT_HARM)
user_shieldbash(user, target, user.a_intent == INTENT_HARM)
return TRUE
/obj/item/shield/proc/do_shieldbash_effect(mob/living/user, dir, harmful)
@@ -52,13 +52,13 @@
px = 12
if(WEST)
px = -12
var/oldpx = user.pixel_x
var/oldpy = user.pixel_y
animate(user, pixel_x = px, pixel_y = py, time = 3, easing = SINE_EASING | EASE_OUT, flags = ANIMATION_END_NOW)
animate(user, pixel_x = oldpx, pixel_y = oldpy, time = 3)
user.visible_message("<span class='warning'>[user] [harmful? "charges forwards with" : "sweeps"] [src]!</span>")
var/obj/effect/temp_visual/dir_setting/shield_bash/effect = new(user.loc, dir)
animate(effect, alpha = 0, pixel_x = px + 4, pixel_y = py + 4, time = 3)
effect.pixel_x = user.pixel_x - 32 //96x96 effect, -32.
effect.pixel_y = user.pixel_y - 32
user.visible_message("<span class='warning'>[user] [harmful? "charges forwards with" : "sweeps"] [src]!</span>")
animate(user, pixel_x = px, pixel_y = py, time = 3, easing = SINE_EASING | EASE_OUT, flags = ANIMATION_PARALLEL | ANIMATION_RELATIVE)
animate(user, pixel_x = -px, pixel_y = -py, time = 3, flags = ANIMATION_RELATIVE)
animate(effect, alpha = 0, pixel_x = px * 1.5, pixel_y = py * 1.5, time = 3, flags = ANIMATION_PARALLEL | ANIMATION_RELATIVE)
/obj/item/shield/proc/bash_target(mob/living/user, mob/living/target, bashdir, harmful)
if(!(target.status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)) // should probably add stun absorption check at some point I guess..
@@ -76,7 +76,7 @@
"<span class='warning'>[user] shoves you with [src]!</span>")
for(var/i in 1 to harmful? shieldbash_knockback : shieldbash_push_distance)
var/turf/new_turf = get_step(target, bashdir)
var/mob/living/carbon/human/H = locate() in new_turf
var/mob/living/carbon/human/H = locate() in (new_turf.contents - target)
if(H && harmful)
H.visible_message("<span class='warning'>[target] is sent crashing into [H]!</span>",
"<span class='userdanger'>[target] is sent crashing into you!</span>")
@@ -113,7 +113,8 @@
if(world.time < last_shieldbash + shieldbash_cooldown)
to_chat(user, "<span class='warning'>You can't bash with [src] again so soon!</span>")
return FALSE
if(isliving(target)) //GROUND SLAAAM
var/mob/living/livingtarget = target //only access after an isliving check!
if(isliving(target) && !CHECK_MOBILITY(livingtarget, MOBILITY_STAND)) //GROUND SLAAAM
if(!(shield_flags & SHIELD_BASH_GROUND_SLAM))
to_chat(user, "<span class='warning'>You can't ground slam with [src]!</span>")
return FALSE
@@ -122,7 +123,7 @@
playsound(src, harmful? "swing_hit" : 'sound/weapons/thudswoosh.ogg', 75, 1)
last_shieldbash = world.time
user.adjustStaminaLossBuffered(shieldbash_stamcost)
return 1
return TRUE
// Directional sweep!
last_shieldbash = world.time
user.adjustStaminaLossBuffered(shieldbash_stamcost)
@@ -168,7 +169,7 @@
max_integrity = 75
/obj/item/shield/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
if(ismovableatom(object))
if(ismovable(object))
var/atom/movable/AM = object
if(CHECK_BITFIELD(shield_flags, SHIELD_TRANSPARENT) && (AM.pass_flags & PASSGLASS))
return BLOCK_NONE
@@ -324,7 +325,6 @@ obj/item/shield/riot/bullet_proof
armor = list("melee" = 25, "bullet" = 25, "laser" = 5, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 80)
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
icon = 'icons/obj/items_and_weapons.dmi'
item_state = "metal"
icon_state = "makeshift_shield"
custom_materials = list(/datum/material/iron = 18000)
@@ -340,7 +340,6 @@ obj/item/shield/riot/bullet_proof
armor = list("melee" = 95, "bullet" = 95, "laser" = 75, "energy" = 60, "bomb" = 90, "bio" = 90, "rad" = 0, "fire" = 90, "acid" = 10) //Armor for the item, dosnt transfer to user
item_state = "metal"
icon_state = "metal"
icon = 'icons/obj/items_and_weapons.dmi'
block_chance = 75 //1/4 shots will hit*
force = 16
slowdown = 2
@@ -360,7 +359,6 @@ obj/item/shield/riot/bullet_proof
desc = "A massive shield that can block a lot of attacks and can take a lot of abuse before breaking." //It cant break unless it is removed from the implant
item_state = "metal"
icon_state = "metal"
icon = 'icons/obj/items_and_weapons.dmi'
block_chance = 30 //May be big but hard to move around to block.
slowdown = 1
shield_flags = SHIELD_FLAGS_DEFAULT
+1 -9
View File
@@ -40,12 +40,4 @@
user.visible_message("<span class='warning'>[user] waves around \the \"[label]\" sign.</span>")
else
user.visible_message("<span class='warning'>[user] waves around blank sign.</span>")
user.changeNext_move(CLICK_CD_MELEE)
/datum/crafting_recipe/picket_sign
name = "Picket Sign"
result = /obj/item/picket_sign
reqs = list(/obj/item/stack/rods = 1,
/obj/item/stack/sheet/cardboard = 2)
time = 80
category = CAT_MISC
user.changeNext_move(CLICK_CD_MELEE)
+1 -1
View File
@@ -37,7 +37,7 @@
/obj/item/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
for(var/atom/X in orange(5,pull))
if(ismovableatom(X))
if(ismovable(X))
var/atom/movable/A = X
if(A == wielder)
continue
+2 -2
View File
@@ -71,9 +71,9 @@
/obj/item/stack/proc/update_weight()
if(amount <= (max_amount * (1/3)))
w_class = CLAMP(full_w_class-2, WEIGHT_CLASS_TINY, full_w_class)
w_class = clamp(full_w_class-2, WEIGHT_CLASS_TINY, full_w_class)
else if (amount <= (max_amount * (2/3)))
w_class = CLAMP(full_w_class-1, WEIGHT_CLASS_TINY, full_w_class)
w_class = clamp(full_w_class-1, WEIGHT_CLASS_TINY, full_w_class)
else
w_class = full_w_class
+2 -2
View File
@@ -138,7 +138,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
new /obj/item/crowbar/red(src)
new /obj/item/wirecutters(src, "red")
new /obj/item/multitool(src)
new /obj/item/clothing/gloves/combat(src)
new /obj/item/clothing/gloves/tackler/combat/insulated(src)
/obj/item/storage/toolbox/drone
name = "mechanical toolbox"
@@ -311,7 +311,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
new /obj/item/crowbar/red(src)
new /obj/item/wirecutters(src, "red")
new /obj/item/multitool/ai_detect(src)
new /obj/item/clothing/gloves/combat(src)
new /obj/item/clothing/gloves/tackler/combat/insulated(src)
/obj/item/storage/toolbox/gold_real/ComponentInitialize()
. = ..()
+1 -1
View File
@@ -204,7 +204,7 @@
pressure = text2num(pressure)
. = TRUE
if(.)
distribute_pressure = CLAMP(round(pressure), TANK_MIN_RELEASE_PRESSURE, TANK_MAX_RELEASE_PRESSURE)
distribute_pressure = clamp(round(pressure), TANK_MIN_RELEASE_PRESSURE, TANK_MAX_RELEASE_PRESSURE)
/obj/item/tank/remove_air(amount)
return air_contents.remove(amount)
+1 -1
View File
@@ -256,7 +256,7 @@
. = ..()
if(!sliver)
return
if(proximity && ismovableatom(O) && O != sliver)
if(proximity && ismovable(O) && O != sliver)
Consume(O, user)
/obj/item/hemostat/supermatter/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) // no instakill supermatter javelins
+3 -3
View File
@@ -31,7 +31,7 @@
if(damage_flag)
armor_protection = armor.getRating(damage_flag)
if(armor_protection) //Only apply weak-against-armor/hollowpoint effects if there actually IS armor.
armor_protection = CLAMP(armor_protection - armour_penetration, 0, 100)
armor_protection = clamp(armor_protection - armour_penetration, 0, 100)
return round(damage_amount * (100 - armor_protection)*0.01, DAMAGE_PRECISION)
//the sound played when the obj is damaged.
@@ -213,7 +213,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
if(T.intact && level == 1) //fire can't damage things hidden below the floor.
return
if(exposed_temperature && !(resistance_flags & FIRE_PROOF))
take_damage(CLAMP(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0)
take_damage(clamp(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0)
if(!(resistance_flags & ON_FIRE) && (resistance_flags & FLAMMABLE))
resistance_flags |= ON_FIRE
SSfire_burning.processing[src] = src
@@ -244,7 +244,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
if(has_buckled_mobs())
for(var/m in buckled_mobs)
var/mob/living/buckled_mob = m
buckled_mob.electrocute_act((CLAMP(round(strength/400), 10, 90) + rand(-5, 5)), src, flags = SHOCK_TESLA)
buckled_mob.electrocute_act((clamp(round(strength/400), 10, 90) + rand(-5, 5)), src, flags = SHOCK_TESLA)
/obj/proc/reset_shocked()
obj_flags &= ~BEING_SHOCKED
@@ -505,7 +505,7 @@
/obj/structure/closet/container_resist(mob/living/user)
if(opened)
return
if(ismovableatom(loc))
if(ismovable(loc))
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
var/atom/movable/AM = loc
@@ -37,8 +37,8 @@
..()
new /obj/item/clothing/glasses/eyepatch(src)
new /obj/item/clothing/glasses/sunglasses(src)
new /obj/item/clothing/gloves/combat(src)
new /obj/item/clothing/gloves/combat(src)
new /obj/item/clothing/gloves/tackler/combat(src)
new /obj/item/clothing/gloves/tackler/combat(src)
new /obj/item/clothing/head/helmet/swat(src)
new /obj/item/clothing/head/helmet/swat(src)
new /obj/item/clothing/mask/gas/sechailer/swat(src)
+1 -1
View File
@@ -130,7 +130,7 @@
if(burn_time_remaining() < MAXIMUM_BURN_TIMER)
flame_expiry_timer = world.time + MAXIMUM_BURN_TIMER
else
fuel_added = CLAMP(fuel_added + amount, 0, MAXIMUM_BURN_TIMER)
fuel_added = clamp(fuel_added + amount, 0, MAXIMUM_BURN_TIMER)
/obj/structure/fireplace/proc/burn_time_remaining()
if(lit)
@@ -453,7 +453,7 @@
name = "Syndicate Operative Empty"
uniform = /obj/item/clothing/under/syndicate
shoes = /obj/item/clothing/shoes/combat
gloves = /obj/item/clothing/gloves/combat
gloves = /obj/item/clothing/gloves/tackler/combat/insulated
ears = /obj/item/radio/headset/syndicate/alt
back = /obj/item/storage/backpack
implants = list(/obj/item/implant/weapons_auth)
+1 -1
View File
@@ -294,7 +294,7 @@
/obj/structure/girder/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSGRILLE)
+1 -1
View File
@@ -129,7 +129,7 @@
/obj/structure/grille/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSGRILLE)
+1 -1
View File
@@ -159,7 +159,7 @@
if(H.dna.species.use_skintones)
var/list/choices = GLOB.skin_tones
if(CONFIG_GET(number/allow_custom_skintones))
if(CONFIG_GET(flag/allow_custom_skintones))
choices += "custom"
var/new_s_tone = input(H, "Choose your skin tone:", "Race change") as null|anything in choices
if(new_s_tone)
+2 -2
View File
@@ -333,7 +333,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
to_chat(user, "<span class='warning'>That's not connected to anything!</span>")
/obj/structure/tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user)
if(!ismovableatom(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
if(!ismovable(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
return
if(!ismob(O))
if(!istype(O, /obj/structure/closet/body_bag))
@@ -375,6 +375,6 @@ GLOBAL_LIST_EMPTY(crematoriums)
/obj/structure/tray/m_tray/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSTABLE)
+4 -4
View File
@@ -103,7 +103,7 @@
/obj/structure/table/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSTABLE)
@@ -175,8 +175,8 @@
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
I.pixel_x = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_y = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
return 1
else
return ..()
@@ -610,7 +610,7 @@
/obj/structure/rack/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSTABLE)