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

Removes remnants of my enthusiasm #11192

Merged
merged 1 commit into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
74 changes: 37 additions & 37 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2332,6 +2332,43 @@
#include "code\modules\mob\observer\virtual\base.dm"
#include "code\modules\mob\observer\virtual\helpers.dm"
#include "code\modules\mob\observer\virtual\mob.dm"
#include "code\modules\mob\organs\_organ_setup.dm"
#include "code\modules\mob\organs\blood.dm"
#include "code\modules\mob\organs\organ.dm"
#include "code\modules\mob\organs\pain.dm"
#include "code\modules\mob\organs\robolimbs.dm"
#include "code\modules\mob\organs\external\_external.dm"
#include "code\modules\mob\organs\external\_external_damage.dm"
#include "code\modules\mob\organs\external\_external_icons.dm"
#include "code\modules\mob\organs\external\diona.dm"
#include "code\modules\mob\organs\external\head.dm"
#include "code\modules\mob\organs\external\standard.dm"
#include "code\modules\mob\organs\external\stump.dm"
#include "code\modules\mob\organs\external\unbreakable.dm"
#include "code\modules\mob\organs\external\vox.dm"
#include "code\modules\mob\organs\external\xenos.dm"
#include "code\modules\mob\organs\external\wounds\wound.dm"
#include "code\modules\mob\organs\external\wounds\wound_types.dm"
#include "code\modules\mob\organs\internal\_internal.dm"
#include "code\modules\mob\organs\internal\appendix.dm"
#include "code\modules\mob\organs\internal\borer.dm"
#include "code\modules\mob\organs\internal\brain.dm"
#include "code\modules\mob\organs\internal\cerebrum.dm"
#include "code\modules\mob\organs\internal\embryo.dm"
#include "code\modules\mob\organs\internal\eyes.dm"
#include "code\modules\mob\organs\internal\golem.dm"
#include "code\modules\mob\organs\internal\heart.dm"
#include "code\modules\mob\organs\internal\kidneys.dm"
#include "code\modules\mob\organs\internal\liver.dm"
#include "code\modules\mob\organs\internal\lungs.dm"
#include "code\modules\mob\organs\internal\machine.dm"
#include "code\modules\mob\organs\internal\man_machine_interface.dm"
#include "code\modules\mob\organs\internal\metroid_jelly_vessel.dm"
#include "code\modules\mob\organs\internal\posibrain.dm"
#include "code\modules\mob\organs\internal\stack.dm"
#include "code\modules\mob\organs\internal\stomach.dm"
#include "code\modules\mob\organs\internal\voicebox.dm"
#include "code\modules\mob\organs\internal\vox.dm"
#include "code\modules\mob_spawn\mob_spawn.dm"
#include "code\modules\mob_spawn\ghost_roles\golem_roles.dm"
#include "code\modules\mob_spawn\ghost_roles\spider_roles.dm"
Expand Down Expand Up @@ -2448,43 +2485,6 @@
#include "code\modules\nano\modules\human_appearance.dm"
#include "code\modules\nano\modules\law_manager.dm"
#include "code\modules\nano\modules\nano_module.dm"
#include "code\modules\organs\_organ_setup.dm"
#include "code\modules\organs\blood.dm"
#include "code\modules\organs\organ.dm"
#include "code\modules\organs\pain.dm"
#include "code\modules\organs\robolimbs.dm"
#include "code\modules\organs\external\_external.dm"
#include "code\modules\organs\external\_external_damage.dm"
#include "code\modules\organs\external\_external_icons.dm"
#include "code\modules\organs\external\diona.dm"
#include "code\modules\organs\external\head.dm"
#include "code\modules\organs\external\standard.dm"
#include "code\modules\organs\external\stump.dm"
#include "code\modules\organs\external\unbreakable.dm"
#include "code\modules\organs\external\vox.dm"
#include "code\modules\organs\external\xenos.dm"
#include "code\modules\organs\external\wounds\wound.dm"
#include "code\modules\organs\external\wounds\wound_types.dm"
#include "code\modules\organs\internal\_internal.dm"
#include "code\modules\organs\internal\appendix.dm"
#include "code\modules\organs\internal\borer.dm"
#include "code\modules\organs\internal\brain.dm"
#include "code\modules\organs\internal\cerebrum.dm"
#include "code\modules\organs\internal\embryo.dm"
#include "code\modules\organs\internal\eyes.dm"
#include "code\modules\organs\internal\golem.dm"
#include "code\modules\organs\internal\heart.dm"
#include "code\modules\organs\internal\kidneys.dm"
#include "code\modules\organs\internal\liver.dm"
#include "code\modules\organs\internal\lungs.dm"
#include "code\modules\organs\internal\machine.dm"
#include "code\modules\organs\internal\man_machine_interface.dm"
#include "code\modules\organs\internal\metroid_jelly_vessel.dm"
#include "code\modules\organs\internal\posibrain.dm"
#include "code\modules\organs\internal\stack.dm"
#include "code\modules\organs\internal\stomach.dm"
#include "code\modules\organs\internal\voicebox.dm"
#include "code\modules\organs\internal\vox.dm"
#include "code\modules\paperwork\adminpaper.dm"
#include "code\modules\paperwork\carbonpaper.dm"
#include "code\modules\paperwork\clipboard.dm"
Expand Down
2 changes: 2 additions & 0 deletions code/__defines/modifiers.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define MODIFIER_GENETIC 1 // Modifiers with this flag will be copied to mobs who get cloned.

