Skip to content

Commit 479a9f1

Browse files
committed
randomized loot and meat drops
stuff
1 parent a570f84 commit 479a9f1

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

code/datums/procedural_mobspawn.dm

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,26 @@ var/list/appendage_modifier = list(
3737
"feathery",
3838
"tentacled",
3939
)
40+
var/list/procgen_loot = list(
41+
list(/obj/item/weapon/gun/energy/bison/alien, 1),//path, # of items
42+
list(/obj/item/weapon/gun/energy/laser/captain/alien, 2),
43+
list(/obj/item/weapon/gun/projectile/roulette_revolver, 2),
44+
list(/obj/item/weapon/gun/stickybomb, 1),
45+
list(/obj/item/weapon/gun/gravitywell, 1),
46+
list(/obj/item/weapon/gun/energy/laser/captain, 1),
47+
list(/obj/item/weapon/gun/portalgun, 1),
48+
list(/obj/item/stack/sheet/mineral/phazon, 5),
49+
list(/obj/item/stack/sheet/mineral/clown, 20),
50+
list(/obj/item/stack/sheet/mineral/adamantine, 5),
51+
list(/obj/machinery/chem_dispenser/scp_294, 1),
52+
list(/obj/machinery/sleeper/mancrowave/galo, 1),
53+
list(/obj/mecha/combat/phazon, 1),
54+
list(/obj/mecha/combat/durand/old, 1),
55+
list(/obj/mecha/medical/odysseus/murdysseus, 1),
56+
list(/obj/item/weapon/storage/box/syndie_kit/mech_killdozer, 1),
57+
list(/obj/item/weapon/storage/box/syndie_kit/emags_and_glue/, 1),
58+
list(/obj/item/clothing/accessory/medal/participation, 1),
59+
)
4060

4161
/*
4262
//PROC GENNED MEGABEASTS
@@ -81,6 +101,7 @@ var/list/appendage_modifier = list(
81101
"tail",
82102
"wing",
83103
)
104+
var/list/randomloot
84105

85106
//Generate datum variables on creation
86107
/datum/procedural_mobspawn/New(var/mob/living/simple_animal/hostile/mobtype)
@@ -123,6 +144,7 @@ var/list/appendage_modifier = list(
123144
move_to_delay = mymob.move_to_delay
124145
size_matrix = matrix()
125146
size_matrix.Scale(1.5,1.5)
147+
randomloot = pick(procgen_loot)
126148
if(prob(33))
127149
color = rgb(rand(0, 255), rand(0, 255), rand(0, 255))
128150
if(prob(10))

code/modules/mob/living/simple_animal/hostile/megabeast.dm

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ obj/effect/landmark/procedural_mobspawn/forgottenbeast
5353
var/breath_damage_type = BRUTE
5454
var/datum/custom_breath/mybreath
5555
var/datum/procedural_mobspawn/template
56+
var/obj/loot
57+
var/loot_count
5658

5759
/mob/living/simple_animal/hostile/forgotten_beast/Life()
5860
..()
@@ -64,8 +66,13 @@ obj/effect/landmark/procedural_mobspawn/forgottenbeast
6466
GasAttack()
6567

6668
/mob/living/simple_animal/hostile/forgotten_beast/death(var/gibbed = FALSE)
67-
..(TRUE)
68-
visible_message("<span class='warning'><b>[src]</b> stops moving!</span>")
69+
if(!gibbed)
70+
gib()
71+
return
72+
for(var/i = loot_count; i > 0)
73+
new loot(get_turf(src))
74+
--i
75+
new /obj/effect/gibspawner/generic(src.loc)
6976
qdel(src)
7077

7178
/mob/living/simple_animal/hostile/forgotten_beast/OpenFire(target)
@@ -86,6 +93,7 @@ obj/effect/landmark/procedural_mobspawn/forgottenbeast
8693
else
8794
add_template = pick(procgen_mob_datums)
8895
template = add_template
96+
meat_type = pick(typesof(/obj/item/weapon/reagent_containers/food/snacks/meat))
8997

9098
name = template.name
9199
health = template.health
@@ -107,6 +115,8 @@ obj/effect/landmark/procedural_mobspawn/forgottenbeast
107115
transform = template.size_matrix
108116
radioactive = template.radioactive
109117
vapors = template.vapors
118+
loot = template.randomloot[1]
119+
loot_count = template.randomloot[2]
110120
..()
111121

112122
/mob/living/simple_animal/hostile/forgotten_beast/proc/BreathAttack(atom/A = target)

0 commit comments

Comments
 (0)