Skip to content

Commit

Permalink
Simple human armor now draws its values from real armor (shiptest-ss1…
Browse files Browse the repository at this point in the history
…3#3592)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

Simple humans now pull armor values from armor, currently set as
whatever they appear to be wearing
The armor_base variable has a vv intercept to update armor values
automatically for bus

## Why It's Good For The Game

Intuitive that the guy wearing super heavy armor dies to AP rounds and
not 3 shotgun shells

## Changelog

:cl:
balance: simple humans now have as much health as normal humans! This
makes them weaker!
balance: simple humans now also benefit from their armor as much as
normal humans! This makes them stronger!
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Signed-off-by: Theos <[email protected]>
Signed-off-by: rye-rice <[email protected]>
Co-authored-by: Mark Suckerberg <[email protected]>
Co-authored-by: rye-rice <[email protected]>
  • Loading branch information
3 people authored and zimon9 committed Oct 29, 2024
1 parent 065a5dd commit bf65489
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
casingtype = null
ranged_message = "fires the syringe gun at"
ranged_cooldown_time = 30
armor_base = /obj/item/clothing/suit/frontiersmen

/mob/living/simple_animal/hostile/human/frontier/ranged/surgeon/neuter
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/surgeon)
Expand Down Expand Up @@ -115,12 +116,11 @@
/mob/living/simple_animal/hostile/human/frontier/ranged/trooper
icon_state = "frontiersmanrangedelite"
icon_living = "frontiersmanrangedelite"
maxHealth = 170
health = 170
projectilesound = 'sound/weapons/gun/shotgun/shot.ogg'
casingtype = /obj/item/ammo_casing/shotgun/buckshot
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper,
/obj/item/gun/ballistic/shotgun/brimstone)
armor_base = /obj/item/clothing/suit/armor/vest/bulletproof/frontier

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/internals
icon_state = "frontiersmanrangedelite_mask"
Expand Down Expand Up @@ -155,6 +155,7 @@
projectiletype = null
projectilesound = 'sound/weapons/gun/flamethrower/flamethrower1.ogg'
casingtype = null
armor_base = /obj/item/clothing/suit/armor/frontier/fireproof

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/flame/OpenFire()
var/turf/T = get_ranged_target_turf_direct(src, target, 4)
Expand All @@ -176,6 +177,7 @@
casingtype = /obj/item/ammo_casing/a762_40
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper,
/obj/item/gun/ballistic/automatic/assault/skm)
armor_base = /obj/item/clothing/suit/armor/vest/bulletproof/frontier

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/skm/internals
icon_state = "frontiersmanrangedak47_mask"
Expand Down Expand Up @@ -203,6 +205,7 @@
/obj/item/gun/ballistic/rifle/illestren)
casingtype = /obj/item/ammo_casing/a8_50r
projectilesound = 'sound/weapons/gun/rifle/mosin.ogg'
armor_base = /obj/item/clothing/suit/armor/vest/bulletproof/frontier

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/rifle/internals
icon_state = "frontiersmanrangedmosin_mask"
Expand All @@ -226,13 +229,12 @@
icon_state = "frontiersmanrangedminigun"
icon_living = "frontiersmanrangedminigun"
projectilesound = 'sound/weapons/laser4.ogg'
maxHealth = 260
health = 260
rapid = 6
rapid_fire_delay = 1.5
casingtype = null
projectiletype = /obj/projectile/beam/weak/penetrator
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper/heavy)
armor_base = /obj/item/clothing/suit/space/hardsuit/security/independent/frontier

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/heavy/internals
icon_state = "frontiersmanrangedminigun_mask"
Expand All @@ -256,13 +258,12 @@
name = "Frontiersman Officer"
icon_state = "frontiersmanofficer"
icon_living = "frontiersmanofficer"
maxHealth = 65
health = 65
rapid = 4
projectilesound = 'sound/weapons/gun/pistol/mauler.ogg'
casingtype = /obj/item/ammo_casing/c9mm
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/officer,
/obj/item/gun/ballistic/automatic/pistol/mauler)
armor_base = /obj/item/clothing/suit/armor/frontier

