mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-25 17:12:12 +00:00
* Add the system for managed global variables * Travis ban old globals * So you CAN inline proccall, that's neat * Fix that * master.dm * Remove the hack procs * Move InitGlobals to the proper spot * configuration.dm * Fix the missing pre-slash * clockcult.dm * This is probably for the best * Doy * Fix shit * Rest of the DEFINES tree * Fix * Use global. for access * Update find_references_in_globals Always hated that proc Whoever made it must've bee a r e a l idiot... * __HELPERS tree * Move global initialization to master. Fix the declaration * database.dm * Dat newline * I said DECLARATIVE order! * Here's something you can chew on @Iamgoofball * game_modes.dm * Fix this * genetics.dm * flavor_misc.dm * More stuff * Do it mso's way. Keep the controllers as global * Make master actually see it * Fix * Finish _globalvars/lists * Finish the rest of the _globalvars tree * This is weird * Migrate the controllers * SLOTH -> GLOB * Lighting globals * round_start_time -> ticker * PAI card list -> pai SS * record_id_num -> static * Diseases list -> SSdisease * More disease globals to the SS * More disease stuff * Emote list * Better and better * Bluh * So much stuff * Ahh * Wires * dview * station_areas * Teleportlocs * blood_splatter_icons * Stuff and such * More stuff * RAD IO * More stuff and such * Blob shit * Changeling stuff * Add "Balance" to changelogs * Balance for changelog compiler + Auto Tagging * Update the PR template * hivemind_bank * Bip * sacrificed * Good shit * Better define * More cult shit * Devil shit * Gang shit * > borers Fix shit * Rename the define * Nuke * Objectives * Sandbox * Multiverse sword * Announce systems * Stuff and such * TC con * Airlock * doppllllerrrrrr * holopads * Shut up byond you inconsistent fuck * Sneaky fuck * Burp * Bip * Fixnshit * Port without regard * askdlfjs; * asdfjasoidojfi * Protected globals and more * SO MANY * ajsimkvahsaoisd * akfdsiaopwimfeoiwafaw * gsdfigjosidjfgiosdg * AHHHHHHHHHHHHHHHHHHHHHHH!!!!! * facerolll * ASDFASDFASDF * Removes the unused parts of dmm_suite * WIP * Fix quote * asdfjauwfnkjs * afwlunhskjfda * asfjlaiwuefhaf * SO CLOSE * wwwweeeeeewwwww * agdgmoewranwg * HOLY MOTHER OF FUCK AND THATS JUST HALF THE JOB?!? * Fix syntax errors * 100 errors * Another 100 * So many... * Ugh * More shit * kilme * Stuuuuuufffff * ajrgmrlshio;djfa;sdkl * jkbhkhjbmjvjmh * soi soi soi * butt * TODAY WE LEARNED THAT GLOBAL AND STATIC ARE THE EXACT SAME FUCKING THING * lllllllllllllllllllllllllllllllllllllllllll * afsdijfiawhnflnjhnwsdfs * yugykihlugk,kj * time to go * STUFFF!!! * AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!! * ngoaijdjlfkamsdlkf * Break time * aufjsdklfalsjfi * CONTROL KAY AND PRAY * IT COMPILEELEELELAKLJFKLDAFJLKFDJLADKJHFLJKAJGAHIEJALDFJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * Goteem * Fix testing mode * This does not belong in this PR * Convert it to a controller * Eh, fuck this option * Revert controllerization Ill do it some other time * Fix * Working controllerization * FOR THE LOVE OF CHRIST PROTECT THE LOGS * Protect admins and deadmins * Use the inbuilt proc
81 lines
3.2 KiB
Plaintext
81 lines
3.2 KiB
Plaintext
/obj/item/weapon/computer_hardware/network_card
|
|
name = "network card"
|
|
desc = "A basic wireless network card for usage with standard NTNet frequencies."
|
|
power_usage = 50
|
|
origin_tech = "programming=2;engineering=1"
|
|
icon_state = "radio_mini"
|
|
var/identification_id = null // Identification ID. Technically MAC address of this device. Can't be changed by user.
|
|
var/identification_string = "" // Identification string, technically nickname seen in the network. Can be set by user.
|
|
var/long_range = 0
|
|
var/ethernet = 0 // Hard-wired, therefore always on, ignores NTNet wireless checks.
|
|
malfunction_probability = 1
|
|
device_type = MC_NET
|
|
var/global/ntnet_card_uid = 1
|
|
|
|
/obj/item/weapon/computer_hardware/network_card/diagnostics(var/mob/user)
|
|
..()
|
|
to_chat(user, "NIX Unique ID: [identification_id]")
|
|
to_chat(user, "NIX User Tag: [identification_string]")
|
|
to_chat(user, "Supported protocols:")
|
|
to_chat(user, "511.m SFS (Subspace) - Standard Frequency Spread")
|
|
if(long_range)
|
|
to_chat(user, "511.n WFS/HB (Subspace) - Wide Frequency Spread/High Bandiwdth")
|
|
if(ethernet)
|
|
to_chat(user, "OpenEth (Physical Connection) - Physical network connection port")
|
|
|
|
/obj/item/weapon/computer_hardware/network_card/New(var/l)
|
|
..()
|
|
identification_id = ntnet_card_uid++
|
|
|
|
// Returns a string identifier of this network card
|
|
/obj/item/weapon/computer_hardware/network_card/proc/get_network_tag()
|
|
return "[identification_string] (NID [identification_id])"
|
|
|
|
// 0 - No signal, 1 - Low signal, 2 - High signal. 3 - Wired Connection
|
|
/obj/item/weapon/computer_hardware/network_card/proc/get_signal(var/specific_action = 0)
|
|
if(!holder) // Hardware is not installed in anything. No signal. How did this even get called?
|
|
return 0
|
|
|
|
if(!check_functionality())
|
|
return 0
|
|
|
|
if(ethernet) // Computer is connected via wired connection.
|
|
return 3
|
|
|
|
if(!GLOB.ntnet_global || !GLOB.ntnet_global.check_function(specific_action)) // NTNet is down and we are not connected via wired connection. No signal.
|
|
return 0
|
|
|
|
if(holder)
|
|
|
|
var/turf/T = get_turf(holder)
|
|
if((T && istype(T)) && (T.z == ZLEVEL_STATION || T.z == ZLEVEL_MINING))
|
|
// Computer is on station. Low/High signal depending on what type of network card you have
|
|
if(long_range)
|
|
return 2
|
|
else
|
|
return 1
|
|
|
|
if(long_range) // Computer is not on station, but it has upgraded network card. Low signal.
|
|
return 1
|
|
|
|
return 0 // Computer is not on station and does not have upgraded network card. No signal.
|
|
|
|
|
|
/obj/item/weapon/computer_hardware/network_card/advanced
|
|
name = "advanced network card"
|
|
desc = "An advanced network card for usage with standard NTNet frequencies. Its transmitter is strong enough to connect even off-station."
|
|
long_range = 1
|
|
origin_tech = "programming=4;engineering=2"
|
|
power_usage = 100 // Better range but higher power usage.
|
|
icon_state = "radio"
|
|
w_class = WEIGHT_CLASS_TINY
|
|
|
|
/obj/item/weapon/computer_hardware/network_card/wired
|
|
name = "wired network card"
|
|
desc = "An advanced network card for usage with standard NTNet frequencies. This one also supports wired connection."
|
|
ethernet = 1
|
|
origin_tech = "programming=5;engineering=3"
|
|
power_usage = 100 // Better range but higher power usage.
|
|
icon_state = "net_wired"
|
|
w_class = WEIGHT_CLASS_NORMAL
|