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

Updating from Neb dev. #38

Merged
merged 36 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
df71d79
Replace CEILING macro with 515 ceil proc
out-of-phaze Aug 7, 2024
d5bf2b1
Replace FLOOR macro with 515 floor proc
out-of-phaze Aug 7, 2024
cbe9beb
Food can now skip plate creation.
MistakeNot4892 Aug 9, 2024
25743bd
Replace misc. rounding macros with 515 ceil and trunc procs
out-of-phaze Aug 7, 2024
a4c5b30
Change produce bin to use seed product name as a key
out-of-phaze Aug 8, 2024
dc20e86
Stock should now take precedence over soup, which takes precedence ov…
MistakeNot4892 Aug 10, 2024
77958cf
Converts ITEM_SIZE_NO_CONTAINER to OBJ_FLAG_NO_STORAGE.
MistakeNot4892 Aug 10, 2024
e16d779
Updating sound environments for porches.
MistakeNot4892 Aug 10, 2024
92a1db7
Updating keys for Shaded Hills jobs.
MistakeNot4892 Aug 10, 2024
c77739a
Updating Shaded Hills inn map.
MistakeNot4892 Aug 10, 2024
6cb8ee8
Sticks can be used to pick locks.
MistakeNot4892 Aug 10, 2024
12e0ddb
Adding a signpost to despawn from Shaded Hills.
MistakeNot4892 Aug 10, 2024
b3104dd
Merge pull request #4315 from MistakeNot4892/fix/plates
out-of-phaze Aug 10, 2024
9f4b3d7
Separates solid and liquid reagents
NataKilar Jun 30, 2024
cb890ad
Fixes in world in comment
NataKilar Jul 28, 2024
d911e69
Addresses requested fluid changes
NataKilar Aug 10, 2024
d3a8be3
Fixes use of ceiling proc
NataKilar Aug 11, 2024
4c41135
Automatic changelog generation [ci skip]
NebulaSS13Bot Aug 11, 2024
77c0bf2
Merge pull request #4303 from out-of-phaze/codequality/FLOOR-CEILING
MistakeNot4892 Aug 11, 2024
f7ecbb7
Merge pull request #4317 from out-of-phaze/tweak/produce-bin-product
MistakeNot4892 Aug 11, 2024
387d66d
Automatic changelog generation [ci skip]
NebulaSS13Bot Aug 12, 2024
43494f1
Merge pull request #4321 from MistakeNot4892/feature/signpost
out-of-phaze Aug 12, 2024
d311a5b
Merge pull request #4318 from MistakeNot4892/fix/souporder
out-of-phaze Aug 12, 2024
7434db4
Merge pull request #4267 from NataKilar/solid-liquid-reagents
MistakeNot4892 Aug 12, 2024
510a186
Automatic changelog generation for PR #4267 [ci skip]
NebulaSS13Bot Aug 12, 2024
86bd2f9
Failing to pick a lock will damage the pick instead of permanently de…
MistakeNot4892 Aug 11, 2024
471b789
Fixes a tail runtime.
MistakeNot4892 Aug 11, 2024
9f92e44
Make cooking recipes that use stacks not consume the entire stack for…
out-of-phaze Aug 10, 2024
cc08f67
Beggar knights can take max weapon skill.
MistakeNot4892 Aug 10, 2024
822bc33
Adds a windup to AI-driven unarmed human attacks.
MistakeNot4892 Aug 11, 2024
be6ecf4
Adding skill checks and damage to shields.
MistakeNot4892 Aug 11, 2024
7fb573d
Refactor handle_flashed to not require a flash object
noelle-lavenza Aug 11, 2024
afe3f1f
Make mud turf drying probabilistic
noelle-lavenza Aug 11, 2024
cb6b21f
Add an owned subtype of fake fire
noelle-lavenza Aug 11, 2024
b4d82dd
Automatic changelog generation for PR #4328 [ci skip]
NebulaSS13Bot Aug 12, 2024
2b1a965
Merge branch 'dev' of github.com:NebulaSS13/Nebula into fork/pyrelight
MistakeNot4892 Aug 13, 2024
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
Prev Previous commit
Next Next commit
Adding a signpost to despawn from Shaded Hills.
  • Loading branch information
MistakeNot4892 committed Aug 10, 2024
commit 12e0ddb7f7fd1c5919fc4967c0af26cfdcd3f1c8
60 changes: 9 additions & 51 deletions code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
/proc/despawn_character(mob/living/character)
if(character.client)
character.ghostize()
character.prepare_for_despawn()
character.key = null
character.ckey = null
qdel(character)