#define MODIFIER_STACK_FORBID 1 // Disallows stacking entirely.
#define MODIFIER_STACK_EXTEND 2 // Disallows a second instance, but will extend the first instance if possible.
#define MODIFIER_STACK_ALLOWED 3 // Multiple instances are allowed.
6 changes: 0 additions & 6 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -483,12 +483,6 @@
/mob
var/datum/stack/click_handlers

/mob/Destroy()
if(click_handlers)
click_handlers.QdelClear()
QDEL_NULL(click_handlers)
. = ..()

var/const/CLICK_HANDLER_NONE = 0
var/const/CLICK_HANDLER_REMOVE_ON_MOB_LOGOUT = 1
var/const/CLICK_HANDLER_ALL = (~0)
Expand Down
6 changes: 0 additions & 6 deletions code/_onclick/hud/ability_screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,6 @@
return VP
return null

/mob/Login()
..()
if(ability_master)
ability_master.update_abilities(1, src)
ability_master.toggle_open(1)

/mob/Initialize()
. = ..()
ability_master = new /obj/screen/movable/ability_master(null,src)
Expand Down
13 changes: 0 additions & 13 deletions code/_onclick/hud/skybox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,3 @@
. = ..()
if(. && skybox)
skybox.update()

/mob/Login()
if(!skybox)
skybox = new(src)
skybox.owner = src
client.screen += skybox
..()

/mob/Destroy()
if(client)
client.screen -= skybox
QDEL_NULL(skybox)
return ..()
4 changes: 4 additions & 0 deletions code/game/objects/structures/crates_lockers/closets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@

update_icon()

/obj/structure/closet/Destroy()
QDEL_NULL(cdoor)
return ..()

/obj/structure/closet/proc/WillContain()
return null

Expand Down
4 changes: 3 additions & 1 deletion code/game/objects/structures/inflatable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@

for(var/check_dir in GLOB.cardinal)
var/turf/T = get_step(get_turf(src), check_dir)
var/datum/gas_mixture/env = T.return_air()
var/datum/gas_mixture/env = T?.return_air()
if(!env)
continue
var/pressure = env.return_pressure()
min_pressure = min(min_pressure, pressure)
max_pressure = max(max_pressure, pressure)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/living/carbon/human/human_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
/mob/living/carbon/human/dummy/mannequin/Life()
return // Because we never know

/mob/living/carbon/human/dummy/mannequin/check_shadow()
return

/mob/living/carbon/human/skrell/New(new_loc)
h_style = "Skrell Male Tentacles"
..(new_loc, SPECIES_SKRELL)
Expand Down
22 changes: 18 additions & 4 deletions code/modules/mob/login.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
params["name"] = real_name || name
world.Export("[config.external.login_export_addr]?[list2params(params)]", null, 1)

/mob
var/client/my_client // Need to keep track of this ourselves, since by the time Logout() is called the client has already been nulled

/mob/Login()
CAN_BE_REDEFINED(TRUE)
SHOULD_CALL_PARENT(TRUE)
if(!client)
return

GLOB.player_list |= src
update_Login_details()
world.update_status()
Expand All @@ -57,7 +57,8 @@

next_move = 1
set_sight(sight|SEE_SELF)
..()

client.statobj = src // DO NOT CALL PARENT HERE or BYOND will devour your soul

my_client = client

Expand Down Expand Up @@ -89,5 +90,18 @@
else
winset(src, null, "mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true")

if(!skybox)
skybox = new(src)
skybox.owner = src
client.screen += skybox

if(ability_master)
ability_master.update_abilities(1, src)
ability_master.toggle_open(1)
if(mind && ability_master.spell_objects)
for(var/obj/screen/ability/spell/screen in ability_master.spell_objects)
var/datum/spell/S = screen.spell
mind.learned_spells |= S

SEND_GLOBAL_SIGNAL(SIGNAL_LOGGED_IN, src)
SEND_SIGNAL(src, SIGNAL_LOGGED_IN, src)
10 changes: 10 additions & 0 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@
remove_from_dead_mob_list()
remove_from_living_mob_list()
GLOB.player_list.Remove(src)
SSmobs.mob_list.Remove(src)

