Merge branch 'master' into cube-world
This commit is contained in:
@@ -104,7 +104,7 @@ GLOBAL_VAR(antag_prototypes)
|
||||
|
||||
var/special_statuses = get_special_statuses()
|
||||
if(length(special_statuses))
|
||||
out += get_special_statuses() + "<br>"
|
||||
out += special_statuses + "<br>"
|
||||
|
||||
if(!GLOB.antag_prototypes)
|
||||
GLOB.antag_prototypes = list()
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
var/new_volume = input(user, "Choose a volume.", "Sound Emitter", sound_volume) as null|num
|
||||
if(isnull(new_volume))
|
||||
return
|
||||
new_volume = CLAMP(new_volume, 0, 100)
|
||||
new_volume = clamp(new_volume, 0, 100)
|
||||
sound_volume = new_volume
|
||||
to_chat(user, "<span class='notice'>Volume set to [sound_volume]%.</span>")
|
||||
if(href_list["edit_mode"])
|
||||
@@ -118,7 +118,7 @@
|
||||
var/new_radius = input(user, "Choose a radius.", "Sound Emitter", sound_volume) as null|num
|
||||
if(isnull(new_radius))
|
||||
return
|
||||
new_radius = CLAMP(new_radius, 0, 127)
|
||||
new_radius = clamp(new_radius, 0, 127)
|
||||
play_radius = new_radius
|
||||
to_chat(user, "<span class='notice'>Audible radius set to [play_radius].</span>")
|
||||
if(href_list["play"])
|
||||
|
||||
@@ -393,7 +393,7 @@
|
||||
var/nsd = CONFIG_GET(number/note_stale_days)
|
||||
var/nfd = CONFIG_GET(number/note_fresh_days)
|
||||
if (agegate && type == "note" && isnum(nsd) && isnum(nfd) && nsd > nfd)
|
||||
var/alpha = CLAMP(100 - (age - nfd) * (85 / (nsd - nfd)), 15, 100)
|
||||
var/alpha = clamp(100 - (age - nfd) * (85 / (nsd - nfd)), 15, 100)
|
||||
if (alpha < 100)
|
||||
if (alpha <= 15)
|
||||
if (skipped)
|
||||
|
||||
@@ -2363,7 +2363,7 @@
|
||||
return
|
||||
|
||||
var/list/offset = splittext(href_list["offset"],",")
|
||||
var/number = CLAMP(text2num(href_list["object_count"]), 1, 100)
|
||||
var/number = clamp(text2num(href_list["object_count"]), 1, 100)
|
||||
var/X = offset.len > 0 ? text2num(offset[1]) : 0
|
||||
var/Y = offset.len > 1 ? text2num(offset[2]) : 0
|
||||
var/Z = offset.len > 2 ? text2num(offset[3]) : 0
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
if ("set_charge")
|
||||
var/newcharge = input("New charge (0-[borg.cell.maxcharge]):", borg.name, borg.cell.charge) as num|null
|
||||
if (newcharge)
|
||||
borg.cell.charge = CLAMP(newcharge, 0, borg.cell.maxcharge)
|
||||
borg.cell.charge = clamp(newcharge, 0, borg.cell.maxcharge)
|
||||
message_admins("[key_name_admin(user)] set the charge of [ADMIN_LOOKUPFLW(borg)] to [borg.cell.charge].")
|
||||
log_admin("[key_name(user)] set the charge of [key_name(borg)] to [borg.cell.charge].")
|
||||
if ("remove_cell")
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/freq = input(usr, "What frequency would you like the sound to play at?",, 1) as null|num
|
||||
if(!freq)
|
||||
freq = 1
|
||||
vol = CLAMP(vol, 1, 100)
|
||||
vol = clamp(vol, 1, 100)
|
||||
|
||||
var/sound/admin_sound = new()
|
||||
admin_sound.file = S
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
/mob/living/simple_animal/hostile/blob/fire_act(exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(exposed_temperature)
|
||||
adjustFireLoss(CLAMP(0.01 * exposed_temperature, 1, 5))
|
||||
adjustFireLoss(clamp(0.01 * exposed_temperature, 1, 5))
|
||||
else
|
||||
adjustFireLoss(5)
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
B.hud_used.blobpwrdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#82ed00'>[round(blob_core.obj_integrity)]</font></div>"
|
||||
|
||||
/mob/camera/blob/proc/add_points(points)
|
||||
blob_points = CLAMP(blob_points + points, 0, max_blob_points)
|
||||
blob_points = clamp(blob_points + points, 0, max_blob_points)
|
||||
hud_used.blobpwrdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#82ed00'>[round(blob_points)]</font></div>"
|
||||
|
||||
/mob/camera/blob/say(message, bubble_type, var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
/obj/structure/blob/CanAStarPass(ID, dir, caller)
|
||||
. = 0
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || (mover.pass_flags & PASSBLOB)
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/antagonist/bloodsucker/proc/AddBloodVolume(value)
|
||||
owner.current.blood_volume = CLAMP(owner.current.blood_volume + value, 0, max_blood_volume)
|
||||
owner.current.blood_volume = clamp(owner.current.blood_volume + value, 0, max_blood_volume)
|
||||
update_hud()
|
||||
|
||||
/datum/antagonist/bloodsucker/proc/HandleFeeding(mob/living/carbon/target, mult=1)
|
||||
@@ -112,7 +112,7 @@
|
||||
CheckVampOrgans() // Heart, Eyes
|
||||
if(check_limbs(costMult))
|
||||
return TRUE
|
||||
|
||||
|
||||
// BRUTE: Always Heal
|
||||
var/bruteheal = min(C.getBruteLoss(), actual_regen)
|
||||
var/toxinheal = min(C.getToxLoss(), actual_regen)
|
||||
@@ -121,7 +121,7 @@
|
||||
if(mult == 0)
|
||||
return TRUE
|
||||
if(owner.current.stat >= UNCONSCIOUS) //Faster regeneration while unconcious, so you dont have to wait all day
|
||||
mult *= 2
|
||||
mult *= 2
|
||||
// We have damage. Let's heal (one time)
|
||||
C.adjustBruteLoss(-bruteheal * mult, forced = TRUE)// Heal BRUTE / BURN in random portions throughout the body.
|
||||
C.adjustFireLoss(-fireheal * mult, forced = TRUE)
|
||||
@@ -129,7 +129,7 @@
|
||||
//C.heal_overall_damage(bruteheal * mult, fireheal * mult) // REMOVED: We need to FORCE this, because otherwise, vamps won't heal EVER. Swapped to above.
|
||||
AddBloodVolume((bruteheal * -0.5 + fireheal * -1 + toxinheal * -0.2) / mult * costMult) // Costs blood to heal
|
||||
return TRUE // Healed! Done for this tick.
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/antagonist/bloodsucker/proc/check_limbs(costMult)
|
||||
@@ -137,7 +137,7 @@
|
||||
var/mob/living/carbon/C = owner.current
|
||||
var/list/missing = C.get_missing_limbs()
|
||||
if(missing.len && C.blood_volume < limb_regen_cost + 5)
|
||||
return FALSE
|
||||
return FALSE
|
||||
for(var/targetLimbZone in missing) // 1) Find ONE Limb and regenerate it.
|
||||
C.regenerate_limb(targetLimbZone, FALSE) // regenerate_limbs() <--- If you want to EXCLUDE certain parts, do it like this ----> regenerate_limbs(0, list("head"))
|
||||
AddBloodVolume(50)
|
||||
@@ -183,7 +183,7 @@
|
||||
owner.current.blur_eyes(8 - 8 * (owner.current.blood_volume / BLOOD_VOLUME_BAD))
|
||||
// Nutrition
|
||||
owner.current.nutrition = clamp(owner.current.blood_volume, 545, 0) //The amount of blood is how full we are.
|
||||
//A bit higher regeneration based on blood volume
|
||||
//A bit higher regeneration based on blood volume
|
||||
if(owner.current.blood_volume < 700)
|
||||
additional_regen = 0.4
|
||||
else if(owner.current.blood_volume < BLOOD_VOLUME_NORMAL)
|
||||
@@ -369,8 +369,8 @@
|
||||
//Puke blood only if puke_blood is true, and loose some blood, else just puke normally.
|
||||
if(puke_blood)
|
||||
C.blood_volume = max(0, C.blood_volume - foodInGut * 2)
|
||||
C.vomit(foodInGut * 4, foodInGut * 2, 0)
|
||||
else
|
||||
C.vomit(foodInGut * 4, foodInGut * 2, 0)
|
||||
else
|
||||
C.vomit(foodInGut * 4, FALSE, 0)
|
||||
C.Stun(30)
|
||||
//C.Dizzy(50)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
// Heads?
|
||||
if (target_role == "HEAD")
|
||||
target_amount = rand(1, round(SSticker.mode.num_players() / 20))
|
||||
target_amount = CLAMP(target_amount,1,3)
|
||||
target_amount = clamp(target_amount,1,3)
|
||||
// Department?
|
||||
else
|
||||
switch(target_role)
|
||||
@@ -100,7 +100,7 @@
|
||||
if("Quartermaster")
|
||||
department_string = "Cargo"
|
||||
target_amount = rand(round(SSticker.mode.num_players() / 20), round(SSticker.mode.num_players() / 10))
|
||||
target_amount = CLAMP(target_amount, 2, 4)
|
||||
target_amount = clamp(target_amount, 2, 4)
|
||||
..()
|
||||
|
||||
// EXPLANATION
|
||||
|
||||
@@ -200,39 +200,3 @@
|
||||
to_chat(resident, "<span class='notice'>You fix the mechanism and lock it.</span>")
|
||||
broken = FALSE
|
||||
locked = TRUE
|
||||
|
||||
// Look up recipes.dm OR pneumaticCannon.dm
|
||||
/datum/crafting_recipe/bloodsucker/blackcoffin
|
||||
name = "Black Coffin"
|
||||
result = /obj/structure/closet/crate/coffin/blackcoffin
|
||||
tools = list(/obj/item/weldingtool,
|
||||
/obj/item/screwdriver)
|
||||
reqs = list(/obj/item/stack/sheet/cloth = 1,
|
||||
/obj/item/stack/sheet/mineral/wood = 5,
|
||||
/obj/item/stack/sheet/metal = 1)
|
||||
///obj/item/stack/packageWrap = 8,
|
||||
///obj/item/pipe = 2)
|
||||
time = 150
|
||||
category = CAT_MISC
|
||||
always_availible = TRUE
|
||||
|
||||
/datum/crafting_recipe/bloodsucker/meatcoffin
|
||||
name = "Meat Coffin"
|
||||
result =/obj/structure/closet/crate/coffin/meatcoffin
|
||||
tools = list(/obj/item/kitchen/knife,
|
||||
/obj/item/kitchen/rollingpin)
|
||||
reqs = list(/obj/item/reagent_containers/food/snacks/meat/slab = 5,
|
||||
/obj/item/restraints/handcuffs/cable = 1)
|
||||
time = 150
|
||||
category = CAT_MISC
|
||||
always_availible = TRUE
|
||||
|
||||
/datum/crafting_recipe/bloodsucker/metalcoffin
|
||||
name = "Metal Coffin"
|
||||
result =/obj/structure/closet/crate/coffin/metalcoffin
|
||||
tools = list(/obj/item/weldingtool,
|
||||
/obj/item/screwdriver)
|
||||
reqs = list(/obj/item/stack/sheet/metal = 5)
|
||||
time = 100
|
||||
category = CAT_MISC
|
||||
always_availible = TRUE
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
// Find Animals in Area
|
||||
/* if(rand(0,2) == 0)
|
||||
var/mobCount = 0
|
||||
var/mobMax = CLAMP(area_turfs.len / 25, 1, 4)
|
||||
var/mobMax = clamp(area_turfs.len / 25, 1, 4)
|
||||
for (var/turf/T in area_turfs)
|
||||
if(!T) continue
|
||||
var/mob/living/simple_animal/SA = locate() in T
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
/datum/action/bloodsucker/fortitude
|
||||
name = "Fortitude"//"Cellular Emporium"
|
||||
name = "Fortitude"
|
||||
desc = "Withstand egregious physical wounds and walk away from attacks that would stun, pierce, and dismember lesser beings. You cannot run while active."
|
||||
button_icon_state = "power_fortitude"
|
||||
bloodcost = 30
|
||||
@@ -11,28 +11,27 @@
|
||||
bloodsucker_can_buy = TRUE
|
||||
amToggle = TRUE
|
||||
warn_constant_cost = TRUE
|
||||
var/was_running
|
||||
|
||||
var/this_resist // So we can raise and lower your brute resist based on what your level_current WAS.
|
||||
var/fortitude_resist // So we can raise and lower your brute resist based on what your level_current WAS.
|
||||
|
||||
/datum/action/bloodsucker/fortitude/ActivatePower()
|
||||
var/datum/antagonist/bloodsucker/bloodsuckerdatum = owner.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||
var/datum/antagonist/bloodsucker/B = owner.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||
var/mob/living/user = owner
|
||||
to_chat(user, "<span class='notice'>Your flesh, skin, and muscles become as steel.</span>")
|
||||
// Traits & Effects
|
||||
ADD_TRAIT(user, TRAIT_PIERCEIMMUNE, "fortitude")
|
||||
ADD_TRAIT(user, TRAIT_NODISMEMBER, "fortitude")
|
||||
ADD_TRAIT(user, TRAIT_STUNIMMUNE, "fortitude")
|
||||
ADD_TRAIT(user, TRAIT_NORUNNING, "fortitude")
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
this_resist = max(0.3, 0.7 - level_current * 0.1)
|
||||
H.physiology.brute_mod *= this_resist//0.5
|
||||
H.physiology.burn_mod *= this_resist//0.5
|
||||
// Stop Running (Taken from /datum/quirk/nyctophobia in negative.dm)
|
||||
var/was_running = (user.m_intent == MOVE_INTENT_RUN)
|
||||
fortitude_resist = max(0.3, 0.7 - level_current * 0.1)
|
||||
H.physiology.brute_mod *= fortitude_resist
|
||||
H.physiology.burn_mod *= fortitude_resist
|
||||
was_running = (user.m_intent == MOVE_INTENT_RUN)
|
||||
if(was_running)
|
||||
user.toggle_move_intent()
|
||||
while(bloodsuckerdatum && ContinueActive(user) || user.m_intent == MOVE_INTENT_RUN)
|
||||
while(B && ContinueActive(user) || user.m_intent == MOVE_INTENT_RUN)
|
||||
if(istype(user.buckled, /obj/vehicle)) //We dont want people using fortitude being able to use vehicles
|
||||
var/obj/vehicle/V = user.buckled
|
||||
var/datum/component/riding/VRD = V.GetComponent(/datum/component/riding)
|
||||
@@ -44,20 +43,21 @@
|
||||
to_chat(user, "<span class='notice'>You fall off the [V], your weight making you too heavy to be supported by it.</span>")
|
||||
// Pay Blood Toll (if awake)
|
||||
if(user.stat == CONSCIOUS)
|
||||
bloodsuckerdatum.AddBloodVolume(-0.5) // Used to be 0.3 blood per 2 seconds, but we're making it more expensive to keep on.
|
||||
B.AddBloodVolume(-0.5)
|
||||
sleep(20) // Check every few ticks that we haven't disabled this power
|
||||
// Return to Running (if you were before)
|
||||
if(was_running && user.m_intent != MOVE_INTENT_RUN)
|
||||
user.toggle_move_intent()
|
||||
|
||||
|
||||
/datum/action/bloodsucker/fortitude/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||
..()
|
||||
// Restore Traits & Effects
|
||||
REMOVE_TRAIT(user, TRAIT_PIERCEIMMUNE, "fortitude")
|
||||
REMOVE_TRAIT(user, TRAIT_NODISMEMBER, "fortitude")
|
||||
REMOVE_TRAIT(user, TRAIT_STUNIMMUNE, "fortitude")
|
||||
REMOVE_TRAIT(user, TRAIT_NORUNNING, "fortitude")
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.physiology.brute_mod /= this_resist//0.5
|
||||
H.physiology.burn_mod /= this_resist//0.5
|
||||
if(!ishuman(owner))
|
||||
return
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.physiology.brute_mod /= fortitude_resist
|
||||
H.physiology.burn_mod /= fortitude_resist
|
||||
if(was_running && user.m_intent == MOVE_INTENT_WALK)
|
||||
user.toggle_move_intent()
|
||||
|
||||
|
||||
@@ -1,88 +1,46 @@
|
||||
// Level 1: Grapple level 2
|
||||
// Level 2: Grapple 3 from Behind
|
||||
// Level 3: Grapple 3 from Shadows
|
||||
/datum/action/bloodsucker/targeted/lunge
|
||||
|
||||
|
||||
/datum/action/bloodsucker/lunge
|
||||
name = "Predatory Lunge"
|
||||
desc = "Spring at your target and aggressively grapple them without warning. Attacks from concealment or the rear may even knock them down."
|
||||
desc = "Prepare the strenght to grapple your prey."
|
||||
button_icon_state = "power_lunge"
|
||||
bloodcost = 10
|
||||
cooldown = 120
|
||||
target_range = 3
|
||||
power_activates_immediately = TRUE
|
||||
message_Trigger = "Whom will you ensnare within your grasp?"
|
||||
must_be_capacitated = TRUE
|
||||
cooldown = 30
|
||||
bloodsucker_can_buy = TRUE
|
||||
warn_constant_cost = TRUE
|
||||
amToggle = TRUE
|
||||
var/leap_skill_mod = 5
|
||||
|
||||
/datum/action/bloodsucker/targeted/lunge/CheckCanUse(display_error)
|
||||
if(!..(display_error))// DEFAULT CHECKS
|
||||
return FALSE
|
||||
// Being Grabbed
|
||||
if(owner.pulledby && owner.pulledby.grab_state >= GRAB_AGGRESSIVE)
|
||||
if(display_error)
|
||||
to_chat(owner, "<span class='warning'>You're being grabbed!</span>")
|
||||
return FALSE
|
||||
if(!owner.has_gravity(owner.loc))//TODO figure out how to check if theyre able to move while in nograv
|
||||
if(display_error)
|
||||
to_chat(owner, "<span class='warning'>You cant lunge while floating!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
/datum/action/bloodsucker/lunge/New()
|
||||
. = ..()
|
||||
|
||||
|
||||
/datum/action/bloodsucker/targeted/lunge/CheckValidTarget(atom/A)
|
||||
return iscarbon(A)
|
||||
/datum/action/bloodsucker/lunge/Destroy()
|
||||
. = ..()
|
||||
UnregisterSignal(owner, COMSIG_CARBON_TACKLED)
|
||||
|
||||
/datum/action/bloodsucker/targeted/lunge/CheckCanTarget(atom/A, display_error)
|
||||
// Check: Self
|
||||
if(target == owner)
|
||||
return FALSE
|
||||
// Check: Range
|
||||
//if (!(target in view(target_range, get_turf(owner))))
|
||||
// if (display_error)
|
||||
// to_chat(owner, "<span class='warning'>Your victim is too far away.</span>")
|
||||
// return FALSE
|
||||
// DEFAULT CHECKS (Distance)
|
||||
if(!..())
|
||||
return FALSE
|
||||
// Check: Turf
|
||||
var/mob/living/L = A
|
||||
if(!isturf(L.loc))
|
||||
return FALSE
|
||||
return TRUE
|
||||
/datum/action/bloodsucker/lunge/ActivatePower()
|
||||
var/mob/living/carbon/user = owner
|
||||
var/datum/antagonist/bloodsucker/B = user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||
var/datum/component/tackler/T = user.LoadComponent(/datum/component/tackler)
|
||||
T.stamina_cost = 50
|
||||
T.base_knockdown = 3 SECONDS
|
||||
T.range = 4
|
||||
T.speed = 0.8
|
||||
T.skill_mod = 5 //Monstrous tackling
|
||||
T.min_distance = 2
|
||||
active = TRUE
|
||||
user.toggle_throw_mode()
|
||||
RegisterSignal(user, COMSIG_CARBON_TACKLED, .proc/DelayedDeactivatePower)
|
||||
while(B && ContinueActive(user))
|
||||
B.AddBloodVolume(-0.1)
|
||||
sleep(5)
|
||||
|
||||
/datum/action/bloodsucker/targeted/lunge/FireTargetedPower(atom/A)
|
||||
// set waitfor = FALSE <---- DONT DO THIS!We WANT this power to hold up ClickWithPower(), so that we can unlock the power when it's done.
|
||||
var/mob/living/carbon/target = A
|
||||
var/turf/T = get_turf(target)
|
||||
var/mob/living/L = owner
|
||||
// Clear Vars
|
||||
owner.pulling = null
|
||||
// Will we Knock them Down?
|
||||
var/do_knockdown = !is_A_facing_B(target,owner) || owner.alpha <= 0 || istype(owner.loc, /obj/structure/closet)
|
||||
// CAUSES: Target has their back to me, I'm invisible, or I'm in a Closet
|
||||
// Step One: Heatseek toward Target's Turf
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/_walk, owner, 0), 2 SECONDS)
|
||||
target.playsound_local(get_turf(owner), 'sound/bloodsucker/lunge_warn.ogg', 60, FALSE, pressure_affected = FALSE) // target-only telegraphing
|
||||
owner.playsound_local(owner, 'sound/bloodsucker/lunge_warn.ogg', 60, FALSE, pressure_affected = FALSE) // audio feedback to the user
|
||||
if(do_mob(owner, owner, 7, TRUE, TRUE))
|
||||
walk_towards(owner, T, 0.1, 10) // yes i know i shouldn't use this but i don't know how to work in anything better
|
||||
if(get_turf(owner) != T && !(isliving(target) && target.Adjacent(owner)) && owner.incapacitated() && !CHECK_MOBILITY(L, MOBILITY_STAND))
|
||||
var/send_dir = get_dir(owner, T)
|
||||
new /datum/forced_movement(owner, get_ranged_target_turf(owner, send_dir, 1), 1, FALSE)
|
||||
owner.spin(10)
|
||||
// Step Two: Check if I'm at/adjectent to Target's CURRENT turf (not original...that was just a destination)
|
||||
for(var/i in 1 to 6)
|
||||
if (target.Adjacent(owner))
|
||||
// LEVEL 2: If behind target, mute or unconscious!
|
||||
if(do_knockdown) // && level_current >= 1)
|
||||
target.Knockdown(15 + 10 * level_current,1)
|
||||
target.adjustStaminaLoss(40 + 10 * level_current)
|
||||
// Cancel Walk (we were close enough to contact them)
|
||||
walk(owner, 0)
|
||||
target.Stun(10,1) //Without this the victim can just walk away
|
||||
target.grabbedby(owner) // Taken from mutations.dm under changelings
|
||||
target.grippedby(owner, instant = TRUE) //instant aggro grab
|
||||
break
|
||||
sleep(3)
|
||||
//Without this, the leap component would get removed too early, causing the normal crash into effects.
|
||||
/datum/action/bloodsucker/lunge/proc/DelayedDeactivatePower()
|
||||
addtimer(CALLBACK(src, .proc/DeactivatePower), 1 SECONDS, TIMER_UNIQUE)
|
||||
|
||||
/datum/action/bloodsucker/targeted/lunge/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||
..() // activate = FALSE
|
||||
user.update_mobility()
|
||||
/datum/action/bloodsucker/lunge/DeactivatePower(mob/living/user = owner)
|
||||
. = ..()
|
||||
qdel(user.GetComponent(/datum/component/tackler))
|
||||
UnregisterSignal(user, COMSIG_CARBON_TACKLED)
|
||||
|
||||
@@ -430,7 +430,7 @@
|
||||
objectives += destroy_objective
|
||||
else
|
||||
if(prob(70))
|
||||
var/datum/objective/assassinate/kill_objective = new
|
||||
var/datum/objective/assassinate/once/kill_objective = new
|
||||
kill_objective.owner = owner
|
||||
if(team_mode) //No backstabbing while in a team
|
||||
kill_objective.find_target_by_role(role = ROLE_CHANGELING, role_type = 1, invert = 1)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
changeling.purchasedpowers -= src
|
||||
|
||||
var/newmob = user.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS)
|
||||
var/newmob = user.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_KEEPSE)
|
||||
|
||||
changeling_transform(newmob, chosen_prof)
|
||||
return TRUE
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
if(!do_after(user, repair_values["healing_for_cycle"] * fabricator.speed_multiplier, target = src, \
|
||||
extra_checks = CALLBACK(fabricator, /obj/item/clockwork/replica_fabricator.proc/fabricator_repair_checks, repair_values, src, user, TRUE)))
|
||||
break
|
||||
obj_integrity = CLAMP(obj_integrity + repair_values["healing_for_cycle"], 0, max_integrity)
|
||||
obj_integrity = clamp(obj_integrity + repair_values["healing_for_cycle"], 0, max_integrity)
|
||||
adjust_clockwork_power(-repair_values["power_required"])
|
||||
playsound(src, 'sound/machines/click.ogg', 50, 1)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
if(GLOB.ratvar_awakens)
|
||||
current_power = GLOB.clockwork_power = INFINITY
|
||||
else
|
||||
current_power = GLOB.clockwork_power = CLAMP(GLOB.clockwork_power + amount, 0, MAX_CLOCKWORK_POWER)
|
||||
current_power = GLOB.clockwork_power = clamp(GLOB.clockwork_power + amount, 0, MAX_CLOCKWORK_POWER)
|
||||
for(var/obj/effect/clockwork/sigil/transmission/T in GLOB.all_clockwork_objects)
|
||||
T.update_icon()
|
||||
var/unlock_message
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
var/mob/living/carbon/C = L
|
||||
C.stuttering = max(8, C.stuttering)
|
||||
C.drowsyness = max(8, C.drowsyness)
|
||||
C.confused += CLAMP(16 - C.confused, 0, 8)
|
||||
C.confused += clamp(16 - C.confused, 0, 8)
|
||||
C.apply_status_effect(STATUS_EFFECT_BELLIGERENT)
|
||||
L.adjustFireLoss(15)
|
||||
..()
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
if(issilicon(L))
|
||||
L.DefaultCombatKnockdown(100)
|
||||
else if(iscultist(L))
|
||||
L.confused += CLAMP(10 - L.confused, 0, 5) // Spearthrow now confuses enemy cultists + just deals extra damage / sets on fire instead of hardstunning + damage
|
||||
L.confused += clamp(10 - L.confused, 0, 5) // Spearthrow now confuses enemy cultists + just deals extra damage / sets on fire instead of hardstunning + damage
|
||||
to_chat(L, "<span class ='userdanger'>[src] crashes into you with burning force, sending you reeling!</span>")
|
||||
L.adjust_fire_stacks(2)
|
||||
L.DefaultCombatKnockdown(1)
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
var/mob/living/L = M.current
|
||||
if(ishuman(L) && L.stat != DEAD)
|
||||
human_servants++
|
||||
construct_limit = round(CLAMP((human_servants / 4), 1, 3)) //1 per 4 human servants, maximum of 3
|
||||
construct_limit = round(clamp((human_servants / 4), 1, 3)) //1 per 4 human servants, maximum of 3
|
||||
|
||||
//Summon Neovgre: Summon a very powerful combat mech that explodes when destroyed for massive damage.
|
||||
/datum/clockwork_scripture/create_object/summon_arbiter
|
||||
|
||||
@@ -63,4 +63,4 @@
|
||||
break
|
||||
if(!M)
|
||||
M = H.apply_status_effect(STATUS_EFFECT_MANIAMOTOR, src)
|
||||
M.severity = CLAMP(M.severity + ((11 - get_dist(src, H)) * efficiency * efficiency), 0, MAX_MANIA_SEVERITY)
|
||||
M.severity = clamp(M.severity + ((11 - get_dist(src, H)) * efficiency * efficiency), 0, MAX_MANIA_SEVERITY)
|
||||
|
||||
@@ -454,16 +454,16 @@
|
||||
S.emp_act(EMP_HEAVY)
|
||||
else if(iscarbon(target))
|
||||
var/mob/living/carbon/C = L
|
||||
C.silent += CLAMP(12 - C.silent, 0, 6)
|
||||
C.stuttering += CLAMP(30 - C.stuttering, 0, 15)
|
||||
C.cultslurring += CLAMP(30 - C.cultslurring, 0, 15)
|
||||
C.silent += clamp(12 - C.silent, 0, 6)
|
||||
C.stuttering += clamp(30 - C.stuttering, 0, 15)
|
||||
C.cultslurring += clamp(30 - C.cultslurring, 0, 15)
|
||||
C.Jitter(15)
|
||||
else // cultstun no longer hardstuns + damages hostile cultists, instead debuffs them hard + deals some damage; debuffs for a bit longer since they don't add the clockie belligerent debuff
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = L
|
||||
C.stuttering = max(10, C.stuttering)
|
||||
C.drowsyness = max(10, C.drowsyness)
|
||||
C.confused += CLAMP(20 - C.confused, 0, 10)
|
||||
C.confused += clamp(20 - C.confused, 0, 10)
|
||||
L.adjustBruteLoss(15)
|
||||
to_chat(user, "<span class='cultitalic'>In an brilliant flash of red, [L] [iscultist(L) ? "writhes in pain" : "falls to the ground!"]</span>")
|
||||
uses--
|
||||
|
||||
@@ -731,7 +731,7 @@
|
||||
if(!L.anti_magic_check())
|
||||
if(is_servant_of_ratvar(L))
|
||||
to_chat(L, "<span class='cultlarge'>\"Kneel for me, scum\"</span>")
|
||||
L.confused += CLAMP(10 - L.confused, 0, 5) //confuses and lightly knockdowns + damages hostile cultists instead of hardstunning like before
|
||||
L.confused += clamp(10 - L.confused, 0, 5) //confuses and lightly knockdowns + damages hostile cultists instead of hardstunning like before
|
||||
L.DefaultCombatKnockdown(15)
|
||||
L.adjustBruteLoss(10)
|
||||
else
|
||||
|
||||
@@ -358,7 +358,7 @@
|
||||
if(NUKEUI_AWAIT_TIMER)
|
||||
var/number_value = text2num(numeric_input)
|
||||
if(number_value)
|
||||
timer_set = CLAMP(number_value, minimum_timer_set, maximum_timer_set)
|
||||
timer_set = clamp(number_value, minimum_timer_set, maximum_timer_set)
|
||||
playsound(src, 'sound/machines/nuke/general_beep.ogg', 50, FALSE)
|
||||
set_safety()
|
||||
. = TRUE
|
||||
|
||||
@@ -16,3 +16,6 @@
|
||||
/datum/traitor_class/human/hijack/finalize_traitor(datum/antagonist/traitor/T)
|
||||
T.hijack_speed=1
|
||||
return TRUE
|
||||
|
||||
/datum/traitor_class/human/hijack/clean_up_traitor(datum/antagonist/traitor/T)
|
||||
T.hijack_speed = 0.5
|
||||
|
||||
@@ -38,3 +38,7 @@ GLOBAL_LIST_EMPTY(traitor_classes)
|
||||
/datum/traitor_class/proc/finalize_traitor(datum/antagonist/traitor/T)
|
||||
// Finalization. Return TRUE if should play standard traitor sound/equip, return FALSE if both are special case
|
||||
return TRUE
|
||||
|
||||
/datum/traitor_class/proc/clean_up_traitor(datum/antagonist/traitor/T)
|
||||
// Any effects that need to be cleaned up if traitor class is being swapped.
|
||||
|
||||
@@ -15,36 +15,53 @@
|
||||
threat = 5
|
||||
|
||||
/datum/antagonist/traitor/New()
|
||||
..()
|
||||
if(!GLOB.traitor_classes.len)//Only need to fill the list when it's needed.
|
||||
for(var/I in subtypesof(/datum/traitor_class))
|
||||
new I
|
||||
..()
|
||||
|
||||
/datum/antagonist/traitor/proc/set_traitor_kind(var/kind)
|
||||
/datum/antagonist/traitor/proc/set_traitor_kind(kind)
|
||||
var/swap_from_old = FALSE
|
||||
if(traitor_kind)
|
||||
traitor_kind.remove_innate_effects(owner.current)
|
||||
traitor_kind.clean_up_traitor(src)
|
||||
swap_from_old = TRUE
|
||||
traitor_kind = GLOB.traitor_classes[kind]
|
||||
traitor_kind.apply_innate_effects(owner.current)
|
||||
if(give_objectives)
|
||||
for(var/O in objectives)
|
||||
qdel(O)
|
||||
traitor_kind.forge_objectives(src)
|
||||
if(swap_from_old)
|
||||
traitor_kind.finalize_traitor(src)
|
||||
traitor_kind.greet(src)
|
||||
owner.announce_objectives()
|
||||
|
||||
/proc/get_random_traitor_kind(var/list/blacklist = list())
|
||||
var/chaos_weight = 0
|
||||
if(istype(SSticker.mode,/datum/game_mode/dynamic))
|
||||
var/datum/game_mode/dynamic/mode = SSticker.mode
|
||||
chaos_weight = (mode.threat - 50)/50
|
||||
var/list/weights = list()
|
||||
for(var/C in GLOB.traitor_classes)
|
||||
if(!(C in blacklist))
|
||||
var/datum/traitor_class/class = GLOB.traitor_classes[C]
|
||||
var/weight = LOGISTIC_FUNCTION(1.5*class.weight,chaos_weight,class.chaos,0)
|
||||
weights[C] = weight * 1000
|
||||
var/choice = pickweightAllowZero(weights)
|
||||
if(!choice)
|
||||
choice = TRAITOR_HUMAN // it's an "easter egg"
|
||||
var/datum/traitor_class/actual_class = GLOB.traitor_classes[choice]
|
||||
actual_class.weight *= 0.8 // less likely this round
|
||||
return choice
|
||||
|
||||
/datum/antagonist/traitor/on_gain()
|
||||
if(owner.current && isAI(owner.current))
|
||||
set_traitor_kind(TRAITOR_AI)
|
||||
else
|
||||
var/chaos_weight = 0
|
||||
if(istype(SSticker.mode,/datum/game_mode/dynamic))
|
||||
var/datum/game_mode/dynamic/mode = SSticker.mode
|
||||
chaos_weight = (mode.threat - 50)/50
|
||||
var/list/weights = list()
|
||||
for(var/C in GLOB.traitor_classes)
|
||||
var/datum/traitor_class/class = GLOB.traitor_classes[C]
|
||||
var/weight = LOGISTIC_FUNCTION(1.5*class.weight,chaos_weight,class.chaos,0)
|
||||
weights[C] = weight
|
||||
var/choice = pickweightAllowZero(weights)
|
||||
if(!choice)
|
||||
choice = GLOB.traitor_classes[TRAITOR_HUMAN] // it's an "easter egg"
|
||||
set_traitor_kind(choice)
|
||||
traitor_kind.weight *= 0.8 // less likely this round
|
||||
set_traitor_kind(get_random_traitor_kind())
|
||||
SSticker.mode.traitors += owner
|
||||
owner.special_role = special_role
|
||||
if(give_objectives)
|
||||
traitor_kind.forge_objectives(src)
|
||||
finalize_traitor()
|
||||
..()
|
||||
|
||||
@@ -97,7 +114,8 @@
|
||||
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/tatoralert.ogg', 100, FALSE, pressure_affected = FALSE)
|
||||
|
||||
/datum/antagonist/traitor/antag_panel_objectives()
|
||||
. = ..()
|
||||
. += "<i><b>Traitor class:</b></i> <a href='?src=[REF(owner)];traitor_class=1;target_antag=[REF(src)]'>[traitor_kind.employer]</a><br>"
|
||||
. += ..()
|
||||
if(contractor_hub?.assigned_targets && length(contractor_hub.assigned_targets))
|
||||
. += "<i><b>Contract Targets</b></i>:<br>"
|
||||
for(var/datum/mind/M in contractor_hub.assigned_targets)
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
|
||||
var/new_heat_capacity = air.heat_capacity()
|
||||
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
|
||||
air.temperature = CLAMP(((air.temperature*old_heat_capacity + reaction_energy)/new_heat_capacity),TCMB,INFINITY)
|
||||
air.temperature = clamp(((air.temperature*old_heat_capacity + reaction_energy)/new_heat_capacity),TCMB,INFINITY)
|
||||
return REACTING
|
||||
|
||||
/datum/gas_reaction/nitrylformation //The formation of nitryl. Endothermic. Requires N2O as a catalyst.
|
||||
|
||||
@@ -159,13 +159,13 @@
|
||||
pump_direction = 1
|
||||
|
||||
if("set_input_pressure" in signal.data)
|
||||
input_pressure_min = CLAMP(text2num(signal.data["set_input_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
input_pressure_min = clamp(text2num(signal.data["set_input_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
output_pressure_max = CLAMP(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
output_pressure_max = clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("set_external_pressure" in signal.data)
|
||||
external_pressure_bound = CLAMP(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
external_pressure_bound = clamp(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("status" in signal.data)
|
||||
spawn(2)
|
||||
|
||||
@@ -122,7 +122,7 @@ Passive gate is similar to the regular pump except:
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
target_pressure = clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
|
||||
@@ -144,7 +144,7 @@ Passive gate is similar to the regular pump except:
|
||||
on = !on
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
target_pressure = CLAMP(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
target_pressure = clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if(on != old_on)
|
||||
investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
target_pressure = clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
on = !on
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
target_pressure = CLAMP(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
target_pressure = clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if(on != old_on)
|
||||
investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
open_pressure = CLAMP(pressure, close_pressure, 50*ONE_ATMOSPHERE)
|
||||
open_pressure = clamp(pressure, close_pressure, 50*ONE_ATMOSPHERE)
|
||||
investigate_log("open pressure was set to [open_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
if("close_pressure")
|
||||
var/pressure = params["close_pressure"]
|
||||
@@ -106,6 +106,6 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
close_pressure = CLAMP(pressure, 0, open_pressure)
|
||||
close_pressure = clamp(pressure, 0, open_pressure)
|
||||
investigate_log("close pressure was set to [close_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
rate = text2num(rate)
|
||||
. = TRUE
|
||||
if(.)
|
||||
transfer_rate = CLAMP(rate, 0, MAX_TRANSFER_RATE)
|
||||
transfer_rate = clamp(rate, 0, MAX_TRANSFER_RATE)
|
||||
investigate_log("was set to [transfer_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
if("set_transfer_rate" in signal.data)
|
||||
var/datum/gas_mixture/air1 = airs[1]
|
||||
transfer_rate = CLAMP(text2num(signal.data["set_transfer_rate"]),0,air1.volume)
|
||||
transfer_rate = clamp(text2num(signal.data["set_transfer_rate"]),0,air1.volume)
|
||||
|
||||
if(on != old_on)
|
||||
investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
rate = text2num(rate)
|
||||
. = TRUE
|
||||
if(.)
|
||||
transfer_rate = CLAMP(rate, 0, MAX_TRANSFER_RATE)
|
||||
transfer_rate = clamp(rate, 0, MAX_TRANSFER_RATE)
|
||||
investigate_log("was set to [transfer_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
if("filter")
|
||||
filter_type = null
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
target_pressure = clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
if("node1")
|
||||
var/value = text2num(params["concentration"])
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
if("set_volume_rate" in signal.data)
|
||||
var/number = text2num(signal.data["set_volume_rate"])
|
||||
var/datum/gas_mixture/air_contents = airs[1]
|
||||
volume_rate = CLAMP(number, 0, air_contents.volume)
|
||||
volume_rate = clamp(number, 0, air_contents.volume)
|
||||
|
||||
if("status" in signal.data)
|
||||
spawn(2)
|
||||
@@ -172,7 +172,7 @@
|
||||
rate = text2num(rate)
|
||||
. = TRUE
|
||||
if(.)
|
||||
volume_rate = CLAMP(rate, 0, MAX_TRANSFER_RATE)
|
||||
volume_rate = clamp(rate, 0, MAX_TRANSFER_RATE)
|
||||
investigate_log("was set to [volume_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
broadcast_status()
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
open_pressure = CLAMP(pressure, close_pressure, 50*ONE_ATMOSPHERE)
|
||||
open_pressure = clamp(pressure, close_pressure, 50*ONE_ATMOSPHERE)
|
||||
investigate_log("open pressure was set to [open_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
if("close_pressure")
|
||||
var/pressure = params["close_pressure"]
|
||||
@@ -107,6 +107,6 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
close_pressure = CLAMP(pressure, 0, open_pressure)
|
||||
close_pressure = clamp(pressure, 0, open_pressure)
|
||||
investigate_log("close pressure was set to [close_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
target = text2num(target)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target_temperature = CLAMP(target, min_temperature, max_temperature)
|
||||
target_temperature = clamp(target, min_temperature, max_temperature)
|
||||
investigate_log("was set to [target_temperature] K by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -210,13 +210,13 @@
|
||||
|
||||
if("set_internal_pressure" in signal.data)
|
||||
var/old_pressure = internal_pressure_bound
|
||||
internal_pressure_bound = CLAMP(text2num(signal.data["set_internal_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
internal_pressure_bound = clamp(text2num(signal.data["set_internal_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
if(old_pressure != internal_pressure_bound)
|
||||
investigate_log(" internal pressure was set to [internal_pressure_bound] by [key_name(signal_sender)]",INVESTIGATE_ATMOS)
|
||||
|
||||
if("set_external_pressure" in signal.data)
|
||||
var/old_pressure = external_pressure_bound
|
||||
external_pressure_bound = CLAMP(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
external_pressure_bound = clamp(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
if(old_pressure != external_pressure_bound)
|
||||
investigate_log(" external pressure was set to [external_pressure_bound] by [key_name(signal_sender)]",INVESTIGATE_ATMOS)
|
||||
|
||||
@@ -227,10 +227,10 @@
|
||||
internal_pressure_bound = 0
|
||||
|
||||
if("adjust_internal_pressure" in signal.data)
|
||||
internal_pressure_bound = CLAMP(internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
internal_pressure_bound = clamp(internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("adjust_external_pressure" in signal.data)
|
||||
external_pressure_bound = CLAMP(external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
external_pressure_bound = clamp(external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("init" in signal.data)
|
||||
name = signal.data["init"]
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
if(initialize_directions & dir)
|
||||
return ..()
|
||||
if((NORTH|EAST) & dir)
|
||||
user.ventcrawl_layer = CLAMP(user.ventcrawl_layer + 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
|
||||
user.ventcrawl_layer = clamp(user.ventcrawl_layer + 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
|
||||
if((SOUTH|WEST) & dir)
|
||||
user.ventcrawl_layer = CLAMP(user.ventcrawl_layer - 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
|
||||
user.ventcrawl_layer = clamp(user.ventcrawl_layer - 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
|
||||
to_chat(user, "You align yourself with the [user.ventcrawl_layer]\th output.")
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
release_pressure = CLAMP(round(pressure), can_min_release_pressure, can_max_release_pressure)
|
||||
release_pressure = clamp(round(pressure), can_min_release_pressure, can_max_release_pressure)
|
||||
investigate_log("was set to [release_pressure] kPa by [key_name(usr)].", INVESTIGATE_ATMOS)
|
||||
if("valve")
|
||||
var/logmsg
|
||||
@@ -434,7 +434,7 @@
|
||||
var/N = text2num(user_input)
|
||||
if(!N)
|
||||
return
|
||||
timer_set = CLAMP(N,minimum_timer_set,maximum_timer_set)
|
||||
timer_set = clamp(N,minimum_timer_set,maximum_timer_set)
|
||||
log_admin("[key_name(usr)] has activated a prototype valve timer")
|
||||
. = TRUE
|
||||
if("toggle_timer")
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
pump.target_pressure = CLAMP(round(pressure), PUMP_MIN_PRESSURE, PUMP_MAX_PRESSURE)
|
||||
pump.target_pressure = clamp(round(pressure), PUMP_MIN_PRESSURE, PUMP_MAX_PRESSURE)
|
||||
investigate_log("was set to [pump.target_pressure] kPa by [key_name(usr)].", INVESTIGATE_ATMOS)
|
||||
if("eject")
|
||||
if(holding)
|
||||
|
||||
@@ -487,8 +487,7 @@
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/shielded/ctf
|
||||
toggle_helmet = FALSE // see the whites of their eyes
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
id = /obj/item/card/id/syndicate
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat
|
||||
belt = /obj/item/gun/ballistic/automatic/pistol/deagle/ctf
|
||||
l_pocket = /obj/item/ammo_box/magazine/recharge/ctf
|
||||
r_pocket = /obj/item/ammo_box/magazine/recharge/ctf
|
||||
|
||||
@@ -490,7 +490,7 @@
|
||||
glasses = /obj/item/clothing/glasses/eyepatch
|
||||
mask = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
head = /obj/item/clothing/head/centhat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat
|
||||
shoes = /obj/item/clothing/shoes/combat/swat
|
||||
r_pocket = /obj/item/lighter
|
||||
id = /obj/item/card/id
|
||||
@@ -507,7 +507,7 @@
|
||||
uniform = /obj/item/clothing/under/rank/security/officer
|
||||
suit = /obj/item/clothing/suit/armor/vest
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat
|
||||
mask = /obj/item/clothing/mask/gas/sechailer/swat
|
||||
head = /obj/item/clothing/head/helmet/swat/nanotrasen
|
||||
back = /obj/item/storage/backpack/security
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/matrix/mat = matrix()
|
||||
mat.Translate(0, 16)
|
||||
mat.Scale(1, sqrt((x_offset * x_offset) + (y_offset * y_offset)) / 32)
|
||||
mat.Turn(90 - ATAN2(x_offset, y_offset)) // So... You pass coords in order x,y to this version of atan2. It should be called acsc2.
|
||||
mat.Turn(90 - arctan(x_offset, y_offset)) // So... You pass coords in order x,y to this version of atan2. It should be called acsc2.
|
||||
mat.Translate(atom_a.pixel_x, atom_a.pixel_y)
|
||||
|
||||
transform = mat
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
DuplicateObject(stored, perfectcopy=1, sameloc=0,newloc=T)
|
||||
log_admin("Build Mode: [key_name(c)] copied [stored] to [AREACOORD(object)]")
|
||||
else if(right_click)
|
||||
if(ismovableatom(object)) // No copying turfs for now.
|
||||
if(ismovable(object)) // No copying turfs for now.
|
||||
to_chat(c, "<span class='notice'>[object] set as template.</span>")
|
||||
stored = object
|
||||
|
||||
@@ -309,7 +309,7 @@
|
||||
/datum/export/gear/combatgloves
|
||||
cost = 80
|
||||
unit_name = "combat gloves"
|
||||
export_types = list(/obj/item/clothing/gloves/combat, /obj/item/clothing/gloves/fingerless/pugilist/rapid, /obj/item/clothing/gloves/krav_maga)
|
||||
export_types = list(/obj/item/clothing/gloves/tackler/combat, /obj/item/clothing/gloves/tackler/dolphin, /obj/item/clothing/gloves/fingerless/pugilist/rapid, /obj/item/clothing/gloves/krav_maga)
|
||||
include_subtypes = TRUE
|
||||
|
||||
/datum/export/gear/bonegloves
|
||||
@@ -797,4 +797,4 @@ datum/export/gear/glasses //glasses are not worth selling
|
||||
export_types = list(/obj/item/clothing/head/chameleon, /obj/item/clothing/mask/chameleon, /obj/item/clothing/under/chameleon, /obj/item/clothing/suit/chameleon, /obj/item/clothing/glasses/chameleon,\
|
||||
/obj/item/clothing/gloves/chameleon, /obj/item/clothing/head/chameleon, /obj/item/clothing/shoes/chameleon, /obj/item/storage/backpack/chameleon, \
|
||||
/obj/item/storage/belt/chameleon, /obj/item/radio/headset/chameleon, /obj/item/pda/chameleon, /obj/item/stamp/chameleon, /obj/item/clothing/neck/cloak/chameleon)
|
||||
include_subtypes = TRUE
|
||||
include_subtypes = TRUE
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
/obj/item/clothing/suit/armor/vest/russian,
|
||||
/obj/item/clothing/head/helmet/rus_helmet,
|
||||
/obj/item/clothing/shoes/russian,
|
||||
/obj/item/clothing/gloves/combat,
|
||||
/obj/item/clothing/gloves/tackler/combat/insulated,
|
||||
/obj/item/clothing/under/syndicate/rus_army,
|
||||
/obj/item/clothing/under/costume/soviet,
|
||||
/obj/item/clothing/mask/russian_balaclava,
|
||||
@@ -201,8 +201,8 @@
|
||||
/obj/item/clothing/mask/gas/sechailer/swat,
|
||||
/obj/item/storage/belt/military/assault,
|
||||
/obj/item/storage/belt/military/assault,
|
||||
/obj/item/clothing/gloves/combat,
|
||||
/obj/item/clothing/gloves/combat)
|
||||
/obj/item/clothing/gloves/tackler/combat/insulated,
|
||||
/obj/item/clothing/gloves/tackler/combat/insulated)
|
||||
crate_name = "swat crate"
|
||||
|
||||
/datum/supply_pack/security/armory/wt550
|
||||
|
||||
@@ -91,8 +91,8 @@
|
||||
/obj/item/clothing/suit/armor/bulletproof,
|
||||
/obj/item/clothing/head/helmet/alt,
|
||||
/obj/item/clothing/head/helmet/alt,
|
||||
/obj/item/clothing/gloves/combat,
|
||||
/obj/item/clothing/gloves/combat,
|
||||
/obj/item/clothing/gloves/tackler/combat/insulated,
|
||||
/obj/item/clothing/gloves/tackler/combat/insulated,
|
||||
/obj/item/clothing/mask/gas,
|
||||
/obj/item/clothing/mask/gas)
|
||||
crate_name = "surplus russian clothing"
|
||||
@@ -109,7 +109,7 @@
|
||||
/obj/item/clothing/head/ushanka,
|
||||
/obj/item/clothing/suit/armor/bulletproof,
|
||||
/obj/item/clothing/head/helmet/alt,
|
||||
/obj/item/clothing/gloves/combat,
|
||||
/obj/item/clothing/gloves/tackler/combat/insulated,
|
||||
/obj/item/clothing/mask/gas,
|
||||
/obj/item/gun/ballistic/shotgun/boltaction,
|
||||
/obj/item/ammo_box/a762)
|
||||
|
||||
@@ -888,8 +888,8 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
var/viewscale = getviewsize(view)
|
||||
var/x = viewscale[1]
|
||||
var/y = viewscale[2]
|
||||
x = CLAMP(x+change, min, max)
|
||||
y = CLAMP(y+change, min,max)
|
||||
x = clamp(x+change, min, max)
|
||||
y = clamp(y+change, min,max)
|
||||
change_view("[x]x[y]")
|
||||
|
||||
/client/proc/change_view(new_size)
|
||||
|
||||
@@ -197,10 +197,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/action_buttons_screen_locs = list()
|
||||
|
||||
//bad stuff
|
||||
var/digestable = FALSE
|
||||
var/devourable = FALSE
|
||||
var/feeding = FALSE
|
||||
var/lickable = FALSE
|
||||
var/vore_flags = 0
|
||||
var/list/belly_prefs = list()
|
||||
var/vore_taste = "nothing in particular"
|
||||
|
||||
@@ -211,6 +208,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
var/show_mismatched_markings = FALSE //determines whether or not the markings lists should show markings that don't match the currently selected species. Intentionally left unsaved.
|
||||
|
||||
var/no_tetris_storage = FALSE
|
||||
|
||||
/datum/preferences/New(client/C)
|
||||
parent = C
|
||||
|
||||
@@ -866,6 +865,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<b>Widescreen:</b> <a href='?_src_=prefs;preference=widescreenpref'>[widescreenpref ? "Enabled ([CONFIG_GET(string/default_view)])" : "Disabled (15x15)"]</a><br>"
|
||||
dat += "<b>Auto stand:</b> <a href='?_src_=prefs;preference=autostand'>[autostand ? "Enabled" : "Disabled"]</a><br>"
|
||||
dat += "<b>Auto OOC:</b> <a href='?_src_=prefs;preference=auto_ooc'>[auto_ooc ? "Enabled" : "Disabled"]</a><br>"
|
||||
dat += "<b>Force Slot Storage HUD:</b> <a href='?_src_=prefs;preference=no_tetris_storage'>[no_tetris_storage ? "Enabled" : "Disabled"]</a><br>"
|
||||
dat += "<b>Screen Shake:</b> <a href='?_src_=prefs;preference=screenshake'>[(screenshake==100) ? "Full" : ((screenshake==0) ? "None" : "[screenshake]")]</a><br>"
|
||||
if (user && user.client && !user.client.prefs.screenshake==0)
|
||||
dat += "<b>Damage Screen Shake:</b> <a href='?_src_=prefs;preference=damagescreenshake'>[(damagescreenshake==1) ? "On" : ((damagescreenshake==0) ? "Off" : "Only when down")]</a><br>"
|
||||
@@ -1837,7 +1837,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
if("s_tone")
|
||||
var/list/choices = GLOB.skin_tones - GLOB.nonstandard_skin_tones
|
||||
if(CONFIG_GET(number/allow_custom_skintones))
|
||||
if(CONFIG_GET(flag/allow_custom_skintones))
|
||||
choices += "custom"
|
||||
var/new_s_tone = input(user, "Choose your character's skin tone:", "Character Preference") as null|anything in choices
|
||||
if(new_s_tone)
|
||||
@@ -1966,7 +1966,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/max_D = CONFIG_GET(number/penis_max_inches_prefs)
|
||||
var/new_length = input(user, "Penis length in inches:\n([min_D]-[max_D])", "Character Preference") as num|null
|
||||
if(new_length)
|
||||
features["cock_length"] = CLAMP(round(new_length), min_D, max_D)
|
||||
features["cock_length"] = clamp(round(new_length), min_D, max_D)
|
||||
|
||||
if("cock_shape")
|
||||
var/new_shape
|
||||
@@ -2163,7 +2163,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/danger = CONFIG_GET(number/threshold_body_size_slowdown)
|
||||
var/new_body_size = input(user, "Choose your desired sprite size:\n([min*100]%-[max*100]%), Warning: May make your character look distorted[danger > min ? ", and an exponential slowdown will occur for those smaller than [danger*100]%!" : "!"]", "Character Preference", features["body_size"]*100) as num|null
|
||||
if (new_body_size)
|
||||
new_body_size = CLAMP(new_body_size * 0.01, min, max)
|
||||
new_body_size = clamp(new_body_size * 0.01, min, max)
|
||||
var/dorfy
|
||||
if(danger > new_body_size)
|
||||
dorfy = alert(user, "The chosen size appears to be smaller than the threshold of [danger*100]%, which will lead to an added exponential slowdown. Are you sure about that?", "Dwarfism Alert", "Yes", "Move it to the threshold", "No")
|
||||
@@ -2204,6 +2204,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
autostand = !autostand
|
||||
if("auto_ooc")
|
||||
auto_ooc = !auto_ooc
|
||||
if("no_tetris_storage")
|
||||
no_tetris_storage = !no_tetris_storage
|
||||
if ("screenshake")
|
||||
var/desiredshake = input(user, "Set the amount of screenshake you want. \n(0 = disabled, 100 = full, 200 = maximum.)", "Character Preference", screenshake) as null|num
|
||||
if (!isnull(desiredshake))
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// You do not need to raise this if you are adding new values that have sane defaults.
|
||||
// Only raise this value when changing the meaning/format/name/layout of an existing value
|
||||
// where you would want the updater procs below to run
|
||||
#define SAVEFILE_VERSION_MAX 28
|
||||
#define SAVEFILE_VERSION_MAX 29
|
||||
|
||||
/*
|
||||
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
|
||||
@@ -120,10 +120,14 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
if(fexists(vr_path))
|
||||
var/list/json_from_file = json_decode(file2text(vr_path))
|
||||
if(json_from_file)
|
||||
digestable = json_from_file["digestable"]
|
||||
devourable = json_from_file["devourable"]
|
||||
feeding = json_from_file["feeding"]
|
||||
lickable = json_from_file["lickable"]
|
||||
if(json_from_file["digestable"])
|
||||
ENABLE_BITFIELD(vore_flags,DIGESTABLE)
|
||||
if(json_from_file["devourable"])
|
||||
ENABLE_BITFIELD(vore_flags,DEVOURABLE)
|
||||
if(json_from_file["feeding"])
|
||||
ENABLE_BITFIELD(vore_flags,FEEDING)
|
||||
if(json_from_file["lickable"])
|
||||
ENABLE_BITFIELD(vore_flags,LICKABLE)
|
||||
belly_prefs = json_from_file["belly_prefs"]
|
||||
vore_taste = json_from_file["vore_taste"]
|
||||
|
||||
@@ -158,6 +162,24 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
if(malformed_hockeys[hockey])
|
||||
features["cock_shape"] = malformed_hockeys[hockey]
|
||||
features["cock_taur"] = TRUE
|
||||
|
||||
if(current_version < 29)
|
||||
var/digestable
|
||||
var/devourable
|
||||
var/feeding
|
||||
var/lickable
|
||||
S["digestable"] >> digestable
|
||||
S["devourable"] >> devourable
|
||||
S["feeding"] >> feeding
|
||||
S["lickable"] >> lickable
|
||||
if(digestable)
|
||||
ENABLE_BITFIELD(vore_flags,DIGESTABLE)
|
||||
if(devourable)
|
||||
ENABLE_BITFIELD(vore_flags,DEVOURABLE)
|
||||
if(feeding)
|
||||
ENABLE_BITFIELD(vore_flags,FEEDING)
|
||||
if(lickable)
|
||||
ENABLE_BITFIELD(vore_flags,LICKABLE)
|
||||
|
||||
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
|
||||
if(!ckey)
|
||||
@@ -231,7 +253,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["autostand"] >> autostand
|
||||
S["cit_toggles"] >> cit_toggles
|
||||
S["preferred_chaos"] >> preferred_chaos
|
||||
S["auto_ooc"] >> auto_ooc
|
||||
S["auto_ooc"] >> auto_ooc
|
||||
S["no_tetris_storage"] >> no_tetris_storage
|
||||
|
||||
|
||||
//try to fix any outdated data if necessary
|
||||
@@ -268,10 +291,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
pda_skin = sanitize_inlist(pda_skin, GLOB.pda_reskins, PDA_SKIN_ALT)
|
||||
screenshake = sanitize_integer(screenshake, 0, 800, initial(screenshake))
|
||||
damagescreenshake = sanitize_integer(damagescreenshake, 0, 2, initial(damagescreenshake))
|
||||
widescreenpref = sanitize_integer(widescreenpref, 0, 1, initial(widescreenpref))
|
||||
widescreenpref = sanitize_integer(widescreenpref, 0, 1, initial(widescreenpref))
|
||||
autostand = sanitize_integer(autostand, 0, 1, initial(autostand))
|
||||
cit_toggles = sanitize_integer(cit_toggles, 0, 65535, initial(cit_toggles))
|
||||
auto_ooc = sanitize_integer(auto_ooc, 0, 1, initial(auto_ooc))
|
||||
no_tetris_storage = sanitize_integer(no_tetris_storage, 0, 1, initial(no_tetris_storage))
|
||||
|
||||
return 1
|
||||
|
||||
@@ -336,6 +360,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
WRITE_FILE(S["cit_toggles"], cit_toggles)
|
||||
WRITE_FILE(S["preferred_chaos"], preferred_chaos)
|
||||
WRITE_FILE(S["auto_ooc"], auto_ooc)
|
||||
WRITE_FILE(S["no_tetris_storage"], no_tetris_storage)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -499,11 +524,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
else //We have no old flavortext, default to new
|
||||
S["feature_flavor_text"] >> features["flavor_text"]
|
||||
|
||||
S["digestable"] >> digestable
|
||||
S["devourable"] >> devourable
|
||||
S["feeding"] >> feeding
|
||||
S["vore_flags"] >> vore_flags
|
||||
S["vore_taste"] >> vore_taste
|
||||
S["lickable"] >> lickable
|
||||
S["belly_prefs"] >> belly_prefs
|
||||
|
||||
//try to fix any outdated data if necessary
|
||||
@@ -549,11 +571,16 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
hair_color = sanitize_hexcolor(hair_color, 3, 0)
|
||||
facial_hair_color = sanitize_hexcolor(facial_hair_color, 3, 0)
|
||||
eye_color = sanitize_hexcolor(eye_color, 3, 0)
|
||||
use_custom_skin_tone = sanitize_integer(use_custom_skin_tone, FALSE, TRUE, initial(use_custom_skin_tone))
|
||||
if(use_custom_skin_tone && CONFIG_GET(number/allow_custom_skintones))
|
||||
|
||||
var/static/allow_custom_skintones
|
||||
if(isnull(allow_custom_skintones))
|
||||
allow_custom_skintones = CONFIG_GET(flag/allow_custom_skintones)
|
||||
use_custom_skin_tone = allow_custom_skintones ? sanitize_integer(use_custom_skin_tone, FALSE, TRUE, initial(use_custom_skin_tone)) : FALSE
|
||||
if(use_custom_skin_tone)
|
||||
skin_tone = sanitize_hexcolor(skin_tone, 6, TRUE, "#FFFFFF")
|
||||
else
|
||||
skin_tone = sanitize_inlist(skin_tone, GLOB.skin_tones - GLOB.nonstandard_skin_tones, initial(skin_tone))
|
||||
|
||||
horn_color = sanitize_hexcolor(horn_color, 3, FALSE)
|
||||
wing_color = sanitize_hexcolor(wing_color, 3, FALSE, "#FFFFFF")
|
||||
backbag = sanitize_inlist(backbag, GLOB.backbaglist, initial(backbag))
|
||||
@@ -580,7 +607,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
var/static/size_max
|
||||
if(!size_max)
|
||||
size_max = CONFIG_GET(number/body_size_max)
|
||||
features["body_size"] = sanitize_integer(features["body_size"], size_min, size_max, RESIZE_DEFAULT_SIZE)
|
||||
features["body_size"] = sanitize_num_clamp(features["body_size"], size_min, size_max, RESIZE_DEFAULT_SIZE, 0.01)
|
||||
|
||||
var/static/list/B_sizes
|
||||
if(!B_sizes)
|
||||
@@ -623,10 +650,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
|
||||
all_quirks = SANITIZE_LIST(all_quirks)
|
||||
|
||||
lickable = sanitize_integer(lickable, FALSE, TRUE, initial(lickable))
|
||||
devourable = sanitize_integer(devourable, FALSE, TRUE, initial(devourable))
|
||||
digestable = sanitize_integer(digestable, FALSE, TRUE, initial(digestable))
|
||||
feeding = sanitize_integer(feeding, FALSE, TRUE, initial(feeding))
|
||||
vore_flags = sanitize_integer(vore_flags, 0, MAX_VORE_FLAG, 0)
|
||||
vore_taste = copytext(vore_taste, 1, MAX_TASTE_LEN)
|
||||
belly_prefs = SANITIZE_LIST(belly_prefs)
|
||||
|
||||
@@ -736,11 +760,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
//Quirks
|
||||
WRITE_FILE(S["all_quirks"] , all_quirks)
|
||||
|
||||
WRITE_FILE(S["digestable"] , digestable)
|
||||
WRITE_FILE(S["devourable"] , devourable)
|
||||
WRITE_FILE(S["feeding"] , feeding)
|
||||
WRITE_FILE(S["vore_flags"] , vore_flags)
|
||||
WRITE_FILE(S["vore_taste"] , vore_taste)
|
||||
WRITE_FILE(S["lickable"] , lickable)
|
||||
WRITE_FILE(S["belly_prefs"] , belly_prefs)
|
||||
|
||||
cit_character_pref_save(S)
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/obj/item/clothing/gloves/tackler
|
||||
name = "gripper gloves"
|
||||
desc = "Special gloves that manipulate the blood vessels in the wearer's hands, granting them the ability to launch headfirst into walls."
|
||||
icon_state = "tackle"
|
||||
item_state = "tackle"
|
||||
transfer_prints = TRUE
|
||||
cold_protection = HANDS
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
resistance_flags = NONE
|
||||
//custom_premium_price = 350
|
||||
/// For storing our tackler datum so we can remove it after
|
||||
var/datum/component/tackler
|
||||
/// See: [/datum/component/tackler/var/stamina_cost]
|
||||
var/tackle_stam_cost = 25
|
||||
/// See: [/datum/component/tackler/var/base_knockdown]
|
||||
var/base_knockdown = 1 SECONDS
|
||||
/// See: [/datum/component/tackler/var/range]
|
||||
var/tackle_range = 4
|
||||
/// See: [/datum/component/tackler/var/min_distance]
|
||||
var/min_distance = 0
|
||||
/// See: [/datum/component/tackler/var/speed]
|
||||
var/tackle_speed = 1
|
||||
/// See: [/datum/component/tackler/var/skill_mod]
|
||||
var/skill_mod = 1
|
||||
|
||||
/obj/item/clothing/gloves/tackler/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
if(!ishuman(user))
|
||||
return
|
||||
if(slot == ITEM_SLOT_GLOVES)
|
||||
var/mob/living/carbon/human/H = user
|
||||
tackler = H.AddComponent(/datum/component/tackler, stamina_cost=tackle_stam_cost, base_knockdown = base_knockdown, range = tackle_range, speed = tackle_speed, skill_mod = skill_mod, min_distance = min_distance)
|
||||
|
||||
/obj/item/clothing/gloves/tackler/dropped(mob/user)
|
||||
. = ..()
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.get_item_by_slot(ITEM_SLOT_GLOVES) == src)
|
||||
qdel(tackler)
|
||||
|
||||
/obj/item/clothing/gloves/tackler/dolphin
|
||||
name = "dolphin gloves"
|
||||
desc = "Sleek, aerodynamic gripper gloves that are less effective at actually performing takedowns, but more effective at letting the user sail through the hallways and cause accidents."
|
||||
icon_state = "tackledolphin"
|
||||
item_state = "tackledolphin"
|
||||
|
||||
tackle_stam_cost = 15
|
||||
base_knockdown = 0.5 SECONDS
|
||||
tackle_range = 5
|
||||
tackle_speed = 2
|
||||
min_distance = 2
|
||||
skill_mod = -2
|
||||
|
||||
/obj/item/clothing/gloves/tackler/combat
|
||||
name = "gorilla gloves"
|
||||
desc = "Premium quality combative gloves, heavily reinforced to give the user an edge in close combat tackles, though they are more taxing to use than normal gripper gloves. Fireproof to boot!"
|
||||
icon_state = "combat"
|
||||
item_state = "blackgloves"
|
||||
|
||||
tackle_stam_cost = 35
|
||||
base_knockdown = 1.5 SECONDS
|
||||
tackle_range = 5
|
||||
skill_mod = 3
|
||||
|
||||
cold_protection = HANDS
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
heat_protection = HANDS
|
||||
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
|
||||
resistance_flags = NONE
|
||||
|
||||
/obj/item/clothing/gloves/tackler/combat/insulated
|
||||
name = "guerrilla gloves"
|
||||
desc = "Superior quality combative gloves, good for performing tackle takedowns as well as absorbing electrical shocks."
|
||||
siemens_coefficient = 0
|
||||
permeability_coefficient = 0.05
|
||||
|
||||
/obj/item/clothing/gloves/tackler/rocket
|
||||
name = "rocket gloves"
|
||||
desc = "The ultimate in high risk, high reward, perfect for when you need to stop a criminal from fifty feet away or die trying. Banned in most Spinward gridiron football and rugby leagues."
|
||||
icon_state = "tacklerocket"
|
||||
item_state = "tacklerocket"
|
||||
|
||||
tackle_stam_cost = 50
|
||||
base_knockdown = 2 SECONDS
|
||||
tackle_range = 10
|
||||
min_distance = 7
|
||||
tackle_speed = 6
|
||||
skill_mod = 7
|
||||
|
||||
/obj/item/clothing/gloves/tackler/offbrand
|
||||
name = "improvised gripper gloves"
|
||||
desc = "Ratty looking fingerless gloves wrapped with sticky tape. Beware anyone wearing these, for they clearly have no shame and nothing to lose."
|
||||
icon_state = "fingerless"
|
||||
item_state = "fingerless"
|
||||
|
||||
tackle_stam_cost = 30
|
||||
base_knockdown = 1.75 SECONDS
|
||||
min_distance = 2
|
||||
skill_mod = -1
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
uniform = /obj/item/clothing/under/rank/centcom/officer
|
||||
shoes = /obj/item/clothing/shoes/combat/swat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat/insulated
|
||||
ears = /obj/item/radio/headset/headset_cent/alt
|
||||
|
||||
/datum/outfit/ert/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
|
||||
@@ -69,8 +69,8 @@
|
||||
id = /obj/item/card/id/ert/Security
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/ert/sec
|
||||
glasses = /obj/item/clothing/glasses/hud/security/sunglasses
|
||||
back = /obj/item/storage/backpack/security
|
||||
belt = /obj/item/storage/belt/security/full
|
||||
back = /obj/item/storage/backpack/security
|
||||
backpack_contents = list(/obj/item/storage/box/engineer=1,\
|
||||
/obj/item/storage/box/handcuffs=1,\
|
||||
/obj/item/clothing/mask/gas/sechailer=1,\
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
uniform = /obj/item/clothing/under/rank/centcom/commander
|
||||
suit = /obj/item/clothing/suit/armor/bulletproof
|
||||
shoes = /obj/item/clothing/shoes/combat/swat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat/insulated
|
||||
ears = /obj/item/radio/headset/headset_cent/commander
|
||||
glasses = /obj/item/clothing/glasses/eyepatch
|
||||
mask = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
@@ -234,7 +234,7 @@
|
||||
uniform = /obj/item/clothing/under/syndicate
|
||||
suit = /obj/item/clothing/suit/space/officer
|
||||
shoes = /obj/item/clothing/shoes/combat/swat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat/insulated
|
||||
glasses = /obj/item/clothing/glasses/thermal/eyepatch
|
||||
ears = /obj/item/radio/headset/headset_cent/commander
|
||||
mask = /obj/item/clothing/mask/cigarette/cigar/havana
|
||||
@@ -316,7 +316,7 @@
|
||||
uniform = /obj/item/clothing/under/costume/soviet
|
||||
head = /obj/item/clothing/head/pirate/captain
|
||||
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/headset_cent
|
||||
glasses = /obj/item/clothing/glasses/thermal/eyepatch
|
||||
suit = /obj/item/clothing/suit/pirate/captain
|
||||
@@ -372,7 +372,7 @@
|
||||
uniform = /obj/item/clothing/under/color/green
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/deathsquad
|
||||
shoes = /obj/item/clothing/shoes/combat/swat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat/insulated
|
||||
mask = /obj/item/clothing/mask/gas/sechailer/swat
|
||||
glasses = /obj/item/clothing/glasses/hud/toggle/thermal
|
||||
back = /obj/item/storage/backpack/security
|
||||
@@ -431,7 +431,7 @@
|
||||
glasses = /obj/item/clothing/glasses/debug
|
||||
ears = /obj/item/radio/headset/headset_cent/commander
|
||||
mask = /obj/item/clothing/mask/gas/welding/up
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat/insulated
|
||||
belt = /obj/item/storage/belt/utility/chief/full
|
||||
l_pocket = /obj/item/gun/magic/wand/resurrection/debug
|
||||
r_pocket = /obj/item/gun/magic/wand/death/debug
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
name = "Syndicate VR Operative - Basic"
|
||||
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
|
||||
back = /obj/item/storage/backpack
|
||||
id = /obj/item/card/id/syndicate
|
||||
belt = /obj/item/gun/ballistic/automatic/pistol
|
||||
|
||||
@@ -408,7 +408,6 @@
|
||||
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/syndi/owl
|
||||
mutantrace_variation = STYLE_DIGITIGRADE
|
||||
|
||||
|
||||
//Wizard hardsuit
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/wizard
|
||||
name = "gem-encrusted hardsuit helmet"
|
||||
@@ -473,6 +472,7 @@
|
||||
name = "medical hardsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Built with lightweight materials for easier movement."
|
||||
item_state = "medical_hardsuit"
|
||||
slowdown = 0.8
|
||||
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/storage/firstaid, /obj/item/healthanalyzer, /obj/item/stack/medical)
|
||||
armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 75)
|
||||
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/medical
|
||||
@@ -748,63 +748,20 @@
|
||||
allowed = null
|
||||
armor = list("melee" = 30, "bullet" = 15, "laser" = 30, "energy" = 10, "bomb" = 10, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100)
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
var/current_charges = 3
|
||||
var/max_charges = 3 //How many charges total the shielding has
|
||||
var/current_charges //if null, will default to max_chargs
|
||||
var/recharge_delay = 200 //How long after we've been shot before we can start recharging. 20 seconds here
|
||||
var/recharge_cooldown = 0 //Time since we've last been shot
|
||||
var/recharge_rate = 1 //How quickly the shield recharges once it starts charging
|
||||
var/shield_state = "shield-old"
|
||||
var/shield_on = "shield-old"
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/Initialize()
|
||||
. = ..()
|
||||
if(!allowed)
|
||||
allowed = GLOB.advanced_hardsuit_allowed
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/check_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
if(current_charges > 0)
|
||||
block_return[BLOCK_RETURN_NORMAL_BLOCK_CHANCE] = 100
|
||||
block_return[BLOCK_RETURN_BLOCK_CAPACITY] = (block_return[BLOCK_RETURN_BLOCK_CAPACITY] || 0) + current_charges
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
recharge_cooldown = world.time + recharge_delay
|
||||
if(current_charges > 0)
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
owner.visible_message("<span class='danger'>[owner]'s shields deflect [attack_text] in a shower of sparks!</span>")
|
||||
current_charges--
|
||||
if(recharge_rate)
|
||||
START_PROCESSING(SSobj, src)
|
||||
if(current_charges <= 0)
|
||||
owner.visible_message("[owner]'s shield overloads!")
|
||||
shield_state = "broken"
|
||||
owner.update_inv_wear_suit()
|
||||
return BLOCK_SUCCESS | BLOCK_PHYSICAL_EXTERNAL
|
||||
return BLOCK_NONE
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/process()
|
||||
if(world.time > recharge_cooldown && current_charges < max_charges)
|
||||
current_charges = CLAMP((current_charges + recharge_rate), 0, max_charges)
|
||||
playsound(loc, 'sound/magic/charge.ogg', 50, 1)
|
||||
if(current_charges == max_charges)
|
||||
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
shield_state = "[shield_on]"
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/C = loc
|
||||
C.update_inv_wear_suit()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/ComponentInitialize()
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
var/file2use = style_flags & STYLE_ALL_TAURIC ? 'modular_citadel/icons/mob/64x32_effects.dmi' : 'icons/effects/effects.dmi'
|
||||
. += mutable_appearance(file2use, shield_state, MOB_LAYER + 0.01)
|
||||
AddComponent(/datum/component/shielded, current_charges, max_charges, recharge_delay, recharge_rate, ITEM_SLOT_OCLOTHING, shield_state)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/shielded
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
@@ -833,7 +790,6 @@
|
||||
hardsuit_type = "ert_security"
|
||||
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/shielded/ctf/red
|
||||
shield_state = "shield-red"
|
||||
shield_on = "shield-red"
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/ctf/blue
|
||||
name = "blue shielded hardsuit"
|
||||
@@ -896,7 +852,6 @@
|
||||
item_state = "swat_suit"
|
||||
hardsuit_type = "syndi"
|
||||
max_charges = 4
|
||||
current_charges = 4
|
||||
recharge_delay = 15
|
||||
armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 50, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100)
|
||||
strip_delay = 130
|
||||
|
||||
@@ -199,10 +199,9 @@
|
||||
icon_state = "battlemage"
|
||||
item_state = "battlemage"
|
||||
recharge_rate = 0
|
||||
max_charges = INFINITY
|
||||
current_charges = 15
|
||||
recharge_cooldown = INFINITY
|
||||
shield_state = "shield-red"
|
||||
shield_on = "shield-red"
|
||||
min_cold_protection_temperature = ARMOR_MIN_TEMP_PROTECT
|
||||
max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT
|
||||
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/shielded/wizard
|
||||
@@ -243,6 +242,7 @@
|
||||
if(!istype(W))
|
||||
to_chat(user, "<span class='warning'>The rune can only be used on battlemage armour!</span>")
|
||||
return
|
||||
W.current_charges += 8
|
||||
to_chat(user, "<span class='notice'>You charge \the [W]. It can now absorb [W.current_charges] hits.</span>")
|
||||
var/datum/component/shielded/S = GetComponent(/datum/component/shielded)
|
||||
S.adjust_charges(8)
|
||||
to_chat(user, "<span class='notice'>You charge \the [W]. It can now absorb [S.charges] hits.</span>")
|
||||
qdel(src)
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
. += mutable_appearance('icons/effects/item_damage.dmi', "damageduniform")
|
||||
if(blood_DNA)
|
||||
. += mutable_appearance('icons/effects/blood.dmi', "uniformblood", color = blood_DNA_to_color())
|
||||
if(accessory_overlay)
|
||||
. += accessory_overlay
|
||||
|
||||
/obj/item/clothing/under/attackby(obj/item/I, mob/user, params)
|
||||
if((has_sensor == BROKEN_SENSORS) && istype(I, /obj/item/stack/cable_coil))
|
||||
@@ -99,8 +101,7 @@
|
||||
if((flags_inv & HIDEACCESSORY) || (A.flags_inv & HIDEACCESSORY))
|
||||
return TRUE
|
||||
|
||||
var/accessory_color = attached_accessory.icon_state
|
||||
accessory_overlay = mutable_appearance('icons/mob/clothing/accessories.dmi', "[accessory_color]")
|
||||
accessory_overlay = mutable_appearance('icons/mob/clothing/accessories.dmi', "attached_accessory.icon_state")
|
||||
accessory_overlay.alpha = attached_accessory.alpha
|
||||
accessory_overlay.color = attached_accessory.color
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
/obj/item/clothing/under/trek/medsci/next
|
||||
desc = "The uniform worn by medsci officers. This one's from the mid 2360s."
|
||||
icon_state = "trek_next_medsci"
|
||||
item_state = "b_suit"
|
||||
|
||||
|
||||
//ENT
|
||||
@@ -67,35 +68,51 @@
|
||||
/obj/item/clothing/under/trek/command/voy
|
||||
desc = "The uniform worn by command officers of the 2370s."
|
||||
icon_state = "trek_voy_command"
|
||||
item_state = "trek_voy_command"
|
||||
item_state = "r_suit"
|
||||
|
||||
/obj/item/clothing/under/trek/engsec/voy
|
||||
desc = "The uniform worn by operations officers of the 2370s."
|
||||
icon_state = "trek_voy_engsec"
|
||||
item_state = "trek_voy_engsec"
|
||||
item_state = "y_suit"
|
||||
|
||||
/obj/item/clothing/under/trek/medsci/voy
|
||||
desc = "The uniform worn by medsci officers of the 2370s."
|
||||
icon_state = "trek_voy_medsci"
|
||||
item_state = "trek_voy_medsci"
|
||||
item_state = "b_suit"
|
||||
|
||||
|
||||
//DS9
|
||||
/obj/item/clothing/under/trek/command/ds9
|
||||
desc = "The uniform worn by command officers of the 2380s."
|
||||
icon_state = "trek_ds9_command"
|
||||
item_state = "trek_ds9_command"
|
||||
item_state = "r_suit"
|
||||
|
||||
/obj/item/clothing/under/trek/engsec/ds9
|
||||
desc = "The uniform worn by operations officers of the 2380s."
|
||||
icon_state = "trek_ds9_engsec"
|
||||
item_state = "trek_ds9_engsec"
|
||||
item_state = "y_suit"
|
||||
|
||||
/obj/item/clothing/under/trek/medsci/ds9
|
||||
desc = "The uniform undershirt worn by medsci officers of the 2380s."
|
||||
icon_state = "trek_ds9_medsci"
|
||||
item_state = "trek_ds9_medsci"
|
||||
item_state = "b_suit"
|
||||
|
||||
//The Motion Picture
|
||||
/obj/item/clothing/under/trek/fedutil
|
||||
name = "federation utility uniform"
|
||||
desc = "The uniform worn by United Federation enlisted crew members in 2285s."
|
||||
icon_state = "trek_tmp_enlist"
|
||||
item_state = "r_suit"
|
||||
|
||||
/obj/item/clothing/under/trek/fedutil/trainee
|
||||
name = "federation trainee utility uniform"
|
||||
desc = "The uniform worn by United Federation enlisted trainees in 2285s."
|
||||
icon_state = "trek_tmp_trainee"
|
||||
|
||||
/obj/item/clothing/under/trek/fedutil/service
|
||||
name = "federation service uniform"
|
||||
desc = "The uniform worn by United Federation enlists for service work in 2285s."
|
||||
icon_state = "trek_tmp_service"
|
||||
|
||||
//Q
|
||||
/obj/item/clothing/under/trek/Q
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if(!(ismecha(M) && mech_sized))
|
||||
return
|
||||
|
||||
if(ismovableatom(M))
|
||||
if(ismovable(M))
|
||||
if(GLOB.portals.len)
|
||||
var/obj/effect/portal/P = pick(GLOB.portals)
|
||||
if(P && isturf(P.loc))
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
var/foodtype = NONE
|
||||
var/last_check_time
|
||||
var/food_quality = 50
|
||||
|
||||
/obj/item/reagent_containers/food/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -23,6 +24,9 @@
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/item/reagent_containers/food/proc/adjust_food_quality(new_quality)
|
||||
food_quality = clamp(new_quality,0,100)
|
||||
|
||||
/obj/item/reagent_containers/food/proc/checkLiked(var/fraction, mob/M)
|
||||
if(last_check_time + 50 < world.time)
|
||||
if(ishuman(M))
|
||||
@@ -32,13 +36,13 @@
|
||||
to_chat(H,"<span class='warning'>What the hell was that thing?!</span>")
|
||||
H.adjust_disgust(25 + 30 * fraction)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "toxic_food", /datum/mood_event/disgusting_food)
|
||||
else if(foodtype & H.dna.species.disliked_food)
|
||||
else if((foodtype & H.dna.species.disliked_food) || food_quality <= 30)
|
||||
to_chat(H,"<span class='notice'>That didn't taste very good...</span>")
|
||||
H.adjust_disgust(11 + 15 * fraction)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "gross_food", /datum/mood_event/gross_food)
|
||||
else if(foodtype & H.dna.species.liked_food)
|
||||
else if(((foodtype & H.dna.species.liked_food) && food_quality >= 50) || food_quality >= 70) //you like food of high quality, and food of regular quality you have a preference for
|
||||
to_chat(H,"<span class='notice'>I love this taste!</span>")
|
||||
H.adjust_disgust(-5 + -2.5 * fraction)
|
||||
H.adjust_disgust(-5 + (-2.5 * food_quality/50) + -2.5 * fraction)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "fav_food", /datum/mood_event/favorite_food)
|
||||
else
|
||||
if(foodtype & H.dna.species.toxic_food)
|
||||
@@ -48,4 +52,4 @@
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "breakfast", /datum/mood_event/breakfast)
|
||||
last_check_time = world.time
|
||||
|
||||
#undef STOP_SERVING_BREAKFAST
|
||||
#undef STOP_SERVING_BREAKFAST
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
var/list/ingredients = list()
|
||||
var/ingredients_placement = INGREDIENTS_FILL
|
||||
var/customname = "custom"
|
||||
var/total_quality = 0 //quality of all ingredients added together
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/customizable/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -56,6 +57,9 @@
|
||||
S.reagents.trans_to(src,min(S.reagents.total_volume, 15)) //limit of 15, we don't want our custom food to be completely filled by just one ingredient with large reagent volume.
|
||||
foodtype |= S.foodtype
|
||||
update_snack_overlays(S)
|
||||
//quality of customised food is average of the ingredient's qualities
|
||||
total_quality += S.food_quality
|
||||
food_quality = total_quality / length(ingredients)
|
||||
to_chat(user, "<span class='notice'>You add the [I.name] to the [name].</span>")
|
||||
update_name(S)
|
||||
else
|
||||
|
||||
@@ -153,6 +153,12 @@ All foods are distributed among various categories. Use common sense.
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/examine(mob/user)
|
||||
. = ..()
|
||||
if(food_quality >= 70)
|
||||
. += "It is of a high quality."
|
||||
else
|
||||
if(food_quality <= 30)
|
||||
. += "It is of a low quality."
|
||||
|
||||
if(bitecount == 0)
|
||||
return
|
||||
else if(bitecount == 1)
|
||||
@@ -285,7 +291,7 @@ All foods are distributed among various categories. Use common sense.
|
||||
reagents.trans_to(S, reagents.total_volume)
|
||||
if(cooking_efficiency && length(S.bonus_reagents))
|
||||
for(var/r_id in S.bonus_reagents)
|
||||
var/amount = S.bonus_reagents[r_id] * cooking_efficiency
|
||||
var/amount = round(S.bonus_reagents[r_id] * cooking_efficiency)
|
||||
if(r_id == /datum/reagent/consumable/nutriment || r_id == /datum/reagent/consumable/nutriment/vitamin)
|
||||
S.reagents.add_reagent(r_id, amount, tastes)
|
||||
else
|
||||
@@ -296,6 +302,10 @@ All foods are distributed among various categories. Use common sense.
|
||||
var/obj/item/result
|
||||
if(cooked_type)
|
||||
result = new cooked_type(T)
|
||||
//if the result is food, set its food quality to the original food item's quality
|
||||
if(isfood(result))
|
||||
var/obj/item/reagent_containers/food/food_output = result
|
||||
food_output.adjust_food_quality(food_quality + M.quality_increase)
|
||||
if(istype(M))
|
||||
initialize_cooked_food(result, M.efficiency)
|
||||
else
|
||||
|
||||
@@ -197,6 +197,7 @@
|
||||
icon = 'icons/obj/food/food.dmi'
|
||||
icon_state = ""
|
||||
bitesize = 2
|
||||
var/fried_garbage = FALSE //did you really fry a fire extinguisher?
|
||||
|
||||
GLOBAL_VAR_INIT(frying_hardmode, TRUE)
|
||||
GLOBAL_VAR_INIT(frying_bad_chem_add_volume, TRUE)
|
||||
@@ -227,21 +228,13 @@ GLOBAL_LIST_INIT(frying_bad_chems, list(
|
||||
item_flags = fried.item_flags
|
||||
obj_flags = fried.obj_flags
|
||||
|
||||
if(istype(fried, /obj/item/reagent_containers/food/snacks))
|
||||
if(isfood(fried))
|
||||
fried.reagents.trans_to(src, fried.reagents.total_volume)
|
||||
qdel(fried)
|
||||
else
|
||||
fried.forceMove(src)
|
||||
trash = fried
|
||||
if(!istype(fried, /obj/item/reagent_containers/food) && GLOB.frying_hardmode && GLOB.frying_bad_chems.len)
|
||||
var/R = rand(1, GLOB.frying_bad_chems.len)
|
||||
var/bad_chem = GLOB.frying_bad_chems[R]
|
||||
var/bad_chem_amount = GLOB.frying_bad_chems[bad_chem]
|
||||
if(GLOB.frying_bad_chem_add_volume)
|
||||
reagents.maximum_volume += bad_chem_amount + 2 //Added room for condensed cooking oil
|
||||
reagents.add_reagent(bad_chem, bad_chem_amount)
|
||||
//All fried inedible items also get condensed cooking oil added, which induces minor vomiting and heart damage
|
||||
reagents.add_reagent(/datum/reagent/toxin/condensed_cooking_oil, 2)
|
||||
fried_garbage = TRUE
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/deepfryholder/Destroy()
|
||||
if(trash)
|
||||
@@ -249,6 +242,13 @@ GLOBAL_LIST_INIT(frying_bad_chems, list(
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/deepfryholder/On_Consume(mob/living/eater)
|
||||
if(fried_garbage && GLOB.frying_hardmode && GLOB.frying_bad_chems.len)
|
||||
var/R = rand(1, GLOB.frying_bad_chems.len)
|
||||
var/bad_chem = GLOB.frying_bad_chems[R]
|
||||
var/bad_chem_amount = GLOB.frying_bad_chems[bad_chem]
|
||||
eater.reagents.add_reagent(bad_chem, bad_chem_amount)
|
||||
//All fried inedible items also get condensed cooking oil added, which induces minor vomiting and heart damage
|
||||
eater.reagents.add_reagent(/datum/reagent/toxin/condensed_cooking_oil, 2)
|
||||
if(trash)
|
||||
QDEL_NULL(trash)
|
||||
..()
|
||||
@@ -259,18 +259,22 @@ GLOBAL_LIST_INIT(frying_bad_chems, list(
|
||||
add_atom_colour(rgb(166,103,54), FIXED_COLOUR_PRIORITY)
|
||||
name = "lightly-fried [name]"
|
||||
desc = "[desc] It's been lightly fried in a deep fryer."
|
||||
adjust_food_quality(food_quality - 5)
|
||||
if(16 to 49)
|
||||
add_atom_colour(rgb(103,63,24), FIXED_COLOUR_PRIORITY)
|
||||
name = "fried [name]"
|
||||
desc = "[desc] It's been fried, increasing its tastiness value by [rand(1, 75)]%."
|
||||
adjust_food_quality(food_quality - 10)
|
||||
if(50 to 59)
|
||||
add_atom_colour(rgb(63,23,4), FIXED_COLOUR_PRIORITY)
|
||||
name = "deep-fried [name]"
|
||||
desc = "[desc] Deep-fried to perfection."
|
||||
adjust_food_quality(food_quality) //we shouldn't punish perfection in the fried arts
|
||||
if(60 to INFINITY)
|
||||
add_atom_colour(rgb(33,19,9), FIXED_COLOUR_PRIORITY)
|
||||
name = "the physical manifestation of the very concept of fried foods"
|
||||
desc = "A heavily-fried...something. Who can tell anymore?"
|
||||
adjust_food_quality(0) //good job, you're truly the best cook.
|
||||
filling_color = color
|
||||
foodtype |= FRIED
|
||||
|
||||
|
||||
@@ -104,6 +104,12 @@ God bless America.
|
||||
else if(!frying && user.transferItemToLoc(I, src))
|
||||
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
|
||||
frying = new/obj/item/reagent_containers/food/snacks/deepfryholder(src, I)
|
||||
//setup food quality for item depending on if it's edible or not
|
||||
if(isfood(I))
|
||||
var/obj/item/reagent_containers/food/original_food = I
|
||||
frying.adjust_food_quality(original_food.food_quality) //food quality remains unchanged until degree of frying is calculated
|
||||
else
|
||||
frying.adjust_food_quality(10) //inedible fried item has low quality
|
||||
icon_state = "fryer_on"
|
||||
fry_loop.start()
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
break
|
||||
|
||||
if(href_list["portion"])
|
||||
portion = CLAMP(input("How much drink do you want to dispense per glass?") as num, 0, 50)
|
||||
portion = clamp(input("How much drink do you want to dispense per glass?") as num, 0, 50)
|
||||
|
||||
if(href_list["pour"] || href_list["m_pour"])
|
||||
if(glasses-- <= 0)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
var/gibtime = 40 // Time from starting until meat appears
|
||||
var/meat_produced = 0
|
||||
var/ignore_clothing = FALSE
|
||||
var/meat_quality = 35 //food_quality of meat produced
|
||||
|
||||
|
||||
/obj/machinery/gibber/Initialize()
|
||||
@@ -23,8 +24,10 @@
|
||||
/obj/machinery/gibber/RefreshParts()
|
||||
gibtime = 40
|
||||
meat_produced = 0
|
||||
meat_quality = 35 // unupgraded this means quality is 50, and max upgraded it is 95
|
||||
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
|
||||
meat_produced += B.rating
|
||||
meat_quality += B.rating * 15
|
||||
for(var/obj/item/stock_parts/manipulator/M in component_parts)
|
||||
gibtime -= 5 * M.rating
|
||||
if(M.rating >= 2)
|
||||
@@ -181,6 +184,7 @@
|
||||
|
||||
for (var/i=1 to meat_produced)
|
||||
var/obj/item/reagent_containers/food/snacks/meat/slab/newmeat = new typeofmeat
|
||||
newmeat.adjust_food_quality(meat_quality)
|
||||
newmeat.name = "[sourcename] [newmeat.name]"
|
||||
if(istype(newmeat))
|
||||
newmeat.subjectname = sourcename
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
var/broken = 0 // 0, 1 or 2 // How broken is it???
|
||||
var/max_n_of_items = 10
|
||||
var/efficiency = 0
|
||||
var/quality_increase = 5 // how much do we increase the quality of microwaved items
|
||||
var/productivity = 0
|
||||
var/datum/looping_sound/microwave/soundloop
|
||||
var/list/ingredients = list() // may only contain /atom/movables
|
||||
|
||||
@@ -43,11 +45,16 @@
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/microwave/RefreshParts()
|
||||
efficiency = 0
|
||||
efficiency = 0.6
|
||||
productivity = 0
|
||||
max_n_of_items = 5
|
||||
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
|
||||
efficiency += M.rating
|
||||
efficiency += M.rating * 0.4
|
||||
productivity += M.rating
|
||||
for(var/obj/item/stock_parts/matter_bin/M in component_parts)
|
||||
|
||||
max_n_of_items = 10 * M.rating
|
||||
quality_increase = M.rating * 5
|
||||
break
|
||||
|
||||
/obj/machinery/microwave/examine(mob/user)
|
||||
@@ -83,7 +90,7 @@
|
||||
if(!(stat & (NOPOWER|BROKEN)))
|
||||
. += "<span class='notice'>The status display reads:</span>"
|
||||
. += "<span class='notice'>- Capacity: <b>[max_n_of_items]</b> items.<span>"
|
||||
. += "<span class='notice'>- Cook time reduced by <b>[(efficiency - 1) * 25]%</b>.<span>"
|
||||
. += "<span class='notice'>- Cook time reduced by <b>[(productivity - 1) * 25]%</b>.<span>"
|
||||
|
||||
/obj/machinery/microwave/update_icon_state()
|
||||
if(broken)
|
||||
@@ -240,7 +247,7 @@
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
return
|
||||
|
||||
if(prob(max((5 / efficiency) - 5, dirty * 5))) //a clean unupgraded microwave has no risk of failure
|
||||
if(prob(dirty * 5 / (5 * efficiency))) //a clean unupgraded microwave has no risk of failure
|
||||
muck()
|
||||
return
|
||||
for(var/obj/O in ingredients)
|
||||
@@ -285,7 +292,7 @@
|
||||
update_icon()
|
||||
loop(MICROWAVE_MUCK, 4)
|
||||
|
||||
/obj/machinery/microwave/proc/loop(type, time, wait = max(12 - 2 * efficiency, 2)) // standard wait is 10
|
||||
/obj/machinery/microwave/proc/loop(type, time, wait = max(12 - 2 * productivity, 2)) // standard wait is 10
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(type == MICROWAVE_PRE)
|
||||
pre_fail()
|
||||
|
||||
@@ -14,10 +14,13 @@
|
||||
var/processing = FALSE
|
||||
var/rating_speed = 1
|
||||
var/rating_amount = 1
|
||||
var/quality_increase = 5
|
||||
|
||||
/obj/machinery/processor/RefreshParts()
|
||||
quality_increase = 0
|
||||
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
|
||||
rating_amount = B.rating
|
||||
quality_increase += B.rating * 5
|
||||
for(var/obj/item/stock_parts/manipulator/M in component_parts)
|
||||
rating_speed = M.rating
|
||||
|
||||
@@ -28,8 +31,10 @@
|
||||
|
||||
/obj/machinery/processor/proc/process_food(datum/food_processor_process/recipe, atom/movable/what)
|
||||
if (recipe.output && loc && !QDELETED(src))
|
||||
var/obj/item/reagent_containers/food/food_input = what
|
||||
for(var/i = 0, i < rating_amount, i++)
|
||||
new recipe.output(drop_location())
|
||||
var/obj/item/reagent_containers/food/food_output = new recipe.output(drop_location())
|
||||
food_output.adjust_food_quality(food_input.food_quality + quality_increase)
|
||||
if (ismob(what))
|
||||
var/mob/themob = what
|
||||
themob.gib(TRUE,TRUE,TRUE)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
return
|
||||
else
|
||||
bomb_timer = input(user, "Set the [bomb] timer from [BOMB_TIMER_MIN] to [BOMB_TIMER_MAX].", bomb, bomb_timer) as num
|
||||
bomb_timer = CLAMP(CEILING(bomb_timer / 2, 1), BOMB_TIMER_MIN, BOMB_TIMER_MAX)
|
||||
bomb_timer = clamp(CEILING(bomb_timer / 2, 1), BOMB_TIMER_MIN, BOMB_TIMER_MAX)
|
||||
bomb_defused = FALSE
|
||||
|
||||
var/message = "[ADMIN_LOOKUPFLW(user)] has trapped a [src] with [bomb] set to [bomb_timer * 2] seconds."
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
parts |= reqs
|
||||
|
||||
//////////////////////////////////////////FOOD MIXTURES////////////////////////////////////
|
||||
|
||||
/datum/chemical_reaction/tofu
|
||||
name = "Tofu"
|
||||
id = "tofu"
|
||||
|
||||
@@ -138,7 +138,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
|
||||
|
||||
/datum/chatOutput/proc/setMusicVolume(volume = "")
|
||||
if(volume)
|
||||
adminMusicVolume = CLAMP(text2num(volume), 0, 100)
|
||||
adminMusicVolume = clamp(text2num(volume), 0, 100)
|
||||
|
||||
//Sends client connection details to the chat to handle and save
|
||||
/datum/chatOutput/proc/sendClientData()
|
||||
|
||||
@@ -81,9 +81,7 @@
|
||||
ENABLE_BITFIELD(mob.flags_1, HOLOGRAM_1)
|
||||
if(isliving(mob))
|
||||
var/mob/living/L = mob
|
||||
L.feeding = FALSE
|
||||
L.devourable = FALSE
|
||||
L.digestable = FALSE
|
||||
L.vore_flags = 0
|
||||
return mob
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/deactivate(var/obj/machinery/computer/holodeck/HC)
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
else if(href_list["create"])
|
||||
var/amount = (text2num(href_list["amount"]))
|
||||
//Can't be outside these (if you change this keep a sane limit)
|
||||
amount = CLAMP(amount, 1, 50)
|
||||
amount = clamp(amount, 1, 50)
|
||||
var/id = href_list["create"]
|
||||
if(!stored_research.researched_designs.Find(id))
|
||||
//naughty naughty
|
||||
|
||||
@@ -199,8 +199,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)
|
||||
W.pixel_x = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
W.pixel_y = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
W.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
W.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -928,26 +928,26 @@
|
||||
|
||||
/// Tray Setters - The following procs adjust the tray or plants variables, and make sure that the stat doesn't go out of bounds.///
|
||||
/obj/machinery/hydroponics/proc/adjustNutri(adjustamt)
|
||||
nutrilevel = CLAMP(nutrilevel + adjustamt, 0, maxnutri)
|
||||
nutrilevel = clamp(nutrilevel + adjustamt, 0, maxnutri)
|
||||
|
||||
/obj/machinery/hydroponics/proc/adjustWater(adjustamt)
|
||||
waterlevel = CLAMP(waterlevel + adjustamt, 0, maxwater)
|
||||
waterlevel = clamp(waterlevel + adjustamt, 0, maxwater)
|
||||
|
||||
if(adjustamt>0)
|
||||
adjustToxic(-round(adjustamt/4))//Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
|
||||
|
||||
/obj/machinery/hydroponics/proc/adjustHealth(adjustamt)
|
||||
if(myseed && !dead)
|
||||
plant_health = CLAMP(plant_health + adjustamt, 0, myseed.endurance)
|
||||
plant_health = clamp(plant_health + adjustamt, 0, myseed.endurance)
|
||||
|
||||
/obj/machinery/hydroponics/proc/adjustToxic(adjustamt)
|
||||
toxic = CLAMP(toxic + adjustamt, 0, 100)
|
||||
toxic = clamp(toxic + adjustamt, 0, 100)
|
||||
|
||||
/obj/machinery/hydroponics/proc/adjustPests(adjustamt)
|
||||
pestlevel = CLAMP(pestlevel + adjustamt, 0, 10)
|
||||
pestlevel = clamp(pestlevel + adjustamt, 0, 10)
|
||||
|
||||
/obj/machinery/hydroponics/proc/adjustWeeds(adjustamt)
|
||||
weedlevel = CLAMP(weedlevel + adjustamt, 0, 10)
|
||||
weedlevel = clamp(weedlevel + adjustamt, 0, 10)
|
||||
|
||||
/obj/machinery/hydroponics/proc/spawnplant() // why would you put strange reagent in a hydro tray you monster I bet you also feed them blood
|
||||
var/list/livingplants = list(/mob/living/simple_animal/hostile/tree, /mob/living/simple_animal/hostile/killertomato)
|
||||
|
||||
@@ -211,7 +211,7 @@ obj/item/seeds/proc/is_gene_forbidden(typepath)
|
||||
/// Setters procs ///
|
||||
/obj/item/seeds/proc/adjust_yield(adjustamt)
|
||||
if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable
|
||||
yield = CLAMP(yield + adjustamt, 0, 10)
|
||||
yield = clamp(yield + adjustamt, 0, 10)
|
||||
|
||||
if(yield <= 0 && get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
|
||||
yield = 1 // Mushrooms always have a minimum yield of 1.
|
||||
@@ -220,39 +220,39 @@ obj/item/seeds/proc/is_gene_forbidden(typepath)
|
||||
C.value = yield
|
||||
|
||||
/obj/item/seeds/proc/adjust_lifespan(adjustamt)
|
||||
lifespan = CLAMP(lifespan + adjustamt, 10, 100)
|
||||
lifespan = clamp(lifespan + adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/lifespan)
|
||||
if(C)
|
||||
C.value = lifespan
|
||||
|
||||
/obj/item/seeds/proc/adjust_endurance(adjustamt)
|
||||
endurance = CLAMP(endurance + adjustamt, 10, 100)
|
||||
endurance = clamp(endurance + adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/endurance)
|
||||
if(C)
|
||||
C.value = endurance
|
||||
|
||||
/obj/item/seeds/proc/adjust_production(adjustamt)
|
||||
if(yield != -1)
|
||||
production = CLAMP(production + adjustamt, 1, 10)
|
||||
production = clamp(production + adjustamt, 1, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/production)
|
||||
if(C)
|
||||
C.value = production
|
||||
|
||||
/obj/item/seeds/proc/adjust_potency(adjustamt)
|
||||
if(potency != -1)
|
||||
potency = CLAMP(potency + adjustamt, 0, 100)
|
||||
potency = clamp(potency + adjustamt, 0, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/potency)
|
||||
if(C)
|
||||
C.value = potency
|
||||
|
||||
/obj/item/seeds/proc/adjust_weed_rate(adjustamt)
|
||||
weed_rate = CLAMP(weed_rate + adjustamt, 0, 10)
|
||||
weed_rate = clamp(weed_rate + adjustamt, 0, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_rate)
|
||||
if(C)
|
||||
C.value = weed_rate
|
||||
|
||||
/obj/item/seeds/proc/adjust_weed_chance(adjustamt)
|
||||
weed_chance = CLAMP(weed_chance + adjustamt, 0, 67)
|
||||
weed_chance = clamp(weed_chance + adjustamt, 0, 67)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_chance)
|
||||
if(C)
|
||||
C.value = weed_chance
|
||||
@@ -261,7 +261,7 @@ obj/item/seeds/proc/is_gene_forbidden(typepath)
|
||||
|
||||
/obj/item/seeds/proc/set_yield(adjustamt)
|
||||
if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable
|
||||
yield = CLAMP(adjustamt, 0, 10)
|
||||
yield = clamp(adjustamt, 0, 10)
|
||||
|
||||
if(yield <= 0 && get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
|
||||
yield = 1 // Mushrooms always have a minimum yield of 1.
|
||||
@@ -270,39 +270,39 @@ obj/item/seeds/proc/is_gene_forbidden(typepath)
|
||||
C.value = yield
|
||||
|
||||
/obj/item/seeds/proc/set_lifespan(adjustamt)
|
||||
lifespan = CLAMP(adjustamt, 10, 100)
|
||||
lifespan = clamp(adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/lifespan)
|
||||
if(C)
|
||||
C.value = lifespan
|
||||
|
||||
/obj/item/seeds/proc/set_endurance(adjustamt)
|
||||
endurance = CLAMP(adjustamt, 10, 100)
|
||||
endurance = clamp(adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/endurance)
|
||||
if(C)
|
||||
C.value = endurance
|
||||
|
||||
/obj/item/seeds/proc/set_production(adjustamt)
|
||||
if(yield != -1)
|
||||
production = CLAMP(adjustamt, 1, 10)
|
||||
production = clamp(adjustamt, 1, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/production)
|
||||
if(C)
|
||||
C.value = production
|
||||
|
||||
/obj/item/seeds/proc/set_potency(adjustamt)
|
||||
if(potency != -1)
|
||||
potency = CLAMP(adjustamt, 0, 100)
|
||||
potency = clamp(adjustamt, 0, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/potency)
|
||||
if(C)
|
||||
C.value = potency
|
||||
|
||||
/obj/item/seeds/proc/set_weed_rate(adjustamt)
|
||||
weed_rate = CLAMP(adjustamt, 0, 10)
|
||||
weed_rate = clamp(adjustamt, 0, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_rate)
|
||||
if(C)
|
||||
C.value = weed_rate
|
||||
|
||||
/obj/item/seeds/proc/set_weed_chance(adjustamt)
|
||||
weed_chance = CLAMP(adjustamt, 0, 67)
|
||||
weed_chance = clamp(adjustamt, 0, 67)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_chance)
|
||||
if(C)
|
||||
C.value = weed_chance
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
|
||||
/datum/song/proc/sanitize_tempo(new_tempo)
|
||||
new_tempo = abs(new_tempo)
|
||||
return CLAMP(round(new_tempo, world.tick_lag), world.tick_lag, 5 SECONDS)
|
||||
return clamp(round(new_tempo, world.tick_lag), world.tick_lag, 5 SECONDS)
|
||||
|
||||
/datum/song/proc/get_bpm()
|
||||
return 600 / tempo
|
||||
@@ -242,22 +242,22 @@
|
||||
cached_linear_dropoff = volume_decrease_per_decisecond
|
||||
|
||||
/datum/song/proc/set_volume(volume)
|
||||
src.volume = CLAMP(volume, max(0, min_volume), min(100, max_volume))
|
||||
src.volume = clamp(volume, max(0, min_volume), min(100, max_volume))
|
||||
update_sustain()
|
||||
updateDialog()
|
||||
|
||||
/datum/song/proc/set_dropoff_volume(volume)
|
||||
sustain_dropoff_volume = CLAMP(volume, INSTRUMENT_MIN_SUSTAIN_DROPOFF, 100)
|
||||
sustain_dropoff_volume = clamp(volume, INSTRUMENT_MIN_SUSTAIN_DROPOFF, 100)
|
||||
update_sustain()
|
||||
updateDialog()
|
||||
|
||||
/datum/song/proc/set_exponential_drop_rate(drop)
|
||||
sustain_exponential_dropoff = CLAMP(drop, INSTRUMENT_EXP_FALLOFF_MIN, INSTRUMENT_EXP_FALLOFF_MAX)
|
||||
sustain_exponential_dropoff = clamp(drop, INSTRUMENT_EXP_FALLOFF_MIN, INSTRUMENT_EXP_FALLOFF_MAX)
|
||||
update_sustain()
|
||||
updateDialog()
|
||||
|
||||
/datum/song/proc/set_linear_falloff_duration(duration)
|
||||
sustain_linear_duration = CLAMP(duration, 0.1, INSTRUMENT_MAX_TOTAL_SUSTAIN)
|
||||
sustain_linear_duration = clamp(duration, 0.1, INSTRUMENT_MAX_TOTAL_SUSTAIN)
|
||||
update_sustain()
|
||||
updateDialog()
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
else if(href_list["setnoteshift"])
|
||||
var/amount = input(usr, "Set note shift", "Note Shift") as null|num
|
||||
if(!isnull(amount))
|
||||
note_shift = CLAMP(amount, note_shift_min, note_shift_max)
|
||||
note_shift = clamp(amount, note_shift_min, note_shift_max)
|
||||
|
||||
else if(href_list["setsustainmode"])
|
||||
var/choice = input(usr, "Choose a sustain mode", "Sustain Mode") as null|anything in list("Linear", "Exponential")
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
if(!num) //it's an accidental
|
||||
accents[key] = oct_acc //if they misspelled it/fucked up that's on them lmao, no safety checks.
|
||||
else //octave
|
||||
octaves[key] = CLAMP(num, octave_min, octave_max)
|
||||
compiled_chord += CLAMP((note_offset_lookup[key] + octaves[key] * 12 + accent_lookup[accents[key]]), key_min, key_max)
|
||||
octaves[key] = clamp(num, octave_min, octave_max)
|
||||
compiled_chord += clamp((note_offset_lookup[key] + octaves[key] * 12 + accent_lookup[accents[key]]), key_min, key_max)
|
||||
compiled_chord += tempodiv //this goes last
|
||||
if(length(compiled_chord))
|
||||
compiled_chords[++compiled_chords.len] = compiled_chord
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
new_data = 0
|
||||
|
||||
if(isnum(new_data))
|
||||
data = CLAMP(round(new_data), 0, IC_MAX_LIST_LENGTH)
|
||||
data = clamp(round(new_data), 0, IC_MAX_LIST_LENGTH)
|
||||
holder.on_data_written()
|
||||
|
||||
/datum/integrated_io/index/display_pin_type()
|
||||
|
||||
@@ -308,7 +308,7 @@ obj/item/integrated_circuit/atmospherics/connector/portableConnectorReturnAir()
|
||||
|
||||
/obj/item/integrated_circuit/atmospherics/pump/filter/on_data_written()
|
||||
var/amt = get_pin_data(IC_INPUT, 5)
|
||||
target_pressure = CLAMP(amt, 0, PUMP_MAX_PRESSURE)
|
||||
target_pressure = clamp(amt, 0, PUMP_MAX_PRESSURE)
|
||||
|
||||
/obj/item/integrated_circuit/atmospherics/pump/filter/do_work()
|
||||
activate_pin(2)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
/obj/item/integrated_circuit/transfer/pulsedemultiplexer/do_work()
|
||||
var/output_index = get_pin_data(IC_INPUT, 1)
|
||||
|
||||
if(output_index == CLAMP(output_index, 1, number_of_pins))
|
||||
if(output_index == clamp(output_index, 1, number_of_pins))
|
||||
activate_pin(round(output_index + 1 ,1))
|
||||
|
||||
/obj/item/integrated_circuit/transfer/pulsedemultiplexer/medium
|
||||
|
||||
@@ -389,8 +389,8 @@
|
||||
activate_pin(3)
|
||||
return
|
||||
var/turf/T = get_turf(assembly)
|
||||
var/target_x = CLAMP(get_pin_data(IC_INPUT, 1), 0, world.maxx)
|
||||
var/target_y = CLAMP(get_pin_data(IC_INPUT, 2), 0, world.maxy)
|
||||
var/target_x = clamp(get_pin_data(IC_INPUT, 1), 0, world.maxx)
|
||||
var/target_y = clamp(get_pin_data(IC_INPUT, 2), 0, world.maxy)
|
||||
var/turf/A = locate(target_x, target_y, T.z)
|
||||
set_pin_data(IC_OUTPUT, 1, null)
|
||||
if(!A || !(A in view(T)))
|
||||
@@ -532,7 +532,7 @@
|
||||
var/rad = get_pin_data(IC_INPUT, 2)
|
||||
|
||||
if(isnum(rad))
|
||||
rad = CLAMP(rad, 0, 8)
|
||||
rad = clamp(rad, 0, 8)
|
||||
radius = rad
|
||||
|
||||
/obj/item/integrated_circuit/input/advanced_locator_list/do_work()
|
||||
@@ -594,7 +594,7 @@
|
||||
/obj/item/integrated_circuit/input/advanced_locator/on_data_written()
|
||||
var/rad = get_pin_data(IC_INPUT, 2)
|
||||
if(isnum(rad))
|
||||
rad = CLAMP(rad, 0, 8)
|
||||
rad = clamp(rad, 0, 8)
|
||||
radius = rad
|
||||
|
||||
/obj/item/integrated_circuit/input/advanced_locator/do_work()
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
var/mode = get_pin_data(IC_INPUT, 2)
|
||||
switch(ord)
|
||||
if(1)
|
||||
mode = CLAMP(mode, GRAB_PASSIVE, max_grab)
|
||||
mode = clamp(mode, GRAB_PASSIVE, max_grab)
|
||||
if(AM)
|
||||
if(check_target(AM, exclude_contents = TRUE))
|
||||
acting_object.investigate_log("grabbed ([AM]) using [src].", INVESTIGATE_CIRCUIT)
|
||||
@@ -329,9 +329,9 @@
|
||||
// If the item is in a grabber circuit we'll update the grabber's outputs after we've thrown it.
|
||||
var/obj/item/integrated_circuit/manipulation/grabber/G = A.loc
|
||||
|
||||
var/x_abs = CLAMP(T.x + target_x_rel, 0, world.maxx)
|
||||
var/y_abs = CLAMP(T.y + target_y_rel, 0, world.maxy)
|
||||
var/range = round(CLAMP(sqrt(target_x_rel*target_x_rel+target_y_rel*target_y_rel),0,8),1)
|
||||
var/x_abs = clamp(T.x + target_x_rel, 0, world.maxx)
|
||||
var/y_abs = clamp(T.y + target_y_rel, 0, world.maxy)
|
||||
var/range = round(clamp(sqrt(target_x_rel*target_x_rel+target_y_rel*target_y_rel),0,8),1)
|
||||
//remove damage
|
||||
A.throwforce = 0
|
||||
A.embedding = list("embed_chance" = 0)
|
||||
@@ -447,7 +447,7 @@
|
||||
if(!S)
|
||||
activate_pin(4)
|
||||
return
|
||||
if(materials.insert_item(S, CLAMP(get_pin_data(IC_INPUT, 2),0,100), multiplier = 1) )
|
||||
if(materials.insert_item(S, clamp(get_pin_data(IC_INPUT, 2),0,100), multiplier = 1) )
|
||||
AfterMaterialInsert()
|
||||
activate_pin(3)
|
||||
else
|
||||
@@ -458,7 +458,7 @@
|
||||
for(var/I in 1 to mtypes.len)
|
||||
var/datum/material/M = materials.materials[mtypes[I]]
|
||||
if(M)
|
||||
var/U = CLAMP(get_pin_data(IC_INPUT, I+2),-100000,100000)
|
||||
var/U = clamp(get_pin_data(IC_INPUT, I+2),-100000,100000)
|
||||
if(!U)
|
||||
continue
|
||||
if(!mt) //Invalid input
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
var/brightness = get_pin_data(IC_INPUT, 2)
|
||||
|
||||
if(new_color && isnum(brightness))
|
||||
brightness = CLAMP(brightness, 0, 10)
|
||||
brightness = clamp(brightness, 0, 10)
|
||||
light_rgb = new_color
|
||||
light_brightness = brightness
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
var/selected_sound = sounds[ID]
|
||||
if(!selected_sound)
|
||||
return
|
||||
vol = CLAMP(vol ,0 , 100)
|
||||
vol = clamp(vol ,0 , 100)
|
||||
playsound(get_turf(src), selected_sound, vol, freq, -1)
|
||||
var/atom/A = get_object()
|
||||
A.investigate_log("played a sound ([selected_sound]) as [type].", INVESTIGATE_CIRCUIT)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
else
|
||||
direction_mode = SYRINGE_INJECT
|
||||
if(isnum(new_amount))
|
||||
new_amount = CLAMP(new_amount, 0, volume)
|
||||
new_amount = clamp(new_amount, 0, volume)
|
||||
transfer_amount = new_amount
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
else
|
||||
direction_mode = SYRINGE_INJECT
|
||||
if(isnum(new_amount))
|
||||
new_amount = CLAMP(new_amount, 0, 50)
|
||||
new_amount = clamp(new_amount, 0, 50)
|
||||
transfer_amount = new_amount
|
||||
|
||||
/obj/item/integrated_circuit/reagent/pump/do_work()
|
||||
@@ -468,7 +468,7 @@
|
||||
else
|
||||
direction_mode = SYRINGE_INJECT
|
||||
if(isnum(new_amount))
|
||||
new_amount = CLAMP(new_amount, 0, 50)
|
||||
new_amount = clamp(new_amount, 0, 50)
|
||||
transfer_amount = new_amount
|
||||
|
||||
/obj/item/integrated_circuit/reagent/filter/do_work()
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
activate_pin(3)
|
||||
return
|
||||
var/turf/T = get_turf(assembly)
|
||||
var/target_x = CLAMP(get_pin_data(IC_INPUT, 1), 0, world.maxx)
|
||||
var/target_y = CLAMP(get_pin_data(IC_INPUT, 2), 0, world.maxy)
|
||||
var/target_x = clamp(get_pin_data(IC_INPUT, 1), 0, world.maxx)
|
||||
var/target_y = clamp(get_pin_data(IC_INPUT, 2), 0, world.maxy)
|
||||
var/turf/A = locate(target_x, target_y, T.z)
|
||||
set_pin_data(IC_OUTPUT, 1, null)
|
||||
if(!A||A==T)
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
/obj/item/integrated_circuit/time/delay/custom/do_work()
|
||||
var/delay_input = get_pin_data(IC_INPUT, 1)
|
||||
if(delay_input && isnum(delay_input) )
|
||||
var/new_delay = CLAMP(delay_input ,1 ,36000) //An hour.
|
||||
var/new_delay = clamp(delay_input ,1 ,36000) //An hour.
|
||||
delay = new_delay
|
||||
|
||||
..()
|
||||
@@ -119,7 +119,7 @@
|
||||
/obj/item/integrated_circuit/time/ticker/custom/on_data_written()
|
||||
var/delay_input = get_pin_data(IC_INPUT, 2)
|
||||
if(delay_input && isnum(delay_input) )
|
||||
var/new_delay = CLAMP(delay_input ,1 ,1 HOURS)
|
||||
var/new_delay = clamp(delay_input ,1 ,1 HOURS)
|
||||
delay = new_delay
|
||||
..()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -102,8 +102,8 @@
|
||||
yo.data = round(yo.data, 1)
|
||||
|
||||
var/turf/T = get_turf(assembly)
|
||||
var/target_x = CLAMP(T.x + xo.data, 0, world.maxx)
|
||||
var/target_y = CLAMP(T.y + yo.data, 0, world.maxy)
|
||||
var/target_x = clamp(T.x + xo.data, 0, world.maxx)
|
||||
var/target_y = clamp(T.y + yo.data, 0, world.maxy)
|
||||
|
||||
assembly.visible_message("<span class='danger'>[assembly] fires [installed_gun]!</span>")
|
||||
shootAt(locate(target_x, target_y, T.z))
|
||||
@@ -191,7 +191,7 @@
|
||||
var/datum/integrated_io/detonation_time = inputs[1]
|
||||
var/dt
|
||||
if(isnum(detonation_time.data) && detonation_time.data > 0)
|
||||
dt = CLAMP(detonation_time.data, 1, 12)*10
|
||||
dt = clamp(detonation_time.data, 1, 12)*10
|
||||
else
|
||||
dt = 15
|
||||
addtimer(CALLBACK(attached_grenade, /obj/item/grenade.proc/prime), dt)
|
||||
@@ -293,9 +293,9 @@
|
||||
// If the item is in a grabber circuit we'll update the grabber's outputs after we've thrown it.
|
||||
var/obj/item/integrated_circuit/manipulation/grabber/G = A.loc
|
||||
|
||||
var/x_abs = CLAMP(T.x + target_x_rel, 0, world.maxx)
|
||||
var/y_abs = CLAMP(T.y + target_y_rel, 0, world.maxy)
|
||||
var/range = round(CLAMP(sqrt(target_x_rel*target_x_rel+target_y_rel*target_y_rel),0,8),1)
|
||||
var/x_abs = clamp(T.x + target_x_rel, 0, world.maxx)
|
||||
var/y_abs = clamp(T.y + target_y_rel, 0, world.maxy)
|
||||
var/range = round(clamp(sqrt(target_x_rel*target_x_rel+target_y_rel*target_y_rel),0,8),1)
|
||||
assembly.visible_message("<span class='danger'>\The [assembly] has thrown [A]!</span>")
|
||||
log_attack("[assembly] [REF(assembly)] has thrown [A] with lethal force.")
|
||||
A.forceMove(drop_location())
|
||||
@@ -324,7 +324,7 @@
|
||||
|
||||
|
||||
/obj/item/integrated_circuit/weaponized/stun/do_work()
|
||||
var/stunforce = CLAMP(get_pin_data(IC_INPUT, 1),1,70)
|
||||
var/stunforce = clamp(get_pin_data(IC_INPUT, 1),1,70)
|
||||
var/mob/living/L = assembly.loc
|
||||
if(attempt_stun(L,stunforce))
|
||||
activate_pin(2)
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
var/datum/language_holder/other
|
||||
if(istype(thing, /datum/language_holder))
|
||||
other = thing
|
||||
else if(ismovableatom(thing))
|
||||
else if(ismovable(thing))
|
||||
var/atom/movable/AM = thing
|
||||
other = AM.get_language_holder()
|
||||
else if(istype(thing, /datum/mind))
|
||||
@@ -94,7 +94,7 @@
|
||||
language_menu.ui_interact(user)
|
||||
|
||||
/datum/language_holder/proc/get_atom()
|
||||
if(ismovableatom(owner))
|
||||
if(ismovable(owner))
|
||||
. = owner
|
||||
else if(istype(owner, /datum/mind))
|
||||
var/datum/mind/M = owner
|
||||
|
||||
@@ -267,7 +267,7 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
dat += "<A href='?src=[REF(src)];orderbyid=1'>(Order book by SS<sup>13</sup>BN)</A><BR><BR>"
|
||||
dat += "<table>"
|
||||
dat += "<tr><td>AUTHOR</td><td>TITLE</td><td>CATEGORY</td><td></td></tr>"
|
||||
dat += libcomp_menu[CLAMP(page,1,libcomp_menu.len)]
|
||||
dat += libcomp_menu[clamp(page,1,libcomp_menu.len)]
|
||||
dat += "<tr><td><A href='?src=[REF(src)];page=[(max(1,page-1))]'><<<<</A></td> <td></td> <td></td> <td><span style='text-align:right'><A href='?src=[REF(src)];page=[(min(libcomp_menu.len,page+1))]'>>>>></A></span></td></tr>"
|
||||
dat += "</table>"
|
||||
dat += "<BR><A href='?src=[REF(src)];switchscreen=0'>(Return to main menu)</A><BR>"
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
if (!light_power || !light_range) // We won't emit light anyways, destroy the light source.
|
||||
QDEL_NULL(light)
|
||||
else
|
||||
if (!ismovableatom(loc)) // We choose what atom should be the top atom of the light here.
|
||||
if (!ismovable(loc)) // We choose what atom should be the top atom of the light here.
|
||||
. = src
|
||||
else
|
||||
. = loc
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
gridSet.ycrd = text2num(dmmRegex.group[4])
|
||||
gridSet.zcrd = text2num(dmmRegex.group[5])
|
||||
|
||||
bounds[MAP_MINX] = min(bounds[MAP_MINX], CLAMP(gridSet.xcrd, x_lower, x_upper))
|
||||
bounds[MAP_MINX] = min(bounds[MAP_MINX], clamp(gridSet.xcrd, x_lower, x_upper))
|
||||
bounds[MAP_MINZ] = min(bounds[MAP_MINZ], gridSet.zcrd)
|
||||
bounds[MAP_MAXZ] = max(bounds[MAP_MAXZ], gridSet.zcrd)
|
||||
|
||||
@@ -113,15 +113,15 @@
|
||||
if(gridLines.len && gridLines[gridLines.len] == "")
|
||||
gridLines.Cut(gridLines.len) // Remove only one blank line at the end.
|
||||
|
||||
bounds[MAP_MINY] = min(bounds[MAP_MINY], CLAMP(gridSet.ycrd, y_lower, y_upper))
|
||||
bounds[MAP_MINY] = min(bounds[MAP_MINY], clamp(gridSet.ycrd, y_lower, y_upper))
|
||||
gridSet.ycrd += gridLines.len - 1 // Start at the top and work down
|
||||
bounds[MAP_MAXY] = max(bounds[MAP_MAXY], CLAMP(gridSet.ycrd, y_lower, y_upper))
|
||||
bounds[MAP_MAXY] = max(bounds[MAP_MAXY], clamp(gridSet.ycrd, y_lower, y_upper))
|
||||
|
||||
var/maxx = gridSet.xcrd
|
||||
if(gridLines.len) //Not an empty map
|
||||
maxx = max(maxx, gridSet.xcrd + length(gridLines[1]) / key_len - 1)
|
||||
|
||||
bounds[MAP_MAXX] = CLAMP(max(bounds[MAP_MAXX], maxx), x_lower, x_upper)
|
||||
bounds[MAP_MAXX] = clamp(max(bounds[MAP_MAXX], maxx), x_lower, x_upper)
|
||||
CHECK_TICK
|
||||
|
||||
// Indicate failure to parse any coordinates by nulling bounds
|
||||
|
||||
@@ -428,7 +428,7 @@
|
||||
|
||||
/obj/item/projectile/hook/on_hit(atom/target)
|
||||
. = ..()
|
||||
if(ismovableatom(target))
|
||||
if(ismovable(target))
|
||||
var/atom/movable/A = target
|
||||
if(A.anchored)
|
||||
return
|
||||
@@ -833,13 +833,13 @@
|
||||
force = 0
|
||||
var/ghost_counter = ghost_check()
|
||||
|
||||
force = CLAMP((ghost_counter * 4), 0, 75)
|
||||
force = clamp((ghost_counter * 4), 0, 75)
|
||||
user.visible_message("<span class='danger'>[user] strikes with the force of [ghost_counter] vengeful spirits!</span>")
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/ghost_sword/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
var/ghost_counter = ghost_check()
|
||||
final_block_chance += CLAMP((ghost_counter * 5), 0, 75)
|
||||
final_block_chance += clamp((ghost_counter * 5), 0, 75)
|
||||
owner.visible_message("<span class='danger'>[owner] is protected by a ring of [ghost_counter] ghosts!</span>")
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
|
||||
var/list/logs = GLOB.silo_access_logs[REF(src)]
|
||||
var/len = LAZYLEN(logs)
|
||||
var/num_pages = 1 + round((len - 1) / 30)
|
||||
var/page = CLAMP(log_page, 1, num_pages)
|
||||
var/page = clamp(log_page, 1, num_pages)
|
||||
if(num_pages > 1)
|
||||
for(var/i in 1 to num_pages)
|
||||
if(i == page)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user