/mob/living/simple_animal/hostile/human/frontier/ranged/officer/internals
icon_state = "frontiersmanofficer_mask"
Expand Down
23 changes: 23 additions & 0 deletions code/modules/mob/living/simple_animal/hostile/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,26 @@
footstep_type = FOOTSTEP_MOB_SHOE

faction = list("hermit")

///Steals the armor datum from this type of armor
var/obj/item/clothing/armor_base

/mob/living/simple_animal/hostile/human/Initialize()
. = ..()
if(ispath(armor_base, /obj/item/clothing))
//sigh. if only we could get the initial() value of list vars
var/obj/item/clothing/instance = new armor_base()
armor = instance.armor
qdel(instance)

/mob/living/simple_animal/hostile/human/vv_edit_var(var_name, var_value)
switch(var_name)
if (NAMEOF(src, armor_base))
if(ispath(var_value, /obj/item/clothing))
var/obj/item/clothing/temp = new var_value
armor = temp.armor
qdel(temp)
datum_flags |= DF_VAR_EDITED
return TRUE
return FALSE
. = ..()
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
faction = list(ROLE_DEATHSQUAD)
check_friendly_fire = TRUE
dodging = TRUE
armor_base = /obj/item/clothing/suit/armor/vest

/mob/living/simple_animal/hostile/human/nanotrasen/screaming
icon_state = "nanotrasen"
Expand Down Expand Up @@ -61,8 +62,6 @@
icon = 'icons/mob/simple_human.dmi'
icon_state = "nanotrasen_ert"
icon_living = "nanotrasen_ert"
maxHealth = 150
health = 150
melee_damage_lower = 13
melee_damage_upper = 18
ranged = TRUE
Expand All @@ -77,3 +76,4 @@
projectilesound = 'sound/weapons/laser.ogg'
loot = list(/obj/effect/gibspawner/human)
faction = list(ROLE_DEATHSQUAD)
armor_base = /obj/item/clothing/suit/space/hardsuit/ert/sec
2 changes: 2 additions & 0 deletions code/modules/mob/living/simple_animal/hostile/human/pirate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
atmos_requirements = IMMUNE_ATMOS_REQS
minbodytemp = 0
speed = 1
armor_base = /obj/item/clothing/suit/space

/mob/living/simple_animal/hostile/human/pirate/melee/space/Initialize()
. = ..()
Expand Down Expand Up @@ -73,6 +74,7 @@
atmos_requirements = IMMUNE_ATMOS_REQS
minbodytemp = 0
speed = 1
armor_base = /obj/item/clothing/suit/space

/mob/living/simple_animal/hostile/human/pirate/ranged/space/Initialize()
. = ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
loot = list(
/obj/effect/mob_spawn/human/corpse/damaged/whitesands
)
armor_base = /obj/item/clothing/suit/hooded/survivor

/mob/living/simple_animal/hostile/human/hermit/survivor/death(gibbed)
move_force = MOVE_FORCE_DEFAULT
Expand Down
38 changes: 13 additions & 25 deletions code/modules/mob/living/simple_animal/hostile/human/syndicate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
check_friendly_fire = TRUE
dodging = TRUE
rapid_melee = 2
armor_base = /obj/item/clothing/suit/armor/vest

///////////////Melee////////////

/mob/living/simple_animal/hostile/human/syndicate/space
icon_state = "syndicate_space"
icon_living = "syndicate_space"
name = "Ramzi Clique Commando"
maxHealth = 170
health = 170
atmos_requirements = IMMUNE_ATMOS_REQS
minbodytemp = 0
maxbodytemp = 1000
speed = 1
armor_base = /obj/item/clothing/suit/space/hardsuit/syndi