/*
* Cryogenic refrigeration unit. Basically a despawner.
* Stealing a lot of concepts/code from sleepers due to massive laziness.
* The despawn tick will only fire if it's been more than time_till_despawned ticks
* since time_entered, which is world.time when the occupant moves in.
*/


//Main cryopod console.

/obj/machinery/computer/cryopod
Expand Down Expand Up @@ -310,21 +317,6 @@

despawn_occupant()

// This function can not be undone; do not call this unless you are sure
// Also make sure there is a valid control computer
/obj/machinery/cryopod/robot/despawn_occupant()
var/mob/living/silicon/robot/R = occupant
if(istype(R))
R.clear_brain()
if(R.module)
for(var/obj/item/I in R.module) // the tools the borg has; metal, glass, guns etc
for(var/obj/item/O in I.get_contained_external_atoms()) // the things inside the tools, if anything; mainly for janiborg trash bags
O.forceMove(R)
qdel(I)
qdel(R.module)

. = ..()

// This function can not be undone; do not call this unless you are sure
// Also make sure there is a valid control computer
/obj/machinery/cryopod/proc/despawn_occupant()
Expand Down Expand Up @@ -352,38 +344,9 @@
else
frozen_item.forceMove(get_turf(src))

//Update any existing objectives involving this mob.
for(var/datum/objective/objective in global.all_objectives)
// We don't want revs to get objectives that aren't for heads of staff. Letting
// them win or lose based on cryo is silly so we remove the objective.
if(objective.target == occupant.mind)
if(objective.owner?.current)
to_chat(objective.owner.current, SPAN_DANGER("You get the feeling your target, [occupant.real_name], is no longer within your reach..."))
qdel(objective)

//Handle job slot/tater cleanup.
if(occupant.mind)
if(occupant.mind.assigned_job)
occupant.mind.assigned_job.clear_slot()

if(occupant.mind.objectives.len)
occupant.mind.objectives = null
occupant.mind.assigned_special_role = null

// Delete them from datacore.
var/sanitized_name = occupant.real_name
sanitized_name = sanitize(sanitized_name)
var/datum/computer_file/report/crew_record/record = get_crewmember_record(sanitized_name)
if(record)
qdel(record)

icon_state = base_icon_state

//TODO: Check objectives/mode, update new targets if this mob is the target, spawn new antags?


//Make an announcement and log the person entering storage.

// Titles should really be fetched from data records
// and records should not be fetched by name as there is no guarantee names are unique
var/role_alt_title = occupant.mind ? occupant.mind.role_alt_title : "Unknown"
Expand All @@ -394,12 +357,7 @@
log_and_message_admins("[key_name(occupant)] ([role_alt_title]) entered cryostorage.")

do_telecomms_announcement(src, "[occupant.real_name], [role_alt_title], [on_store_message]", "[on_store_name]")

//This should guarantee that ghosts don't spawn.
occupant.ckey = null

// Delete the mob.
qdel(occupant)
despawn_character(occupant)
set_occupant(null)

/obj/machinery/cryopod/proc/attempt_enter(var/mob/target, var/mob/user)
Expand Down
22 changes: 22 additions & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1800,3 +1800,25 @@ default behaviour is:
return FALSE

return TRUE

/mob/living/proc/prepare_for_despawn()
//Update any existing objectives involving this mob.
for(var/datum/objective/objective in global.all_objectives)
// We don't want revs to get objectives that aren't for heads of staff. Letting
// them win or lose based on cryo is silly so we remove the objective.
if(objective.target == mind)
if(objective.owner?.current)
to_chat(objective.owner.current, SPAN_DANGER("You get the feeling your target, [real_name], is no longer within your reach..."))
qdel(objective)
//Handle job slot/tater cleanup.
if(mind)
if(mind.assigned_job)
mind.assigned_job.clear_slot()
if(mind.objectives.len)
mind.objectives = null
mind.assigned_special_role = null
// Delete them from datacore.
var/datum/computer_file/report/crew_record/record = get_crewmember_record(sanitize(real_name))
if(record)
qdel(record)
return TRUE
10 changes: 10 additions & 0 deletions code/modules/mob/living/silicon/robot/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1125,3 +1125,13 @@
to_chat(src, SPAN_WARNING("You have already grabbed something!"))
return FALSE
return TRUE

