final stuff, i think?

This commit is contained in:
SandPoot
2024-03-07 20:31:53 -03:00
parent a558377206
commit fcd036dab5
8 changed files with 45 additions and 45 deletions
-8
View File
@@ -20,14 +20,6 @@
/savefile/byond_version = MIN_COMPILER_VERSION
#endif
// Temporary 515 block until it is completely compatible.
// AnturK says there are issues with savefiles that would make it dangerous to test merge,
// and so this check is in place to stop serious damage.
// That being said, if you really are ready, you can give YES_I_WANT_515 to TGS.
#if !defined(YES_I_WANT_515) && DM_VERSION >= 515
#error We do not yet completely support BYOND 515.
#endif
// 515 split call for external libraries into call_ext
#if DM_VERSION < 515
#define LIBCALL call
@@ -65,7 +65,7 @@
. &= !(protection & CONFIG_ENTRY_HIDDEN)
/datum/config_entry/vv_edit_var(var_name, var_value)
var/static/list/banned_edits = list(NAMEOF(src, name), NAMEOF(src, vv_VAS), NAMEOF(src, default), NAMEOF(src, resident_file), NAMEOF(src, protection), NAMEOF(src, abstract_type), NAMEOF(src, modified), NAMEOF(src, dupes_allowed))
var/static/list/banned_edits = list(NAMEOF_STATIC(src, name), NAMEOF_STATIC(src, vv_VAS), NAMEOF_STATIC(src, default), NAMEOF_STATIC(src, resident_file), NAMEOF_STATIC(src, protection), NAMEOF_STATIC(src, abstract_type), NAMEOF_STATIC(src, modified), NAMEOF_STATIC(src, dupes_allowed))
if(var_name == NAMEOF(src, config_entry_value))
if(protection & CONFIG_ENTRY_LOCKED)
return FALSE
@@ -135,7 +135,7 @@
return FALSE
/datum/config_entry/number/vv_edit_var(var_name, var_value)
var/static/list/banned_edits = list(NAMEOF(src, max_val), NAMEOF(src, min_val), NAMEOF(src, integer))
var/static/list/banned_edits = list(NAMEOF_STATIC(src, max_val), NAMEOF_STATIC(src, min_val), NAMEOF_STATIC(src, integer))
return !(var_name in banned_edits) && ..()
/datum/config_entry/flag
+5 -4
View File
@@ -834,15 +834,16 @@
update_icon()
/obj/item/toy/cards/deck/update_icon_state()
switch(cards.len)
if(original_size*0.5 to INFINITY)
switch(LAZYLEN(cards))
if(27 to INFINITY)
icon_state = "deck_[deckstyle]_full"
if(original_size*0.25 to original_size*0.5)
if(11 to 27)
icon_state = "deck_[deckstyle]_half"
if(1 to original_size*0.25)
if(1 to 11)
icon_state = "deck_[deckstyle]_low"
else
icon_state = "deck_[deckstyle]_empty"
return ..()
/obj/item/toy/cards/deck/attack_self(mob/user)
if(cooldown < world.time - 50)
@@ -192,32 +192,32 @@
else
var/healthpercent = (health/maxHealth) * 100
switch(healthpercent)
if(100 to 70) //Bonuses to speed and damage at high health
if(70 to 100) //Bonuses to speed and damage at high health
speed = 0
melee_damage_lower = 16
melee_damage_upper = 16
attack_verb_continuous = "viciously slashes"
if(70 to 40)
if(40 to 70)
speed = initial(speed)
melee_damage_lower = initial(melee_damage_lower)
melee_damage_upper = initial(melee_damage_upper)
attack_verb_continuous = initial(attack_verb_continuous)
if(40 to 30) //Damage decrease, but not speed
if(30 to 40) //Damage decrease, but not speed
speed = initial(speed)
melee_damage_lower = 10
melee_damage_upper = 10
attack_verb_continuous = "lightly slashes"
if(30 to 20) //Speed decrease
if(20 to 30) //Speed decrease
speed = 2
melee_damage_lower = 8
melee_damage_upper = 8
attack_verb_continuous = "lightly slashes"
if(20 to 10) //Massive speed decrease and weak melee attacks
if(10 to 20) //Massive speed decrease and weak melee attacks
speed = 3
melee_damage_lower = 6
melee_damage_upper = 6
attack_verb_continuous = "weakly slashes"
if(10 to 0) //We are super weak and going to die
if(0 to 10) //We are super weak and going to die
speed = 4
melee_damage_lower = 4
melee_damage_upper = 4
-1
View File
@@ -467,7 +467,6 @@
/datum/mafia_role/lawyer/proc/release(datum/mafia_controller/game)
SIGNAL_HANDLER
. = ..()
if(current_target)
current_target.role_flags &= ~ROLE_ROLEBLOCKED
current_target = null
@@ -2574,7 +2574,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
generate_data_info(data)
/datum/reagent/consumable/ethanol/fruit_wine/proc/generate_data_info(list/data)
var/minimum_percent = 0.15 //Percentages measured between 0 and 1.
// BYOND's compiler fails to catch non-consts in a ranged switch case, and it causes incorrect behavior. So this needs to explicitly be a constant.
var/const/minimum_percent = 0.15 //Percentages measured between 0 and 1.
var/list/primary_tastes = list()
var/list/secondary_tastes = list()
glass_name = "glass of [name]"
+25 -18
View File
@@ -87,28 +87,35 @@
/obj/item/organ/eyes/applyOrganDamage(d, maximum = maxHealth)
. = ..()
if(!.)
return
var/old_damaged = eye_damaged
switch(damage)
if(INFINITY to maxHealth)
eye_damaged = BLIND_VISION_THREE
if(maxHealth to high_threshold)
eye_damaged = BLURRY_VISION_TWO
if(high_threshold to low_threshold)
eye_damaged = BLURRY_VISION_ONE
else
if(!owner)
return FALSE
apply_damaged_eye_effects()
/// Applies effects to our owner based on how damaged our eyes are
/obj/item/organ/eyes/proc/apply_damaged_eye_effects()
// we're in healthy threshold, either try to heal (if damaged) or do nothing
if(damage <= low_threshold)
if(eye_damaged)
eye_damaged = FALSE
if(eye_damaged == old_damaged || !owner)
// clear nearsightedness from damage
owner.clear_fullscreen(EYE_DAMAGE)
// and cure blindness from damage
owner.cure_blind(EYE_DAMAGE)
return
if(old_damaged == BLIND_VISION_THREE)
owner.cure_blind(EYE_DAMAGE)
else if(eye_damaged == BLIND_VISION_THREE)
//various degrees of "oh fuck my eyes", from "point a laser at your eye" to "staring at the Sun" intensities
// 50 - blind
// 49-31 - nearsighted (2 severity)
// 30-20 - nearsighted (1 severity)
if(organ_flags & ORGAN_FAILING)
// become blind from damage
owner.become_blind(EYE_DAMAGE)
if(eye_damaged && eye_damaged != BLIND_VISION_THREE)
owner.overlay_fullscreen("eye_damage", /atom/movable/screen/fullscreen/scaled/impaired, eye_damaged)
else
owner.clear_fullscreen("eye_damage")
// become nearsighted from damage
owner.overlay_fullscreen(EYE_DAMAGE, /atom/movable/screen/fullscreen/scaled/impaired, damage > high_threshold ? 2 : 1)
eye_damaged = TRUE
/obj/item/organ/eyes/night_vision
name = "shadow eyes"
@@ -467,15 +467,15 @@ if(driver.sprinting && !(boost_cooldown))
return WEST
else
switch(angle)
if(0 to -22)
if(-22 to 0)
return EAST
if(-22 to -67)
if(-67 to -22)
return SOUTHEAST
if(-67 to -112)
if(-112 to -67)
return SOUTH
if(-112 to -157)
if(-157 to -112)
return SOUTHWEST
if(-157 to -180)
if(-180 to -157)
return WEST