new->init refactor

This commit is contained in:
Killian
2022-02-20 19:32:23 +00:00
parent 3f9af78f3a
commit 91d39da943
71 changed files with 182 additions and 4839 deletions
+2 -8
View File
@@ -179,16 +179,10 @@
ability_master.toggle_open(1)
client.screen -= ability_master
<<<<<<< HEAD
/mob/New()
..()
if(!ability_master) //VOREStation Edit: S H A D E K I N
ability_master = new /obj/screen/movable/ability_master(src)
=======
/mob/Initialize()
. = ..()
ability_master = new /obj/screen/movable/ability_master(null, src)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
if(!ability_master) //VOREStation Edit: S H A D E K I N
ability_master = new /obj/screen/movable/ability_master(null, src)
///////////ACTUAL ABILITIES////////////
//This is what you click to do things//
-17
View File
@@ -34,15 +34,6 @@ SUBSYSTEM_DEF(atoms)
LAZYINITLIST(late_loaders)
var/list/mapload_arg = list(TRUE)
<<<<<<< HEAD
if(atoms)
created_atoms = list()
count = atoms.len
for(var/atom/A as anything in atoms)
if(!A.initialized)
if(InitAtom(A, mapload_arg))
atoms -= A
=======
var/count = LAZYLEN(supplied_atoms)
if(count)
while(supplied_atoms.len)
@@ -50,7 +41,6 @@ SUBSYSTEM_DEF(atoms)
supplied_atoms.len--
if(!A.initialized)
InitAtom(A, GetArguments(A, mapload_arg))
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
CHECK_TICK
else if(!subsystem_initialized)
// If wondering why not just store all atoms in a list and use the block above: that turns out unbearably expensive.
@@ -68,17 +58,10 @@ SUBSYSTEM_DEF(atoms)
atom_init_stage = INITIALIZATION_INNEW_REGULAR
if(late_loaders.len)
<<<<<<< HEAD
for(var/atom/A as anything in late_loaders)
A.LateInitialize()
CHECK_TICK
testing("Late initialized [late_loaders.len] atoms")
=======
for(var/I in late_loaders)
var/atom/A = I
A.LateInitialize(arglist(late_loaders[A]))
report_progress("Late initialized [late_loaders.len] atom\s")
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
late_loaders.Cut()
/datum/controller/subsystem/atoms/proc/InitAtom(atom/A, list/arguments)
+4 -27
View File
@@ -27,7 +27,7 @@
// Overlays
///Our local copy of (non-priority) overlays without byond magic. Use procs in SSoverlays to manipulate
var/list/our_overlays
var/list/our_overlays
///Overlays that should remain on top and not normally removed when using cut_overlay functions, like c4.
var/list/priority_overlays
///vis overlays managed by SSvis_overlays to automaticaly turn them like other overlays
@@ -35,7 +35,7 @@
///Our local copy of filter data so we can add/remove it
var/list/filter_data
//Detective Work, used for the duplicate data points kept in the scanners
var/list/original_atom
// Track if we are already had initialize() called to prevent double-initialization.
@@ -52,32 +52,10 @@
var/global/list/pre_init_created_atoms // atom creation ordering means some stuff is trying to init before SSatoms exists, temp workaround
/atom/New(loc, ...)
<<<<<<< HEAD
// Don't call ..() unless /datum/New() ever exists
// During dynamic mapload (reader.dm) this assigns the var overrides from the .dmm file
// Native BYOND maploading sets those vars before invoking New(), by doing this FIRST we come as close to that behavior as we can.
//atom creation method that preloads variables at creation
if(GLOB.use_preloader && (src.type == GLOB._preloader.target_path))//in case the instanciated atom is creating other atoms in New()
GLOB._preloader.load(src)
// Pass our arguments to InitAtom so they can be passed to initialize(), but replace 1st with if-we're-during-mapload.
var/do_initialize = SSatoms.initialized
if(do_initialize > INITIALIZATION_INSSATOMS)
args[1] = (do_initialize == INITIALIZATION_INNEW_MAPLOAD)
if(SSatoms.InitAtom(src, args))
// We were deleted. No sense continuing
return
// Uncomment if anything ever uses the return value of SSatoms.InitializeAtoms ~Leshana
// If a map is being loaded, it might want to know about newly created objects so they can be handled.
// var/list/created = SSatoms.created_atoms
// if(created)
// created += src
=======
//atom creation method that preloads variables at creation
if(global.use_preloader && (src.type == global._preloader.target_path))//in case the instanciated atom is creating other atoms in New()
global._preloader.load(src)
var/do_initialize = SSatoms?.atom_init_stage
if(do_initialize > INITIALIZATION_INSSATOMS_LATE)
args[1] = do_initialize == INITIALIZATION_INNEW_MAPLOAD
@@ -88,7 +66,6 @@ var/global/list/pre_init_created_atoms // atom creation ordering means some stuf
argument_list = args.Copy(2)
if(length(argument_list))
LAZYSET(global.pre_init_created_atoms, src, argument_list)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
// Note: I removed "auto_init" feature (letting types disable auto-init) since it shouldn't be needed anymore.
// You can replicate the same by checking the value of the first parameter to initialize() ~Leshana
@@ -696,7 +673,7 @@ var/global/list/pre_init_created_atoms // atom creation ordering means some stuf
if(!isnull(.))
datum_flags |= DF_VAR_EDITED
return
. = ..()
/atom/proc/atom_say(message)
+55 -17
View File
@@ -418,12 +418,6 @@
continue
src.throw_impact(A,speed)
<<<<<<< HEAD
/atom/movable/proc/throw_at(atom/target, range, speed, mob/thrower, spin = TRUE, datum/callback/callback) //If this returns FALSE then callback will not be called.
. = TRUE
if (!target || speed <= 0 || QDELETED(src) || (target.z != src.z))
return FALSE
=======
/atom/movable/proc/throw_at(atom/target, range, speed, thrower)
set waitfor = FALSE
if(!target || !src)
@@ -451,21 +445,65 @@
dx = EAST
else
dx = WEST
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
if (pulledby)
pulledby.stop_pulling()
var/dy
if (target.y > src.y)
dy = NORTH
else
dy = SOUTH
var/datum/thrownthing/TT = new(src, target, range, speed, thrower, callback)
throwing = TT
var/error
var/major_dir
var/major_dist
var/minor_dir
var/minor_dist
if(dist_x > dist_y)
error = dist_x/2 - dist_y
major_dir = dx
major_dist = dist_x
minor_dir = dy
minor_dist = dist_y
else
error = dist_y/2 - dist_x
major_dir = dy
major_dist = dist_y
minor_dir = dx
minor_dist = dist_x
pixel_z = 0
if(spin && does_spin)
SpinAnimation(4,1)
range = min(dist_x + dist_y, range)
SSthrowing.processing[src] = TT
if (SSthrowing.state == SS_PAUSED && length(SSthrowing.currentrun))
SSthrowing.currentrun[src] = TT
while(src && target && src.throwing && istype(src.loc, /turf) \
&& ((abs(target.x - src.x)+abs(target.y - src.y) > 0 && dist_travelled < range) \
|| (a && a.has_gravity == 0) \
|| istype(src.loc, /turf/space)))
// only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up
var/atom/step
if(error >= 0)
step = get_step(src, major_dir)
error -= minor_dist
else
step = get_step(src, minor_dir)
error += major_dist
if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
break
src.Move(step)
hit_check(speed)
dist_travelled++
dist_since_sleep++
if(dist_since_sleep >= speed)
dist_since_sleep = 0
sleep(1)
a = get_area(src.loc)
// and yet it moves
if(src.does_spin)
src.SpinAnimation(speed = 4, loops = 1)
//done throwing, either because it hit something or it finished moving
if(isobj(src)) src.throw_impact(get_turf(src),speed)
src.throwing = 0
src.thrower = null
src.throw_source = null
fall()
//Overlays
/atom/movable/overlay
@@ -14,13 +14,9 @@
consume_range = 6
<<<<<<< HEAD
/obj/singularity/narsie/large/exit/New()
..()
=======
/obj/singularity/narsie/large/exit/Initialize()
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
START_PROCESSING(SSobj, src)
/obj/singularity/narsie/large/exit/update_icon()
-6
View File
@@ -8,16 +8,10 @@
var/max_cable = 100
var/on = 0
<<<<<<< HEAD
/obj/machinery/cablelayer/New()
cable = new(src, 100)
..()
=======
/obj/machinery/cablelayer/Initialize()
cable = new(src)
cable.amount = 100
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/machinery/cablelayer/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
-9
View File
@@ -155,17 +155,8 @@
TLV["pressure"] = list(ONE_ATMOSPHERE * 0.80, ONE_ATMOSPHERE * 0.90, ONE_ATMOSPHERE * 1.10, ONE_ATMOSPHERE * 1.20) /* kpa */
TLV["temperature"] = list(T0C - 26, T0C, T0C + 40, T0C + 66) // K
<<<<<<< HEAD
update_icon()
/obj/machinery/alarm/Initialize()
. = ..()
set_frequency(frequency)
if(!master_is_operating())
elect_master()
=======
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/machinery/alarm/process()
if((stat & (NOPOWER|BROKEN)) || shorted)
return
-4
View File
@@ -61,16 +61,12 @@
error("[src.name] in [get_area(src)]has errored. [src.network?"Empty network list":"Null network list"]")
ASSERT(src.network)
ASSERT(src.network.len > 0)
<<<<<<< HEAD
// VOREStation Edit Start - Make mapping with cameras easier
if(!c_tag)
var/area/A = get_area(src)
c_tag = "[A ? A.name : "Unknown"] #[rand(111,999)]"
..()
// VOREStation Edit End
=======
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/machinery/camera/Destroy()
if(isMotion())
-8
View File
@@ -96,12 +96,6 @@
/obj/machinery/computer/arcade/battle/Initialize()
. = ..()
<<<<<<< HEAD
randomize_characters()
/obj/machinery/computer/arcade/battle/proc/randomize_characters()
=======
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
var/name_action
var/name_part1
var/name_part2
@@ -194,7 +188,6 @@
turtle = 0
if(emagged)
randomize_characters()
emagged = 0
add_fingerprint(usr)
@@ -213,7 +206,6 @@
new /obj/item/clothing/head/collectable/petehat(src.loc)
message_admins("[key_name_admin(usr)] has outbombed Cuban Pete and been awarded a bomb.")
log_game("[key_name_admin(usr)] has outbombed Cuban Pete and been awarded a bomb.")
randomize_characters()
emagged = 0
else if(!contents.len)
feedback_inc("arcade_win_normal")
-4
View File
@@ -288,9 +288,6 @@
time_till_despawn = 60 //1 second, because gateway.
<<<<<<< HEAD
/obj/machinery/cryopod/New()
=======
/obj/machinery/cryopod/robot/door/checkpoint
name = "automated checkpoint"
desc = "A reinforced, automated checkpoint tracking arrivals and departures from the outpost. Beyond this vault is a small airstrip, then nothing but untamed wilderness."
@@ -303,7 +300,6 @@
/obj/machinery/cryopod/Initialize()
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
announce = new /obj/item/device/radio/intercom(src)
find_control_computer()
File diff suppressed because it is too large Load Diff
+1 -16
View File
@@ -7,22 +7,7 @@
open_sound_powered = 'sound/machines/door/WideOpen.ogg'
close_sound_powered = 'sound/machines/door/WideClose.ogg'
<<<<<<< HEAD
/obj/machinery/door/airlock/multi_tile/Initialize(mapload)
=======
/obj/machinery/door/airlock/multi_tile/Initialize()
. = ..()
SetBounds()
if(opacity)
create_fillers()
/obj/machinery/door/airlock/multi_tile/Destroy()
QDEL_NULL(filler1)
QDEL_NULL(filler2)
return ..()
/obj/machinery/door/airlock/multi_tile/Moved(atom/old_loc, direction, forced = FALSE)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
. = ..()
SetBounds()
RegisterSignal(src, COMSIG_MOVABLE_MOVED, .proc/SetBounds)
@@ -63,4 +48,4 @@
/obj/machinery/door/airlock/multi_tile/metal/mait
icon = 'icons/obj/doors/Door2x1_Maint.dmi'
//req_one_access = list(access_maint_tunnels) //VOREStaiton Edit - Maintenance is open access
//req_one_access = list(access_maint_tunnels) //VOREStaiton Edit - Maintenance is open access
-6
View File
@@ -119,17 +119,11 @@ Class Procs:
var/speed_process = FALSE //If false, SSmachines. If true, SSfastprocess.
<<<<<<< HEAD
blocks_emissive = EMISSIVE_BLOCK_GENERIC
/obj/machinery/New(l, d=0)
..()
if(isnum(d))
=======
/obj/machinery/Initialize(var/ml, d=0)
. = ..()
if(d)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
set_dir(d)
if(ispath(circuit))
circuit = new circuit(src)
-3
View File
@@ -59,8 +59,6 @@ var/list/obj/machinery/requests_console/allConsoles = list()
light_range = 0
var/datum/announcement/announcement = new
<<<<<<< HEAD
=======
/obj/machinery/requests_console/power_change()
..()
update_icon()
@@ -73,7 +71,6 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(icon_state == "req_comp_off")
icon_state = "req_comp[newmessagepriority]"
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/machinery/requests_console/Initialize()
. = ..()
+1 -13
View File
@@ -29,7 +29,6 @@
//The units themselves/////////////////
/obj/machinery/suit_storage_unit/standard_unit
<<<<<<< HEAD
suit_type = /obj/item/clothing/suit/space
helmet_type = /obj/item/clothing/head/helmet/space
mask_type = /obj/item/clothing/mask/breath
@@ -42,15 +41,6 @@
HELMET = new helmet_type(src)
if(mask_type)
MASK = new mask_type(src)
=======
SUIT_TYPE = /obj/item/clothing/suit/space
HELMET_TYPE = /obj/item/clothing/head/helmet/space
MASK_TYPE = /obj/item/clothing/mask/breath
/obj/machinery/suit_storage_unit/Initialize()
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
update_icon()
/obj/machinery/suit_storage_unit/update_icon()
var/hashelmet = 0
@@ -548,8 +538,8 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache)
/obj/machinery/suit_cycler/Initialize()
. = ..()
<<<<<<< HEAD
wires = new(src)
departments = load_departments()
species = load_species()
emagged_departments = load_emagged()
@@ -557,8 +547,6 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache)
target_department = departments["No Change"]
target_species = species["No Change"]
=======
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
if(!target_department || !target_species)
stat |= BROKEN
-9
View File
@@ -13,15 +13,6 @@
//Setting this to 1 will set locked to null after a player enters the portal and will not allow hand-teles to open portals to that location.
var/datum/tgui_module/teleport_control/teleport_control
<<<<<<< HEAD
/obj/machinery/computer/teleporter/New()
id = "[rand(1000, 9999)]"
..()
underlays.Cut()
underlays += image('icons/obj/stationobjs_vr.dmi', icon_state = "telecomp-wires") //VOREStation Edit: different direction for wires to account for dirs
=======
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/machinery/computer/teleporter/Initialize()
id = "[rand(1000, 9999)]"
. = ..()
@@ -7,16 +7,10 @@
var/max_cable = 1000
required_type = list(/obj/mecha/working)
<<<<<<< HEAD
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/New()
cable = new(src, 0)
..()
=======
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/Initialize()
cable = new(src)
cable.amount = 0
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/MoveAction()
layCable()
-9
View File
@@ -16,7 +16,6 @@
var/manufacturer = null
var/species_types = list("Human")
var/species = "Human"
<<<<<<< HEAD
loading_icon_state = "prosfab_loading"
@@ -70,14 +69,6 @@
/obj/machinery/mecha_part_fabricator/pros/Initialize()
. = ..()
=======
var/sync_message = ""
/obj/machinery/pros_fabricator/Initialize()
. = ..()
default_apply_parts()
files = new /datum/research(src) //Setup the research data holder.
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
manufacturer = basic_robolimb.company
/obj/machinery/mecha_part_fabricator/pros/dispense_built_part(datum/design/D)
@@ -14,8 +14,6 @@
icon = 'icons/mob/alien.dmi'
/*
<<<<<<< HEAD
=======
* Resin
*/
/obj/effect/alien/resin
@@ -149,7 +147,6 @@
/*
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
* Weeds
*/
#define NODERANGE 3
@@ -427,9 +424,6 @@
visible_message("<span class='alium'>[src.target] begins to crumble under the acid!</span>")
spawn(rand(150, 200)) tick()
<<<<<<< HEAD
//Xenomorph Effect egg removed, replaced with Structure Egg.
=======
/*
* Egg
*/
@@ -556,4 +550,3 @@
if(exposed_temperature > 500 + T0C)
health -= 5
healthcheck()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
+2 -22
View File
@@ -21,26 +21,16 @@
delete_me = 1
if("JoinLate") // Bit difference, since we need the spawn point to move.
latejoin += src
<<<<<<< HEAD
simulated = TRUE
// delete_me = 1
return
=======
simulated = 1
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
if("JoinLateGateway")
latejoin_gateway += loc
delete_me = 1
if("JoinLateElevator")
latejoin_elevator += loc
delete_me = 1
<<<<<<< HEAD
return
=======
if("JoinLateCheckpoint")
latejoin_checkpoint += loc
delete_me = 1
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
if("JoinLateCryo")
latejoin_cryo += loc
delete_me = 1
@@ -157,27 +147,17 @@
new /obj/item/clothing/head/helmet/gladiator(src.loc)
return INITIALIZE_HINT_QDEL
<<<<<<< HEAD
/obj/effect/landmark/costume/madscientist/New()
new /obj/item/clothing/under/suit_jacket/green(src.loc)
=======
/obj/effect/landmark/costume/madscientist/Initialize()
..()
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
new /obj/item/clothing/under/suit_jacket/green(src.loc)
new /obj/item/clothing/head/flatcap(src.loc)
new /obj/item/clothing/suit/storage/toggle/labcoat/mad(src.loc)
new /obj/item/clothing/glasses/gglasses(src.loc)
return INITIALIZE_HINT_QDEL
<<<<<<< HEAD
/obj/effect/landmark/costume/elpresidente/New()
new /obj/item/clothing/under/suit_jacket/green(src.loc)
=======
/obj/effect/landmark/costume/elpresidente/Initialize()
..()
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
new /obj/item/clothing/under/suit_jacket/green(src.loc)
new /obj/item/clothing/head/flatcap(src.loc)
new /obj/item/clothing/mask/smokable/cigarette/cigar/havana(src.loc)
new /obj/item/clothing/shoes/boots/jackboots(src.loc)
-4
View File
@@ -159,7 +159,6 @@
/obj/effect/spider/spiderling/frost
grow_as = list(/mob/living/simple_mob/animal/giant_spider/frost)
<<<<<<< HEAD
/obj/effect/spider/spiderling/varied
grow_as = list(/mob/living/simple_mob/animal/giant_spider, /mob/living/simple_mob/animal/giant_spider/nurse, /mob/living/simple_mob/animal/giant_spider/hunter,
/mob/living/simple_mob/animal/giant_spider/frost, /mob/living/simple_mob/animal/giant_spider/electric, /mob/living/simple_mob/animal/giant_spider/lurker,
@@ -167,10 +166,7 @@
/mob/living/simple_mob/animal/giant_spider/webslinger, /mob/living/simple_mob/animal/giant_spider/phorogenic, /mob/living/simple_mob/animal/giant_spider/carrier,
/mob/living/simple_mob/animal/giant_spider/ion)
/obj/effect/spider/spiderling/New(var/location, var/atom/parent)
=======
/obj/effect/spider/spiderling/Initialize(var/ml, var/atom/parent)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
pixel_x = rand(6,-6)
pixel_y = rand(6,-6)
START_PROCESSING(SSobj, src)
@@ -504,15 +504,9 @@
on = 1 //Bio-luminesence has one setting, on.
power_use = 0
<<<<<<< HEAD
/obj/item/device/flashlight/slime/New()
..()
set_light(light_range, light_power, light_color)
=======
/obj/item/device/flashlight/slime/Initialize()
. = ..()
set_light(brightness_on, flashlight_power, flashlight_colour)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
set_light(light_range, light_power, light_color)
/obj/item/device/flashlight/slime/update_brightness()
return
+1 -7
View File
@@ -22,15 +22,9 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
if(istype(rig))
rig.forced_move(direction, user)
<<<<<<< HEAD
/obj/item/device/paicard/New()
..()
add_overlay("pai-off")
=======
/obj/item/device/paicard/Initialize()
. = ..()
overlays += "pai-off"
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
add_overlay("pai-off")
/obj/item/device/paicard/Destroy()
//Will stop people throwing friend pAIs into the singularity so they can respawn
@@ -1,7 +1,6 @@
// Access check is of the type requires one. These have been carefully selected to avoid allowing the janitor to see channels he shouldn't
//VOREStation Edit Start - Updating this for Virgo
var/global/list/default_internal_channels = list(
<<<<<<< HEAD
num2text(PUB_FREQ) = list(),
num2text(AI_FREQ) = list(access_synth),
num2text(ENT_FREQ) = list(),
@@ -22,27 +21,6 @@ var/global/list/default_medbay_channels = list(
num2text(PUB_FREQ) = list(),
num2text(MED_FREQ) = list(),
num2text(MED_I_FREQ) = list()
=======
num2text(PUB_FREQ) = list(),
num2text(AI_FREQ) = list(access_synth),
num2text(ENT_FREQ) = list(),
num2text(ERT_FREQ) = list(access_cent_specops),
num2text(COMM_FREQ) = list(access_heads),
num2text(ENG_FREQ) = list(access_engine_equip, access_atmospherics),
num2text(MED_FREQ) = list(access_medical_equip),
num2text(MED_I_FREQ) = list(access_medical_equip),
num2text(SEC_FREQ) = list(access_security),
num2text(SEC_I_FREQ) = list(access_security),
num2text(SCI_FREQ) = list(access_tox,access_robotics,access_xenobiology),
num2text(SUP_FREQ) = list(access_cargo),
num2text(SRV_FREQ) = list(access_janitor, access_hydroponics)
)
var/global/list/default_medbay_channels = list(
num2text(PUB_FREQ) = list(),
num2text(MED_FREQ) = list(access_medical_equip),
num2text(MED_I_FREQ) = list(access_medical_equip)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
)
//VOREStation Edit End
@@ -26,8 +26,7 @@
tool_qualities = list(TOOL_WIRECUTTER)
var/random_color = TRUE
<<<<<<< HEAD
/obj/item/weapon/tool/wirecutters/New()
/obj/item/weapon/tool/wirecutters/Initialize()
if(random_color)
switch(pick("red","blue","yellow"))
if ("red")
@@ -42,14 +41,7 @@
if (prob(75))
src.pixel_y = rand(0, 16)
..()
=======
/obj/item/weapon/tool/wirecutters/Initialize()
if(random_color && prob(50))
icon_state = "cutters-y"
item_state = "cutters_yellow"
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/item/weapon/tool/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob)
if(istype(C) && user.a_intent == I_HELP && (C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/handcuffs/cable)))
@@ -8,11 +8,7 @@
/obj/structure/bed/chair/e_chair/Initialize()
. = ..()
<<<<<<< HEAD
add_overlay(image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir))
=======
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
return
/obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -9,21 +9,13 @@
var/obj/item/weapon/extinguisher/has_extinguisher
var/opened = 0
<<<<<<< HEAD
/obj/structure/extinguisher_cabinet/Initialize(var/mapload, var/dir, var/building = 0)
. = ..()
if(building)
pixel_x = (dir & 3)? 0 : (dir == 4 ? -27 : 27)
pixel_y = (dir & 3)? (dir ==1 ? -27 : 27) : 0
=======
/obj/structure/extinguisher_cabinet/Initialize(var/ml, var/dir, var/building = 0)
. = ..()
if(building)
pixel_x = (dir & 3)? 0 : (dir == 4 ? -27 : 27)
pixel_y = (dir & 3)? (dir ==1 ? -27 : 27) : 0
update_icon()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
else
has_extinguisher = new/obj/item/weapon/extinguisher(src)
+1 -4
View File
@@ -11,12 +11,9 @@
var/glass = 1
var/datum/tgui_module/appearance_changer/mirror/M
<<<<<<< HEAD
/obj/structure/mirror/Initialize(mapload, var/dir, var/building = 0, mob/user as mob)
=======
/obj/structure/mirror/Initialize(var/ml, var/dir, var/building = 0, mob/user as mob)
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
M = new(src, null)
if(building)
glass = 0
+13 -48
View File
@@ -22,12 +22,15 @@
hardness -= material.combustion_effect(get_turf(src),temperature, 0.3)
CheckHardness()
<<<<<<< HEAD
/obj/structure/simple_door/Initialize(mapload, var/material_name)
. = ..()
set_material(material_name)
if(material_name && !material)
material = material_name
else if(!material)
material = DEFAULT_WALL_MATERIAL
if(!material)
return INITIALIZE_HINT_QDEL
material = get_material_by_name(material)
/obj/structure/simple_door/Destroy()
STOP_PROCESSING(SSobj, src)
@@ -40,17 +43,6 @@
material = get_material_by_name(material_name)
if(!material)
return
=======
/obj/structure/simple_door/Initialize(var/ml, var/material_name)
. = ..()
if(material_name && !material)
material = material_name
else if(!material)
material = DEFAULT_WALL_MATERIAL
if(!material)
return INITIALIZE_HINT_QDEL
material = get_material_by_name(material)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
hardness = max(1,round(material.integrity/10))
icon_state = material.door_icon_base
name = "[material.display_name] door"
@@ -229,44 +221,15 @@
return
SSradiation.radiate(src, round(material.radioactivity/3))
<<<<<<< HEAD
/obj/structure/simple_door/iron/Initialize(mapload,var/material_name)
..(mapload, material_name || "iron")
/obj/structure/simple_door/silver/Initialize(mapload,var/material_name)
..(mapload, material_name || "silver")
/obj/structure/simple_door/gold/Initialize(mapload,var/material_name)
..(mapload, material_name || "gold")
/obj/structure/simple_door/uranium/Initialize(mapload,var/material_name)
..(mapload, material_name || "uranium")
/obj/structure/simple_door/sandstone/Initialize(mapload,var/material_name)
..(mapload, material_name || "sandstone")
/obj/structure/simple_door/phoron/Initialize(mapload,var/material_name)
..(mapload, material_name || "phoron")
/obj/structure/simple_door/diamond/Initialize(mapload,var/material_name)
..(mapload, material_name || "diamond")
/obj/structure/simple_door/wood/Initialize(mapload,var/material_name)
..(mapload, material_name || MAT_WOOD)
/obj/structure/simple_door/wood/Initialize(mapload)
knock_sound = 'sound/machines/door/knock_wood.wav'
/obj/structure/simple_door/hardwood/Initialize(mapload,var/material_name)
..(mapload, material_name || MAT_HARDWOOD)
/obj/structure/simple_door/hardwood/Initialize(mapload)
knock_sound = 'sound/machines/door/knock_wood.wav'
/obj/structure/simple_door/sifwood/Initialize(mapload,var/material_name)
..(mapload, material_name || MAT_SIFWOOD)
/obj/structure/simple_door/sifwood/Initialize(mapload)
knock_sound = 'sound/machines/door/knock_wood.wav'
/obj/structure/simple_door/resin/Initialize(mapload,var/material_name)
..(mapload, material_name || "resin")
/obj/structure/simple_door/cult/Initialize(mapload,var/material_name)
..(mapload, material_name || "cult")
=======
/obj/structure/simple_door/iron
material = MAT_IRON
@@ -291,6 +254,9 @@
/obj/structure/simple_door/wood
material = MAT_WOOD
/obj/structure/simple_door/hardwood
material = MAT_HARDWOOD
/obj/structure/simple_door/sifwood
material = MAT_SIFWOOD
@@ -299,7 +265,6 @@
/obj/structure/simple_door/cult
material = "cult"
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/structure/simple_door/cult/TryToSwitchState(atom/user)
if(isliving(user))
@@ -22,14 +22,8 @@
var/base_icon = "bed"
var/applies_material_colour = 1
<<<<<<< HEAD
/obj/structure/bed/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc)
color = null
=======
/obj/structure/bed/Initialize(var/ml, var/new_material, var/new_padding_material)
. = ..(ml)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
if(!new_material)
new_material = MAT_STEEL
material = get_material_by_name(new_material)
@@ -210,13 +210,8 @@
return
..()
<<<<<<< HEAD
/obj/structure/bed/chair/wood/New(var/newloc)
..(newloc, "wood")
=======
/obj/structure/bed/chair/wood/Initialize(var/ml, var/newmaterial)
. = ..(ml, MAT_WOOD)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/structure/bed/chair/wood/wings
icon_state = "wooden_chair_wings"
@@ -149,8 +149,6 @@ var/global/list/stool_cache = list() //haha stool
remove_padding()
else
..()
<<<<<<< HEAD
=======
/obj/item/weapon/stool/barstool
name = "bar stool"
@@ -169,5 +167,4 @@ var/global/list/stool_cache = list() //haha stool
icon_state = "bar_stool_padded_preview" //set for the map
/obj/item/weapon/stool/barstool/padded/Initialize(var/ml, var/new_material)
. = ..(ml, MAT_STEEL, "carpet")
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
. = ..(ml, MAT_STEEL, "carpet")
+23 -722
View File
@@ -1,4 +1,3 @@
<<<<<<< HEAD
/obj/structure/window
name = "window"
desc = "A window."
@@ -387,25 +386,28 @@
update_nearby_tiles(need_rebuild=1)
return
/obj/structure/window/New(Loc, start_dir=null, constructed=0)
..()
if (start_dir)
set_dir(start_dir)
//player-constructed windows
if (constructed)
anchored = FALSE
state = 0
update_verbs()
health = maxhealth
ini_dir = dir
update_nearby_tiles(need_rebuild=1)
update_nearby_icons()
/obj/structure/window/Initialize(var/ml, start_dir=null, constructed=0)
. = ..()
if (start_dir)
set_dir(start_dir)
//player-constructed windows
if (constructed)
anchored = 0
state = 0
update_verbs()
health = maxhealth
ini_dir = dir
update_nearby_tiles(need_rebuild=1)
update_nearby_icons()
for(var/obj/structure/table/T in view(src, 1))
T.update_connections()
T.update_icon()
/obj/structure/window/Destroy()
density = FALSE
@@ -695,705 +697,4 @@
to_chat(user, span("notice", "You deconstruct \the [src]."))
qdel(src)
return TRUE
return FALSE
=======
/obj/structure/window
name = "window"
desc = "A window."
icon = 'icons/obj/structures.dmi'
density = 1
can_atmos_pass = ATMOS_PASS_PROC
w_class = ITEMSIZE_NORMAL
layer = WINDOW_LAYER
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1.0
flags = ON_BORDER
var/maxhealth = 14.0
var/maximal_heat = T0C + 100 // Maximal heat before this window begins taking damage from fire
var/damage_per_fire_tick = 2.0 // Amount of damage per fire tick. Regular windows are not fireproof so they might as well break quickly.
var/health
var/force_threshold = 0
var/ini_dir = null
var/state = 2
var/reinf = 0
var/basestate
var/shardtype = /obj/item/weapon/material/shard
var/glasstype = null // Set this in subtypes. Null is assumed strange or otherwise impossible to dismantle, such as for shuttle glass.
var/silicate = 0 // number of units of silicate
var/fulltile = FALSE // Set to true on full-tile variants.
/obj/structure/window/examine(mob/user)
. = ..()
if(health == maxhealth)
. += "<span class='notice'>It looks fully intact.</span>"
else
var/perc = health / maxhealth
if(perc > 0.75)
. += "<span class='notice'>It has a few cracks.</span>"
else if(perc > 0.5)
. += "<span class='warning'>It looks slightly damaged.</span>"
else if(perc > 0.25)
. += "<span class='warning'>It looks moderately damaged.</span>"
else
. += "<span class='danger'>It looks heavily damaged.</span>"
if(silicate)
if (silicate < 30)
. += "<span class='notice'>It has a thin layer of silicate.</span>"
else if (silicate < 70)
. += "<span class='notice'>It is covered in silicate.</span>"
else
. += "<span class='notice'>There is a thick layer of silicate covering it.</span>"
/obj/structure/window/examine_icon()
return icon(icon=initial(icon),icon_state=initial(icon_state))
/obj/structure/window/take_damage(var/damage = 0, var/sound_effect = 1)
var/initialhealth = health
if(silicate)
damage = damage * (1 - silicate / 200)
health = max(0, health - damage)
if(health <= 0)
shatter()
else
if(sound_effect)
playsound(src, 'sound/effects/Glasshit.ogg', 100, 1)
if(health < maxhealth / 4 && initialhealth >= maxhealth / 4)
visible_message("[src] looks like it's about to shatter!" )
update_icon()
else if(health < maxhealth / 2 && initialhealth >= maxhealth / 2)
visible_message("[src] looks seriously damaged!" )
update_icon()
else if(health < maxhealth * 3/4 && initialhealth >= maxhealth * 3/4)
visible_message("Cracks begin to appear in [src]!" )
update_icon()
return
/obj/structure/window/proc/apply_silicate(var/amount)
if(health < maxhealth) // Mend the damage
health = min(health + amount * 3, maxhealth)
if(health == maxhealth)
visible_message("[src] looks fully repaired." )
else // Reinforce
silicate = min(silicate + amount, 100)
updateSilicate()
/obj/structure/window/proc/updateSilicate()
if (overlays)
overlays.Cut()
update_icon()
var/image/img = image(src)
img.color = "#ffffff"
img.alpha = silicate * 255 / 100
overlays += img
/obj/structure/window/proc/shatter(var/display_message = 1)
playsound(src, "shatter", 70, 1)
if(display_message)
visible_message("[src] shatters!")
new shardtype(loc)
if(reinf)
new /obj/item/stack/rods(loc)
if(is_fulltile())
new shardtype(loc) //todo pooling?
if(reinf)
new /obj/item/stack/rods(loc)
qdel(src)
return
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
var/proj_damage = Proj.get_structure_damage()
if(!proj_damage) return
..()
take_damage(proj_damage)
return
/obj/structure/window/ex_act(severity)
switch(severity)
if(1.0)
qdel(src)
return
if(2.0)
shatter(0)
return
if(3.0)
if(prob(50))
shatter(0)
return
/obj/structure/window/blob_act()
take_damage(50)
/obj/structure/window/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS))
return TRUE
if(is_fulltile())
return FALSE //full tile window, you can't move into it!
if((get_dir(loc, target) & dir) || (get_dir(mover, target) == turn(dir, 180)))
return !density
else
return TRUE
/obj/structure/window/CanZASPass(turf/T, is_zone)
if(is_fulltile() || get_dir(T, loc) == turn(dir, 180)) // Make sure we're handling the border correctly.
return !anchored // If it's anchored, it'll block air.
return TRUE // Don't stop airflow from the other sides.
/obj/structure/window/CheckExit(atom/movable/O as mob|obj, target as turf)
if(istype(O) && O.checkpass(PASSGLASS))
return 1
if(get_dir(O.loc, target) == dir)
return 0
return 1
/obj/structure/window/hitby(AM as mob|obj)
..()
visible_message("<span class='danger'>[src] was hit by [AM].</span>")
var/tforce = 0
if(ismob(AM))
tforce = 40
else if(isobj(AM))
var/obj/item/I = AM
tforce = I.throwforce
if(reinf) tforce *= 0.25
if(health - tforce <= 7 && !reinf)
anchored = 0
update_verbs()
update_nearby_icons()
step(src, get_dir(AM, src))
take_damage(tforce)
/obj/structure/window/attack_tk(mob/user as mob)
user.visible_message("<span class='notice'>Something knocks on [src].</span>")
playsound(src, 'sound/effects/Glasshit.ogg', 50, 1)
/obj/structure/window/attack_hand(mob/user as mob)
user.setClickCooldown(user.get_attack_speed())
if(HULK in user.mutations)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
user.do_attack_animation(src)
shatter()
else if (usr.a_intent == I_HURT)
if (istype(usr,/mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(H.species.can_shred(H))
attack_generic(H,25)
return
playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
user.do_attack_animation(src)
usr.visible_message("<span class='danger'>\The [usr] bangs against \the [src]!</span>",
"<span class='danger'>You bang against \the [src]!</span>",
"You hear a banging sound.")
else
playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
usr.visible_message("[usr.name] knocks on the [src.name].",
"You knock on the [src.name].",
"You hear a knocking sound.")
return
/obj/structure/window/attack_generic(var/mob/user, var/damage)
user.setClickCooldown(user.get_attack_speed())
if(!damage)
return
if(damage >= STRUCTURE_MIN_DAMAGE_THRESHOLD)
visible_message("<span class='danger'>[user] smashes into [src]!</span>")
if(reinf)
damage = damage / 2
take_damage(damage)
else
visible_message("<span class='notice'>\The [user] bonks \the [src] harmlessly.</span>")
user.do_attack_animation(src)
return 1
/obj/structure/window/attackby(obj/item/W as obj, mob/user as mob)
if(!istype(W)) return//I really wish I did not need this
// Fixing.
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP)
var/obj/item/weapon/weldingtool/WT = W
if(health < maxhealth)
if(WT.remove_fuel(1 ,user))
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
playsound(src, WT.usesound, 50, 1)
if(do_after(user, 40 * WT.toolspeed, target = src))
health = maxhealth
// playsound(src, 'sound/items/Welder.ogg', 50, 1)
update_icon()
to_chat(user, "<span class='notice'>You repair [src].</span>")
else
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
return
// Slamming.
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(istype(G.affecting,/mob/living))
var/mob/living/M = G.affecting
var/state = G.state
qdel(W) //gotta delete it here because if window breaks, it won't get deleted
switch (state)
if(1)
M.visible_message("<span class='warning'>[user] slams [M] against \the [src]!</span>")
M.apply_damage(7)
hit(10)
if(2)
M.visible_message("<span class='danger'>[user] bashes [M] against \the [src]!</span>")
if (prob(50))
M.Weaken(1)
M.apply_damage(10)
hit(25)
if(3)
M.visible_message("<span class='danger'><big>[user] crushes [M] against \the [src]!</big></span>")
M.Weaken(5)
M.apply_damage(20)
hit(50)
return
if(W.flags & NOBLUDGEON) return
if(W.is_screwdriver())
if(reinf && state >= 1)
state = 3 - state
update_nearby_icons()
playsound(src, W.usesound, 75, 1)
to_chat(user, "<span class='notice'>You have [state == 1 ? "un" : ""]fastened the window [state ? "from" : "to"] the frame.</span>")
else if(reinf && state == 0)
anchored = !anchored
update_nearby_icons()
update_verbs()
playsound(src, W.usesound, 75, 1)
to_chat(user, "<span class='notice'>You have [anchored ? "" : "un"]fastened the frame [anchored ? "to" : "from"] the floor.</span>")
else if(!reinf)
anchored = !anchored
update_nearby_icons()
update_verbs()
playsound(src, W.usesound, 75, 1)
to_chat(user, "<span class='notice'>You have [anchored ? "" : "un"]fastened the window [anchored ? "to" : "from"] the floor.</span>")
else if(W.is_crowbar() && reinf && state <= 1)
state = 1 - state
playsound(src, W.usesound, 75, 1)
to_chat(user, "<span class='notice'>You have pried the window [state ? "into" : "out of"] the frame.</span>")
else if(W.is_wrench() && !anchored && (!state || !reinf))
if(!glasstype)
to_chat(user, "<span class='notice'>You're not sure how to dismantle \the [src] properly.</span>")
else
playsound(src, W.usesound, 75, 1)
visible_message("<span class='notice'>[user] dismantles \the [src].</span>")
var/obj/item/stack/material/mats = new glasstype(loc)
if(is_fulltile())
mats.amount = 4
qdel(src)
else if(istype(W, /obj/item/stack/cable_coil) && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized))
var/obj/item/stack/cable_coil/C = W
if (C.use(1))
playsound(src, 'sound/effects/sparks1.ogg', 75, 1)
user.visible_message( \
"<span class='notice'>\The [user] begins to wire \the [src] for electrochromic tinting.</span>", \
"<span class='notice'>You begin to wire \the [src] for electrochromic tinting.</span>", \
"You hear sparks.")
if(do_after(user, 20 * C.toolspeed, src) && state == 0)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
var/obj/structure/window/reinforced/polarized/P = new(loc, dir)
if(is_fulltile())
P.fulltile = TRUE
P.icon_state = "fwindow"
P.maxhealth = maxhealth
P.health = health
P.state = state
P.anchored = anchored
qdel(src)
else if(istype(W,/obj/item/frame) && anchored)
var/obj/item/frame/F = W
F.try_build(src, user)
else
user.setClickCooldown(user.get_attack_speed(W))
if(W.damtype == BRUTE || W.damtype == BURN)
user.do_attack_animation(src)
hit(W.force)
if(health <= 7)
anchored = 0
update_nearby_icons()
step(src, get_dir(user, src))
else
playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
..()
return
/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)
if(damage < force_threshold || force_threshold < 0)
return
if(reinf) damage *= 0.5
take_damage(damage)
return
/obj/structure/window/verb/rotate_counterclockwise()
set name = "Rotate Window Counterclockwise"
set category = "Object"
set src in oview(1)
if(usr.incapacitated())
return 0
if(is_fulltile())
return 0
if(anchored)
to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before
src.set_dir(turn(src.dir, 90))
updateSilicate()
update_nearby_tiles(need_rebuild=1)
return
/obj/structure/window/verb/rotate_clockwise()
set name = "Rotate Window Clockwise"
set category = "Object"
set src in oview(1)
if(usr.incapacitated())
return 0
if(is_fulltile())
return 0
if(anchored)
to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before
src.set_dir(turn(src.dir, 270))
updateSilicate()
update_nearby_tiles(need_rebuild=1)
return
/obj/structure/window/Initialize(var/ml, start_dir=null, constructed=0)
. = ..()
if (start_dir)
set_dir(start_dir)
//player-constructed windows
if (constructed)
anchored = 0
state = 0
update_verbs()
health = maxhealth
ini_dir = dir
update_nearby_tiles(need_rebuild=1)
update_nearby_icons()
for(var/obj/structure/table/T in view(src, 1))
T.update_connections()
T.update_icon()
/obj/structure/window/Destroy()
density = 0
update_nearby_tiles()
var/turf/location = loc
. = ..()
for(var/obj/structure/window/W in orange(location, 1))
W.update_icon()
for(var/obj/structure/table/T in view(location, 1))
T.update_connections()
T.update_icon()
/obj/structure/window/Move()
var/ini_dir = dir
update_nearby_tiles(need_rebuild=1)
var/oldloc = loc
. = ..()
set_dir(ini_dir)
update_nearby_tiles(need_rebuild=1)
if(loc != oldloc)
for(var/obj/structure/table/T in view(oldloc, 1) | view(loc, 1))
T.update_connections()
T.update_icon()
//checks if this window is full-tile one
/obj/structure/window/proc/is_fulltile()
return fulltile
/obj/structure/window/is_between_turfs(var/turf/origin, var/turf/target)
if(fulltile)
return TRUE
return ..()
//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
/obj/structure/window/proc/update_nearby_icons()
update_icon()
for(var/obj/structure/window/W in orange(src, 1))
W.update_icon()
//Updates the availabiliy of the rotation verbs
/obj/structure/window/proc/update_verbs()
if(anchored || is_fulltile())
verbs -= /obj/structure/window/verb/rotate_counterclockwise
verbs -= /obj/structure/window/verb/rotate_clockwise
else if(!is_fulltile())
verbs += /obj/structure/window/verb/rotate_counterclockwise
verbs += /obj/structure/window/verb/rotate_clockwise
//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm)
/obj/structure/window/update_icon()
//A little cludge here, since I don't know how it will work with slim windows. Most likely VERY wrong.
//this way it will only update full-tile ones
overlays.Cut()
if(!is_fulltile())
// Rotate the sprite somewhat so non-fulltiled windows can be seen as needing repair.
var/full_tilt_degrees = 15
var/tilt_to_apply = abs((health / maxhealth) - 1)
if(tilt_to_apply && prob(50))
tilt_to_apply = -tilt_to_apply
adjust_rotation(LERP(0, full_tilt_degrees, tilt_to_apply))
icon_state = "[basestate]"
return
var/list/dirs = list()
if(anchored)
for(var/obj/structure/window/W in orange(src,1))
if(W.anchored && W.density && W.glasstype == src.glasstype && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
dirs += get_dir(src, W)
var/list/connections = dirs_to_corner_states(dirs)
icon_state = ""
for(var/i = 1 to 4)
var/image/I = image(icon, "[basestate][connections[i]]", dir = 1<<(i-1))
overlays += I
// Damage overlays.
var/ratio = health / maxhealth
ratio = CEILING(ratio * 4, 1) * 25
if(ratio > 75)
return
var/image/I = image(icon, "damage[ratio]", layer = layer + 0.1)
overlays += I
return
/obj/structure/window/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > maximal_heat)
hit(damage_per_fire_tick, 0)
..()
/obj/structure/window/basic
desc = "It looks thin and flimsy. A few knocks with... almost anything, really should shatter it."
icon_state = "window"
basestate = "window"
glasstype = /obj/item/stack/material/glass
maximal_heat = T0C + 100
damage_per_fire_tick = 2.0
maxhealth = 12.0
force_threshold = 3
/obj/structure/window/basic/full
icon_state = "window-full"
maxhealth = 24
fulltile = TRUE
/obj/structure/window/phoronbasic
name = "phoron window"
desc = "A borosilicate alloy window. It seems to be quite strong."
basestate = "phoronwindow"
icon_state = "phoronwindow"
shardtype = /obj/item/weapon/material/shard/phoron
glasstype = /obj/item/stack/material/glass/phoronglass
maximal_heat = T0C + 2000
damage_per_fire_tick = 1.0
maxhealth = 40.0
force_threshold = 5
/obj/structure/window/phoronbasic/full
icon_state = "phoronwindow-full"
maxhealth = 80
fulltile = TRUE
/obj/structure/window/phoronreinforced
name = "reinforced borosilicate window"
desc = "A borosilicate alloy window, with rods supporting it. It seems to be very strong."
basestate = "phoronrwindow"
icon_state = "phoronrwindow"
shardtype = /obj/item/weapon/material/shard/phoron
glasstype = /obj/item/stack/material/glass/phoronrglass
reinf = 1
maximal_heat = T0C + 4000
damage_per_fire_tick = 1.0 // This should last for 80 fire ticks if the window is not damaged at all. The idea is that borosilicate windows have something like ablative layer that protects them for a while.
maxhealth = 80.0
force_threshold = 10
/obj/structure/window/phoronreinforced/full
icon_state = "phoronrwindow-full"
maxhealth = 160
fulltile = TRUE
/obj/structure/window/reinforced
name = "reinforced window"
desc = "It looks rather strong. Might take a few good hits to shatter it."
icon_state = "rwindow"
basestate = "rwindow"
maxhealth = 40.0
reinf = 1
maximal_heat = T0C + 750
damage_per_fire_tick = 2.0
glasstype = /obj/item/stack/material/glass/reinforced
force_threshold = 6
/obj/structure/window/reinforced/full
icon_state = "rwindow-full"
maxhealth = 80
fulltile = TRUE
/obj/structure/window/reinforced/tinted
name = "tinted window"
desc = "It looks rather strong and opaque. Might take a few good hits to shatter it."
icon_state = "twindow"
basestate = "twindow"
opacity = 1
/obj/structure/window/reinforced/tinted/frosted
name = "frosted window"
desc = "It looks rather strong and frosted over. Looks like it might take a few less hits then a normal reinforced window."
icon_state = "fwindow"
basestate = "fwindow"
maxhealth = 30
force_threshold = 5
/obj/structure/window/shuttle
name = "shuttle window"
desc = "It looks rather strong. Might take a few good hits to shatter it."
icon = 'icons/obj/podwindows.dmi'
icon_state = "window"
basestate = "window"
maxhealth = 40
reinf = 1
basestate = "w"
dir = 5
force_threshold = 7
/obj/structure/window/reinforced/polarized
name = "electrochromic window"
desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
var/id
/obj/structure/window/reinforced/polarized/full
icon_state = "rwindow-full"
maxhealth = 80
fulltile = TRUE
/obj/structure/window/reinforced/polarized/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/multitool) && !anchored) // Only allow programming if unanchored!
var/obj/item/device/multitool/MT = W
// First check if they have a windowtint button buffered
if(istype(MT.connectable, /obj/machinery/button/windowtint))
var/obj/machinery/button/windowtint/buffered_button = MT.connectable
src.id = buffered_button.id
to_chat(user, "<span class='notice'>\The [src] is linked to \the [buffered_button].</span>")
return TRUE
// Otherwise fall back to asking them
var/t = sanitizeSafe(input(user, "Enter the ID for the window.", src.name, null), MAX_NAME_LEN)
if (!t && user.get_active_hand() != W && in_range(src, user))
src.id = t
to_chat(user, "<span class='notice'>The new ID of \the [src] is [id]</span>")
return TRUE
. = ..()
/obj/structure/window/reinforced/polarized/proc/toggle()
if(opacity)
animate(src, color="#FFFFFF", time=5)
set_opacity(0)
else
animate(src, color="#222222", time=5)
set_opacity(1)
/obj/machinery/button/windowtint
name = "window tint control"
icon = 'icons/obj/power.dmi'
icon_state = "light0"
desc = "A remote control switch for polarized windows."
var/range = 7
/obj/machinery/button/windowtint/attack_hand(mob/user as mob)
if(..())
return 1
toggle_tint()
/obj/machinery/button/windowtint/proc/toggle_tint()
use_power(5)
active = !active
update_icon()
for(var/obj/structure/window/reinforced/polarized/W in range(src,range))
if (W.id == src.id || !W.id)
spawn(0)
W.toggle()
return
/obj/machinery/button/windowtint/power_change()
..()
if(active && !powered(power_channel))
toggle_tint()
/obj/machinery/button/windowtint/update_icon()
icon_state = "light[active]"
/obj/machinery/button/windowtint/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/multitool))
var/obj/item/device/multitool/MT = W
if(!id)
// If no ID is set yet (newly built button?) let them select an ID for first-time use!
var/t = sanitizeSafe(input(user, "Enter an ID for \the [src].", src.name, null), MAX_NAME_LEN)
if (t && user.get_active_hand() != W && in_range(src, user))
src.id = t
to_chat(user, "<span class='notice'>The new ID of \the [src] is [id]</span>")
if(id)
// It already has an ID (or they just set one), buffer it for copying to windows.
to_chat(user, "<span class='notice'>You store \the [src] in \the [MT]'s buffer!</span>")
MT.connectable = src
MT.update_icon()
return TRUE
. = ..()
/obj/structure/window/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode)
switch(passed_mode)
if(RCD_DECONSTRUCT)
return list(
RCD_VALUE_MODE = RCD_DECONSTRUCT,
RCD_VALUE_DELAY = 5 SECONDS,
RCD_VALUE_COST = RCD_SHEETS_PER_MATTER_UNIT * 5
)
/obj/structure/window/rcd_act(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode)
switch(passed_mode)
if(RCD_DECONSTRUCT)
to_chat(user, span("notice", "You deconstruct \the [src]."))
qdel(src)
return TRUE
return FALSE
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
return FALSE
+4 -13
View File
@@ -94,30 +94,23 @@
img.alpha = (i * alpha_inc) - 1
damage_overlays[i] = img
/turf/simulated/wall/proc/update_connections(propagate = 0)
if(!istype(material))
return
var/list/dirs = list()
<<<<<<< HEAD
var/inrange = orange(src, 1)
for(var/turf/simulated/wall/W in inrange)
if(!W.material)
=======
for(var/turf/simulated/wall/W in orange(src, 1))
if(!istype(W.material))
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
continue
if(propagate)
W.update_connections()
W.update_icon()
if(can_join_with_wall(W))
dirs += get_dir(src, W)
for(var/obj/structure/low_wall/WF in inrange)
for(var/obj/structure/low_wall/WF in orange(src, 1))
if(can_join_with_low_wall(WF))
dirs += get_dir(src, WF)
special_wall_connections(dirs, inrange)
special_wall_connections(dirs, orange(src, 1))
wall_connections = dirs_to_corner_states(dirs)
/turf/simulated/wall/proc/special_wall_connections(list/dirs, list/inrange)
@@ -133,7 +126,6 @@
if ((additional_dirs & diag_dir) == diag_dir)
dirs += diag_dir
<<<<<<< HEAD
/turf/simulated/wall/proc/can_join_with_wall(var/turf/simulated/wall/W)
//No blending if no material
if(!material || !W.material)
@@ -143,12 +135,11 @@
return 1
//Also blend if they have the same iconbase
if(material.icon_base == W.material.icon_base)
=======
wall_connections = dirs_to_corner_states(dirs)
return 1
return 0
/turf/simulated/wall/proc/can_join_with(var/turf/simulated/wall/W)
if(istype(material) && istype(W.material) && material.icon_base == W.material.icon_base)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
return 1
return 0
+13 -53
View File
@@ -1,42 +1,5 @@
/turf/simulated/wall/r_wall
icon_state = "rgeneric"
<<<<<<< HEAD
/turf/simulated/wall/r_wall/Initialize(mapload)
. = ..(mapload, "plasteel","plasteel") //3strong
/turf/simulated/wall/shull
icon_state = "hull-steel"
/turf/simulated/wall/shull/Initialize(mapload) //Spaaaace ship.
. = ..(mapload, MAT_STEELHULL, null, MAT_STEELHULL)
/turf/simulated/wall/rshull
icon_state = "hull-r_steel"
/turf/simulated/wall/rshull/Initialize(mapload)
. = ..(mapload, MAT_STEELHULL, MAT_STEELHULL, MAT_STEELHULL)
/turf/simulated/wall/pshull
icon_state = "hull-plasteel"
/turf/simulated/wall/pshull/Initialize(mapload) //Spaaaace-er ship.
. = ..(mapload, MAT_PLASTEELHULL, null, MAT_PLASTEELHULL)
/turf/simulated/wall/rpshull
icon_state = "hull-r_plasteel"
/turf/simulated/wall/rpshull/Initialize(mapload)
. = ..(mapload, MAT_PLASTEELHULL, MAT_PLASTEELHULL, MAT_PLASTEELHULL)
/turf/simulated/wall/dshull
icon_state = "hull-durasteel"
/turf/simulated/wall/dshull/Initialize(mapload) //Spaaaace-est ship.
. = ..(mapload, MAT_DURASTEELHULL, null, MAT_DURASTEELHULL)
/turf/simulated/wall/rdshull
icon_state = "hull-r_durasteel"
/turf/simulated/wall/rdshull/Initialize(mapload)
. = ..(mapload, MAT_DURASTEELHULL, MAT_DURASTEELHULL, MAT_DURASTEELHULL)
/turf/simulated/wall/thull
icon_state = "hull-titanium"
/turf/simulated/wall/thull/Initialize(mapload)
. = ..(mapload, MAT_TITANIUMHULL, null, MAT_TITANIUMHULL)
/turf/simulated/wall/rthull
icon_state = "hull-r_titanium"
/turf/simulated/wall/rthull/Initialize(mapload)
. = ..(mapload, MAT_TITANIUMHULL, MAT_TITANIUMHULL, MAT_TITANIUMHULL)
=======
material = MAT_PLASTEEL
reinf_material = MAT_PLASTEEL
@@ -75,7 +38,6 @@
material = MAT_TITANIUMHULL
reinf_material = MAT_TITANIUMHULL
girder_material = MAT_TITANIUMHULL
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/turf/simulated/wall/cult
name = "cult wall"
@@ -154,16 +116,11 @@
/turf/simulated/wall/wood
material = MAT_WOOD
<<<<<<< HEAD
/turf/simulated/wall/hardwood/Initialize(mapload)
. = ..(mapload, MAT_HARDWOOD)
/turf/simulated/wall/hardwood
material = MAT_HARDWOOD
/turf/simulated/wall/sifwood/Initialize(mapload)
. = ..(mapload, MAT_SIFWOOD)
=======
/turf/simulated/wall/sifwood
material = MAT_SIFWOOD
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/turf/simulated/wall/log
material = MAT_LOG
@@ -171,6 +128,9 @@
/turf/simulated/wall/log_sif
material = MAT_SIFLOG
/turf/simulated/wall/log_hard
material = MAT_HARDLOG
// Shuttle Walls
/turf/simulated/shuttle/wall
name = "autojoin wall"
@@ -342,10 +302,10 @@
/obj/structure/hull_corner
name = "hull corner"
plane = OBJ_PLANE - 1
icon = 'icons/turf/wall_masks.dmi'
icon_state = "hull_corner"
anchored = TRUE
density = TRUE
breakable = TRUE
@@ -363,19 +323,19 @@
/obj/structure/hull_corner/proc/update_look()
cut_overlays()
var/turf/simulated/wall/T
for(var/direction in get_dirs_to_test())
T = get_step(src, direction)
if(!istype(T) || T.material?.icon_base != "hull")
continue
name = T.name
desc = T.desc
var/datum/material/B = T.material
var/datum/material/R = T.reinf_material
if(B?.icon_colour)
color = B.icon_colour
if(R?.icon_colour)
@@ -383,7 +343,7 @@
I.color = R.icon_colour
add_overlay(I)
break
if(!T)
warning("Hull corner at [x],[y] not placed adjacent to a hull it can find.")
@@ -413,7 +373,7 @@
/turf/simulated/wall/eris/can_join_with_low_wall(var/obj/structure/low_wall/WF)
return istype(WF, /obj/structure/low_wall/eris)
/turf/simulated/wall/eris/special_wall_connections(list/dirs, list/inrange)
..()
for(var/direction in cardinal)
+1
View File
@@ -64,6 +64,7 @@ var/list/latejoin_gateway = list()
var/list/latejoin_elevator = list()
var/list/latejoin_cryo = list()
var/list/latejoin_cyborg = list()
var/list/latejoin_checkpoint = list()
var/list/prisonwarp = list() // Prisoners go to these
var/list/holdingfacility = list() // Captured people go here
+1 -5
View File
@@ -30,11 +30,7 @@
melee_damage_lower = 1
melee_damage_upper = 2
<<<<<<< HEAD
/mob/living/simple_mob/hostile/blob/spore/New(var/newloc, var/obj/structure/blob/factory/my_factory)
=======
/mob/living/simple_animal/hostile/blob/spore/Initialize(var/ml, var/obj/structure/blob/factory/my_factory)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/mob/living/simple_mob/hostile/blob/spore/Initialize(var/ml, var/obj/structure/blob/factory/my_factory)
if(istype(my_factory))
factory = my_factory
factory.spores += src
File diff suppressed because it is too large Load Diff
@@ -314,8 +314,6 @@
icon_state = "colorcloak"
item_state = "colorcloak"
<<<<<<< HEAD
=======
/obj/item/clothing/accessory/hawaii
name = "flower-pattern shirt"
desc = "You probably need some welder googles to look at this."
@@ -339,7 +337,6 @@
color = color_rotation(rand(-11,12)*15)
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/item/clothing/accessory/wcoat
name = "waistcoat"
desc = "For some classy, murderous fun."
+1 -8
View File
@@ -56,16 +56,9 @@
M.loc = src
M.gib()
<<<<<<< HEAD
/obj/machinery/gibber/New()
..()
add_overlay("grjam")
=======
/obj/machinery/gibber/Initialize()
. = ..()
src.overlays += image('icons/obj/kitchen.dmi', "grjam")
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
add_overlay("grjam")
/obj/machinery/gibber/update_icon()
cut_overlays()
+2 -14
View File
@@ -215,15 +215,9 @@
desc = "A frame for the beehive that the bees have filled with honeycombs."
honey = 20
<<<<<<< HEAD
/obj/item/honey_frame/filled/New()
..()
add_overlay("honeycomb")
=======
/obj/item/honey_frame/filled/Initialize()
. = ..()
overlays += "honeycomb"
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
add_overlay("honeycomb")
/obj/item/beehive_assembly
name = "beehive assembly"
@@ -273,15 +267,9 @@ var/global/list/datum/stack_recipe/wax_recipes = list( \
icon_state = "beepack"
var/full = 1
<<<<<<< HEAD
/obj/item/bee_pack/New()
..()
add_overlay("beepack-full")
=======
/obj/item/bee_pack/Initialize()
. = ..()
overlays += "beepack-full"
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
add_overlay("beepack-full")
/obj/item/bee_pack/proc/empty()
full = 0
+2 -4
View File
@@ -65,13 +65,11 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/proc/update_desc()
if(!seed)
return
<<<<<<< HEAD
=======
if(!plant_controller)
if(!SSplants)
testing("<span class='danger'>Plant controller does not exist and [src] requires it. Aborting.</span>")
qdel(src)
return
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
if(SSplants.product_descs["[seed.uid]"])
desc = SSplants.product_descs["[seed.uid]"]
@@ -91,13 +91,7 @@
else
parent = newparent
<<<<<<< HEAD
if(!SSplants)
sleep(250) // ugly hack, should mean roundstart plants are fine. TODO initialize perhaps?
if(!SSplants)
=======
if(!plant_controller)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
to_world("<span class='danger'>Plant controller does not exist and [src] requires it. Aborting.</span>")
return INITIALIZE_HINT_QDEL
+1 -3
View File
@@ -91,11 +91,9 @@
else
light = new/datum/light_source(src, .)
<<<<<<< HEAD
=======
/atom/Initialize()
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/**
* Updates the atom's opacity value.
-12
View File
@@ -5,7 +5,6 @@
///whether we are already in the SSlighting.objects_queue list
var/needs_update = FALSE
<<<<<<< HEAD
///the turf that our light is applied to
var/turf/affected_turf
@@ -20,17 +19,6 @@
. = ..()
current_underlay = mutable_appearance(LIGHTING_ICON, "transparent", source.z, PLANE_LIGHTING, 255, RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM)
=======
/atom/movable/lighting_overlay/Initialize(var/ml, var/no_update = FALSE)
. = ..(ml)
verbs.Cut()
total_lighting_overlays++
var/turf/T = loc //If this runtimes atleast we'll know what's creating overlays outside of turfs.
T.lighting_overlay = src
T.luminosity = 0
if(!no_update)
update_overlay()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
affected_turf = source
if (affected_turf.lighting_object)
-5
View File
@@ -363,15 +363,10 @@
var/brace_tier = 1
var/obj/machinery/mining/drill/connected
<<<<<<< HEAD
/obj/machinery/mining/brace/examine(mob/user)
. = ..()
if(brace_tier > 2)
. += SPAN_NOTICE("The internals of the brace look resilient enough to support a drill by itself.")
=======
/obj/machinery/mining/brace/Initialize()
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/machinery/mining/brace/Initialize()
. = ..()
@@ -134,16 +134,12 @@
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
real_name = name
animate(src, pixel_y = 2, time = 10, loop = -1)
<<<<<<< HEAD
observer_mob_list += src
..()
=======
. = ..()
exonet = new(src)
init_exonet()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/mob/observer/dead/Topic(href, href_list)
if (href_list["track"])
-6
View File
@@ -22,7 +22,6 @@ var/list/holder_mob_icon_cache = list()
)
pixel_y = 8
var/mob/living/held_mob
<<<<<<< HEAD
var/matrix/original_transform
var/original_vis_flags = NONE
@@ -42,11 +41,6 @@ var/list/holder_mob_icon_cache = list()
// I really hate this, but I'm sleepy and unable to figure out a nice stateful way to do it
// Entered and Exited seem ideal but all the inventory procs are trash and put items on
// turfs before you when manhandling things in/out of backpacks and inventory slots.
=======
/obj/item/weapon/holder/Initialize()
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
START_PROCESSING(SSobj, src)
/obj/item/weapon/holder/Destroy()
@@ -135,10 +135,6 @@
pda.ownjob = "Personal Assistant"
pda.owner = text("[]", src)
pda.name = pda.owner + " (" + pda.ownjob + ")"
<<<<<<< HEAD
=======
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
var/datum/data/pda/app/messenger/M = pda.find_program(/datum/data/pda/app/messenger)
if(M)
M.toff = TRUE
@@ -101,13 +101,8 @@ var/list/mob_hat_cache = list()
can_pick_shell = FALSE
shell_accessories = list("eyes-miningdrone")
<<<<<<< HEAD
/mob/living/silicon/robot/drone/New()
..()
=======
/mob/living/silicon/robot/drone/Initialize()
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
verbs += /mob/living/proc/ventcrawl
verbs += /mob/living/proc/hide
remove_language("Robot Talk")
@@ -59,13 +59,7 @@ var/global/list/robot_modules = list(
handle_shell(R)
if(R.radio)
<<<<<<< HEAD
if(R.shell)
channels = R.mainframe.aiRadio.channels
R.radio.recalculateChannels()
=======
addtimer(CALLBACK(R.radio, /obj/item/device/radio/proc/recalculateChannels), 0)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
vr_add_sprites() //Vorestation Edit: For vorestation only sprites
@@ -62,13 +62,8 @@
true_name = "[pick("Primary","Secondary","Tertiary","Quaternary")] [rand(1000,9999)]"
<<<<<<< HEAD
if(!roundstart && antag)
request_player()
=======
if(!roundstart)
addtimer(CALLBACK(src, .proc/request_player), 0)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
return ..()
-7
View File
@@ -223,16 +223,9 @@
/obj/item/organ/external/update_health()
damage = min(max_damage, (brute_dam + burn_dam))
<<<<<<< HEAD
/obj/item/organ/external/New(var/mob/living/carbon/holder)
..(holder, 0)
=======
return
/obj/item/organ/external/Initialize(var/ml)
. = ..(ml, 0)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
if(istype(owner))
replaced(owner)
sync_colour_to_human(owner)
@@ -7,8 +7,6 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov
var/obj/effect/overmap/visitable/ship/linked
var/list/viewers // Weakrefs to mobs in direct-view mode.
var/extra_view = 0 // how much the view is increased by when the mob is in overmap mode.
<<<<<<< HEAD
=======
var/list/whitelisted_types = list(/obj/effect/overmap/visitable/ship)
var/list/blacklisted_types = list()
@@ -20,7 +18,6 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov
for(var/type in blacklisted_types)
L -= typesof(type)
whitelisted_types = L
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
// A late init operation called in SSshuttles, used to attach the thing to the right ship.
/obj/machinery/computer/ship/proc/attempt_hook_up(obj/effect/overmap/visitable/ship/sector)
-9
View File
@@ -6,7 +6,6 @@
in_space = TRUE
/obj/effect/overmap/visitable/sector/temporary/Initialize()
<<<<<<< HEAD
if(!istype(loc, /turf/unsimulated/map))
CRASH("Attempt to create deepspace which is not on overmap: [log_info_line(loc)]")
// Tell sector initializer where are is where we want to be.
@@ -15,9 +14,6 @@
// But pick an empty z level to use
map_z += global.using_map.get_empty_zlevel()
. = ..()
testing("Temporary sector at [x],[y],[z] was created, corresponding zlevel is [english_list(map_z)].")
=======
. = ..()
if(!map_z[1])
log_and_message_admins("Could not create empty sector at [x], [y]. No available z levels to allocate.")
@@ -25,7 +21,6 @@
map_sectors["[map_z[1]]"] = src
testing("Temporary sector at [x],[y] was created, corresponding zlevel is [map_z[1]].")
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/effect/overmap/visitable/sector/temporary/Destroy()
for(var/zlevel in map_z)
@@ -55,13 +50,9 @@
var/obj/effect/overmap/visitable/sector/temporary/res = locate() in overmap_turf
if(istype(res))
return res
<<<<<<< HEAD
return new /obj/effect/overmap/visitable/sector/temporary(overmap_turf)
=======
res = new /obj/effect/overmap/visitable/sector/temporary(overmap_turf)
if(!QDELETED(res))
return res
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/atom/movable/proc/lost_in_space()
for(var/atom/movable/AM in contents)
+8 -17
View File
@@ -106,35 +106,26 @@
//lipstick wiping is in code/game/objects/items/weapons/cosmetics.dm!
/obj/item/weapon/paper/Initialize(mapload)
/obj/item/weapon/paper/Initialize(mapload, var/text, var/title)
. = ..()
if(istext(title))
name = title
if(istext(text))
info = text
addtimer(CALLBACK(src, .proc/update_info), 0)
if(mapload) // Jank, but we do this to prevent maploaded papers from somehow stacking across rounds if re-added to the board by a player.
was_maploaded = TRUE
<<<<<<< HEAD
/obj/item/weapon/paper/New(var/newloc, var/text, var/title)
..()
=======
/obj/item/weapon/paper/Initialize()
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
pixel_y = rand(-8, 8)
pixel_x = rand(-9, 9)
stamps = ""
addtimer(CALLBACK(src, .proc/update_info), 0)
/obj/item/weapon/paper/proc/update_info()
if(!isnull(title))
name = title
if(name != "paper")
desc = "This is a paper titled '" + name + "'."
if(!isnull(text))
info = text
if(info != initial(info))
info = html_encode(info)
info = replacetext(info, "\n", "<BR>")
@@ -434,7 +425,7 @@
var/raw = input(usr, "Enter what you want to write:", "Write") as null|message
if(!raw)
return
var/t = sanitize(raw, MAX_PAPER_MESSAGE_LEN, extra = 0)
if(!t)
return
+2 -8
View File
@@ -212,16 +212,10 @@
desc = "It's a black ink pen with a sharp point and a carefully engraved \"Waffle Co.\""
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
<<<<<<< HEAD
/obj/item/weapon/pen/reagent/sleepy/New()
..()
reagents.add_reagent("chloralhydrate", 1) //VOREStation Edit
reagents.add_reagent("stoxin", 14) //VOREStation Add
=======
/obj/item/weapon/pen/reagent/sleepy/Initialize()
. = ..()
reagents.add_reagent("chloralhydrate", 22) //Used to be 100 sleep toxin//30 Chloral seems to be fatal, reducing it to 22./N
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
reagents.add_reagent("chloralhydrate", 1) //VOREStation Edit
reagents.add_reagent("stoxin", 14) //VOREStation Add
/*
+1 -315
View File
@@ -1,4 +1,3 @@
<<<<<<< HEAD
var/list/command_cartridges = list(
/obj/item/weapon/cartridge/captain,
/obj/item/weapon/cartridge/hop,
@@ -306,317 +305,4 @@ var/list/civilian_cartridges = list(
name = "F.R.A.M.E. cartridge"
icon_state = "cart"
charges = 5
messenger_plugins = list(new/datum/data/pda/messenger_plugin/virus/frame)
=======
var/list/command_cartridges = list(
/obj/item/weapon/cartridge/captain,
/obj/item/weapon/cartridge/hop,
/obj/item/weapon/cartridge/hos,
/obj/item/weapon/cartridge/ce,
/obj/item/weapon/cartridge/rd,
/obj/item/weapon/cartridge/cmo,
/obj/item/weapon/cartridge/head,
/obj/item/weapon/cartridge/lawyer // Internal Affaris,
)
var/list/security_cartridges = list(
/obj/item/weapon/cartridge/security,
/obj/item/weapon/cartridge/detective,
/obj/item/weapon/cartridge/hos
)
var/list/engineering_cartridges = list(
/obj/item/weapon/cartridge/engineering,
/obj/item/weapon/cartridge/atmos,
/obj/item/weapon/cartridge/ce
)
var/list/medical_cartridges = list(
/obj/item/weapon/cartridge/medical,
/obj/item/weapon/cartridge/chemistry,
/obj/item/weapon/cartridge/cmo
)
var/list/research_cartridges = list(
/obj/item/weapon/cartridge/signal/science,
/obj/item/weapon/cartridge/rd
)
var/list/cargo_cartridges = list(
/obj/item/weapon/cartridge/quartermaster, // This also covers cargo-techs, apparently,
/obj/item/weapon/cartridge/miner,
/obj/item/weapon/cartridge/hop
)
var/list/civilian_cartridges = list(
/obj/item/weapon/cartridge/janitor,
/obj/item/weapon/cartridge/service,
/obj/item/weapon/cartridge/hop
)
/obj/item/weapon/cartridge
name = "generic cartridge"
desc = "A data cartridge for portable microcomputers."
icon = 'icons/obj/pda.dmi'
icon_state = "cart"
item_state = "electronic"
w_class = ITEMSIZE_TINY
drop_sound = 'sound/items/drop/component.ogg'
pickup_sound = 'sound/items/pickup/component.ogg'
var/obj/item/radio/integrated/radio = null
var/charges = 0
var/list/stored_data = list()
var/list/programs = list()
var/list/messenger_plugins = list()
/obj/item/weapon/cartridge/Destroy()
QDEL_NULL(radio)
QDEL_LIST(programs)
QDEL_LIST(messenger_plugins)
return ..()
/obj/item/weapon/cartridge/proc/update_programs(obj/item/device/pda/pda)
for(var/A in programs)
var/datum/data/pda/P = A
P.pda = pda
for(var/A in messenger_plugins)
var/datum/data/pda/messenger_plugin/P = A
P.pda = pda
/obj/item/weapon/cartridge/engineering
name = "\improper Power-ON cartridge"
icon_state = "cart-e"
programs = list(
new/datum/data/pda/app/power,
new/datum/data/pda/utility/scanmode/halogen)
/obj/item/weapon/cartridge/atmos
name = "\improper BreatheDeep cartridge"
icon_state = "cart-a"
programs = list(new/datum/data/pda/utility/scanmode/gas)
/obj/item/weapon/cartridge/medical
name = "\improper Med-U cartridge"
icon_state = "cart-m"
programs = list(
new/datum/data/pda/app/crew_records/medical,
new/datum/data/pda/utility/scanmode/medical)
/obj/item/weapon/cartridge/chemistry
name = "\improper ChemWhiz cartridge"
icon_state = "cart-chem"
programs = list(
new/datum/data/pda/app/crew_records/medical,
new/datum/data/pda/utility/scanmode/medical,
new/datum/data/pda/utility/scanmode/reagent)
/obj/item/weapon/cartridge/security
name = "\improper R.O.B.U.S.T. cartridge"
icon_state = "cart-s"
programs = list(
new/datum/data/pda/app/crew_records/security)
/obj/item/weapon/cartridge/detective
name = "\improper D.E.T.E.C.T. cartridge"
icon_state = "cart-s"
programs = list(
new/datum/data/pda/app/crew_records/medical,
new/datum/data/pda/utility/scanmode/medical,
new/datum/data/pda/app/crew_records/security)
/obj/item/weapon/cartridge/janitor
name = "\improper CustodiPRO cartridge"
desc = "The ultimate in clean-room design."
icon_state = "cart-j"
programs = list(new/datum/data/pda/app/janitor)
/obj/item/weapon/cartridge/lawyer
name = "\improper P.R.O.V.E. cartridge"
icon_state = "cart-s"
programs = list(new/datum/data/pda/app/crew_records/security)
/obj/item/weapon/cartridge/clown
name = "\improper Honkworks 5.0 cartridge"
icon_state = "cart-clown"
charges = 5
programs = list(new/datum/data/pda/utility/honk)
messenger_plugins = list(new/datum/data/pda/messenger_plugin/virus/clown)
/obj/item/weapon/cartridge/mime
name = "\improper Gestur-O 1000 cartridge"
icon_state = "cart-mi"
charges = 5
messenger_plugins = list(new/datum/data/pda/messenger_plugin/virus/mime)
/obj/item/weapon/cartridge/service
name = "\improper Serv-U Pro cartridge"
desc = "A data cartridge designed to serve YOU!"
/obj/item/weapon/cartridge/signal
name = "generic signaler cartridge"
desc = "A data cartridge with an integrated radio signaler module."
programs = list(new/datum/data/pda/app/signaller)
/obj/item/weapon/cartridge/signal/Initialize()
radio = new /obj/item/radio/integrated/signal(src)
. = ..()
/obj/item/weapon/cartridge/signal/science
name = "\improper Signal Ace 2 cartridge"
desc = "Complete with integrated radio signaler!"
icon_state = "cart-tox"
programs = list(
new/datum/data/pda/utility/scanmode/gas,
new/datum/data/pda/utility/scanmode/reagent,
new/datum/data/pda/app/signaller)
/obj/item/weapon/cartridge/quartermaster
name = "\improper Space Parts & Space Vendors cartridge"
desc = "Perfect for the Quartermaster on the go!"
icon_state = "cart-q"
programs = list(
new/datum/data/pda/app/supply)
/obj/item/weapon/cartridge/miner
name = "\improper Drill-Jockey 4.5 cartridge"
desc = "It's covered in some sort of sand."
icon_state = "cart-q"
/obj/item/weapon/cartridge/head
name = "\improper Easy-Record DELUXE cartridge"
icon_state = "cart-h"
programs = list(new/datum/data/pda/app/status_display)
/obj/item/weapon/cartridge/hop
name = "\improper HumanResources9001 cartridge"
icon_state = "cart-h"
programs = list(
new/datum/data/pda/app/crew_records/security,
new/datum/data/pda/app/janitor,
new/datum/data/pda/app/supply,
new/datum/data/pda/app/status_display)
/obj/item/weapon/cartridge/hos
name = "\improper R.O.B.U.S.T. DELUXE cartridge"
icon_state = "cart-hos"
programs = list(
new/datum/data/pda/app/crew_records/security,
new/datum/data/pda/app/status_display)
/obj/item/weapon/cartridge/ce
name = "\improper Power-On DELUXE cartridge"
icon_state = "cart-ce"
programs = list(
new/datum/data/pda/app/power,
new/datum/data/pda/utility/scanmode/halogen,
new/datum/data/pda/utility/scanmode/gas,
new/datum/data/pda/app/status_display)
/obj/item/weapon/cartridge/cmo
name = "\improper Med-U DELUXE cartridge"
icon_state = "cart-cmo"
programs = list(
new/datum/data/pda/app/crew_records/medical,
new/datum/data/pda/utility/scanmode/medical,
new/datum/data/pda/utility/scanmode/reagent,
new/datum/data/pda/app/status_display)
/obj/item/weapon/cartridge/rd
name = "\improper Signal Ace DELUXE cartridge"
icon_state = "cart-rd"
programs = list(
new/datum/data/pda/utility/scanmode/gas,
new/datum/data/pda/utility/scanmode/reagent,
new/datum/data/pda/app/signaller,
new/datum/data/pda/app/status_display)
/obj/item/weapon/cartridge/rd/Initialize()
radio = new /obj/item/radio/integrated/signal(src)
. = ..()
/obj/item/weapon/cartridge/captain
name = "\improper Value-PAK cartridge"
desc = "Now with 200% more value!"
icon_state = "cart-c"
programs = list(
new/datum/data/pda/app/power,
new/datum/data/pda/utility/scanmode/halogen,
new/datum/data/pda/utility/scanmode/gas,
new/datum/data/pda/app/crew_records/medical,
new/datum/data/pda/utility/scanmode/medical,
new/datum/data/pda/utility/scanmode/reagent,
new/datum/data/pda/app/crew_records/security,
new/datum/data/pda/app/janitor,
new/datum/data/pda/app/supply,
new/datum/data/pda/app/status_display)
/obj/item/weapon/cartridge/syndicate
name = "\improper Detomatix cartridge"
icon_state = "cart"
var/initial_remote_door_id = "smindicate" //Make sure this matches the syndicate shuttle's shield/door id!! //don't ask about the name, testing.
charges = 4
programs = list(new/datum/data/pda/utility/toggle_door)
messenger_plugins = list(new/datum/data/pda/messenger_plugin/virus/detonate)
/obj/item/weapon/cartridge/syndicate/Initialize()
. = ..()
var/datum/data/pda/utility/toggle_door/D = programs[1]
if(istype(D))
D.remote_door_id = initial_remote_door_id
/obj/item/weapon/cartridge/proc/post_status(var/command, var/data1, var/data2)
var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435)
if(!frequency) return
var/datum/signal/status_signal = new
status_signal.source = src
status_signal.transmission_method = TRANSMISSION_RADIO
status_signal.data["command"] = command
switch(command)
if("message")
status_signal.data["msg1"] = data1
status_signal.data["msg2"] = data2
if(loc)
var/obj/item/PDA = loc
var/mob/user = PDA.fingerprintslast
log_admin("STATUS: [user] set status screen with [PDA]. Message: [data1] [data2]")
message_admins("STATUS: [user] set status screen with [PDA]. Message: [data1] [data2]")
if("alert")
status_signal.data["picture_state"] = data1
frequency.post_signal(src, status_signal)
/obj/item/weapon/cartridge/frame
name = "F.R.A.M.E. cartridge"
icon_state = "cart"
charges = 5
messenger_plugins = list(new/datum/data/pda/messenger_plugin/virus/frame)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
messenger_plugins = list(new/datum/data/pda/messenger_plugin/virus/frame)
+10 -508
View File
@@ -1,5 +1,3 @@
<<<<<<< HEAD
//The advanced pea-green monochrome lcd of tomorrow.
var/global/list/obj/item/device/pda/PDAs = list()
@@ -113,8 +111,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
close(usr)
return 0
/obj/item/device/pda/New(var/mob/living/carbon/human/H)
..()
/obj/item/device/pda/Initialize()
. = ..()
PDAs += src
PDAs = sortAtom(PDAs)
update_programs()
@@ -122,7 +120,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
cartridge = new default_cartridge(src)
cartridge.update_programs(src)
new /obj/item/weapon/pen(src)
pdachoice = isnull(H) ? 1 : (ishuman(H) ? H.pdachoice : 1)
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
pdachoice = H.pdachoice
else
pdachoice = 1
switch(pdachoice)
if(1) icon = 'icons/obj/pda.dmi'
if(2) icon = 'icons/obj/pda_slim.dmi'
@@ -491,506 +495,4 @@ var/global/list/obj/item/device/pda/PDAs = list()
// Pass along the pulse to atoms in contents, largely added so pAIs are vulnerable to EMP
/obj/item/device/pda/emp_act(severity)
for(var/atom/A in src)
A.emp_act(severity)
=======
//The advanced pea-green monochrome lcd of tomorrow.
var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda
name = "\improper PDA"
desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a preprogrammed ROM cartridge."
icon = 'icons/obj/pda.dmi'
icon_state = "pda"
item_state = "electronic"
w_class = ITEMSIZE_SMALL
slot_flags = SLOT_ID | SLOT_BELT
sprite_sheets = list(SPECIES_TESHARI = 'icons/mob/species/teshari/id.dmi')
//Main variables
var/pdachoice = 1
var/owner = null
var/default_cartridge = 0 // Access level defined by cartridge
var/obj/item/weapon/cartridge/cartridge = null //current cartridge
//Secondary variables
var/model_name = "Thinktronic 5230 Personal Data Assistant"
var/datum/data/pda/utility/scanmode/scanmode = null
var/lock_code = "" // Lockcode to unlock uplink
var/honkamt = 0 //How many honks left when infected with honk.exe
var/mimeamt = 0 //How many silence left when infected with mime.exe
var/detonate = 1 // Can the PDA be blown up?
var/ttone = "beep" //The ringtone!
var/list/ttone_sound = list("beep" = 'sound/machines/twobeep.ogg',
"boom" = 'sound/effects/explosionfar.ogg',
"slip" = 'sound/misc/slip.ogg',
"honk" = 'sound/items/bikehorn.ogg',
"SKREE" = 'sound/voice/shriek1.ogg',
// "holy" = 'sound/items/PDA/ambicha4-short.ogg',
"xeno" = 'sound/voice/hiss1.ogg')
var/hidden = 0 // Is the PDA hidden from the PDA list?
var/touch_silent = 0 //If 1, no beeps on interacting.
var/obj/item/weapon/card/id/id = null //Making it possible to slot an ID card into the PDA so it can function as both.
var/ownjob = null //related to above - this is assignment (potentially alt title)
var/ownrank = null // this one is rank, never alt title
var/obj/item/device/paicard/pai = null // A slot for a personal AI device
var/spam_proof = FALSE // If true, it can't be spammed by random events.
var/datum/data/pda/app/current_app = null
var/datum/data/pda/app/lastapp = null
var/list/programs = list(
new/datum/data/pda/app/main_menu,
new/datum/data/pda/app/notekeeper,
new/datum/data/pda/app/news,
new/datum/data/pda/app/messenger,
new/datum/data/pda/app/manifest,
new/datum/data/pda/app/atmos_scanner,
new/datum/data/pda/utility/scanmode/notes,
new/datum/data/pda/utility/flashlight)
var/list/shortcut_cache = list()
var/list/shortcut_cat_order = list()
var/list/notifying_programs = list()
var/retro_mode = 0
/obj/item/device/pda/examine(mob/user)
. = ..()
if(Adjacent(user))
. += "The time [stationtime2text()] is displayed in the corner of the screen."
/obj/item/device/pda/CtrlClick()
if(issilicon(usr))
return
if(can_use(usr))
remove_pen()
return
..()
/obj/item/device/pda/AltClick()
if(issilicon(usr))
return
if ( can_use(usr) )
if(id)
remove_id()
else
to_chat(usr, "<span class='notice'>This PDA does not have an ID in it.</span>")
/obj/item/device/pda/proc/play_ringtone()
var/S
if(ttone in ttone_sound)
S = ttone_sound[ttone]
else
S = 'sound/machines/twobeep.ogg'
playsound(loc, S, 50, 1)
for(var/mob/O in hearers(3, loc))
O.show_message(text("[bicon(src)] *[ttone]*"))
/obj/item/device/pda/proc/set_ringtone()
var/t = input("Please enter new ringtone", name, ttone) as text
if(in_range(src, usr) && loc == usr)
if(t)
if(hidden_uplink && hidden_uplink.check_trigger(usr, lowertext(t), lowertext(lock_code)))
to_chat(usr, "The PDA softly beeps.")
close(usr)
else
t = sanitize(copytext(t, 1, 20))
ttone = t
return 1
else
close(usr)
return 0
/obj/item/device/pda/Initialize()
. = ..()
PDAs += src
PDAs = sortAtom(PDAs)
update_programs()
if(default_cartridge)
cartridge = new default_cartridge(src)
cartridge.update_programs(src)
new /obj/item/weapon/pen(src)
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
pdachoice = H.pdachoice
else
pdachoice = 1
switch(pdachoice)
if(1) icon = 'icons/obj/pda.dmi'
if(2) icon = 'icons/obj/pda_slim.dmi'
if(3) icon = 'icons/obj/pda_old.dmi'
if(4) icon = 'icons/obj/pda_rugged.dmi'
if(5) icon = 'icons/obj/pda_holo.dmi'
if(6)
icon = 'icons/obj/pda_wrist.dmi'
item_state = icon_state
item_icons = list(
slot_belt_str = 'icons/mob/pda_wrist.dmi',
slot_wear_id_str = 'icons/mob/pda_wrist.dmi',
slot_gloves_str = 'icons/mob/pda_wrist.dmi'
)
desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a wrist-bound version."
slot_flags = SLOT_ID | SLOT_BELT | SLOT_GLOVES
sprite_sheets = list(
SPECIES_TESHARI = 'icons/mob/species/teshari/pda_wrist.dmi',
SPECIES_VR_TESHARI = 'icons/mob/species/teshari/pda_wrist.dmi',
)
else
icon = 'icons/obj/pda_old.dmi'
log_debug("Invalid switch for PDA, defaulting to old PDA icons. [pdachoice] chosen.")
start_program(find_program(/datum/data/pda/app/main_menu))
/obj/item/device/pda/proc/can_use(mob/user)
return (tgui_status(user, GLOB.tgui_inventory_state) == STATUS_INTERACTIVE)
/obj/item/device/pda/GetAccess()
if(id)
return id.GetAccess()
else
return ..()
/obj/item/device/pda/GetID()
return id
/obj/item/device/pda/MouseDrop(obj/over_object as obj, src_location, over_location)
var/mob/M = usr
if((!istype(over_object, /obj/screen)) && can_use(usr))
return attack_self(M)
return
/obj/item/device/pda/proc/close(mob/user)
SStgui.close_uis(src)
/obj/item/device/pda/attack_self(mob/user as mob)
user.set_machine(src)
if(active_uplink_check(user))
return
tgui_interact(user)
return
/obj/item/device/pda/proc/start_program(datum/data/pda/P)
if(P && ((P in programs) || (cartridge && (P in cartridge.programs))))
return P.start()
return 0
/obj/item/device/pda/proc/find_program(type)
var/datum/data/pda/A = locate(type) in programs
if(A)
return A
if(cartridge)
A = locate(type) in cartridge.programs
if(A)
return A
return null
// force the cache to rebuild on update_ui
/obj/item/device/pda/proc/update_shortcuts()
shortcut_cache.Cut()
/obj/item/device/pda/proc/update_programs()
for(var/A in programs)
var/datum/data/pda/P = A
P.pda = src
/obj/item/device/pda/proc/detonate_act(var/obj/item/device/pda/P)
//TODO: sometimes these attacks show up on the message server
var/i = rand(1,100)
var/j = rand(0,1) //Possibility of losing the PDA after the detonation
var/message = ""
var/mob/living/M = null
if(ismob(P.loc))
M = P.loc
//switch(i) //Yes, the overlapping cases are intended.
if(i<=10) //The traditional explosion
P.explode()
j=1
message += "Your [P] suddenly explodes!"
if(i>=10 && i<= 20) //The PDA burns a hole in the holder.
j=1
if(M && isliving(M))
M.apply_damage( rand(30,60) , BURN)
message += "You feel a searing heat! Your [P] is burning!"
if(i>=20 && i<=25) //EMP
empulse(P.loc, 1, 2, 4, 6, 1)
message += "Your [P] emits a wave of electromagnetic energy!"
if(i>=25 && i<=40) //Smoke
var/datum/effect/effect/system/smoke_spread/chem/S = new /datum/effect/effect/system/smoke_spread/chem
S.attach(P.loc)
S.set_up(P, 10, 0, P.loc)
playsound(P, 'sound/effects/smoke.ogg', 50, 1, -3)
S.start()
message += "Large clouds of smoke billow forth from your [P]!"
if(i>=40 && i<=45) //Bad smoke
var/datum/effect/effect/system/smoke_spread/bad/B = new /datum/effect/effect/system/smoke_spread/bad
B.attach(P.loc)
B.set_up(P, 10, 0, P.loc)
playsound(P, 'sound/effects/smoke.ogg', 50, 1, -3)
B.start()
message += "Large clouds of noxious smoke billow forth from your [P]!"
if(i>=65 && i<=75) //Weaken
if(M && isliving(M))
M.apply_effects(0,1)
message += "Your [P] flashes with a blinding white light! You feel weaker."
if(i>=75 && i<=85) //Stun and stutter
if(M && isliving(M))
M.apply_effects(1,0,0,0,1)
message += "Your [P] flashes with a blinding white light! You feel weaker."
if(i>=85) //Sparks
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, P.loc)
s.start()
message += "Your [P] begins to spark violently!"
if(i>45 && i<65 && prob(50)) //Nothing happens
message += "Your [P] bleeps loudly."
j = prob(10)
if(j && detonate) //This kills the PDA
qdel(P)
if(message)
message += "It melts in a puddle of plastic."
else
message += "Your [P] shatters in a thousand pieces!"
if(M && isliving(M))
message = "<span class='warning'>[message]</span>"
M.show_message(message, 1)
/obj/item/device/pda/proc/remove_id()
if (id)
if (ismob(loc))
var/mob/M = loc
M.put_in_hands(id)
to_chat(usr, "<span class='notice'>You remove the ID from the [name].</span>")
playsound(src, 'sound/machines/id_swipe.ogg', 100, 1)
else
id.loc = get_turf(src)
id = null
/obj/item/device/pda/proc/remove_pen()
var/obj/item/weapon/pen/O = locate() in src
if(O)
if(istype(loc, /mob))
var/mob/M = loc
if(M.get_active_hand() == null)
M.put_in_hands(O)
to_chat(usr, "<span class='notice'>You remove \the [O] from \the [src].</span>")
return
O.loc = get_turf(src)
else
to_chat(usr, "<span class='notice'>This PDA does not have a pen in it.</span>")
/obj/item/device/pda/verb/verb_reset_pda()
set category = "Object"
set name = "Reset PDA"
set src in usr
if(issilicon(usr))
return
if(can_use(usr))
start_program(find_program(/datum/data/pda/app/main_menu))
notifying_programs.Cut()
overlays -= image('icons/obj/pda.dmi', "pda-r")
to_chat(usr, "<span class='notice'>You press the reset button on \the [src].</span>")
else
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
/obj/item/device/pda/verb/verb_remove_id()
set category = "Object"
set name = "Remove id"
set src in usr
if(issilicon(usr))
return
if ( can_use(usr) )
if(id)
remove_id()
else
to_chat(usr, "<span class='notice'>This PDA does not have an ID in it.</span>")
else
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
/obj/item/device/pda/verb/verb_remove_pen()
set category = "Object"
set name = "Remove pen"
set src in usr
if(issilicon(usr))
return
if ( can_use(usr) )
remove_pen()
else
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
/obj/item/device/pda/verb/verb_remove_cartridge()
set category = "Object"
set name = "Remove cartridge"
set src in usr
if(issilicon(usr))
return
if(!can_use(usr))
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
return
if(isnull(cartridge))
to_chat(usr, "<span class='notice'>There's no cartridge to eject.</span>")
return
cartridge.forceMove(get_turf(src))
if(ismob(loc))
var/mob/M = loc
M.put_in_hands(cartridge)
// mode = 0
// scanmode = 0
if (cartridge.radio)
cartridge.radio.hostpda = null
to_chat(usr, "<span class='notice'>You remove \the [cartridge] from the [name].</span>")
playsound(src, 'sound/machines/id_swipe.ogg', 100, 1)
cartridge = null
update_programs()
update_shortcuts()
start_program(find_program(/datum/data/pda/app/main_menu))
/obj/item/device/pda/proc/id_check(mob/user as mob, choice as num)//To check for IDs; 1 for in-pda use, 2 for out of pda use.
if(choice == 1)
if (id)
remove_id()
return 1
else
var/obj/item/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id) && user.unEquip(I))
I.loc = src
id = I
return 1
else
var/obj/item/weapon/card/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id) && I:registered_name && user.unEquip(I))
var/obj/old_id = id
I.loc = src
id = I
user.put_in_hands(old_id)
return 1
return 0
// access to status display signals
/obj/item/device/pda/attackby(obj/item/C as obj, mob/user as mob)
..()
if(istype(C, /obj/item/weapon/cartridge) && !cartridge)
cartridge = C
user.drop_item()
cartridge.loc = src
cartridge.update_programs(src)
update_shortcuts()
to_chat(usr, "<span class='notice'>You insert [cartridge] into [src].</span>")
if(cartridge.radio)
cartridge.radio.hostpda = src
else if(istype(C, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/idcard = C
if(!idcard.registered_name)
to_chat(user, "<span class='notice'>\The [src] rejects the ID.</span>")
return
if(!owner)
owner = idcard.registered_name
ownjob = idcard.assignment
ownrank = idcard.rank
name = "PDA-[owner] ([ownjob])"
to_chat(user, "<span class='notice'>Card scanned.</span>")
else
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
if(id_check(user, 2))
to_chat(user, "<span class='notice'>You put the ID into \the [src]'s slot.</span>")
updateSelfDialog()//Update self dialog on success.
return //Return in case of failed check or when successful.
updateSelfDialog()//For the non-input related code.
else if(istype(C, /obj/item/device/paicard) && !src.pai)
user.drop_item()
C.loc = src
pai = C
to_chat(user, "<span class='notice'>You slot \the [C] into \the [src].</span>")
SStgui.update_uis(src) // update all UIs attached to src
else if(istype(C, /obj/item/weapon/pen))
var/obj/item/weapon/pen/O = locate() in src
if(O)
to_chat(user, "<span class='notice'>There is already a pen in \the [src].</span>")
else
user.drop_item()
C.loc = src
to_chat(user, "<span class='notice'>You slot \the [C] into \the [src].</span>")
return
/obj/item/device/pda/attack(mob/living/C as mob, mob/living/user as mob)
if (istype(C, /mob/living/carbon) && scanmode)
scanmode.scan_mob(C, user)
/obj/item/device/pda/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
if(proximity && scanmode)
scanmode.scan_atom(A, user)
/obj/item/device/pda/proc/explode() //This needs tuning. //Sure did.
if(!src.detonate) return
var/turf/T = get_turf(src.loc)
if(T)
T.hotspot_expose(700,125)
explosion(T, 0, 0, 1, rand(1,2))
return
/obj/item/device/pda/Destroy()
PDAs -= src
if (src.id && prob(90)) //IDs are kept in 90% of the cases
src.id.forceMove(get_turf(src.loc))
else
QDEL_NULL(src.id)
current_app = null
scanmode = null
QDEL_NULL(pai)
QDEL_LIST(programs)
QDEL_NULL(cartridge)
return ..()
//Some spare PDAs in a box
/obj/item/weapon/storage/box/PDAs
name = "box of spare PDAs"
desc = "A box of spare PDA microcomputers."
icon = 'icons/obj/pda.dmi'
icon_state = "pdabox"
/obj/item/weapon/storage/box/PDAs/Initialize()
. = ..()
new /obj/item/device/pda(src)
new /obj/item/device/pda(src)
new /obj/item/device/pda(src)
new /obj/item/device/pda(src)
new /obj/item/weapon/cartridge/head(src)
var/newcart = pick( /obj/item/weapon/cartridge/engineering,
/obj/item/weapon/cartridge/security,
/obj/item/weapon/cartridge/medical,
/obj/item/weapon/cartridge/signal/science,
/obj/item/weapon/cartridge/quartermaster)
new newcart(src)
// Pass along the pulse to atoms in contents, largely added so pAIs are vulnerable to EMP
/obj/item/device/pda/emp_act(severity)
for(var/atom/A in src)
A.emp_act(severity)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
A.emp_act(severity)
+3 -142
View File
@@ -1,4 +1,3 @@
<<<<<<< HEAD
/obj/item/radio/integrated
name = "\improper PDA radio module"
desc = "An electronic radio system."
@@ -18,8 +17,8 @@
var/on = 0 //Are we currently active??
var/menu_message = ""
/obj/item/radio/integrated/New()
..()
/obj/item/radio/integrated/Initialize()
. = ..()
if(istype(loc.loc, /obj/item/device/pda))
hostpda = loc.loc
if(bot_filter)
@@ -134,142 +133,4 @@
signal.data["message"] = message
spawn(0)
radio_connection.post_signal(src, signal)
=======
/obj/item/radio/integrated
name = "\improper PDA radio module"
desc = "An electronic radio system."
icon = 'icons/obj/module.dmi'
icon_state = "power_mod"
var/obj/item/device/pda/hostpda = null
var/list/botlist = null // list of bots
var/mob/living/bot/active // the active bot; if null, show bot list
var/list/botstatus // the status signal sent by the bot
var/bot_type //The type of bot it is.
var/bot_filter //Determines which radio filter to use.
var/control_freq = BOT_FREQ
var/on = 0 //Are we currently active??
var/menu_message = ""
/obj/item/radio/integrated/Initialize()
. = ..()
if(istype(loc.loc, /obj/item/device/pda))
hostpda = loc.loc
if(bot_filter)
spawn(5)
add_to_radio(bot_filter)
/obj/item/radio/integrated/Destroy()
if(radio_controller)
radio_controller.remove_object(src, control_freq)
hostpda = null
return ..()
/obj/item/radio/integrated/proc/post_signal(var/freq, var/key, var/value, var/key2, var/value2, var/key3, var/value3, s_filter)
//to_world("Post: [freq]: [key]=[value], [key2]=[value2]")
var/datum/radio_frequency/frequency = radio_controller.return_frequency(freq)
if(!frequency)
return
var/datum/signal/signal = new()
signal.source = src
signal.transmission_method = TRANSMISSION_RADIO
signal.data[key] = value
if(key2)
signal.data[key2] = value2
if(key3)
signal.data[key3] = value3
frequency.post_signal(src, signal, radio_filter = s_filter)
/obj/item/radio/integrated/Topic(href, href_list)
..()
switch(href_list["op"])
if("control")
active = locate(href_list["bot"])
spawn(0)
post_signal(control_freq, "command", "bot_status", "active", active, s_filter = bot_filter)
if("scanbots") // find all bots
botlist = null
spawn(0)
post_signal(control_freq, "command", "bot_status", s_filter = bot_filter)
if("botlist")
active = null
if("stop", "go", "home")
spawn(0)
post_signal(control_freq, "command", href_list["op"], "active", active, s_filter = bot_filter)
post_signal(control_freq, "command", "bot_status", "active", active, s_filter = bot_filter)
if("summon")
spawn(0)
post_signal(control_freq, "command", "summon", "active", active, "target", get_turf(hostpda), "useraccess", hostpda.GetAccess(), "user", usr, s_filter = bot_filter)
post_signal(control_freq, "command", "bot_status", "active", active, s_filter = bot_filter)
/obj/item/radio/integrated/receive_signal(datum/signal/signal)
if(bot_type && istype(signal.source, /mob/living/bot) && signal.data["type"] == bot_type)
if(!botlist)
botlist = new()
botlist |= signal.source
if(active == signal.source)
var/list/b = signal.data
botstatus = b.Copy()
/obj/item/radio/integrated/proc/add_to_radio(bot_filter) //Master filter control for bots. Must be placed in the bot's local New() to support map spawned bots.
if(radio_controller)
radio_controller.add_object(src, control_freq, radio_filter = bot_filter)
/*
* Radio Cartridge, essentially a signaler.
*/
/obj/item/radio/integrated/signal
var/frequency = 1457
var/code = 30.0
var/last_transmission
var/datum/radio_frequency/radio_connection
/obj/item/radio/integrated/signal/Destroy()
if(radio_controller)
radio_controller.remove_object(src, frequency)
radio_connection = null
return ..()
/obj/item/radio/integrated/signal/Initialize()
. = ..()
if(radio_controller)
if(src.frequency < PUBLIC_LOW_FREQ || src.frequency > PUBLIC_HIGH_FREQ)
src.frequency = sanitize_frequency(src.frequency)
set_frequency(frequency)
/obj/item/radio/integrated/signal/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency)
/obj/item/radio/integrated/signal/proc/send_signal(message="ACTIVATE")
if(last_transmission && world.time < (last_transmission + 5))
return
last_transmission = world.time
var/time = time2text(world.realtime,"hh:mm:ss")
var/turf/T = get_turf(src)
lastsignalers.Add("[time] <B>:</B> [usr.key] used [src] @ location ([T.x],[T.y],[T.z]) <B>:</B> [format_frequency(frequency)]/[code]")
var/datum/signal/signal = new
signal.source = src
signal.encryption = code
signal.data["message"] = message
spawn(0)
radio_connection.post_signal(src, signal)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
radio_connection.post_signal(src, signal)
-10
View File
@@ -288,13 +288,8 @@ var/global/list/light_type_cache = list()
shows_alerts = FALSE //VOREStation Edit
var/lamp_shade = 1
<<<<<<< HEAD
/obj/machinery/light/flamp/Initialize(mapload, obj/machinery/light_construct/construct = null)
. = ..()
=======
/obj/machinery/light/flamp/Initialize(var/ml, obj/machinery/light_construct/construct = null)
. = ..(ml, construct)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
if(construct)
start_with_cell = FALSE
lamp_shade = 0
@@ -326,13 +321,8 @@ var/global/list/light_type_cache = list()
//VOREStation Add End
// create a new lighting fixture
<<<<<<< HEAD
/obj/machinery/light/Initialize(mapload, obj/machinery/light_construct/construct = null)
. =..()
=======
/obj/machinery/light/Initialize(var/ml, obj/machinery/light_construct/construct = null)
. = ..(ml)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
if(construct)
start_with_cell = FALSE
-4
View File
@@ -155,16 +155,12 @@ GLOBAL_LIST_EMPTY(solars_list)
broken()
return
<<<<<<< HEAD
=======
/obj/machinery/power/solar/fake/Initialize(mapload, glass_type)
. = ..(mapload, glass_type, 0)
/obj/machinery/power/solar/fake/process()
return PROCESS_KILL
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
//trace towards SSsun.sun to see if we're in shadow
/obj/machinery/power/solar/proc/occlusion()
-5
View File
@@ -93,7 +93,6 @@
var/last_shot = 0 //records the last shot fired
<<<<<<< HEAD
//VOREStation Add - /tg/ icon system
var/charge_sections = 4
var/shaded_charge = FALSE
@@ -124,12 +123,8 @@
update_icon()
//VOREStation Add End
/obj/item/weapon/gun/New()
..()
=======
/obj/item/weapon/gun/Initialize()
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
for(var/i in 1 to firemodes.len)
firemodes[i] = new /datum/firemode(src, firemodes[i])
@@ -10,13 +10,8 @@
/obj/item/weapon/shield_diffuser/Initialize()
<<<<<<< HEAD
. = ..()
cell = new(src)
=======
cell = new(src)
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/item/weapon/shield_diffuser/Destroy()
QDEL_NULL(cell)
@@ -16,14 +16,6 @@
/obj/machinery/shield_diffuser/Initialize()
. = ..()
<<<<<<< HEAD
// TODO - Remove this bit once machines are converted to Initialize
if(ispath(circuit))
circuit = new circuit(src)
default_apply_parts()
=======
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
var/turf/T = get_turf(src)
hide(!T.is_plating())
-12
View File
@@ -113,28 +113,16 @@
icon_state = "holo_preview"
color = "#EEEEEE"
<<<<<<< HEAD
/obj/structure/table/holotable/New()
material = get_material_by_name("holo[DEFAULT_TABLE_MATERIAL]")
..()
=======
/obj/structure/table/holotable/Initialize()
material = get_material_by_name("holo" + DEFAULT_TABLE_MATERIAL)
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/structure/table/woodentable/holotable
icon_state = "holo_preview"
<<<<<<< HEAD
/obj/structure/table/woodentable/holotable/New()
material = get_material_by_name("holowood")
..()
=======
/obj/structure/table/woodentable/holotable/Initialize()
material = get_material_by_name("holo" + MAT_WOOD)
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/structure/table/alien
name = "alien table"
+1 -4
View File
@@ -26,8 +26,6 @@
/obj/structure/table/rack/holorack/dismantle(obj/item/weapon/tool/wrench/W, mob/user)
to_chat(user, "<span class='warning'>You cannot dismantle \the [src].</span>")
return
<<<<<<< HEAD
=======
/obj/structure/table/rack/steel
color = "#666666"
@@ -62,5 +60,4 @@
/obj/structure/table/rack/gun_rack/steel/Initialize()
material = get_material_by_name(MAT_STEEL)
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
. = ..()
@@ -12,11 +12,7 @@
/obj/machinery/suspension_gen/Initialize()
. = ..()
<<<<<<< HEAD
cell = new /obj/item/weapon/cell/high(src)
=======
src.cell = new /obj/item/weapon/cell/high(src)
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/obj/machinery/suspension_gen/process()
if(suspension_field)
+1 -7
View File
@@ -80,15 +80,9 @@ Slime definitions, Life and New live here.
"woodpulp" = list("heal" = 0.1, "nutr" = 0.7),
"docilitytoxin" = list("nutr" = 0.3) )
<<<<<<< HEAD
/mob/living/simple_mob/xeno/slime/New()
..()
for(var/datum/language/L in subtypesof(/datum/language))
=======
/mob/living/simple_animal/xeno/slime/Initialize()
/mob/living/simple_mob/xeno/slime/Initialize()
. = ..()
for(var/datum/language/L in (typesof(/datum/language) - /datum/language))
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
languages += L
speak += "[station_name()]?"
traitdat.source = "Slime"
+1 -5
View File
@@ -74,11 +74,7 @@ Also includes Life and New
return 1 //Everything worked okay.
<<<<<<< HEAD
/mob/living/simple_mob/xeno/New()
=======
/mob/living/simple_animal/xeno/Initialize()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
/mob/living/simple_mob/xeno/Initialize()
traitdat = new()
+1 -1
View File
@@ -3238,6 +3238,7 @@
#include "code\modules\multiz\ladder_assembly_vr.dm"
#include "code\modules\multiz\ladders.dm"
#include "code\modules\multiz\ladders_vr.dm"
#include "code\modules\multiz\misc.dm"
#include "code\modules\multiz\movement.dm"
#include "code\modules\multiz\movement_vr.dm"
#include "code\modules\multiz\pipes.dm"
@@ -3826,7 +3827,6 @@
#include "code\modules\tables\rack.dm"
#include "code\modules\tables\rack_vr.dm"
#include "code\modules\tables\tables.dm"
#include "code\modules\tables\update_triggers.dm"
#include "code\modules\telesci\bscyrstal.dm"
#include "code\modules\telesci\construction.dm"
#include "code\modules\telesci\gps_advanced.dm"