/mob/living/silicon/robot/prepare_for_despawn()
clear_brain()
if(module)
for(var/obj/item/I in module) // the tools the borg has; metal, glass, guns etc
for(var/obj/item/O in I.get_contained_external_atoms()) // the things inside the tools, if anything; mainly for janiborg trash bags
O.forceMove(src)
qdel(I)
QDEL_NULL(module)
return ..()
6 changes: 5 additions & 1 deletion maps/shaded_hills/shaded_hills-inn.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,10 @@
"Rl" = (
/turf/floor/natural/mud,
/area/shaded_hills/outside/downlands)
"Rz" = (
/obj/effect/departure_signpost/east,
/turf/floor/natural/dirt,
/area/shaded_hills/outside/downlands)
"RC" = (
/obj/structure/railing/mapped/wooden/walnut,
/turf/floor/natural/grass,
Expand Down Expand Up @@ -22849,7 +22853,7 @@ HI
HI
HI
TR
TR
Rz
EV
Gq
Ic
Expand Down
6 changes: 5 additions & 1 deletion maps/shaded_hills/shaded_hills-woods.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@
/obj/structure/table/woodentable/ebony,
/turf/floor/wood/walnut,
/area/shaded_hills/forester_hut)
"Uz" = (
/obj/effect/departure_signpost/north,
/turf/floor/natural/dirt,
/area/shaded_hills/outside/woods)
"VA" = (
/obj/abstract/landmark/start/shaded_hills/traveller,
/turf/floor/natural/path/basalt,
Expand Down Expand Up @@ -1740,7 +1744,7 @@ lC
lC
lC
YB
lU
Uz
HA
HA
HA
Expand Down
1 change: 1 addition & 0 deletions mods/content/fantasy/_fantasy.dme
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@
#include "items\clothing\loincloth.dm"
#include "items\clothing\overrides.dm"
#include "items\clothing\trousers.dm"
#include "props\signpost.dm"
// END_INCLUDE
#endif
Binary file added mods/content/fantasy/icons/structures/signpost.dmi
Binary file not shown.
67 changes: 67 additions & 0 deletions mods/content/fantasy/props/signpost.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/obj/effect/departure_signpost
name = "border post"
desc = "A tall lamplit signpost marking the edge of the region. Beyond lies distant kingdoms."
icon = 'mods/content/fantasy/icons/structures/signpost.dmi'
icon_state = ICON_STATE_WORLD
color = /decl/material/solid/organic/wood/walnut::color
density = TRUE
opacity = FALSE
anchored = TRUE
simulated = FALSE
pixel_z = 12

var/lit_light_power = /obj/item/flame/fuelled/lantern::lit_light_power
var/lit_light_range = /obj/item/flame/fuelled/lantern::lit_light_range
var/lit_light_color = /obj/item/flame/fuelled/lantern::lit_light_color

/obj/effect/departure_signpost/Initialize()
. = ..()
set_light(lit_light_range, lit_light_power, lit_light_color)
update_icon()

/obj/effect/departure_signpost/on_update_icon()
. = ..()
add_overlay(overlay_image(icon, "[icon_state]-lamp", /decl/material/solid/metal/copper::color, RESET_COLOR))
var/image/glow = emissive_overlay(icon, "[icon_state]-lamp-glow", color = lit_light_color)
glow.appearance_flags |= RESET_COLOR
add_overlay(glow)

/obj/effect/departure_signpost/attackby(obj/item/used_item, mob/user)
SHOULD_CALL_PARENT(FALSE)
return TRUE

/obj/effect/departure_signpost/attack_hand(mob/user)
SHOULD_CALL_PARENT(FALSE)
var/choice = alert(user, "Are you sure you wish to depart? This will permanently remove your character from the round.", "Venture Forth?", "No", "Yes")
if(choice != "Yes" || QDELETED(user) || user.incapacitated() || QDELETED(src) || !user.Adjacent(src))
return TRUE
var/obj/effect/dummy/fadeout = new(get_turf(user))
fadeout.set_dir(dir)
fadeout.appearance = user // grab appearance before ghostizing in case they fall over etc
switch(dir)
if(NORTH)
animate(fadeout, pixel_z = 32, alpha = 0, time = 1 SECOND)
if(SOUTH)
animate(fadeout, pixel_z = -32, alpha = 0, time = 1 SECOND)
if(EAST)
animate(fadeout, pixel_w = 32, alpha = 0, time = 1 SECOND)
if(WEST)
animate(fadeout, pixel_w = -32, alpha = 0, time = 1 SECOND)
else
animate(fadeout, alpha = 0, time = 1 SECOND)
QDEL_IN(fadeout, 1 SECOND)
despawn_character(user)
return TRUE

// Premade types for mapping.
/obj/effect/departure_signpost/north
dir = NORTH

/obj/effect/departure_signpost/south
dir = SOUTH

/obj/effect/departure_signpost/east
dir = EAST

/obj/effect/departure_signpost/west
dir = WEST