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

[WIP] PvE tutorial #457

Open
wants to merge 2 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
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,5 @@
#define COMSIG_MOB_END_TUTORIAL "mob_end_tutorial"

#define COMSIG_MOB_NESTED "mob_nested"

#define COMSIG_MOB_BUCKLED "mob_buckled"
5 changes: 5 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_obj.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define COMPONENT_GRENADE_PRIME_CANCEL (1<<0)

#define COMSIG_CLOSET_FLASHBANGED "closet_flashbanged"
#define COMSIG_CLOSET_OPEN "closet_open"

#define COMSIG_SENTRY_ENGAGED_ALERT "signal_sentry_engaged"
#define COMSIG_SENTRY_LOW_AMMO_ALERT "signal_sentry_low_ammo"
Expand Down Expand Up @@ -53,3 +54,7 @@
#define COMSIG_DROPSHIP_REMOVE_EQUIPMENT "dropship_remove_equipment"

#define COMSIG_STRUCTURE_CRATE_SQUAD_LAUNCHED "structure_crate_squad_launched"

#define COMSIG_LARGECRATE_OPEN "largecrate_open"

#define COMSIG_GUNRACK_ITEM_TAKEN "gunrack_item_taken"
6 changes: 6 additions & 0 deletions code/datums/tutorial/_tutorial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,9 @@ GLOBAL_LIST_EMPTY_TYPED(ongoing_tutorials, /datum/tutorial)
mappath = "maps/tutorial/tutorial_7x7.dmm"
width = 7
height = 7

/datum/map_template/tutorial/pve
name = "PvE Tutorial Zone (45x21)"
mappath = "maps/tutorial/tutorial_pve.dmm"
width = 45
height = 21
285 changes: 285 additions & 0 deletions code/datums/tutorial/marine/pve_marine.dm

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions code/game/machinery/vending/vendor_types/food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,23 @@
list("W-Y Flask", 5, /obj/item/reagent_container/food/drinks/flask/weylandyutani, VENDOR_ITEM_REGULAR)
)

/obj/structure/machinery/cm_vending/sorted/marine_food/empty/populate_product_list(scale)
listed_products = list(
list("PREPARED MEALS", -1, null, null),
list("USCM Prepared Meal (Chicken)", 0, /obj/item/reagent_container/food/snacks/mre_pack/meal5, VENDOR_ITEM_REGULAR),
list("USCM Prepared Meal (Cornbread)", 0, /obj/item/reagent_container/food/snacks/mre_pack/meal1, VENDOR_ITEM_REGULAR),
list("USCM Prepared Meal (Pasta)", 0, /obj/item/reagent_container/food/snacks/mre_pack/meal3, VENDOR_ITEM_REGULAR),
list("USCM Prepared Meal (Pizza)", 0, /obj/item/reagent_container/food/snacks/mre_pack/meal4, VENDOR_ITEM_REGULAR),
list("USCM Prepared Meal (Pork)", 0, /obj/item/reagent_container/food/snacks/mre_pack/meal2, VENDOR_ITEM_REGULAR),
list("USCM Prepared Meal (Tofu)", 0, /obj/item/reagent_container/food/snacks/mre_pack/meal6, VENDOR_ITEM_REGULAR),
list("USCM Protein Bar", 0, /obj/item/reagent_container/food/snacks/protein_pack, VENDOR_ITEM_REGULAR),
list("FLASKS", -1, null, null),
list("Canteen", 0, /obj/item/reagent_container/food/drinks/flask/canteen, VENDOR_ITEM_REGULAR),
list("Metal Flask", 0, /obj/item/reagent_container/food/drinks/flask, VENDOR_ITEM_REGULAR),
list("USCM Flask", 0, /obj/item/reagent_container/food/drinks/flask/marine, VENDOR_ITEM_REGULAR),
list("W-Y Flask", 0, /obj/item/reagent_container/food/drinks/flask/weylandyutani, VENDOR_ITEM_REGULAR)
)

/obj/structure/machinery/cm_vending/sorted/marine_food/tutorial
hackable = FALSE
wrenchable = FALSE
Expand All @@ -46,6 +63,29 @@
list("USCM Flask", 0, /obj/item/reagent_container/food/drinks/flask/marine, VENDOR_ITEM_REGULAR),
list("W-Y Flask", 0, /obj/item/reagent_container/food/drinks/flask/weylandyutani, VENDOR_ITEM_REGULAR)
)

/obj/structure/machinery/cm_vending/sorted/marine_food/tutorial/pve
req_access = list()