/mob/living/simple_animal/hostile/human/syndicate/space/Initialize()
. = ..()
Expand All @@ -42,8 +42,7 @@
icon_state = "syndicate_stormtrooper"
icon_living = "syndicate_stormtrooper"
name = "Ramzi Clique Assault Trooper"
maxHealth = 250
health = 250
armor_base = /obj/item/clothing/suit/space/hardsuit/syndi/elite

/mob/living/simple_animal/hostile/human/syndicate/melee //dude with a knife and no shields
melee_damage_lower = 15
Expand All @@ -61,13 +60,11 @@
icon_state = "syndicate_space_knife"
icon_living = "syndicate_space_knife"
name = "Ramzi Clique Commando"
maxHealth = 170
health = 170
atmos_requirements = IMMUNE_ATMOS_REQS
minbodytemp = 0
maxbodytemp = 1000
speed = 1
projectile_deflect_chance = 50
armor_base = /obj/item/clothing/suit/space/hardsuit/syndi

/mob/living/simple_animal/hostile/human/syndicate/melee/space/Initialize()
. = ..()
Expand All @@ -78,9 +75,8 @@
icon_state = "syndicate_stormtrooper_knife"
icon_living = "syndicate_stormtrooper_knife"
name = "Ramzi Clique Stormtrooper"
maxHealth = 250
health = 250
projectile_deflect_chance = 50
armor_base = /obj/item/clothing/suit/space/hardsuit/syndi/elite

/mob/living/simple_animal/hostile/human/syndicate/melee/sword
melee_damage_lower = 30
Expand Down Expand Up @@ -114,13 +110,12 @@
icon_state = "syndicate_space_sword"
icon_living = "syndicate_space_sword"
name = "Ramzi Clique Commando"
maxHealth = 170
health = 170
atmos_requirements = IMMUNE_ATMOS_REQS
minbodytemp = 0
maxbodytemp = 1000
speed = 1
projectile_deflect_chance = 50
armor_base = /obj/item/clothing/suit/space/hardsuit/syndi

/mob/living/simple_animal/hostile/human/syndicate/melee/sword/space/Initialize()
. = ..()
Expand All @@ -136,9 +131,8 @@
icon_state = "syndicate_stormtrooper_sword"
icon_living = "syndicate_stormtrooper_sword"
name = "Ramzi Clique Stormtrooper"
maxHealth = 250
health = 250
projectile_deflect_chance = 50
armor_base = /obj/item/clothing/suit/space/hardsuit/syndi/elite

///////////////Guns////////////

Expand All @@ -162,12 +156,11 @@
icon_state = "syndicate_space_pistol"
icon_living = "syndicate_space_pistol"
name = "Ramzi Clique Commando"
maxHealth = 170
health = 170
atmos_requirements = IMMUNE_ATMOS_REQS
minbodytemp = 0
maxbodytemp = 1000
speed = 1
armor_base = /obj/item/clothing/suit/space/hardsuit/syndi

/mob/living/simple_animal/hostile/human/syndicate/ranged/space/Initialize()
. = ..()
Expand All @@ -178,8 +171,7 @@
icon_state = "syndicate_stormtrooper_pistol"
icon_living = "syndicate_stormtrooper_pistol"
name = "Ramzi Clique Stormtrooper"
maxHealth = 250
health = 250
armor_base = /obj/item/clothing/suit/space/hardsuit/syndi/elite

/mob/living/simple_animal/hostile/human/syndicate/ranged/smg
rapid = 2
Expand All @@ -192,12 +184,11 @@
icon_state = "syndicate_space_smg"
icon_living = "syndicate_space_smg"
name = "Ramzi Clique Commando"
maxHealth = 170
health = 170
atmos_requirements = IMMUNE_ATMOS_REQS
minbodytemp = 0
maxbodytemp = 1000
speed = 1
armor_base = /obj/item/clothing/suit/space/hardsuit/syndi

