Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Initialize(mapload)
This commit is contained in:
+14
-1
@@ -1,5 +1,18 @@
|
||||
#define ARMORID "armor-[melee]-[bullet]-[laser]-[energy]-[bomb]-[bio]-[rad]-[fire]-[acid]-[magic]-[wound]"
|
||||
|
||||
#define MELEE "melee"
|
||||
#define BULLET "bullet"
|
||||
#define LASER "laser"
|
||||
#define ENERGY "energy"
|
||||
#define BOMB "bomb"
|
||||
#define BIO "bio"
|
||||
#define RAD "rad"
|
||||
#define FIRE "fire"
|
||||
#define ACID "acid"
|
||||
#define MAGIC "magic"
|
||||
#define WOUND "wound"
|
||||
|
||||
|
||||
/proc/getArmor(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0, wound = 0)
|
||||
. = locate(ARMORID)
|
||||
if (!.)
|
||||
@@ -56,7 +69,7 @@
|
||||
return vars[rating]
|
||||
|
||||
/datum/armor/proc/getList()
|
||||
return list("melee" = melee, "bullet" = bullet, "laser" = laser, "energy" = energy, "bomb" = bomb, "bio" = bio, "rad" = rad, "fire" = fire, "acid" = acid, "magic" = magic, "wound" = wound)
|
||||
return list(MELEE = melee, BULLET = bullet, LASER = laser, ENERGY = energy, BOMB = bomb, BIO = bio, RAD = rad, FIRE = fire, ACID = acid, MAGIC = magic, WOUND = wound)
|
||||
|
||||
/datum/armor/proc/attachArmor(datum/armor/AA)
|
||||
return getArmor(melee+AA.melee, bullet+AA.bullet, laser+AA.laser, energy+AA.energy, bomb+AA.bomb, bio+AA.bio, rad+AA.rad, fire+AA.fire, acid+AA.acid, magic+AA.magic, wound+AA.wound)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
if(!(O.resistance_flags & ACID_PROOF))
|
||||
if(prob(33))
|
||||
playsound(O.loc, 'sound/items/welder.ogg', 150, 1)
|
||||
O.take_damage(min(1 + round(sqrt(level)*0.3), 300), BURN, "acid", 0)
|
||||
O.take_damage(min(1 + round(sqrt(level)*0.3), 300), BURN, ACID, 0)
|
||||
|
||||
level = max(level - (5 + 3*round(sqrt(level))), 0)
|
||||
if(level <= 0)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
var/amount = 0
|
||||
var/maxamount = 3
|
||||
var/upgrade_item = /obj/item/stack/sheet/animalhide/goliath_hide
|
||||
var/datum/armor/added_armor = list("melee" = 10)
|
||||
var/datum/armor/added_armor = list(MELEE = 10)
|
||||
var/upgrade_name
|
||||
|
||||
/datum/component/armor_plate/Initialize(_maxamount,obj/item/_upgrade_item,datum/armor/_added_armor)
|
||||
@@ -12,7 +12,7 @@
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine)
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/applyplate)
|
||||
RegisterSignal(parent, COMSIG_PARENT_PREQDELETED, .proc/dropplates)
|
||||
if(istype(parent, /obj/mecha/working/ripley))
|
||||
if(istype(parent, /obj/vehicle/sealed/mecha/working/ripley))
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/apply_mech_overlays)
|
||||
|
||||
if(_maxamount)
|
||||
@@ -67,7 +67,7 @@
|
||||
O.armor = O.armor.attachArmor(added_armor)
|
||||
|
||||
if(ismecha(O))
|
||||
var/obj/mecha/R = O
|
||||
var/obj/vehicle/sealed/mecha/R = O
|
||||
R.update_icon()
|
||||
to_chat(user, "<span class='info'>You strengthen [R], improving its resistance against melee, bullet and laser damage.</span>")
|
||||
else
|
||||
@@ -80,11 +80,11 @@
|
||||
for(var/i in 1 to amount)
|
||||
new upgrade_item(get_turf(parent))
|
||||
|
||||
/datum/component/armor_plate/proc/apply_mech_overlays(obj/mecha/mech, list/overlays)
|
||||
/datum/component/armor_plate/proc/apply_mech_overlays(obj/vehicle/sealed/mecha/mech, list/overlays)
|
||||
if(amount)
|
||||
var/overlay_string = "ripley-g"
|
||||
if(amount >= 3)
|
||||
overlay_string += "-full"
|
||||
if(!mech.occupant)
|
||||
if(LAZYLEN(mech.occupants) < 1)
|
||||
overlay_string += "-open"
|
||||
overlays += overlay_string
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
to_chat(victim, "<span class='userdanger'>[weapon] sticks itself to your [limb.name]!</span>")
|
||||
|
||||
if(damage > 0)
|
||||
var/armor = victim.run_armor_check(limb.body_zone, "melee", "Your armor has protected your [limb.name].", "Your armor has softened a hit to your [limb.name].",weapon.armour_penetration)
|
||||
var/armor = victim.run_armor_check(limb.body_zone, MELEE, "Your armor has protected your [limb.name].", "Your armor has softened a hit to your [limb.name].",weapon.armour_penetration)
|
||||
limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage, blocked=armor, sharpness = weapon.get_sharpness())
|
||||
|
||||
/// Called every time a carbon with a harmful embed moves, rolling a chance for the item to cause pain. The chance is halved if the carbon is crawling or walking.
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/on_drop)
|
||||
if(istype(parent, /obj/item/clothing/shoes))
|
||||
RegisterSignal(parent, COMSIG_SHOES_STEP_ACTION, .proc/step_squeak)
|
||||
else if(isstructure(parent))
|
||||
RegisterSignal(parent, COMSIG_ATOM_ATTACK_HAND, .proc/use_squeak)
|
||||
|
||||
override_squeak_sounds = custom_sounds
|
||||
if(chance_override)
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
return !is_mouth_covered()
|
||||
|
||||
/mob/living/carbon/CanSpreadAirborneDisease()
|
||||
return !((head && (head.flags_cover & HEADCOVERSMOUTH) && (head.armor.getRating("bio") >= 25)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && (wear_mask.armor.getRating("bio") >= 25)))
|
||||
return !((head && (head.flags_cover & HEADCOVERSMOUTH) && (head.armor.getRating(BIO) >= 25)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && (wear_mask.armor.getRating(BIO) >= 25)))
|
||||
|
||||
/mob/living/proc/set_shocked()
|
||||
flags_1 |= SHOCKED_1
|
||||
|
||||
@@ -54,11 +54,14 @@
|
||||
|
||||
/datum/element/art/rev
|
||||
|
||||
/datum/element/art/rev/apply_moodlet(atom/source, mob/M, impress)
|
||||
M.visible_message("<span class='notice'>[M] stops to inspect [source].</span>", \
|
||||
"<span class='notice'>You take in [source], inspecting the fine craftsmanship of the proletariat.</span>")
|
||||
|
||||
if(M.mind && M.mind.has_antag_datum(/datum/antagonist/rev))
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "artgreat", /datum/mood_event/artgreat)
|
||||
/datum/element/art/rev/apply_moodlet(atom/source, mob/user, impress)
|
||||
var/msg
|
||||
if(user.mind?.has_antag_datum(/datum/antagonist/rev))
|
||||
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "artgreat", /datum/mood_event/artgreat)
|
||||
msg = "What \a [pick("masterpiece", "chef-d'oeuvre")] [source.p_theyre()]. So [pick("subversive", "revolutionary", "unitizing", "egalitarian")]!"
|
||||
else
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "artbad", /datum/mood_event/artbad)
|
||||
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "artbad", /datum/mood_event/artbad)
|
||||
msg = "Wow, [source.p_they()] sucks."
|
||||
|
||||
user.visible_message(span_notice("[user] stops to inspect [source]."), \
|
||||
span_notice("You appraise [source], inspecting the fine craftsmanship of the proletariat... [msg]"))
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
var/actual_chance = embed_chance
|
||||
|
||||
if(!weapon.isEmbedHarmless()) // all the armor in the world won't save you from a kick me sign
|
||||
var/armor = max(victim.run_armor_check(hit_zone, "bullet", silent=TRUE), victim.run_armor_check(hit_zone, "bomb", silent=TRUE)) * 0.5 // we'll be nice and take the better of bullet and bomb armor, halved
|
||||
var/armor = max(victim.run_armor_check(hit_zone, BULLET, silent=TRUE), victim.run_armor_check(hit_zone, BOMB, silent=TRUE)) * 0.5 // we'll be nice and take the better of bullet and bomb armor, halved
|
||||
|
||||
if(armor) // we only care about armor penetration if there's actually armor to penetrate
|
||||
var/pen_mod = -armor + weapon.armour_penetration // even a little bit of armor can make a big difference for shrapnel with large negative armor pen
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
return TRUE
|
||||
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
|
||||
var/armor_block = D.run_armor_check(affecting, "melee")
|
||||
var/armor_block = D.run_armor_check(affecting, MELEE)
|
||||
|
||||
playsound(D.loc, A.dna.species.attack_sound, 25, 1, -1)
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
/datum/martial_art/krav_maga/proc/leg_sweep(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(BODY_ZONE_CHEST)
|
||||
var/armor_block = D.run_armor_check(affecting, "melee")
|
||||
var/armor_block = D.run_armor_check(affecting, MELEE)
|
||||
var/damage = (damage_roll(A,D)*2 + 25)
|
||||
if(!CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
return FALSE
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
/datum/martial_art/krav_maga/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
|
||||
var/armor_block = D.run_armor_check(affecting, "melee")
|
||||
var/armor_block = D.run_armor_check(affecting, MELEE)
|
||||
if(check_streak(A,D))
|
||||
return TRUE
|
||||
log_combat(A, D, "punched")
|
||||
@@ -165,7 +165,7 @@
|
||||
if(check_streak(A,D))
|
||||
return TRUE
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
|
||||
var/armor_block = D.run_armor_check(affecting, "melee")
|
||||
var/armor_block = D.run_armor_check(affecting, MELEE)
|
||||
var/damage = damage_roll(A,D)
|
||||
var/stunthreshold = A.dna.species.punchstunthreshold
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
@@ -233,4 +233,4 @@
|
||||
heat_protection = HANDS
|
||||
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
|
||||
resistance_flags = NONE
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50)
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 80, ACID = 50)
|
||||
|
||||
@@ -30,7 +30,7 @@ Simple datum which is instanced once per type and is used for every object of sa
|
||||
///This is the amount of value per 1 unit of the material
|
||||
var/value_per_unit = 0
|
||||
///Armor modifiers, multiplies an items normal armor vars by these amounts.
|
||||
var/armor_modifiers = list("melee" = 1, "bullet" = 1, "laser" = 1, "energy" = 1, "bomb" = 1, "bio" = 1, "rad" = 1, "fire" = 1, "acid" = 1)
|
||||
var/armor_modifiers = list(MELEE = 1, BULLET = 1, LASER = 1, ENERGY = 1, BOMB = 1, BIO = 1, RAD = 1, FIRE = 1, ACID = 1)
|
||||
///How beautiful is this material per unit.
|
||||
var/beauty_modifier = 0
|
||||
///Can be used to override the sound items make, lets add some SLOSHing.
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
sheet_type = /obj/item/stack/sheet/glass
|
||||
value_per_unit = 0.0025
|
||||
beauty_modifier = 0.05
|
||||
armor_modifiers = list("melee" = 0.2, "bullet" = 0.2, "laser" = 0, "energy" = 1, "bomb" = 0, "bio" = 0.2, "rad" = 0.2, "fire" = 1, "acid" = 0.2) // yeah ok
|
||||
armor_modifiers = list(MELEE = 0.2, BULLET = 0.2, LASER = 0, ENERGY = 1, BOMB = 0, BIO = 0.2, RAD = 0.2, FIRE = 1, ACID = 0.2) // yeah ok
|
||||
|
||||
/*
|
||||
Color matrices are like regular colors but unlike with normal colors, you can go over 255 on a channel.
|
||||
@@ -45,7 +45,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
sheet_type = /obj/item/stack/sheet/mineral/gold
|
||||
value_per_unit = 0.0625
|
||||
beauty_modifier = 0.15
|
||||
armor_modifiers = list("melee" = 1.1, "bullet" = 1.1, "laser" = 1.15, "energy" = 1.15, "bomb" = 1, "bio" = 1, "rad" = 1, "fire" = 0.7, "acid" = 1.1)
|
||||
armor_modifiers = list(MELEE = 1.1, BULLET = 1.1, LASER = 1.15, ENERGY = 1.15, BOMB = 1, BIO = 1, RAD = 1, FIRE = 0.7, ACID = 1.1)
|
||||
|
||||
///Small force increase, for diamond swords
|
||||
/datum/material/diamond
|
||||
@@ -58,7 +58,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
sheet_type = /obj/item/stack/sheet/mineral/diamond
|
||||
value_per_unit = 0.25
|
||||
beauty_modifier = 0.3
|
||||
armor_modifiers = list("melee" = 1.3, "bullet" = 1.3, "laser" = 0.6, "energy" = 1, "bomb" = 1.2, "bio" = 1, "rad" = 1, "fire" = 1, "acid" = 1)
|
||||
armor_modifiers = list(MELEE = 1.3, BULLET = 1.3, LASER = 0.6, ENERGY = 1, BOMB = 1.2, BIO = 1, RAD = 1, FIRE = 1, ACID = 1)
|
||||
|
||||
///Is slightly radioactive
|
||||
/datum/material/uranium
|
||||
@@ -69,7 +69,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
sheet_type = /obj/item/stack/sheet/mineral/uranium
|
||||
value_per_unit = 0.05
|
||||
beauty_modifier = 0.3 //It shines so beautiful
|
||||
armor_modifiers = list("melee" = 1.5, "bullet" = 1.4, "laser" = 0.5, "energy" = 0.5, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 1, "acid" = 1)
|
||||
armor_modifiers = list(MELEE = 1.5, BULLET = 1.4, LASER = 0.5, ENERGY = 0.5, BOMB = 0, BIO = 0, RAD = 0, FIRE = 1, ACID = 1)
|
||||
|
||||
/datum/material/uranium/on_applied(atom/source, amount, material_flags)
|
||||
. = ..()
|
||||
@@ -90,7 +90,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
sheet_type = /obj/item/stack/sheet/mineral/plasma
|
||||
value_per_unit = 0.1
|
||||
beauty_modifier = 0.15
|
||||
armor_modifiers = list("melee" = 1.4, "bullet" = 0.7, "laser" = 0, "energy" = 1.2, "bomb" = 0, "bio" = 1.2, "rad" = 1, "fire" = 0, "acid" = 0.5)
|
||||
armor_modifiers = list(MELEE = 1.4, BULLET = 0.7, LASER = 0, ENERGY = 1.2, BOMB = 0, BIO = 1.2, RAD = 1, FIRE = 0, ACID = 0.5)
|
||||
|
||||
/datum/material/plasma/on_applied(atom/source, amount, material_flags)
|
||||
. = ..()
|
||||
@@ -124,7 +124,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
sheet_type = /obj/item/stack/sheet/mineral/bananium
|
||||
value_per_unit = 0.5
|
||||
beauty_modifier = 0.5
|
||||
armor_modifiers = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 100, "bio" = 0, "rad" = 0, "fire" = 10, "acid" = 0) //Clowns cant be blown away
|
||||
armor_modifiers = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 100, BIO = 0, RAD = 0, FIRE = 10, ACID = 0) //Clowns cant be blown away
|
||||
|
||||
/datum/material/bananium/on_applied(atom/source, amount, material_flags)
|
||||
. = ..()
|
||||
@@ -147,7 +147,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
sheet_type = /obj/item/stack/sheet/mineral/titanium
|
||||
value_per_unit = 0.0625
|
||||
beauty_modifier = 0.05
|
||||
armor_modifiers = list("melee" = 1.35, "bullet" = 1.3, "laser" = 1.3, "energy" = 1.25, "bomb" = 1.25, "bio" = 1, "rad" = 1, "fire" = 0.7, "acid" = 1)
|
||||
armor_modifiers = list(MELEE = 1.35, BULLET = 1.3, LASER = 1.3, ENERGY = 1.25, BOMB = 1.25, BIO = 1, RAD = 1, FIRE = 0.7, ACID = 1)
|
||||
|
||||
/datum/material/runite
|
||||
name = "runite"
|
||||
@@ -157,7 +157,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/runite
|
||||
beauty_modifier = 0.5
|
||||
armor_modifiers = list("melee" = 1.35, "bullet" = 2, "laser" = 0.5, "energy" = 1.25, "bomb" = 1.25, "bio" = 1, "rad" = 1, "fire" = 1.4, "acid" = 1) //rune is weak against magic lasers but strong against bullets. This is the combat triangle.
|
||||
armor_modifiers = list(MELEE = 1.35, BULLET = 2, LASER = 0.5, ENERGY = 1.25, BOMB = 1.25, BIO = 1, RAD = 1, FIRE = 1.4, ACID = 1) //rune is weak against magic lasers but strong against bullets. This is the combat triangle.
|
||||
|
||||
///Force decrease
|
||||
/datum/material/plastic
|
||||
@@ -168,7 +168,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
sheet_type = /obj/item/stack/sheet/plastic
|
||||
value_per_unit = 0.0125
|
||||
beauty_modifier = -0.01
|
||||
armor_modifiers = list("melee" = 1.5, "bullet" = 1.1, "laser" = 0.3, "energy" = 0.5, "bomb" = 1, "bio" = 1, "rad" = 1, "fire" = 1.1, "acid" = 1)
|
||||
armor_modifiers = list(MELEE = 1.5, BULLET = 1.1, LASER = 0.3, ENERGY = 0.5, BOMB = 1, BIO = 1, RAD = 1, FIRE = 1.1, ACID = 1)
|
||||
|
||||
///Force decrease and mushy sound effect. (Not yet implemented)
|
||||
/datum/material/biomass
|
||||
@@ -187,7 +187,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
value_per_unit = 0.06
|
||||
beauty_modifier = 0.1
|
||||
armor_modifiers = list("melee" = 1.1, "bullet" = 1.1, "laser" = 0.4, "energy" = 0.4, "bomb" = 1, "bio" = 0.2, "rad" = 0, "fire" = 0, "acid" = 0.3)
|
||||
armor_modifiers = list(MELEE = 1.1, BULLET = 1.1, LASER = 0.4, ENERGY = 0.4, BOMB = 1, BIO = 0.2, RAD = 0, FIRE = 0, ACID = 0.3)
|
||||
|
||||
/datum/material/wood/on_applied_obj(obj/source, amount, material_flags)
|
||||
. = ..()
|
||||
@@ -211,7 +211,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
sheet_type = /obj/item/stack/sheet/mineral/adamantine
|
||||
value_per_unit = 0.25
|
||||
beauty_modifier = 0.4
|
||||
armor_modifiers = list("melee" = 1.5, "bullet" = 1.5, "laser" = 1.3, "energy" = 1.3, "bomb" = 1, "bio" = 1, "rad" = 1, "fire" = 2.5, "acid" = 1)
|
||||
armor_modifiers = list(MELEE = 1.5, BULLET = 1.5, LASER = 1.3, ENERGY = 1.3, BOMB = 1, BIO = 1, RAD = 1, FIRE = 2.5, ACID = 1)
|
||||
|
||||
///RPG Magic. (Admin only)
|
||||
/datum/material/mythril
|
||||
@@ -222,7 +222,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
sheet_type = /obj/item/stack/sheet/mineral/mythril
|
||||
value_per_unit = 0.75
|
||||
beauty_modifier = 0.5
|
||||
armor_modifiers = list("melee" = 2, "bullet" = 2, "laser" = 2, "energy" = 2, "bomb" = 2, "bio" = 2, "rad" = 2, "fire" = 2, "acid" = 2)
|
||||
armor_modifiers = list(MELEE = 2, BULLET = 2, LASER = 2, ENERGY = 2, BOMB = 2, BIO = 2, RAD = 2, FIRE = 2, ACID = 2)
|
||||
|
||||
/datum/material/mythril/on_applied_obj(atom/source, amount, material_flags)
|
||||
. = ..()
|
||||
@@ -244,7 +244,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
value_per_unit = 0.001
|
||||
strength_modifier = 0.5
|
||||
integrity_modifier = 0.1
|
||||
armor_modifiers = list("melee" = 0.25, "bullet" = 0.25, "laser" = 1.25, "energy" = 0.25, "bomb" = 0.25, "bio" = 0.25, "rad" = 1.5, "fire" = 1.5, "acid" = 1.5)
|
||||
armor_modifiers = list(MELEE = 0.25, BULLET = 0.25, LASER = 1.25, ENERGY = 0.25, BOMB = 0.25, BIO = 0.25, RAD = 1.5, FIRE = 1.5, ACID = 1.5)
|
||||
beauty_modifier = 0.25
|
||||
turf_sound_override = FOOTSTEP_SAND
|
||||
texture_layer_icon_state = "sand"
|
||||
@@ -257,7 +257,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/sandstone
|
||||
value_per_unit = 0.0025
|
||||
armor_modifiers = list("melee" = 0.5, "bullet" = 0.5, "laser" = 1.25, "energy" = 0.5, "bomb" = 0.5, "bio" = 0.25, "rad" = 1.5, "fire" = 1.5, "acid" = 1.5)
|
||||
armor_modifiers = list(MELEE = 0.5, BULLET = 0.5, LASER = 1.25, ENERGY = 0.5, BOMB = 0.5, BIO = 0.25, RAD = 1.5, FIRE = 1.5, ACID = 1.5)
|
||||
beauty_modifier = 0.3
|
||||
turf_sound_override = FOOTSTEP_WOOD
|
||||
texture_layer_icon_state = "brick"
|
||||
@@ -269,7 +269,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/snow
|
||||
value_per_unit = 0.0025
|
||||
armor_modifiers = list("melee" = 0.25, "bullet" = 0.25, "laser" = 0.25, "energy" = 0.25, "bomb" = 0.25, "bio" = 0.25, "rad" = 1.5, "fire" = 0.25, "acid" = 1.5)
|
||||
armor_modifiers = list(MELEE = 0.25, BULLET = 0.25, LASER = 0.25, ENERGY = 0.25, BOMB = 0.25, BIO = 0.25, RAD = 1.5, FIRE = 0.25, ACID = 1.5)
|
||||
beauty_modifier = 0.3
|
||||
turf_sound_override = FOOTSTEP_SAND
|
||||
texture_layer_icon_state = "sand"
|
||||
@@ -282,7 +282,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
strength_modifier = 1.2
|
||||
sheet_type = /obj/item/stack/sheet/runed_metal
|
||||
value_per_unit = 0.75
|
||||
armor_modifiers = list("melee" = 1.2, "bullet" = 1.2, "laser" = 1, "energy" = 1, "bomb" = 1.2, "bio" = 1.2, "rad" = 1.5, "fire" = 1.5, "acid" = 1.5)
|
||||
armor_modifiers = list(MELEE = 1.2, BULLET = 1.2, LASER = 1, ENERGY = 1, BOMB = 1.2, BIO = 1.2, RAD = 1.5, FIRE = 1.5, ACID = 1.5)
|
||||
beauty_modifier = -0.15
|
||||
texture_layer_icon_state = "runed"
|
||||
|
||||
@@ -294,7 +294,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
strength_modifier = 1.3 // Replicant Alloy is very good for skull beatings..
|
||||
sheet_type = /obj/item/stack/tile/brass
|
||||
value_per_unit = 0.75
|
||||
armor_modifiers = list("melee" = 1.4, "bullet" = 1.4, "laser" = 0, "energy" = 0, "bomb" = 1.4, "bio" = 1.2, "rad" = 1.5, "fire" = 1.5, "acid" = 1.5) //But it has.. a few problems that can't easily be compensated for.
|
||||
armor_modifiers = list(MELEE = 1.4, BULLET = 1.4, LASER = 0, ENERGY = 0, BOMB = 1.4, BIO = 1.2, RAD = 1.5, FIRE = 1.5, ACID = 1.5) //But it has.. a few problems that can't easily be compensated for.
|
||||
beauty_modifier = 0.3 //It really beats the cold plain plating of the station, doesn't it?
|
||||
|
||||
/datum/material/bronze
|
||||
@@ -305,7 +305,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/bronze
|
||||
value_per_unit = 0.025
|
||||
armor_modifiers = list("melee" = 1, "bullet" = 1, "laser" = 1, "energy" = 1, "bomb" = 1, "bio" = 1, "rad" = 1.5, "fire" = 1.5, "acid" = 1.5)
|
||||
armor_modifiers = list(MELEE = 1, BULLET = 1, LASER = 1, ENERGY = 1, BOMB = 1, BIO = 1, RAD = 1.5, FIRE = 1.5, ACID = 1.5)
|
||||
beauty_modifier = 0.2
|
||||
|
||||
/datum/material/paper
|
||||
@@ -315,7 +315,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/paperframes
|
||||
value_per_unit = 0.0025
|
||||
armor_modifiers = list("melee" = 0.1, "bullet" = 0.1, "laser" = 0.1, "energy" = 0.1, "bomb" = 0.1, "bio" = 0.1, "rad" = 1.5, "fire" = 0, "acid" = 1.5)
|
||||
armor_modifiers = list(MELEE = 0.1, BULLET = 0.1, LASER = 0.1, ENERGY = 0.1, BOMB = 0.1, BIO = 0.1, RAD = 1.5, FIRE = 0, ACID = 1.5)
|
||||
beauty_modifier = 0.3
|
||||
turf_sound_override = FOOTSTEP_SAND
|
||||
texture_layer_icon_state = "paper"
|
||||
@@ -340,7 +340,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/cardboard
|
||||
value_per_unit = 0.003
|
||||
armor_modifiers = list("melee" = 0.25, "bullet" = 0.25, "laser" = 0.25, "energy" = 0.25, "bomb" = 0.25, "bio" = 0.25, "rad" = 1.5, "fire" = 0, "acid" = 1.5)
|
||||
armor_modifiers = list(MELEE = 0.25, BULLET = 0.25, LASER = 0.25, ENERGY = 0.25, BOMB = 0.25, BIO = 0.25, RAD = 1.5, FIRE = 0, ACID = 1.5)
|
||||
beauty_modifier = -0.1
|
||||
|
||||
/datum/material/cardboard/on_applied_obj(obj/source, amount, material_flags)
|
||||
@@ -364,7 +364,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
sheet_type = /obj/item/stack/sheet/bone
|
||||
strength_modifier = 1.05
|
||||
value_per_unit = 0.05
|
||||
armor_modifiers = list("melee" = 1.2, "bullet" = 0.75, "laser" = 0.75, "energy" = 1.2, "bomb" = 1, "bio" = 1, "rad" = 1.5, "fire" = 1.5, "acid" = 1.5)
|
||||
armor_modifiers = list(MELEE = 1.2, BULLET = 0.75, LASER = 0.75, ENERGY = 1.2, BOMB = 1, BIO = 1, RAD = 1.5, FIRE = 1.5, ACID = 1.5)
|
||||
beauty_modifier = -0.2
|
||||
|
||||
/datum/material/bamboo
|
||||
@@ -374,7 +374,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/bamboo
|
||||
value_per_unit = 0.0025
|
||||
armor_modifiers = list("melee" = 0.5, "bullet" = 0.5, "laser" = 0.5, "energy" = 0.5, "bomb" = 0.5, "bio" = 0.51, "rad" = 1.5, "fire" = 0.5, "acid" = 1.5)
|
||||
armor_modifiers = list(MELEE = 0.5, BULLET = 0.5, LASER = 0.5, ENERGY = 0.5, BOMB = 0.5, BIO = 0.51, RAD = 1.5, FIRE = 0.5, ACID = 1.5)
|
||||
beauty_modifier = 0.2
|
||||
turf_sound_override = FOOTSTEP_WOOD
|
||||
texture_layer_icon_state = "bamboo"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
value_per_unit = 0.05
|
||||
beauty_modifier = -0.3
|
||||
strength_modifier = 0.7
|
||||
armor_modifiers = list("melee" = 0.3, "bullet" = 0.3, "laser" = 1.2, "energy" = 1.2, "bomb" = 0.3, "bio" = 0, "rad" = 0.7, "fire" = 1, "acid" = 1)
|
||||
armor_modifiers = list(MELEE = 0.3, BULLET = 0.3, LASER = 1.2, ENERGY = 1.2, BOMB = 0.3, BIO = 0, RAD = 0.7, FIRE = 1, ACID = 1)
|
||||
item_sound_override = 'sound/effects/meatslap.ogg'
|
||||
turf_sound_override = FOOTSTEP_MEAT
|
||||
texture_layer_icon_state = "meat"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
value_per_unit = 0.05
|
||||
beauty_modifier = 0.1
|
||||
strength_modifier = 0.7
|
||||
armor_modifiers = list("melee" = 0.3, "bullet" = 0.3, "laser" = 1.2, "energy" = 1.2, "bomb" = 0.3, "bio" = 0, "rad" = 0.7, "fire" = 1, "acid" = 1)
|
||||
armor_modifiers = list(MELEE = 0.3, BULLET = 0.3, LASER = 1.2, ENERGY = 1.2, BOMB = 0.3, BIO = 0, RAD = 0.7, FIRE = 1, ACID = 1)
|
||||
item_sound_override = 'sound/effects/meatslap.ogg'
|
||||
turf_sound_override = FOOTSTEP_MEAT
|
||||
texture_layer_icon_state = "pizza"
|
||||
|
||||
+118
-46
@@ -1,67 +1,139 @@
|
||||
#define PROGRESSBAR_HEIGHT 6
|
||||
#define PROGRESSBAR_ANIMATION_TIME 5
|
||||
|
||||
/datum/progressbar
|
||||
var/goal = 1
|
||||
///The progress bar visual element.
|
||||
var/image/bar
|
||||
var/shown = 0
|
||||
///The target where this progress bar is applied and where it is shown.
|
||||
var/atom/bar_loc
|
||||
///The mob whose client sees the progress bar.
|
||||
var/mob/user
|
||||
var/client/client
|
||||
var/listindex
|
||||
///The client seeing the progress bar.
|
||||
var/client/user_client
|
||||
///Effectively the number of steps the progress bar will need to do before reaching completion.
|
||||
var/goal = 1
|
||||
///Control check to see if the progress was interrupted before reaching its goal.
|
||||
var/last_progress = 0
|
||||
///Variable to ensure smooth visual stacking on multiple progress bars.
|
||||
var/listindex = 0
|
||||
|
||||
|
||||
/datum/progressbar/New(mob/User, goal_number, atom/target)
|
||||
. = ..()
|
||||
if (!istype(target))
|
||||
CRASH("Invalid target given")
|
||||
if (goal_number)
|
||||
goal = goal_number
|
||||
bar = image('icons/effects/progessbar.dmi', target, "prog_bar_0", HUD_LAYER)
|
||||
bar.plane = HUD_PLANE
|
||||
EXCEPTION("Invalid target given")
|
||||
if(QDELETED(User) || !istype(User))
|
||||
stack_trace("/datum/progressbar created with [isnull(User) ? "null" : "invalid"] user")
|
||||
qdel(src)
|
||||
return
|
||||
if(!isnum(goal_number))
|
||||
stack_trace("/datum/progressbar created with [isnull(User) ? "null" : "invalid"] goal_number")
|
||||
qdel(src)
|
||||
return
|
||||
goal = goal_number
|
||||
bar_loc = target
|
||||
bar = image('icons/effects/progessbar.dmi', bar_loc, "prog_bar_0")
|
||||
bar.plane = ABOVE_HUD_PLANE
|
||||
bar.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
|
||||
user = User
|
||||
if(user)
|
||||
client = user.client
|
||||
|
||||
LAZYINITLIST(user.progressbars)
|
||||
LAZYINITLIST(user.progressbars[bar.loc])
|
||||
var/list/bars = user.progressbars[bar.loc]
|
||||
bars.Add(src)
|
||||
LAZYADDASSOCLIST(user.progressbars, bar_loc, src)
|
||||
var/list/bars = user.progressbars[bar_loc]
|
||||
listindex = bars.len
|
||||
bar.pixel_y = 32 + (PROGRESSBAR_HEIGHT * (listindex - 1))
|
||||
|
||||
/datum/progressbar/proc/update(progress)
|
||||
if (!user || !user.client)
|
||||
shown = 0
|
||||
return
|
||||
if (user.client != client)
|
||||
if (client)
|
||||
client.images -= bar
|
||||
if (user.client)
|
||||
user.client.images += bar
|
||||
if(user.client)
|
||||
user_client = user.client
|
||||
add_prog_bar_image_to_client()
|
||||
|
||||
progress = clamp(progress, 0, goal)
|
||||
bar.icon_state = "prog_bar_[round(((progress / goal) * 100), 5)]"
|
||||
if (!shown)
|
||||
user.client.images += bar
|
||||
shown = 1
|
||||
|
||||
/datum/progressbar/proc/shiftDown()
|
||||
--listindex
|
||||
bar.pixel_y -= PROGRESSBAR_HEIGHT
|
||||
RegisterSignal(user, COMSIG_PARENT_QDELETING, .proc/on_user_delete)
|
||||
RegisterSignal(user, COMSIG_MOB_CLIENT_LOGOUT, .proc/clean_user_client)
|
||||
RegisterSignal(user, COMSIG_MOB_CLIENT_LOGIN, .proc/on_user_login)
|
||||
|
||||
/datum/progressbar/Destroy()
|
||||
for(var/I in user.progressbars[bar.loc])
|
||||
var/datum/progressbar/P = I
|
||||
if(P != src && P.listindex > listindex)
|
||||
P.shiftDown()
|
||||
if(user)
|
||||
for(var/pb in user.progressbars[bar_loc])
|
||||
var/datum/progressbar/progress_bar = pb
|
||||
if(progress_bar == src || progress_bar.listindex <= listindex)
|
||||
continue
|
||||
progress_bar.listindex--
|
||||
|
||||
var/list/bars = user.progressbars[bar.loc]
|
||||
bars.Remove(src)
|
||||
if(!bars.len)
|
||||
LAZYREMOVE(user.progressbars, bar.loc)
|
||||
progress_bar.bar.pixel_y = 32 + (PROGRESSBAR_HEIGHT * (progress_bar.listindex - 1))
|
||||
var/dist_to_travel = 32 + (PROGRESSBAR_HEIGHT * (progress_bar.listindex - 1)) - PROGRESSBAR_HEIGHT
|
||||
animate(progress_bar.bar, pixel_y = dist_to_travel, time = PROGRESSBAR_ANIMATION_TIME, easing = SINE_EASING)
|
||||
|
||||
if (client)
|
||||
client.images -= bar
|
||||
qdel(bar)
|
||||
. = ..()
|
||||
LAZYREMOVEASSOC(user.progressbars, bar_loc, src)
|
||||
user = null
|
||||
|
||||
if(user_client)
|
||||
clean_user_client()
|
||||
|
||||
bar_loc = null
|
||||
|
||||
if(bar)
|
||||
QDEL_NULL(bar)
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
///Called right before the user's Destroy()
|
||||
/datum/progressbar/proc/on_user_delete(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
user.progressbars = null //We can simply nuke the list and stop worrying about updating other prog bars if the user itself is gone.
|
||||
user = null
|
||||
qdel(src)
|
||||
|
||||
|
||||
///Removes the progress bar image from the user_client and nulls the variable, if it exists.
|
||||
/datum/progressbar/proc/clean_user_client(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(!user_client) //Disconnected, already gone.
|
||||
return
|
||||
user_client.images -= bar
|
||||
user_client = null
|
||||
|
||||
|
||||
///Called by user's Login(), it transfers the progress bar image to the new client.
|
||||
/datum/progressbar/proc/on_user_login(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(user_client)
|
||||
if(user_client == user.client) //If this was not client handling I'd condemn this sanity check. But clients are fickle things.
|
||||
return
|
||||
clean_user_client()
|
||||
if(!user.client) //Clients can vanish at any time, the bastards.
|
||||
return
|
||||
user_client = user.client
|
||||
add_prog_bar_image_to_client()
|
||||
|
||||
|
||||
///Adds a smoothly-appearing progress bar image to the player's screen.
|
||||
/datum/progressbar/proc/add_prog_bar_image_to_client()
|
||||
bar.pixel_y = 0
|
||||
bar.alpha = 0
|
||||
user_client.images += bar
|
||||
animate(bar, pixel_y = 32 + (PROGRESSBAR_HEIGHT * (listindex - 1)), alpha = 255, time = PROGRESSBAR_ANIMATION_TIME, easing = SINE_EASING)
|
||||
|
||||
|
||||
///Updates the progress bar image visually.
|
||||
/datum/progressbar/proc/update(progress)
|
||||
progress = clamp(progress, 0, goal)
|
||||
if(progress == last_progress)
|
||||
return
|
||||
last_progress = progress
|
||||
bar.icon_state = "prog_bar_[round(((progress / goal) * 100), 5)]"
|
||||
|
||||
|
||||
///Called on progress end, be it successful or a failure. Wraps up things to delete the datum and bar.
|
||||
/datum/progressbar/proc/end_progress()
|
||||
if(last_progress != goal)
|
||||
bar.icon_state = "[bar.icon_state]_fail"
|
||||
|
||||
animate(bar, alpha = 0, time = PROGRESSBAR_ANIMATION_TIME)
|
||||
|
||||
QDEL_IN(src, PROGRESSBAR_ANIMATION_TIME)
|
||||
|
||||
|
||||
#undef PROGRESSBAR_ANIMATION_TIME
|
||||
#undef PROGRESSBAR_HEIGHT
|
||||
|
||||
@@ -127,13 +127,58 @@
|
||||
desc = "You've fallen asleep. Wait a bit and you should wake up. Unless you don't, considering how helpless you are."
|
||||
icon_state = "asleep"
|
||||
|
||||
|
||||
/datum/status_effect/grouped/stasis
|
||||
id = "stasis"
|
||||
duration = -1
|
||||
tick_interval = 10
|
||||
alert_type = /atom/movable/screen/alert/status_effect/stasis
|
||||
var/last_dead_time
|
||||
|
||||
/datum/status_effect/grouped/stasis/proc/update_time_of_death()
|
||||
if(last_dead_time)
|
||||
var/delta = world.time - last_dead_time
|
||||
var/new_timeofdeath = owner.timeofdeath + delta
|
||||
owner.timeofdeath = new_timeofdeath
|
||||
owner.tod = gameTimestamp(wtime=new_timeofdeath)
|
||||
last_dead_time = null
|
||||
if(owner.stat == DEAD)
|
||||
last_dead_time = world.time
|
||||
|
||||
/datum/status_effect/grouped/stasis/on_creation(mob/living/new_owner, set_duration)
|
||||
. = ..()
|
||||
if(.)
|
||||
update_time_of_death()
|
||||
owner.reagents?.end_metabolization(owner, FALSE)
|
||||
|
||||
/datum/status_effect/grouped/stasis/on_apply()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
RegisterSignal(owner, COMSIG_LIVING_LIFE, .proc/InterruptBiologicalLife)
|
||||
owner.mobility_flags &= ~(MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_PULL | MOBILITY_HOLD)
|
||||
owner.update_mobility()
|
||||
owner.add_filter("stasis_status_ripple", 2, list("type" = "ripple", "flags" = WAVE_BOUNDED, "radius" = 0, "size" = 2))
|
||||
var/filter = owner.get_filter("stasis_status_ripple")
|
||||
animate(filter, radius = 32, time = 15, size = 0, loop = -1)
|
||||
|
||||
/datum/status_effect/grouped/stasis/proc/InterruptBiologicalLife()
|
||||
return COMPONENT_INTERRUPT_LIFE_BIOLOGICAL
|
||||
|
||||
/datum/status_effect/grouped/stasis/tick()
|
||||
update_time_of_death()
|
||||
|
||||
/datum/status_effect/grouped/stasis/on_remove()
|
||||
UnregisterSignal(owner, COMSIG_LIVING_LIFE)
|
||||
owner.mobility_flags |= MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_PULL | MOBILITY_HOLD
|
||||
owner.remove_filter("stasis_status_ripple")
|
||||
update_time_of_death()
|
||||
return ..()
|
||||
|
||||
/atom/movable/screen/alert/status_effect/stasis
|
||||
name = "Stasis"
|
||||
desc = "Your biological functions have halted. You could live forever this way, but it's pretty boring."
|
||||
icon_state = "stasis"
|
||||
|
||||
/datum/status_effect/robotic_emp
|
||||
id = "emp_no_combat_mode"
|
||||
|
||||
|
||||
@@ -27,6 +27,6 @@
|
||||
|
||||
|
||||
/datum/weather/acid_rain/weather_act(mob/living/L)
|
||||
var/resist = L.getarmor(null, "acid")
|
||||
var/resist = L.getarmor(null, ACID)
|
||||
if(prob(max(0,100-resist)))
|
||||
L.acid_act(20,20)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
status_alarm(TRUE)
|
||||
|
||||
/datum/weather/rad_storm/weather_act(mob/living/L)
|
||||
var/resist = L.getarmor(null, "rad")
|
||||
var/resist = L.getarmor(null, RAD)
|
||||
var/ratio = 1 - (min(resist, 100) / 100)
|
||||
L.rad_act(radiation_intensity * ratio)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user