Skip to content

Commit

Permalink
good for tm
Browse files Browse the repository at this point in the history
  • Loading branch information
Zonespace27 committed Oct 12, 2023
1 parent 7eacd71 commit f71f775
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 19 deletions.
12 changes: 7 additions & 5 deletions code/datums/tutorial/_tutorial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ GLOBAL_LIST_EMPTY(ongoing_tutorials)
var/parent_path = /datum/tutorial

/datum/tutorial/Destroy(force, ...)
if(bottom_left_corner)
var/obj/landmark = locate(/obj/effect/landmark/tutorial_bottom_left) in bottom_left_corner.contents
qdel(landmark)

GLOB.ongoing_tutorials -= src
QDEL_NULL(reservation) // Its Destroy() handles releasing reserved turfs

Expand Down Expand Up @@ -65,7 +61,9 @@ GLOBAL_LIST_EMPTY(ongoing_tutorials)
template.load(bottom_left_corner_reservation, FALSE, TRUE)

GLOB.ongoing_tutorials |= src
bottom_left_corner = get_turf(locate(/obj/effect/landmark/tutorial_bottom_left) in GLOB.landmarks_list)
var/obj/landmark = locate(/obj/effect/landmark/tutorial_bottom_left) in GLOB.landmarks_list
bottom_left_corner = get_turf(landmark)
qdel(landmark)
var/area/tutorial_area = get_area(bottom_left_corner)
tutorial_area.update_base_lighting() // this will be entirely dark otherwise
init_map()
Expand Down Expand Up @@ -171,6 +169,10 @@ GLOBAL_LIST_EMPTY(ongoing_tutorials)
width = 8
height = 9

/datum/map_template/tutorial/s8x9/no_baselight
name = "Tutorial Zone (8x9) (No Baselight)"
mappath = "maps/tutorial/tutorial_8x9_nb.dmm"

/datum/map_template/tutorial/s7x7
name = "Tutorial Zone (7x7)"
mappath = "maps/tutorial/tutorial_7x7.dmm"
Expand Down
28 changes: 14 additions & 14 deletions code/datums/tutorial/marine/basic_marine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "Marine - Basic"
desc = "A tutorial to get you acquainted with the very basics of how to play a groundside marine role."
tutorial_id = "marine_basic_1"
tutorial_template = /datum/map_template/tutorial/s8x9
tutorial_template = /datum/map_template/tutorial/s8x9/no_baselight
/// How many items need to be vended from the clothing vendor for the script to continue, if something vends 2 items (for example), increase this number by 2.
var/clothing_items_to_vend = 9
/// How many items need to be vended from the gun vendor to continue
Expand All @@ -15,6 +15,14 @@
if(!.)
return

var/obj/item/device/flashlight/flashlight = new(loc_from_corner(2, 3))
flashlight.anchored = TRUE
flashlight.set_light_power(4)
flashlight.set_light_range(12)
flashlight.icon = null
flashlight.set_light_on(TRUE)
add_to_tracking_atoms(flashlight)

init_mob()
message_to_player("This is the tutorial for marine rifleman. Leave the cryopod by pressing <b>W</b> or <b>D</b> to continue.")
update_objective("Exit the cryopod by pressing W or D.")
Expand Down Expand Up @@ -65,7 +73,7 @@
UnregisterSignal(clothing_vendor, COMSIG_VENDOR_SUCCESSFUL_VEND)
clothing_vendor.req_access = list(ACCESS_TUTORIAL_LOCKED)
remove_highlight(clothing_vendor)
message_to_player("Now, the room will be dimmed. Take a <b>flare</b> out of your <b>flare pouch</b> by clicking on it with an empty hand, and then light it by using it in-hand with <b>Z</b>.")
message_to_player("Now, the room will darken. Take a <b>flare</b> out of your <b>flare pouch</b> by clicking on it with an empty hand, and then light it by using it in-hand with <b>Z</b>.")
update_objective("Click on your flare pouch to remove a flare before using it in-hand.")
var/obj/item/storage/pouch/flare/flare_pouch = locate(/obj/item/storage/pouch/flare) in tutorial_mob.contents
if(flare_pouch)
Expand Down Expand Up @@ -166,20 +174,12 @@
// START OF SCRIPT HELPERS

/datum/tutorial/marine/basic/proc/dim_room()
var/area/tutorial_area = get_area(tutorial_mob)
tutorial_area.set_base_lighting(new_alpha = 200)
sleep(0.5 SECONDS)
tutorial_area.set_base_lighting(new_alpha = 160)
sleep(0.5 SECONDS)
tutorial_area.set_base_lighting(new_alpha = 140)
TUTORIAL_ATOM_FROM_TRACKING(/obj/item/device/flashlight, flashlight)
flashlight.set_light_on(FALSE)

/datum/tutorial/marine/basic/proc/brighten_room()
var/area/tutorial_area = get_area(tutorial_mob)
tutorial_area.set_base_lighting(new_alpha = 160)
sleep(0.5 SECONDS)
tutorial_area.set_base_lighting(new_alpha = 200)
sleep(0.5 SECONDS)
tutorial_area.set_base_lighting(new_alpha = 255)
TUTORIAL_ATOM_FROM_TRACKING(/obj/item/device/flashlight, flashlight)
flashlight.set_light_on(TRUE)

/datum/tutorial/marine/basic/proc/disappear_xeno()
TUTORIAL_ATOM_FROM_TRACKING(/mob/living/carbon/xenomorph/drone/tutorial, xeno_dummy)
Expand Down
3 changes: 3 additions & 0 deletions code/game/area/admin_level.dm
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,6 @@
/area/misc/tutorial/Initialize(mapload, ...)
. = ..()
update_base_lighting()

/area/misc/tutorial/no_baselight
base_lighting_alpha = 0
100 changes: 100 additions & 0 deletions maps/tutorial/tutorial_8x9_nb.dmm
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
"a" = (
/turf/closed/wall/almayer/outer,
/area/misc/tutorial/no_baselight)
"z" = (
/turf/open/floor/almayer,
/area/misc/tutorial/no_baselight)
"R" = (
/obj/effect/landmark/tutorial_bottom_left,
/turf/open/floor/almayer,
/area/misc/tutorial/no_baselight)

(1,1,1) = {"
a
a
a
a
a
a
a
a
a
"}
(2,1,1) = {"
a
z
z
z
z
z
z
R
a
"}
(3,1,1) = {"
a
z
z
z
z
z
z
z
a
"}
(4,1,1) = {"
a
z
z
z
z
z
z
z
a
"}
(5,1,1) = {"
a
z
z
z
z
z
z
z
a
"}
(6,1,1) = {"
a
z
z
z
z
z
z
z
a
"}
(7,1,1) = {"
a
z
z
z
z
z
z
z
a
"}
(8,1,1) = {"
a
a
a
a
a
a
a
a
a
"}

0 comments on commit f71f775

Please sign in to comment.