Skip to content

Commit

Permalink
refactor the frointersmen just a little to not reuse alot of code
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Oct 1, 2024
1 parent 37f9915 commit 2e1783e
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 97 deletions.
30 changes: 30 additions & 0 deletions code/modules/mob/living/simple_animal/corpse.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,32 @@
hairstyle = "Bald"
facial_hairstyle = "Shaved"

/obj/effect/mob_spawn/human/corpse/frontier/internals
outfit = /datum/outfit/frontier/internals

/datum/outfit/frontier
name = "Frontiersman Corpse"
uniform = /obj/item/clothing/under/frontiersmen
shoes = /obj/item/clothing/shoes/jackboots
head = /obj/item/clothing/head/beret/sec/frontier
gloves = /obj/item/clothing/gloves/color/black

/datum/outfit/frontier/internals
mask = /obj/item/clothing/mask/gas/sechailer
l_pocket = /obj/item/tank/internals/emergency_oxygen/engi

/obj/effect/mob_spawn/human/corpse/frontier/ranged
outfit = /datum/outfit/frontier

/obj/effect/mob_spawn/human/corpse/frontier/ranged/internals
outfit = /datum/outfit/frontier/internals

/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper
outfit = /datum/outfit/frontier/trooper

/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper/internals
outfit = /datum/outfit/frontier/trooper/internals

/datum/outfit/frontier/trooper
name = "Frontiersman Armored Corpse"
suit = /obj/item/clothing/suit/armor/vest/bulletproof/frontier
Expand All @@ -144,6 +157,9 @@
ears = /obj/item/radio/headset
head = /obj/item/clothing/head/helmet/bulletproof/x11/frontier

/datum/outfit/frontier/trooper/internals
mask = /obj/item/clothing/mask/gas/sechailer
l_pocket = /obj/item/tank/internals/emergency_oxygen/engi

/obj/effect/mob_spawn/human/corpse/frontier/ranged/officer
name = "Frontiersman Officer"
Expand All @@ -157,6 +173,13 @@
ears = /obj/item/radio/headset
head = /obj/item/clothing/head/frontier/peaked

/obj/effect/mob_spawn/human/corpse/frontier/ranged/officer/internals
outfit = /datum/outfit/frontier/officer/internals

/datum/outfit/frontier/officer/internals
mask = /obj/item/clothing/mask/gas/sechailer
l_pocket = /obj/item/tank/internals/emergency_oxygen/engi

/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper/heavy
outfit = /datum/outfit/frontier/trooper/heavy

Expand All @@ -166,6 +189,13 @@
head = /obj/item/clothing/head/beret/sec/frontier/officer
back = /obj/item/minigunpack

/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper/heavy/internals
outfit = /datum/outfit/frontier/trooper/heavy/internals

/datum/outfit/frontier/trooper/heavy/internals
mask = /obj/item/clothing/mask/gas
l_pocket = /obj/item/tank/internals/emergency_oxygen/engi

/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper/heavy/gunless
outfit = /datum/outfit/frontier/trooper/heavy/gunless

Expand Down
128 changes: 31 additions & 97 deletions code/modules/mob/living/simple_animal/hostile/human/frontiersman.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,24 @@
desc = "A frontiersman! A terrorist that would probably kill everyone without mercy."
icon_state = "frontiersmanmelee"
icon = 'icons/mob/simple_frontiersman.dmi'
icon_living = "frontiersmanmelee"
icon_dead = "frontiersmanmelee_dead"
speak_chance = 0
melee_damage_lower = 15
melee_damage_upper = 15
loot = list(/obj/effect/mob_spawn/human/corpse/frontier,
/obj/item/melee/knife/survival)
loot = list()
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
faction = list(FACTION_ANTAG_FRONTIERSMEN)
footstep_type = FOOTSTEP_MOB_SHOE
mob_spawner = /obj/effect/mob_spawn/human/corpse/frontier
r_hand = /obj/item/melee/knife/kitchen
r_hand = /obj/item/melee/knife/survival