/mob/living/simple_animal/hostile/human/syndicate/ranged/smg/space/Initialize()
. = ..()
Expand All @@ -208,8 +199,7 @@
icon_state = "syndicate_stormtrooper_smg"
icon_living = "syndicate_stormtrooper_smg"
name = "Ramzi Clique Stormtrooper"
maxHealth = 250
health = 250
armor_base = /obj/item/clothing/suit/space/hardsuit/syndi/elite

/mob/living/simple_animal/hostile/human/syndicate/ranged/shotgun
rapid = 2
Expand All @@ -223,12 +213,11 @@
icon_state = "syndicate_space_shotgun"
icon_living = "syndicate_space_shotgun"
name = "Ramzi Clique Commando"
maxHealth = 170
health = 170
atmos_requirements = IMMUNE_ATMOS_REQS
minbodytemp = 0
maxbodytemp = 1000
speed = 1
armor_base = /obj/item/clothing/suit/space/hardsuit/syndi

/mob/living/simple_animal/hostile/human/syndicate/ranged/shotgun/space/Initialize()
. = ..()
Expand All @@ -239,8 +228,7 @@
icon_state = "syndicate_stormtrooper_shotgun"
icon_living = "syndicate_stormtrooper_shotgun"
name = "Ramzi Clique Stormtrooper"
maxHealth = 250
health = 250
armor_base = /obj/item/clothing/suit/space/hardsuit/syndi/elite

///////////////Misc////////////

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
speak_chance = 0
stat_attack = HARD_CRIT //braains
maxHealth = 100
health = 100
harm_intent_damage = 5
melee_damage_lower = 21
melee_damage_upper = 21
Expand Down Expand Up @@ -41,6 +39,7 @@
//They have claws now.
O.r_hand = null
O.l_hand = null
armor_base = O.suit

var/icon/P = get_flat_human_icon("zombie_[zombiejob]", J , dummy_prefs, "zombie", outfit_override = O)
icon = P
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,8 @@
mob_size = MOB_SIZE_LARGE
var/icon_aggro = null
var/trophy_drop_mod = 25
var/datum/armor/armor //WS edit - Whitesands

/mob/living/simple_animal/hostile/asteroid/Initialize(mapload)
if (islist(armor)) //WS edit begin - Whitesands
armor = getArmor(arglist(armor))
else if (!armor)
armor = getArmor()
else if (!istype(armor, /datum/armor))
stack_trace("Invalid type [armor.type] found in .armor during [src.type] Initialize()") //WS edit begin - Whitesands

. = ..()
apply_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING)

Expand All @@ -45,11 +37,6 @@
return
icon_state = icon_living

/mob/living/simple_animal/hostile/asteroid/getarmor(def_zone, type) //WS edit begin - Whitesands
if(armor)
return armor.getRating(type)
return 0 // If no armor //WS edit end

/mob/living/simple_animal/hostile/asteroid/bullet_act(obj/projectile/P)//Reduces damage from most projectiles to curb off-screen kills
if(!stat)
Aggro()
Expand Down
15 changes: 15 additions & 0 deletions code/modules/mob/living/simple_animal/simple_animal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,18 @@
///What kind of footstep this mob should have. Null if it shouldn't have any.
var/footstep_type

/// Base armor value on this mob for running armor checks
var/datum/armor/armor


/mob/living/simple_animal/Initialize(mapload)
. = ..()
if (islist(armor))
armor = getArmor(arglist(armor))
else if (!armor)
armor = getArmor()
else if (!istype(armor, /datum/armor))
stack_trace("Invalid type [armor.type] found in .armor during [src.type] Initialize()")
GLOB.simple_animals[AIStatus] += src
if(gender == PLURAL)
gender = pick(MALE,FEMALE)
Expand Down Expand Up @@ -171,6 +181,11 @@

return ..()

/mob/living/simple_animal/getarmor(def_zone, type)
if(armor)
return armor.getRating(type)
return FALSE

/mob/living/simple_animal/attackby(obj/item/O, mob/user, params)
if(!is_type_in_list(O, food_type))
..()
Expand Down

0 comments on commit bf65489

Please sign in to comment.