Skip to content

Commit

Permalink
Requisitions Line Tutorial (#5909)
Browse files Browse the repository at this point in the history
# About the pull request

<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

Adds a tutorial/simulator for the Requisitions Line. Players are asked
by NPCs to vend them several items. There are 3 training NPCs with
pre-made requests and highlights, after which the tutorial enters an
endless mode for training against increasingly complex requests.

This still has some rough edges, notably that it can ask randomly for
non-obvious names much like in real game such as "Frag" refering to
HEDPs. A new player might need for the NPC to repeat the order with a
different name before getting it right.

Also it might be worth finding a way to do highlighting in the vendor UI
for this...

All items dispensed in the tutorial are cloned as props and will be
missing some overlays and be non interactible, because it's the simplest
way i found so the player doesn't explode everything.

# Explain why it's good for the game
Gives people an opportunity to approach a simple yet potentially
stressful activity. Line rush can be tough when starting the game. This
only contains a tutorial for the line though, other reqs system will
need to be made separately

# Testing Photographs and Procedure
Ran through it a few times testing for unintended interactions

Older video of initial implement:

https://cdn.discordapp.com/attachments/964684928161808384/1178420842347102218/reqline-tutorial.mp4?ex=65f747ee&is=65e4d2ee&hm=797dfdfe2693878f4dc69fb976060a285944023935b2e0b5216670102c37366a&

# Changelog
:cl:
add: Added a Tutorial for tending to the Requisitions Line
/:cl:

---------

Co-authored-by: John Doe <[email protected]>
  • Loading branch information
fira and johndoe2013 committed Jun 12, 2024
1 parent eb53cff commit 35084b7
Show file tree
Hide file tree
Showing 10 changed files with 730 additions and 3 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/vendors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@
/// Vendors with this flag will fill retroactively based on latejoining players,
/// and expect a scale multiplier instead of amount of items
#define VEND_STOCK_DYNAMIC (1<<10)
/// Vends props looking like the items instead of the actual items. Basically for tutorials.
#define VEND_PROPS (1<<11)

// Redemption Tokens
#define VEND_TOKEN_ENGINEER "Engineer"
Expand Down
482 changes: 482 additions & 0 deletions code/datums/tutorial/marine/reqs_line.dm

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion code/game/machinery/vending/cm_vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,9 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list(

/obj/structure/machinery/cm_vending/proc/vendor_successful_vend_one(prod_type, mob/living/carbon/human/user, turf/target_turf, insignas_override, stack_amount)
var/obj/item/new_item
if(ispath(prod_type, /obj/item))
if(vend_flags & VEND_PROPS)
new_item = new /obj/item/prop/replacer(target_turf, prod_type)
else if(ispath(prod_type, /obj/item))
if(ispath(prod_type, /obj/item/weapon/gun))
new_item = new prod_type(target_turf, TRUE)
else
Expand Down
23 changes: 23 additions & 0 deletions code/game/objects/prop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@
name = "prop"
desc = "Some kind of prop."

/// A prop that acts as a replacement for another item, mimicking their looks.
/// Mainly used in Reqs Tutorial to provide the full item selections without side effects.
/obj/item/prop/replacer
/// The type that this object is taking the place of
var/original_type

/obj/item/prop/replacer/Initialize(mapload, obj/original_type)
if(!original_type)
return INITIALIZE_HINT_QDEL
. = ..()
src.original_type = original_type
var/obj/created_type = new original_type // Instancing this for the sake of assigning its appearance to the prop and nothing else
name = initial(original_type.name)
icon = initial(original_type.icon)
icon_state = initial(original_type.icon_state)
desc = initial(original_type.desc)
if(ispath(original_type, /obj/item))
var/obj/item/item_type = original_type
item_state = initial(item_type.item_state)

appearance = created_type.appearance
qdel(created_type)

/obj/item/prop/laz_top
name = "lazertop"
icon = 'icons/obj/structures/props/server_equipment.dmi'
Expand Down
4 changes: 3 additions & 1 deletion code/game/objects/structures/blocker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@

visible = TRUE

// for fuel pump since it's a large sprite.
/obj/structure/blocker/forcefield/human/bulletproof/get_projectile_hit_boolean()
return TRUE

// for fuel pump since it's a large sprite.
/obj/structure/blocker/fuelpump
name = "\improper Fuel Pump"
desc = "It is a machine that pumps fuel around the ship."
Expand Down
20 changes: 20 additions & 0 deletions code/modules/gear_presets/other.dm
Original file line number Diff line number Diff line change
Expand Up @@ -969,3 +969,23 @@

/datum/equipment_preset/tutorial/fed
underfed = FALSE


/datum/equipment_preset/uscm/tutorial_rifleman
name = "Tutorial Rifleman"
flags = EQUIPMENT_PRESET_EXTRA
assignment = JOB_SQUAD_MARINE
rank = JOB_SQUAD_MARINE
paygrade = "ME2"
role_comm_title = "RFN"
skills = /datum/skills/pfc/crafty
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)
new_human.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/marine(new_human), WEAR_HEAD)
new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/marine/medium(new_human), WEAR_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/marine(new_human), WEAR_BACK)
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)

