Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combat Pages Revived #2666

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions ModularTegustation/tegu_items/!combat_page/combat_page.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
GLOBAL_VAR_INIT(combat_points, 0)
//Basic combat page
/obj/item/combat_page
name = "combat page"
desc = "A sort of storage that invites hostiles to the facility, and releases a few goodies and PE."
icon = 'ModularTegustation/Teguicons/teguitems.dmi'
icon_state = "darkbible"
slot_flags = ITEM_SLOT_POCKETS
w_class = WEIGHT_CLASS_SMALL
var/combat_level = 1
var/reward_pe
var/reward_items = list() //Any additional information.
var/spawn_enemies = list(/mob/living/simple_animal/hostile/ordeal/amber_bug)
var/spawn_type = "all" //All spawns all enemies, random spawns a random one.
var/spawn_number = 1
var/special //Any special info to add as info
var/being_used = FALSE

//DO, RO and EO can all use these. and Training officer I guess
var/list/allowedroles = list("Disciplinary Officer", "Extraction Officer", "Records Officer", "Training Officer", "Sephirah")

/obj/item/combat_page/attack_self(mob/living/user)
..()
if(!LAZYLEN(allowedroles))
if(!istype(user) || !(user?.mind?.assigned_role in allowedroles))
to_chat(user, span_notice("The page glows red. It is unable to be used by you. Only Departmental officers can use this page."))
return

if(being_used)
to_chat(user, span_notice("You are already using this page."))
return
being_used = TRUE
var/start_page = alert("Start this combat page?", "Combat Page", "Yes", "No")
if(start_page == "No")
being_used = FALSE
return
Spawn_Reward(user)
Spawn_Combat(user)
minor_announce("A combat page has been started by [user.name]." , "[name]")
being_used = FALSE
qdel(src)

/obj/item/combat_page/examine(mob/user)
. = ..()
if(special)
. += span_notice("[special]")
. += span_notice("This is a level [combat_level] combat page")

if(LAZYLEN(reward_items))
. += span_notice("You will recieve an item from this page")
. += span_notice("You will recieve [reward_pe] PE from this page")

/obj/item/combat_page/proc/Spawn_Combat(mob/living/user)
if(!LAZYLEN(GLOB.xeno_spawn))
message_admins("No xeno spawns found when spawning in a combat page!")
return
var/list/spawn_turfs = GLOB.xeno_spawn.Copy()
var/current_spawn = pick(spawn_turfs)

switch(spawn_type)
if("all")
for(var/mob/living/simple_animal/hostile/L in spawn_enemies)
L = new L(current_spawn)
L.can_patrol = TRUE
L.faction += "hostile"
if("random")
var/mob/living/simple_animal/hostile/L = pick(spawn_enemies)
L = new L(current_spawn)
//L.can_patrol = TRUE
L.faction += "hostile"
spawn_number -= 1
if(spawn_number > 0)
Spawn_Combat(user)

/obj/item/combat_page/proc/Spawn_Reward(mob/living/user)
if(LAZYLEN(reward_items))
for(var/I in (reward_items))
new I(get_turf(user))

if(reward_pe)
SSlobotomy_corp.AdjustAvailableBoxes(reward_pe)
92 changes: 92 additions & 0 deletions ModularTegustation/tegu_items/!combat_page/console.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#define CAT_GADGET 1
#define CAT_EQUIP 2
#define CAT_MEDICAL 3
#define CAT_RESOURCE 4
#define CAT_OTHER 5
//CONSOLE CODE uses a altered form of mining_vendor