/obj/structure/machinery/cm_vending/sorted/marine_food/tutorial/pve/populate_product_list(scale)
listed_products = list(
list("PREPARED MEALS", -1, null, null),
list("USCM Prepared Meal (Chicken)", 1, /obj/item/reagent_container/food/snacks/mre_pack/meal5, VENDOR_ITEM_REGULAR),
list("USCM Prepared Meal (Cornbread)", 1, /obj/item/reagent_container/food/snacks/mre_pack/meal1, VENDOR_ITEM_REGULAR),
list("USCM Prepared Meal (Pasta)", 1, /obj/item/reagent_container/food/snacks/mre_pack/meal3, VENDOR_ITEM_REGULAR),
list("USCM Prepared Meal (Pizza)", 1, /obj/item/reagent_container/food/snacks/mre_pack/meal4, VENDOR_ITEM_REGULAR),
list("USCM Prepared Meal (Pork)", 1, /obj/item/reagent_container/food/snacks/mre_pack/meal2, VENDOR_ITEM_REGULAR),
list("USCM Prepared Meal (Tofu)", 1, /obj/item/reagent_container/food/snacks/mre_pack/meal6, VENDOR_ITEM_REGULAR),
list("USCM Protein Bar", 5, /obj/item/reagent_container/food/snacks/protein_pack, VENDOR_ITEM_RECOMMENDED),
list("FLASKS", -1, null, null),
list("Canteen", 0, /obj/item/reagent_container/food/drinks/flask/canteen, VENDOR_ITEM_REGULAR),
list("Metal Flask", 0, /obj/item/reagent_container/food/drinks/flask, VENDOR_ITEM_REGULAR),
list("USCM Flask", 0, /obj/item/reagent_container/food/drinks/flask/marine, VENDOR_ITEM_REGULAR),
list("W-Y Flask", 0, /obj/item/reagent_container/food/drinks/flask/weylandyutani, VENDOR_ITEM_REGULAR)
)



//------------BOOZE-O-MAT VENDOR---------------

/obj/structure/machinery/cm_vending/sorted/boozeomat
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@
src.buckled_mob = target
src.add_fingerprint(user)
afterbuckle(target)
SEND_SIGNAL(user, COMSIG_MOB_BUCKLED, src)
//SEND_SIGNAL(src, COMSIG_ON_MOB_BUCKLED)
return TRUE

/obj/proc/send_buckling_message(mob/M, mob/user)
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/structures/crates_lockers/closets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
update_icon()
playsound(src.loc, open_sound, 15, 1)
density = FALSE
SEND_SIGNAL(src, COMSIG_CLOSET_OPEN)
return TRUE

/obj/structure/closet/proc/close()
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/structures/crates_lockers/largecrate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
if(parts_type) // Create the crate material
new parts_type(current_turf, 2)

SEND_SIGNAL(src, COMSIG_LARGECRATE_OPEN)

deconstruct(TRUE)

/obj/structure/largecrate/deconstruct(disassembled = TRUE)
Expand Down
11 changes: 11 additions & 0 deletions code/game/objects/structures/gun_rack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
var/populate_type
var/max_stored = 5
var/initial_stored = 5
var/locked = FALSE

/obj/structure/gun_rack/Initialize()
. = ..()
Expand All @@ -23,12 +24,19 @@
update_icon()

/obj/structure/gun_rack/attackby(obj/item/O, mob/user)
if(locked)
to_chat(user, SPAN_WARNING("[src] is locked down!"))
return

if(istype(O, allowed_type) && contents.len < max_stored)
user.drop_inv_item_to_loc(O, src)
contents += O
update_icon()

/obj/structure/gun_rack/attack_hand(mob/living/user)
if(locked)
to_chat(user, SPAN_WARNING("[src] is locked down!"))
return
if(!contents.len)
to_chat(user, SPAN_WARNING("[src] is empty."))
return
Expand All @@ -38,6 +46,9 @@
user.put_in_hands(stored_obj)
to_chat(user, SPAN_NOTICE("You grab [stored_obj] from [src]."))
playsound(src, "gunequip", 25, TRUE)

SEND_SIGNAL(src, COMSIG_GUNRACK_ITEM_TAKEN)

update_icon()

/obj/structure/gun_rack/update_icon()
Expand Down
73 changes: 66 additions & 7 deletions code/modules/gear_presets/other.dm
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,13 @@
flags = EQUIPMENT_PRESET_EXTRA
faction_group = FACTION_LIST_MARINE
languages = list(LANGUAGE_ENGLISH)
idtype = /obj/item/card/id
idtype = /obj/item/card/id/dogtag
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you certain this won't affect any of the existing tutorials