2 changes: 1 addition & 1 deletion code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ note dizziness decrements automatically in the mob's Life() proc.

// facing verbs
/mob/proc/canface()
if(client.moving) return 0
if(client?.moving) return 0
if(stat==2) return 0
if(anchored) return 0
if(monkeyizing) return 0
Expand Down
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,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\reqs_line.dm"
#include "code\datums\tutorial\ss13\_ss13.dm"
#include "code\datums\tutorial\ss13\basic_ss13.dm"
#include "code\datums\tutorial\ss13\intents.dm"
Expand Down
Binary file modified icons/misc/tutorial.dmi
Binary file not shown.
195 changes: 195 additions & 0 deletions maps/tutorial/tutorial_reqs_line.dmm
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
"a" = (
/turf/closed/wall/almayer/outer,
/area/misc/tutorial)
"c" = (
/obj/structure/machinery/door/airlock/almayer/marine/requisitions{
dir = 2;
no_panel = 1;
not_weldable = 1;
req_one_access = null
},
/turf/open/floor/almayer,
/area/misc/tutorial)
"l" = (
/obj/structure/surface/table/almayer,
/turf/open/floor/almayer{
dir = 8;
icon_state = "green"
},
/area/misc/tutorial)
"m" = (
/obj/structure/surface/rack,
/turf/open/floor/almayer{
dir = 8;
icon_state = "green"
},
/area/misc/tutorial)
"n" = (
/obj/structure/surface/table/almayer{
breakable = 0;
throwpass = 0;
climbable = 0;
indestructible = 1;
density = 0
},
/obj/structure/blocker/forcefield/human/bulletproof{
visible = 0
},
/turf/open/floor/almayer,
/area/misc/tutorial)
"o" = (
/turf/closed/wall/almayer/outer,
/area/misc/tutorial)
"w" = (
/obj/structure/window/framed/almayer/hull,
/turf/open/floor/almayer,
/area/misc/tutorial)
"x" = (
/obj/structure/barricade/handrail{
dir = 8
},
/turf/open/floor/almayer{
dir = 4;
icon_state = "green"
},
/area/misc/tutorial)
"y" = (
/obj/structure/machinery/line_nexter,
/turf/open/floor/almayer{
dir = 4;
icon_state = "green"
},
/area/misc/tutorial)
"E" = (
/obj/structure/bed/chair/office/dark{
dir = 8
},
/turf/open/floor/almayer,
/area/misc/tutorial)
"J" = (
/obj/item/toy/bikehorn/rubberducky{
name = "Quackers";
desc = "You feel as though this rubber duck has been here for a long time. It's Mr. Quackers! He loves you!"
},
/obj/effect/landmark/tutorial/reqs_line_cleaner,
/turf/open/floor/almayer,
/area/misc/tutorial)
"K" = (
/turf/open/floor/almayer,
/area/misc/tutorial)
"N" = (
/obj/effect/landmark/tutorial_bottom_left,
/turf/open/floor/almayer,
/area/misc/tutorial)
"X" = (
/obj/structure/sign/ROsign{
layer = 3
},
/turf/closed/wall/almayer,
/area/misc/tutorial)

(1,1,1) = {"
a
a
a
a
a
a
a
a
a
a
a
"}
(2,1,1) = {"
a
K
K
K
K
K
K
K
a
N
a
"}
(3,1,1) = {"
a
J
X
y
x
x
x
x
a
K
a
"}
(4,1,1) = {"
a
a
K
n
w
o
a
a
a
c
a
"}
(5,1,1) = {"
a
a
K
E
l
l
m
m
K
K
a
"}
(6,1,1) = {"
a
a
K
K
K
K
K
K
K
K
a
"}
(7,1,1) = {"
a
a
a
K
K
K
K
K
K
K
a
"}
(8,1,1) = {"
a
a
a
a
a
a
a
a
a
a
a
"}

0 comments on commit 35084b7

Please sign in to comment.