/obj/machinery/computer/extraction_cargo/discipline
name = "disciplinary equipment console"
order_list = list(
//Gadgets - Technical Equipment, active, that the Disc team could use.
new /datum/data/extraction_cargo("Barrier Grenade Kit ", /obj/item/storage/box/barrier, 60, CAT_GADGET) = 1,
new /datum/data/extraction_cargo("Forcefield Projector ", /obj/item/forcefield_projector, 150, CAT_GADGET) = 1,
new /datum/data/extraction_cargo("Tracking Implant Kit ", /obj/item/storage/box/minertracker, 150, CAT_GADGET) = 1,
new /datum/data/extraction_cargo("Command Projector ", /obj/item/commandprojector, 150, CAT_GADGET) = 1,
new /datum/data/extraction_cargo("'DEEPSCAN' Kit ", /obj/item/deepscanner, 150, CAT_GADGET) = 1,
new /datum/data/extraction_cargo("Qliphoth Field Projector ", /obj/item/powered_gadget/slowingtrapmk1, 150, CAT_GADGET) = 1,
new /datum/data/extraction_cargo("Regenerator Augmentor ", /obj/item/safety_kit, 150, CAT_GADGET) = 1,
new /datum/data/extraction_cargo("Drain Monitor ", /obj/item/powered_gadget/detector_gadget/abnormality, 200, CAT_GADGET) = 1,
new /datum/data/extraction_cargo("Keen-Sense Rangefinder ", /obj/item/powered_gadget/detector_gadget/ordeal, 200, CAT_GADGET) = 1,
new /datum/data/extraction_cargo("Prototype Enkephalin Injector ",/obj/item/powered_gadget/enkephalin_injector, 200, CAT_GADGET) = 1,
new /datum/data/extraction_cargo("Handheld Taser", /obj/item/powered_gadget/handheld_taser, 300, CAT_GADGET) = 1,
new /datum/data/extraction_cargo("Vitals Projector ", /obj/item/powered_gadget/vitals_projector, 300, CAT_GADGET) = 1,

//Equipment - L-Corp Gear
new /datum/data/extraction_cargo("L-Corp Baton Template ", /obj/item/ego_weapon/city/lcorp/baton, 100, CAT_EQUIP) = 1,
new /datum/data/extraction_cargo("L-Corp Machete Template " , /obj/item/ego_weapon/city/lcorp/machete, 100, CAT_EQUIP) = 1,
new /datum/data/extraction_cargo("L-Corp Club Template ", /obj/item/ego_weapon/city/lcorp/club, 100, CAT_EQUIP) = 1,
new /datum/data/extraction_cargo("L-Corp Shield Template ", /obj/item/ego_weapon/shield/lcorp_shield, 100, CAT_EQUIP) = 1,
new /datum/data/extraction_cargo("L-Corp Pistol Template ", /obj/item/ego_weapon/ranged/city/lcorp/pistol, 100, CAT_EQUIP) = 1,
new /datum/data/extraction_cargo("L-Corp Machinepistol Template ", /obj/item/ego_weapon/ranged/city/lcorp/automatic_pistol, 100, CAT_EQUIP) = 1,
new /datum/data/extraction_cargo("L-Corp Armored Vest Template ", /obj/item/clothing/suit/armor/ego_gear/city/lcorp_vest, 100, CAT_EQUIP) = 1,

//Medical
new /datum/data/extraction_cargo("Epinepherine Medi-Pen ", /obj/item/reagent_containers/hypospray/medipen, 40, CAT_MEDICAL) = 1,
new /datum/data/extraction_cargo("Sal-Acid Medi-Pen ", /obj/item/reagent_containers/hypospray/medipen/salacid, 50, CAT_MEDICAL) = 1,
new /datum/data/extraction_cargo("Mental-Stabilizer Medi-Pen ", /obj/item/reagent_containers/hypospray/medipen/mental, 50, CAT_MEDICAL) = 1,

//Resources - This is for EGOshards
new /datum/data/extraction_cargo("L1 Combat Page ", /obj/item/combat_page/level1, 200, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("L2 Combat Page ", /obj/item/combat_page/level2, 400, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("L3 Combat Page ", /obj/item/combat_page/level3, 800, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("Tier 1 EGOSHARD (Red) ", /obj/item/egoshard, 50, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("Tier 1 EGOSHARD (White) ", /obj/item/egoshard/white, 100, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("Tier 1 EGOSHARD (Black) ", /obj/item/egoshard/black, 100, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("Tier 2 EGOSHARD (Red) ", /obj/item/egoshard/bad, 300, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("Tier 2 EGOSHARD (White) ", /obj/item/egoshard/bad/white, 300, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("Tier 2 EGOSHARD (Black) ", /obj/item/egoshard/bad/black, 300, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("Tier 3 EGOSHARD (Red) ", /obj/item/egoshard/good, 400, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("Tier 3 EGOSHARD (White) ", /obj/item/egoshard/good/white, 400, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("Tier 3 EGOSHARD (Black) ", /obj/item/egoshard/good/black, 400, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("Tier 3 EGOSHARD (Pale) ", /obj/item/egoshard/good/pale, 400, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("Tier 4 EGOSHARD (Red) ", /obj/item/egoshard/great, 900, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("Tier 4 EGOSHARD (White) ", /obj/item/egoshard/great/white, 900, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("Tier 4 EGOSHARD (Black) ", /obj/item/egoshard/great/black, 900, CAT_RESOURCE) = 1,
new /datum/data/extraction_cargo("Tier 4 EGOSHARD (Pale) ", /obj/item/egoshard/great/pale, 900, CAT_RESOURCE) = 1,

//Random stuff
new /datum/data/extraction_cargo("Bubblegum Gum Packet ", /obj/item/storage/box/gum/bubblegum, 15, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Cigar ", /obj/item/clothing/mask/cigarette/cigar/havana, 25, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Beer ", /obj/item/reagent_containers/food/drinks/beer, 25, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Spraycan ", /obj/item/toy/crayon/spraycan, 40, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Magic 8-Ball ", /obj/item/toy/eightball, 70, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Six-Pack ", /obj/item/storage/cans, 70, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Fishing Equipment ", /obj/item/storage/box/fishing, 70, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Whiskey ", /obj/item/reagent_containers/food/drinks/bottle/whiskey, 100, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Absinthe ", /obj/item/reagent_containers/food/drinks/bottle/absinthe/premium, 100, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Skateboard ", /obj/item/melee/skateboard, 100, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Gar Glasses ", /obj/item/clothing/glasses/sunglasses/gar, 100, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Skub ", /obj/item/skub, 200, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Mannequin ", /obj/structure/mannequin, 200, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Gold Fishing Hook ", /obj/item/fishing_component/hook/shiny, 200, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Reinforced Fishing Line ", /obj/item/fishing_component/line/reinforced, 200, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("1000 Ahn ", /obj/item/stack/spacecash/c1000, 200, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Pet Whistle", /obj/item/pet_whistle, 200, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Margherita Pizza ", /obj/item/food/pizza/margherita, 300, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Super Gar Glasses ", /obj/item/clothing/glasses/sunglasses/gar/supergar, 500, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Agent Captain's Cloak ", /obj/item/clothing/neck/cloak/hos/agent, 500, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Agent Captain's Cap ", /obj/item/clothing/head/hos/agent, 500, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Plushie Lootbox", /obj/item/plushgacha, 1000, CAT_OTHER) = 1,
new /datum/data/extraction_cargo("Binah Doll ", /obj/item/toy/plush/binah, 1000, CAT_OTHER) = 1,


)


#undef CAT_GADGET
#undef CAT_EQUIP
#undef CAT_MEDICAL
#undef CAT_RESOURCE
#undef CAT_OTHER
34 changes: 34 additions & 0 deletions ModularTegustation/tegu_items/!combat_page/level1.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/obj/item/combat_page/level1
name = "combat page L1"
desc = "A page that contains a level 1 combat page"
reward_pe = 500
spawn_enemies = list(/mob/living/simple_animal/hostile/kcorp/drone)
spawn_type = "random"
spawn_number = 2
var/list/combat_weights = list(
"KDrones" = 10,
"lovetown1" = 10,
"rat1" = 10,
)

/obj/item/combat_page/level1/Initialize()
. = ..()
var/chosen = pickweight(combat_weights)
switch(chosen)
if("KDrones")
spawn_number = 2
spawn_enemies = list(/mob/living/simple_animal/hostile/kcorp/drone)

if("lovetown1")
spawn_number = 10
spawn_enemies = list(/mob/living/simple_animal/hostile/lovetown/slasher,
/mob/living/simple_animal/hostile/lovetown/stabber)

if("rat1")
spawn_number = 6
spawn_enemies = list(
/mob/living/simple_animal/hostile/humanoid/rat/knife,
/mob/living/simple_animal/hostile/humanoid/rat,
/mob/living/simple_animal/hostile/humanoid/rat/pipe,
/mob/living/simple_animal/hostile/humanoid/rat/hammer,
/mob/living/simple_animal/hostile/humanoid/rat/zippy)
47 changes: 47 additions & 0 deletions ModularTegustation/tegu_items/!combat_page/level2.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/obj/item/combat_page/level2
combat_level = 2
name = "combat page L2"
desc = "A page that contains a level 2 combat page"
reward_pe = 1200
spawn_enemies = list(/mob/living/simple_animal/hostile/kcorp/drone)
spawn_type = "random"
spawn_number = 1
var/list/combat_weights = list(
"bongy" = 10,
"lovetown2" = 10,
"rat2" = 10,
"drones2" = 5,
"metalfixer" = 10,
"flamefixer" = 10,
)

/obj/item/combat_page/level2/Initialize()
. = ..()
var/chosen = pickweight(combat_weights)
switch(chosen)
if("bongy")
spawn_enemies = list(/mob/living/simple_animal/hostile/distortion/papa_bongy)

if("lovetown2")
spawn_number = 10
spawn_enemies = list(/mob/living/simple_animal/hostile/lovetown/shambler,
/mob/living/simple_animal/hostile/lovetown/slumberer)

if("rat2")
spawn_number = 15
spawn_enemies = list(
/mob/living/simple_animal/hostile/humanoid/rat/knife,
/mob/living/simple_animal/hostile/humanoid/rat,
/mob/living/simple_animal/hostile/humanoid/rat/pipe,
/mob/living/simple_animal/hostile/humanoid/rat/hammer,
/mob/living/simple_animal/hostile/humanoid/rat/zippy)

if("drones2")
spawn_number = 5
spawn_enemies = list(/mob/living/simple_animal/hostile/kcorp/drone)

if("metalfixer")
spawn_enemies = list(/mob/living/simple_animal/hostile/humanoid/fixer/metal)

if("flamefixer")
spawn_enemies = list(/mob/living/simple_animal/hostile/humanoid/fixer/flame)
29 changes: 29 additions & 0 deletions ModularTegustation/tegu_items/!combat_page/level3.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/obj/item/combat_page/level3
combat_level = 3
name = "combat page L3"
desc = "A page that contains a level 3 combat page"
reward_pe = 1500
spawn_enemies = list(/mob/living/simple_animal/hostile/kcorp/drone)
spawn_type = "random"
spawn_number = 1
var/list/combat_weights = list(
"bongy" = 10,
"shrimp" = 10,
"philip" = 2,
)

/obj/item/combat_page/level3/Initialize()
. = ..()
var/chosen = pickweight(combat_weights)
switch(chosen)
if("bongy")
spawn_enemies = list(/mob/living/simple_animal/hostile/distortion/papa_bongy)

if("shrimp")
spawn_number = 10
spawn_enemies = list(/mob/living/simple_animal/hostile/senior_shrimp,
/mob/living/simple_animal/hostile/shrimp_rifleman,
/mob/living/simple_animal/hostile/shrimp_soldier,)

if("philip")
spawn_enemies = list(/mob/living/simple_animal/hostile/abnormality/crying_children)
Loading
Loading