assignment = JOB_SQUAD_MARINE
rank = JOB_SQUAD_MARINE
paygrades = list(PAY_SHORT_ME1 = JOB_PLAYTIME_TIER_0)
role_comm_title = "RFN"
skills = /datum/skills/pfc
minimap_icon = "private"
/// If the player should start out underfed
var/underfed = TRUE

Expand All @@ -953,12 +959,7 @@
/datum/equipment_preset/uscm/tutorial_rifleman
name = "Tutorial Rifleman"
flags = EQUIPMENT_PRESET_EXTRA
assignment = JOB_SQUAD_MARINE
rank = JOB_SQUAD_MARINE
paygrades = list(PAY_SHORT_ME1 = JOB_PLAYTIME_TIER_0)
role_comm_title = "RFN"
skills = /datum/skills/pfc
minimap_icon = "private"


/datum/equipment_preset/uscm/tutorial_rifleman/load_gear(mob/living/carbon/human/new_human)
new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine(new_human), WEAR_BODY)
Expand All @@ -968,3 +969,61 @@
new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/marine(new_human), WEAR_HANDS)
new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/marine/knife(new_human), WEAR_FEET)

/datum/equipment_preset/tutorial/pve/lloyd
uses_special_name = TRUE
paygrades = list(PAY_SHORT_ME2 = JOB_PLAYTIME_TIER_0)

/datum/equipment_preset/tutorial/pve/lloyd/load_gear(mob/living/carbon/human/new_human)
new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine(new_human), WEAR_BODY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/head/cmcap/boonie/tan(new_human), WEAR_HEAD)
new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/marine/satchel(new_human), WEAR_BACK)
new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/marine/knife(new_human), WEAR_FEET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(new_human), WEAR_EYES)

/datum/equipment_preset/tutorial/pve/lloyd/load_name(mob/living/carbon/human/new_human, randomise)
new_human.change_real_name(new_human, "Johnny Lloyd")
new_human.f_style = "Shaved"
new_human.h_style = "Parted"
new_human.r_hair = 128
new_human.g_hair = 128
new_human.b_hair = 0
new_human.regenerate_icons()

/datum/equipment_preset/tutorial/pve/oestermann
uses_special_name = TRUE
paygrades = list(PAY_SHORT_MO2 = JOB_PLAYTIME_TIER_0)

/datum/equipment_preset/tutorial/pve/oestermann/load_gear(mob/living/carbon/human/new_human)
new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine/officer/bridge(new_human), WEAR_BODY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/head/cmcap/bridge(new_human), WEAR_HEAD)
new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/marine/satchel(new_human), WEAR_BACK)
new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/marine/knife(new_human), WEAR_FEET)

/datum/equipment_preset/tutorial/pve/oestermann/load_name(mob/living/carbon/human/new_human, randomise)
new_human.change_real_name(new_human, "Charlie Oestermann")
new_human.f_style = "Shaved"
new_human.h_style = "Crewcut"
new_human.r_hair = 153
new_human.g_hair = 102
new_human.b_hair = 51
new_human.regenerate_icons()

/datum/equipment_preset/tutorial/pve/bobert
uses_special_name = TRUE
paygrades = list(PAY_SHORT_MO2 = JOB_PLAYTIME_TIER_0)

/datum/equipment_preset/tutorial/pve/bobert/load_gear(mob/living/carbon/human/new_human)
new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine(new_human), WEAR_BODY)
new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/marine/satchel(new_human), WEAR_BACK)
new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/marine/knife(new_human), WEAR_FEET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(new_human), WEAR_EYES)

/datum/equipment_preset/tutorial/pve/bobert/load_name(mob/living/carbon/human/new_human, randomise)
new_human.change_real_name(new_human, "Steven Robert")
new_human.f_style = "Shaved"
new_human.h_style = "Short Bangs"
new_human.r_hair = 102
new_human.g_hair = 51
new_human.b_hair = 0
new_human.regenerate_icons()

1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@
#include "code\datums\tutorial\marine\_marine.dm"
#include "code\datums\tutorial\marine\basic_marine.dm"
#include "code\datums\tutorial\marine\medical_basic.dm"
#include "code\datums\tutorial\marine\pve_marine.dm"
#include "code\datums\tutorial\marine\reqs_line.dm"
#include "code\datums\tutorial\ss13\_ss13.dm"
#include "code\datums\tutorial\ss13\basic_ss13.dm"
Expand Down
Loading
Loading