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

Requisitions Line Tutorial #5909

Merged
merged 13 commits into from
Jun 12, 2024
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
Zonespace27 marked this conversation as resolved.
Show resolved Hide resolved
/// The type that this object is taking the place of
var/original_type
Zonespace27 marked this conversation as resolved.
Show resolved Hide resolved

/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
"}
Loading