Skip to content
197 changes: 197 additions & 0 deletions _maps/tutorial/tutorial_12x12.dmm
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
"a" = (
/turf/closed/wall/mineral/craftstone,
/area)
"e" = (
/obj/machinery/light/fueled/torchholder/metal_torch/east,
/turf/open/floor/blocks/newstone,
/area)
"n" = (
/turf/open/floor/blocks/newstone,
/area)
"x" = (
/obj/machinery/light/fueled/torchholder/metal_torch/east,
/obj/effect/landmark/tutorial_bottom_left,
/turf/open/floor/blocks/newstone,
/area)
"N" = (
/obj/machinery/light/fueled/torchholder/metal_torch/west,
/turf/open/floor/blocks/newstone,
/area)
"P" = (
/obj/machinery/light/fueled/torchholder/metal_torch/north,
/turf/open/floor/blocks/newstone,
/area)
"S" = (
/obj/machinery/light/fueled/torchholder/c,
/turf/open/floor/blocks/newstone,
/area)

(1,1,1) = {"
a
a
a
a
a
a
a
a
a
a
a
a
"}
(2,1,1) = {"
a
e
n
n
e
n
n
e
n
n
x
a
"}
(3,1,1) = {"
a
n
n
n
n
n
n
n
n
n
n
a
"}
(4,1,1) = {"
a
n
n
n
n
n
n
n
n
n
n
a
"}
(5,1,1) = {"
a
S
n
n
n
n
n
n
n
n
P
a
"}
(6,1,1) = {"
a
n
n
n
n
n
n
n
n
n
n
a
"}
(7,1,1) = {"
a
n
n
n
n
n
n
n
n
n
n
a
"}
(8,1,1) = {"
a
S
n
n
n
n
n
n
n
n
P
a
"}
(9,1,1) = {"
a
n
n
n
n
n
n
n
n
n
n
a
"}
(10,1,1) = {"
a
n
n
n
n
n
n
n
n
n
n
a
"}
(11,1,1) = {"
a
N
n
n
N
n
n
N
n
n
N
a
"}
(12,1,1) = {"
a
a
a
a
a
a
a
a
a
a
a
a
"}
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/signals_atoms/signals_obj.dm
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,5 @@

/// from base of obj/item/reagent_containers/food/snacks/attack(): (mob/living/eater, mob/feeder)
#define COMSIG_FOOD_EATEN "food_eaten"

#define COMSIG_CLOTH_SOAKED "cloth_soaked"
8 changes: 8 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@
#define COMSIG_ITEM_DROPPED "item_drop"
///from base of obj/item/pickup(): (/mob/taker)
#define COMSIG_ITEM_PICKUP "item_pickup"
///from base of obj/item/pickup(): (src)
#define COMSIG_MOB_PICKUP_ITEM "mob_item_pickup"
///from base of obj/item/afterpickup(): (/mob/taker)
#define COMSIG_ITEM_AFTER_PICKUP "item_after_pickup"
///from base of mob/living/carbon/attacked_by(): (mob/living/carbon/target, mob/living/user, hit_zone)
Expand All @@ -155,3 +157,9 @@
#define COMSIG_ITEM_WEARERCROSSED "wearer_crossed"

#define COMSIG_MOB_MOUSE_ENTERED "user_mouse_entered"

#define COMSIG_MOB_END_TUTORIAL "tutorial_over"
/// From /datum/tutorial/proc/update_objective() : (new_objective)
#define COMSIG_MOB_TUTORIAL_UPDATE_OBJECTIVE "mob_tutorial_update_objective"

#define COMSIG_MOB_UNBANDAGE "mob_unbandage_limb"
9 changes: 9 additions & 0 deletions code/__DEFINES/dcs/signals/signals_organ.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@
#define COMSIG_CHIMERIC_ORGAN_TRIGGER "chimeric_organ_trigger"

#define COMSIG_BODYPART_WOUND_REMOVED "bodypart_wound_removed"

/// Called when a bodypart is successfully bandaged
#define COMSIG_BODYPART_BANDAGED "bodypart_bandaged"
/// Called when a bodypart is disinfected
#define COMSIG_BODYPART_DISINFECTED "bodypart_disinfected"
/// Called when an injury is salved
#define COMSIG_INJURY_SALVED "injury_salved"
/// Called when an injury is sutured
#define COMSIG_INJURY_SUTURED "injury_sutured"
5 changes: 5 additions & 0 deletions code/__DEFINES/traits/definitions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai

// ************* mob traits

/// If the mob is currently loading a tutorial
#define TRAIT_IN_TUTORIAL "t_IN_TUTORIAL"
/// Prevents voluntary movement.
#define TRAIT_IMMOBILIZED "immobilized"
/// Buckling yourself to objects with this trait won't immobilize you
Expand Down Expand Up @@ -608,3 +610,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
// genetic traits
#define TRAIT_ANIMAL_NATURAL_ARMOR "natural_armor"
#define TRAIT_ANIMAL_PRODUCTIVE "trait_productive"

/// Status trait coming from a tutorial
#define TRAIT_SOURCE_TUTORIAL "t_s_tutorials"
4 changes: 4 additions & 0 deletions code/__DEFINES/tutorial.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#define TUTORIAL_ATOM_FROM_TRACKING(path, varname) var##path/##varname = tracking_atoms[##path]

#define TUTORIAL_CATEGORY_BASE "Base" // Shouldn't be used outside of base types
#define TUTORIAL_CATEGORY_VANDERLIN "Vanderlin"
10 changes: 10 additions & 0 deletions code/__HELPERS/areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,13 @@
return TRUE

#undef BP_MAX_ROOM_SIZE


/// Returns TRUE if the target is somewhere that the game should not interact with if possible
/// In this case, admin Zs and tutorial areas
/proc/should_block_game_interaction(atom/target)
var/area/target_area = get_area(target)
if(target_area?.block_game_interaction)
return TRUE

return FALSE
2 changes: 2 additions & 0 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ SUBSYSTEM_DEF(ticker)

/// ID of round reboot timer, if it exists
var/reboot_timer = null
///if we don't want to create tutorial zones
var/tutorial_disabled = FALSE

/datum/controller/subsystem/ticker/Initialize(timeofday)
load_mode()
Expand Down
25 changes: 25 additions & 0 deletions code/datums/components/tutorial_status.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/datum/component/tutorial_status
dupe_mode = COMPONENT_DUPE_UNIQUE
/// What the mob's current tutorial status is, displayed in the status panel
var/tutorial_status = ""

/datum/component/tutorial_status/Initialize()
. = ..()
if(!ismob(parent))
return COMPONENT_INCOMPATIBLE

/datum/component/tutorial_status/RegisterWithParent()
..()
RegisterSignal(parent, COMSIG_MOB_TUTORIAL_UPDATE_OBJECTIVE, PROC_REF(update_objective))
RegisterSignal(parent, COMSIG_MOB_GET_STATUS_TAB_ITEMS, PROC_REF(get_status_tab_item))

/datum/component/tutorial_status/proc/update_objective(datum/source, objective_text)
SIGNAL_HANDLER

tutorial_status = objective_text

/datum/component/tutorial_status/proc/get_status_tab_item(datum/source, list/status_tab_items)
SIGNAL_HANDLER

if(tutorial_status)
status_tab_items += "Tutorial Objective: " + tutorial_status
2 changes: 2 additions & 0 deletions code/datums/injury/_injury.dm
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@
// salves the injury
/datum/injury/proc/salve_injury()
injury_flags |= INJURY_SALVED
SEND_SIGNAL(src, COMSIG_INJURY_SALVED)
return TRUE

// unsalves the injury
Expand All @@ -344,6 +345,7 @@
injury_flags |= INJURY_SUTURED
if(parent_bodypart?.spilled)
parent_bodypart.spilled = FALSE
SEND_SIGNAL(src, COMSIG_INJURY_SUTURED)
return TRUE

// unsutures the injury
Expand Down
Loading
Loading