unset_machine()
//SStgui.force_close_all_windows(src) Needs further investigating

QDEL_NULL(hud_used)
QDEL_NULL(show_inventory)
QDEL_NULL(skybox)
QDEL_NULL(ability_master)
QDEL_NULL(shadow)

LAssailant = null
for(var/obj/item/grab/G in grabbed_by)
Expand All @@ -22,6 +28,10 @@
if(ability_master)
QDEL_NULL(ability_master)

if(click_handlers)
click_handlers.QdelClear()
QDEL_NULL(click_handlers)

remove_screen_obj_references()
if(client)
for(var/atom/movable/AM in client.screen)
Expand Down
5 changes: 5 additions & 0 deletions code/modules/mob/mob_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
var/lastKnownIP = null
var/computer_id = null

var/client/my_client // Need to keep track of this ourselves, since by the time Logout() is called the client has already been nulled

var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak

var/obj/screen/hands = null
Expand Down Expand Up @@ -89,6 +91,9 @@

var/bhunger = 0 //Carbon

var/last_pain_message
var/next_pain_time = 0

var/druggy = 0 //Carbon
var/confused = 0 //Carbon
var/sleeping = 0 //Carbon
Expand Down
5 changes: 2 additions & 3 deletions code/modules/mob/new_player/login.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@
mind.set_current(src)

loc = null
new /obj/screen/splash(client, TRUE)
my_client = client
set_sight(sight|SEE_TURFS)
set_sight(sight|SEE_OBJS|SEE_TURFS)
GLOB.player_list |= src
CreateRenderers()
new /obj/screen/splash(client, TRUE)

if(!SScharacter_setup.initialized)
SScharacter_setup.newplayers_requiring_init += src
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/new_player/logout.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
..()
if(!spawning)//Here so that if they are spawning and log out, the other procs can play out and they will have a mob to come back to.
key = null//We null their key before deleting the mob, so they are properly kicked out.
QDEL_NULL(mind) // We transfer mind during create_character(), so this should only happen if the new_player actually logs out w/out actually entering the round.
qdel(src)
return
5 changes: 5 additions & 0 deletions code/modules/mob/new_player/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@

return INITIALIZE_HINT_NORMAL

/mob/new_player/Destroy()
QDEL_NULL(panel)
return ..()

/mob/new_player/proc/new_player_panel(forced = FALSE)
if(!SScharacter_setup.initialized && !forced)
return // Not ready yet.
Expand Down Expand Up @@ -552,6 +556,7 @@
mind.gen_relations_info = client.prefs.relations_info["general"]
mind.traits = client.prefs.traits.Copy()
mind.transfer_to(new_character) //won't transfer key since the mind is not active
mind = null

new_character.apply_traits()
new_character.SetName(real_name)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/observer/ghost/ghost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ GLOBAL_LIST_EMPTY(ghost_sightless_images)

ghost_multitool = new(src)

GLOB.ghost_mob_list += src
GLOB.ghost_mob_list |= src

..()

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
animate(pain, alpha = target, time = 15, easing = ELASTIC_EASING)
animate(pain, alpha = 0, time = 20)

/mob/var/last_pain_message
/mob/var/next_pain_time = 0

// message is the custom message to be displayed
// power decides how much painkillers will stop the message
// force means it ignores anti-spam timer
Expand Down
2 changes: 0 additions & 2 deletions code/modules/modifier/modifier.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#define MODIFIER_GENETIC 1 // Modifiers with this flag will be copied to mobs who get cloned.


// This is a datum that tells the mob that something is affecting them.
// The advantage of using this datum verses just setting a variable on the mob directly, is that there is no risk of two different procs overwriting
Expand Down
6 changes: 0 additions & 6 deletions code/modules/multiz/zshadow.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
. = ..() // I'm cautious about this, but its the right thing to do.
owner = L

/mob/Destroy()
if(shadow)
qdel(shadow)
shadow = null
. = ..()

/mob/zshadow/Destroy()
owner = null
. = ..()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/recycling/disposal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@
return

/obj/structure/disposalholder/Destroy()
qdel(gas)
QDEL_NULL(gas)
active = 0
return ..()

Expand Down
11 changes: 0 additions & 11 deletions code/modules/spells/spells.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@
if(SP_HOLDVAR)
statpanel(S.panel, "[S.holder_var_type] [S.holder_var_amount]", S.connected_button)

//A fix for when a spell is created before a mob is created
/mob/Login()
. = ..()
if(!mind)
return

if(ability_master?.spell_objects)
for(var/obj/screen/ability/spell/screen in ability_master.spell_objects)
var/datum/spell/S = screen.spell
mind.learned_spells |= S

/proc/restore_spells(mob/H)
if(!H.mind?.learned_spells)
return
Expand Down
Loading