/mob/living/simple_animal/hostile/human/frontier/internals
icon_state = "frontiersmanmelee_mask"
icon_living = "frontiersmanmelee_mask"
loot = list(/obj/effect/mob_spawn/human/corpse/frontier,
/obj/item/clothing/mask/gas/sechailer,
/obj/item/tank/internals/emergency_oxygen/engi)
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
mob_spawner = /obj/effect/mob_spawn/human/corpse/frontier/internals

/mob/living/simple_animal/hostile/human/frontier/ranged
icon_state = "frontiersmanranged"
icon_living = "frontiersmanranged"
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged,
/obj/item/gun/ballistic/revolver/shadow)
ranged = 1
retreat_distance = 5
minimum_distance = 5
Expand All @@ -40,190 +31,133 @@

/mob/living/simple_animal/hostile/human/frontier/ranged/internals
icon_state = "frontiersmanranged_mask"
icon_living = "frontiersmanranged_mask"
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged,
/obj/item/gun/ballistic/revolver/shadow,
/obj/item/clothing/mask/gas/sechailer,
/obj/item/tank/internals/emergency_oxygen/engi)
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
mob_spawner = /obj/effect/mob_spawn/human/corpse/frontier/ranged/internals

/mob/living/simple_animal/hostile/human/frontier/ranged/internals/neutered
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged,
/obj/item/clothing/mask/gas/sechailer,
/obj/item/tank/internals/emergency_oxygen/engi)
neutered = TRUE

/mob/living/simple_animal/hostile/human/frontier/ranged/neutered
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged)
neutered = TRUE

/mob/living/simple_animal/hostile/human/frontier/ranged/mosin
icon_state = "frontiersmanrangedrifle"
icon_living = "frontiersmanrangedrifle"
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged,
/obj/item/gun/ballistic/rifle/illestren)
casingtype = /obj/item/ammo_casing/a8_50r
projectilesound = 'sound/weapons/gun/rifle/mosin.ogg'
r_hand = /obj/item/gun/ballistic/rifle/illestren

/mob/living/simple_animal/hostile/human/frontier/ranged/mosin/internals
icon_state = "frontiersmanrangedrifle_mask"
icon_living = "frontiersmanrangedrifle_mask"
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged,
/obj/item/gun/ballistic/rifle/illestren,
/obj/item/clothing/mask/gas/sechailer,
/obj/item/tank/internals/emergency_oxygen/engi)
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
mob_spawner = /obj/effect/mob_spawn/human/corpse/frontier/ranged/internals

/mob/living/simple_animal/hostile/human/frontier/ranged/mosin/internals/neutered
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged,
/obj/item/clothing/mask/gas/sechailer,
/obj/item/tank/internals/emergency_oxygen/engi)
neutered = TRUE

/mob/living/simple_animal/hostile/human/frontier/ranged/mosin/neutered
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged)
neutered = TRUE

/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)
mob_spawner = /obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper
r_hand = /obj/item/gun/ballistic/shotgun/brimstone

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/internals
icon_state = "frontiersmanrangedelite_mask"
icon_living = "frontiersmanrangedelite_mask"
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper,
/obj/item/gun/ballistic/shotgun/brimstone,
/obj/item/clothing/mask/gas,
/obj/item/tank/internals/emergency_oxygen/engi)
mob_spawner = /obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper/internals
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/internals/neutered
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper,
/obj/item/clothing/mask/gas,
/obj/item/tank/internals/emergency_oxygen/engi)
neutered = TRUE

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/neutered
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper)
neutered = TRUE

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/skm
icon_state = "frontiersmanrangedak47"
icon_living = "frontiersmanrangedak47"
projectilesound = 'sound/weapons/gun/rifle/skm.ogg'
rapid = 4
rapid_fire_delay = 3
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)
r_hand = /obj/item/gun/ballistic/automatic/assault/skm

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/internals
/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/skm/internals
icon_state = "frontiersmanrangedak47_mask"
icon_living = "frontiersmanrangedak47_mask"
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper,
/obj/item/gun/ballistic/automatic/assault/skm,
/obj/item/clothing/mask/gas,
/obj/item/tank/internals/emergency_oxygen/engi)
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
mob_spawner = /obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper/internals
r_hand = /obj/item/gun/ballistic/automatic/assault/skm

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/internals/neutered
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper,
/obj/item/clothing/mask/gas,
/obj/item/tank/internals/emergency_oxygen/engi)
/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/skm/internals/neutered
neutered = TRUE

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/skm/neutured
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper)
neutered = TRUE

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/rifle
icon_state = "frontiersmanrangedmosin"
icon_living = "frontiersmanrangedmosin"

loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper,
/obj/item/gun/ballistic/rifle/illestren)
casingtype = /obj/item/ammo_casing/a8_50r
projectilesound = 'sound/weapons/gun/rifle/mosin.ogg'
r_hand = /obj/item/gun/ballistic/rifle/illestren

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/rifle/internals
icon_state = "frontiersmanrangedmosin_mask"
icon_living = "frontiersmanrangedmosin_mask"
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper,
/obj/item/gun/ballistic/rifle/illestren,
/obj/item/clothing/mask/gas,
/obj/item/tank/internals/emergency_oxygen/engi)
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
mob_spawner = /obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper/internals

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/rifle/internals/neutered
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper,
/obj/item/clothing/mask/gas,
/obj/item/tank/internals/emergency_oxygen/engi)
neutered = TRUE

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/rifle/neutered
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper)
neutered = TRUE

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/heavy
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)
mob_spawner = /obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper/heavy

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/heavy/internals
icon_state = "frontiersmanrangedminigun_mask"
icon_living = "frontiersmanrangedminigun_mask"
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper/heavy,
/obj/item/clothing/mask/gas,
/obj/item/tank/internals/emergency_oxygen/engi)
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0


/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/heavy/neutered
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper/heavy/gunless,
/obj/item/clothing/mask/gas,
/obj/item/tank/internals/emergency_oxygen/engi)
mob_spawner = /obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper/heavy/internals

/mob/living/simple_animal/hostile/human/frontier/ranged/trooper/heavy/neutered
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/trooper/heavy/gunless)
neutered = TRUE

/mob/living/simple_animal/hostile/human/frontier/ranged/officer
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)
mob_spawner = /obj/effect/mob_spawn/human/corpse/frontier/ranged/officer
r_hand = /obj/item/gun/ballistic/automatic/pistol/mauler

/mob/living/simple_animal/hostile/human/frontier/ranged/officer/internals
icon_state = "frontiersmanofficer_mask"
icon_living = "frontiersmanofficer_mask"
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/officer,
/obj/item/gun/ballistic/automatic/pistol/mauler,
/obj/item/clothing/mask/gas,
/obj/item/tank/internals/emergency_oxygen/engi)
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
mob_spawner = /obj/effect/mob_spawn/human/corpse/frontier/ranged/officer/internals

/mob/living/simple_animal/hostile/human/frontier/ranged/officer/internals/neutered
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/officer,
/obj/item/clothing/mask/gas,
/obj/item/tank/internals/emergency_oxygen/engi)
neutered = TRUE

/mob/living/simple_animal/hostile/human/frontier/ranged/officer/neutured
loot = list(/obj/effect/mob_spawn/human/corpse/frontier/ranged/officer)
neutered = TRUE
15 changes: 15 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 @@ -40,14 +40,29 @@

faction = list("hermit")

/// If we use stuff from dynamic human icon generation for loot
var/human_loot = TRUE
/// Path of the mob spawner we base the mob's visuals off of.
var/mob_spawner
/// Path of the right hand held item we give to the mob's visuals.
var/r_hand
/// Path of the left hand held item we give to the mob's visuals.
var/l_hand
// If we drop l and r hand loot
var/neutered = FALSE

/mob/living/simple_animal/hostile/human/Initialize(mapload)
. = ..()
if(mob_spawner)
apply_dynamic_human_appearance(src, mob_spawn_path = mob_spawner, r_hand = r_hand, l_hand = l_hand)

/mob/living/simple_animal/hostile/human/drop_loot()
. = ..()
if(!human_loot)
return
if(mob_spawner)
new mob_spawner(loc)
if(r_hand && !neutered)
new r_hand(loc)
if(l_hand && !neutered)
new r_hand(loc)

0 comments on commit 2e1783e

Please sign in to comment.