diff --git a/code/ATMOSPHERICS/components/unary/outlet_injector.dm b/code/ATMOSPHERICS/components/unary/outlet_injector.dm index 553b863da7a..d2bcd37bbe3 100644 --- a/code/ATMOSPHERICS/components/unary/outlet_injector.dm +++ b/code/ATMOSPHERICS/components/unary/outlet_injector.dm @@ -2,7 +2,7 @@ icon_state = "inje_map" use_power = 1 - name = "Air Injector" + name = "air injector" desc = "Has a valve and pump attached to it" var/on = 0 diff --git a/code/WorkInProgress/Sigyn/Softcurity/__README.dm b/code/WorkInProgress/Sigyn/Softcurity/__README.dm deleted file mode 100644 index 75c62c277d5..00000000000 --- a/code/WorkInProgress/Sigyn/Softcurity/__README.dm +++ /dev/null @@ -1,10 +0,0 @@ -/* - -Hey you! -You'll need to untick code/game/jobs/access.dm for this to all work correctly! - -Everything else can just be ticked on top of the original stuff. - -You'll also need to download a modified map from http://tgstation13.googlecode.com/files/tgstation.2.0.9_Softcurity.zip. -Make sure to untick the original map! -*/ \ No newline at end of file diff --git a/code/WorkInProgress/Sigyn/Softcurity/access.dm b/code/WorkInProgress/Sigyn/Softcurity/access.dm deleted file mode 100644 index f0d8fc640a9..00000000000 --- a/code/WorkInProgress/Sigyn/Softcurity/access.dm +++ /dev/null @@ -1,519 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - -/var/const/access_security = 1 // Security equipment -/var/const/access_brig = 2 // Brig timers and permabrig -/var/const/access_armory = 3 -/var/const/access_forensics_lockers= 4 -/var/const/access_medical = 5 -/var/const/access_morgue = 6 -/var/const/access_tox = 7 -/var/const/access_tox_storage = 8 -/var/const/access_genetics = 9 -/var/const/access_engine = 10 -/var/const/access_engine_equip= 11 -/var/const/access_maint_tunnels = 12 -/var/const/access_external_airlocks = 13 -/var/const/access_emergency_storage = 14 -/var/const/access_change_ids = 15 -/var/const/access_ai_upload = 16 -/var/const/access_teleporter = 17 -/var/const/access_eva = 18 -/var/const/access_heads = 19 -/var/const/access_captain = 20 -/var/const/access_all_personal_lockers = 21 -/var/const/access_chapel_office = 22 -/var/const/access_tech_storage = 23 -/var/const/access_atmospherics = 24 -/var/const/access_bar = 25 -/var/const/access_janitor = 26 -/var/const/access_crematorium = 27 -/var/const/access_kitchen = 28 -/var/const/access_robotics = 29 -/var/const/access_rd = 30 -/var/const/access_cargo = 31 -/var/const/access_construction = 32 -/var/const/access_chemistry = 33 -/var/const/access_cargo_bot = 34 -/var/const/access_hydroponics = 35 -/var/const/access_manufacturing = 36 -/var/const/access_library = 37 -/var/const/access_lawyer = 38 -/var/const/access_virology = 39 -/var/const/access_cmo = 40 -/var/const/access_qm = 41 -/var/const/access_court = 42 -/var/const/access_clown = 43 -/var/const/access_mime = 44 -/var/const/access_surgery = 45 -/var/const/access_theatre = 46 -/var/const/access_research = 47 -/var/const/access_mining = 48 -/var/const/access_mining_office = 49 //not in use -/var/const/access_mailsorting = 50 -/var/const/access_mint = 51 -/var/const/access_mint_vault = 52 -/var/const/access_heads_vault = 53 -/var/const/access_mining_station = 54 -/var/const/access_xenobiology = 55 -/var/const/access_ce = 56 -/var/const/access_hop = 57 -/var/const/access_hos = 58 -/var/const/access_RC_announce = 59 //Request console announcements -/var/const/access_keycard_auth = 60 //Used for events which require at least two people to confirm them -/var/const/access_tcomsat = 61 // has access to the entire telecomms satellite / machinery -/var/const/access_gateway = 62 -/var/const/access_sec_doors = 63 // Security front doors - - //BEGIN CENTCOM ACCESS - /*Should leave plenty of room if we need to add more access levels. -/var/const/Mostly for admin fun times.*/ -/var/const/access_cent_general = 101//General facilities. -/var/const/access_cent_thunder = 102//Thunderdome. -/var/const/access_cent_specops = 103//Special Ops. -/var/const/access_cent_medical = 104//Medical/Research -/var/const/access_cent_living = 105//Living quarters. -/var/const/access_cent_storage = 106//Generic storage areas. -/var/const/access_cent_teleporter = 107//Teleporter. -/var/const/access_cent_captain = 109//Captain's office/ID comp/AI. - - //The Syndicate -/var/const/access_syndicate = 150//General Syndicate Access - - //MONEY -/var/const/access_crate_cash = 200 - -/obj/var/list/req_access = null -/obj/var/req_access_txt = "0" -/obj/var/list/req_one_access = null -/obj/var/req_one_access_txt = "0" - -/obj/New() - ..() - //NOTE: If a room requires more than one access (IE: Morgue + medbay) set the req_acesss_txt to "5;6" if it requires 5 and 6 - if(src.req_access_txt) - var/list/req_access_str = text2list(req_access_txt,";") - if(!req_access) - req_access = list() - for(var/x in req_access_str) - var/n = text2num(x) - if(n) - req_access += n - - if(src.req_one_access_txt) - var/list/req_one_access_str = text2list(req_one_access_txt,";") - if(!req_one_access) - req_one_access = list() - for(var/x in req_one_access_str) - var/n = text2num(x) - if(n) - req_one_access += n - - - -//returns 1 if this mob has sufficient access to use this object -/obj/proc/allowed(mob/M) - //check if it doesn't require any access at all - if(src.check_access(null)) - return 1 - if(istype(M, /mob/living/silicon)) - //AI can do whatever he wants - return 1 - else if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - //if they are holding or wearing a card that has access, that works - if(src.check_access(H.get_active_hand()) || src.check_access(H.wear_id)) - return 1 - else if(istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/alien/humanoid)) - var/mob/living/carbon/george = M - //they can only hold things :( - if(george.get_active_hand() && (istype(george.get_active_hand(), /obj/item/weapon/card/id) || istype(george.get_active_hand(), /obj/item/device/pda)) && src.check_access(george.get_active_hand())) - return 1 - return 0 - -/obj/item/proc/GetAccess() - return list() - -/obj/item/proc/GetID() - return null - -/obj/proc/check_access(obj/item/weapon/card/id/I) - - if (istype(I, /obj/item/device/pda)) - var/obj/item/device/pda/pda = I - I = pda.id - - if(!src.req_access && !src.req_one_access) //no requirements - return 1 - if(!istype(src.req_access, /list)) //something's very wrong - return 1 - - var/list/L = src.req_access - if(!L.len && (!src.req_one_access || !src.req_one_access.len)) //no requirements - return 1 - if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access - return 0 - for(var/req in src.req_access) - if(!(req in I.access)) //doesn't have this access - return 0 - if(src.req_one_access && src.req_one_access.len) - for(var/req in src.req_one_access) - if(req in I.access) //has an access from the single access list - return 1 - return 0 - return 1 - - -/obj/proc/check_access_list(var/list/L) - if(!src.req_access && !src.req_one_access) return 1 - if(!istype(src.req_access, /list)) return 1 - if(!src.req_access.len && (!src.req_one_access || !src.req_one_access.len)) return 1 - if(!L) return 0 - if(!istype(L, /list)) return 0 - for(var/req in src.req_access) - if(!(req in L)) //doesn't have this access - return 0 - if(src.req_one_access && src.req_one_access.len) - for(var/req in src.req_one_access) - if(req in L) //has an access from the single access list - return 1 - return 0 - return 1 - - -/proc/get_access(job) - switch(job) - if("Geneticist") - return list(access_medical, access_morgue, access_genetics) - if("Station Engineer") - return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction) - if("Assistant") - if(config.assistant_maint) - return list(access_maint_tunnels) - else - return list() - if("Chaplain") - return list(access_morgue, access_chapel_office, access_crematorium) - if("Detective") - return list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court) - if("Medical Doctor") - return list(access_medical, access_morgue, access_surgery) - if("Botanist") - return list(access_hydroponics, access_morgue) // Removed tox and chem access because STOP PISSING OFF THE CHEMIST GUYS // //Removed medical access because WHAT THE FUCK YOU AREN'T A DOCTOR YOU GROW WHEAT //Given Morgue access because they have a viable means of cloning. - if("Librarian") - return list(access_library) - if("Lawyer") - return list(access_lawyer, access_court, access_sec_doors) - if("Captain") - return get_all_accesses() - if("Crew Supervisor") - return list(access_security, access_sec_doors, access_brig, access_court) - if("Correctional Advisor") - return list(access_security, access_sec_doors, access_brig, access_armory, access_court) - if("Scientist") - return list(access_tox, access_tox_storage, access_research, access_xenobiology) - if("Safety Administrator") - return list(access_medical, access_morgue, access_tox, access_tox_storage, access_chemistry, access_genetics, access_court, - access_teleporter, access_heads, access_tech_storage, access_security, access_sec_doors, access_brig, access_atmospherics, - access_maint_tunnels, access_bar, access_janitor, access_kitchen, access_robotics, access_armory, access_hydroponics, - access_theatre, access_research, access_hos, access_RC_announce, access_forensics_lockers, access_keycard_auth, access_gateway) - if("Head of Personnel") - return list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers, - access_tox, access_tox_storage, access_chemistry, access_medical, access_genetics, access_engine, - access_emergency_storage, access_change_ids, access_ai_upload, access_eva, access_heads, - access_all_personal_lockers, access_tech_storage, access_maint_tunnels, access_bar, access_janitor, - access_crematorium, access_kitchen, access_robotics, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer, - access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station, - access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway) - if("Atmospheric Technician") - return list(access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction) - if("Bartender") - return list(access_bar) - if("Chemist") - return list(access_medical, access_chemistry) - if("Janitor") - return list(access_janitor, access_maint_tunnels) - if("Clown") - return list(access_clown, access_theatre) - if("Mime") - return list(access_mime, access_theatre) - if("Chef") - return list(access_kitchen, access_morgue) - if("Roboticist") - return list(access_robotics, access_tech_storage, access_morgue) //As a job that handles so many corpses, it makes sense for them to have morgue access. - if("Cargo Technician") - return list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting) - if("Shaft Miner") - return list(access_mining, access_mint, access_mining_station) - if("Quartermaster") - return list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station) - if("Chief Engineer") - return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, - access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva, - access_heads, access_ai_upload, access_construction, access_robotics, - access_mint, access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_sec_doors) - if("Research Director") - return list(access_rd, access_heads, access_tox, access_genetics, - access_tox_storage, access_teleporter, - access_research, access_robotics, access_xenobiology, - access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_sec_doors) - if("Virologist") - return list(access_medical, access_virology) - if("Chief Medical Officer") - return list(access_medical, access_morgue, access_genetics, access_heads, - access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce, - access_keycard_auth, access_sec_doors) - else - return list() - -/proc/get_centcom_access(job) - switch(job) - if("VIP Guest") - return list(access_cent_general) - if("Custodian") - return list(access_cent_general, access_cent_living, access_cent_storage) - if("Thunderdome Overseer") - return list(access_cent_general, access_cent_thunder) - if("Intel Officer") - return list(access_cent_general, access_cent_living) - if("Medical Officer") - return list(access_cent_general, access_cent_living, access_cent_medical) - if("Death Commando") - return list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage) - if("Research Officer") - return list(access_cent_general, access_cent_specops, access_cent_medical, access_cent_teleporter, access_cent_storage) - if("BlackOps Commander") - return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_living, access_cent_storage) - if("Supreme Commander") - return get_all_centcom_access() - -/proc/get_all_accesses() - return list(access_security, access_sec_doors, access_brig, access_armory, access_forensics_lockers, access_court, - access_medical, access_genetics, access_morgue, access_rd, - access_tox, access_tox_storage, access_chemistry, access_engine, access_engine_equip, access_maint_tunnels, - access_external_airlocks, access_emergency_storage, access_change_ids, access_ai_upload, - access_teleporter, access_eva, access_heads, access_captain, access_all_personal_lockers, - access_tech_storage, access_chapel_office, access_atmospherics, access_kitchen, - access_bar, access_janitor, access_crematorium, access_robotics, access_cargo, access_cargo_bot, access_construction, - access_hydroponics, access_library, access_manufacturing, access_lawyer, access_virology, access_cmo, access_qm, access_clown, access_mime, access_surgery, - access_theatre, access_research, access_mining, access_mailsorting, access_mint_vault, access_mint, - access_heads_vault, access_mining_station, access_xenobiology, access_ce, access_hop, access_hos, access_RC_announce, - access_keycard_auth, access_tcomsat, access_gateway) - -/proc/get_all_centcom_access() - return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_medical, access_cent_living, access_cent_storage, access_cent_teleporter, access_cent_captain) - -/proc/get_all_syndicate_access() - return list(access_syndicate) - -/proc/get_region_accesses(var/code) - switch(code) - if(0) - return get_all_accesses() - if(1) //security - return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos) - if(2) //medbay - return list(access_medical, access_genetics, access_morgue, access_chemistry, access_virology, access_surgery, access_cmo) - if(3) //research - return list(access_research, access_tox, access_tox_storage, access_xenobiology, access_rd) - if(4) //engineering and maintenance - return list(access_maint_tunnels, access_engine, access_engine_equip, access_external_airlocks, access_tech_storage, access_atmospherics, access_construction, access_robotics, access_ce) - if(5) //command - return list(access_heads, access_change_ids, access_ai_upload, access_teleporter, access_eva, access_all_personal_lockers, access_heads_vault, access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_hop, access_captain) - if(6) //station general - return list(access_kitchen,access_bar, access_hydroponics, access_janitor, access_chapel_office, access_crematorium, access_library, access_theatre, access_lawyer, access_clown, access_mime) - if(7) //supply - return list(access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_mining, access_mining_station) - -/proc/get_region_accesses_name(var/code) - switch(code) - if(0) - return "All" - if(1) //security - return "Security" - if(2) //medbay - return "Medbay" - if(3) //research - return "Research" - if(4) //engineering and maintenance - return "Engineering" - if(5) //command - return "Command" - if(6) //station general - return "Station General" - if(7) //supply - return "Supply" - - -/proc/get_access_desc(A) - switch(A) - if(access_cargo) - return "Cargo Bay" - if(access_cargo_bot) - return "Cargo Bot Delivery" - if(access_security) - return "Security" - if(access_brig) - return "Holding Cells" - if(access_court) - return "Courtroom" - if(access_forensics_lockers) - return "Detective's Office" - if(access_medical) - return "Medical" - if(access_genetics) - return "Genetics Lab" - if(access_morgue) - return "Morgue" - if(access_tox) - return "Research Lab" - if(access_tox_storage) - return "Toxins Storage" - if(access_chemistry) - return "Chemistry Lab" - if(access_rd) - return "RD Private" - if(access_bar) - return "Bar" - if(access_janitor) - return "Custodial Closet" - if(access_engine) - return "Engineering" - if(access_engine_equip) - return "APCs" - if(access_maint_tunnels) - return "Maintenance" - if(access_external_airlocks) - return "External Airlocks" - if(access_emergency_storage) - return "Emergency Storage" - if(access_change_ids) - return "ID Console" - if(access_ai_upload) - return "AI Upload" - if(access_teleporter) - return "Teleporter" - if(access_eva) - return "EVA" - if(access_heads) - return "Bridge" - if(access_captain) - return "Captain Private" - if(access_all_personal_lockers) - return "Personal Lockers" - if(access_chapel_office) - return "Chapel Office" - if(access_tech_storage) - return "Technical Storage" - if(access_atmospherics) - return "Atmospherics" - if(access_crematorium) - return "Crematorium" - if(access_armory) - return "Armory" - if(access_construction) - return "Construction Areas" - if(access_kitchen) - return "Kitchen" - if(access_hydroponics) - return "Hydroponics" - if(access_library) - return "Library" - if(access_lawyer) - return "Law Office" - if(access_robotics) - return "Robotics" - if(access_virology) - return "Virology" - if(access_cmo) - return "CMO Private" - if(access_qm) - return "Quartermaster's Office" - if(access_clown) - return "HONK! Access" - if(access_mime) - return "Silent Access" - if(access_surgery) - return "Surgery" - if(access_theatre) - return "Theatre" - if(access_manufacturing) - return "Manufacturing" - if(access_research) - return "Science" - if(access_mining) - return "Mining" - if(access_mining_office) - return "Mining Office" - if(access_mailsorting) - return "Delivery Office" - if(access_mint) - return "Mint" - if(access_mint_vault) - return "Mint Vault" - if(access_heads_vault) - return "Main Vault" - if(access_mining_station) - return "Mining Station EVA" - if(access_xenobiology) - return "Xenobiology Lab" - if(access_hop) - return "HoP Private" - if(access_hos) - return "HoS Private" - if(access_ce) - return "CE Private" - if(access_RC_announce) - return "RC Announcements" - if(access_keycard_auth) - return "Keycode Auth. Device" - if(access_tcomsat) - return "Telecommunications" - if(access_gateway) - return "Gateway" - if(access_sec_doors) - return "Brig" - -/proc/get_centcom_access_desc(A) - switch(A) - if(access_cent_general) - return "Code Grey" - if(access_cent_thunder) - return "Code Yellow" - if(access_cent_storage) - return "Code Orange" - if(access_cent_living) - return "Code Green" - if(access_cent_medical) - return "Code White" - if(access_cent_teleporter) - return "Code Blue" - if(access_cent_specops) - return "Code Black" - if(access_cent_captain) - return "Code Gold" - -/proc/get_all_jobs() - return list("Assistant", "Captain", "Head of Personnel", "Bartender", "Chef", "Botanist", "Quartermaster", "Cargo Technician", - "Shaft Miner", "Clown", "Mime", "Janitor", "Librarian", "Lawyer", "Chaplain", "Chief Engineer", "Station Engineer", - "Atmospheric Technician", "Roboticist", "Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist", "Virologist", - "Research Director", "Scientist", "Head of Security", "Warden", "Detective", "Security Officer") - -/proc/get_all_centcom_jobs() - return list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer","BlackOps Commander","Supreme Commander") - -/obj/proc/GetJobName() - if (!istype(src, /obj/item/device/pda) && !istype(src,/obj/item/weapon/card/id)) - return - - var/jobName - - if(istype(src, /obj/item/device/pda)) - if(src:id) - jobName = src:id:assignment - if(istype(src, /obj/item/weapon/card/id)) - jobName = src:assignment - - if(jobName in get_all_jobs()) - return jobName - else - return "Unknown" diff --git a/code/WorkInProgress/Sigyn/Softcurity/clothing.dm b/code/WorkInProgress/Sigyn/Softcurity/clothing.dm deleted file mode 100644 index 057c10cb575..00000000000 --- a/code/WorkInProgress/Sigyn/Softcurity/clothing.dm +++ /dev/null @@ -1,33 +0,0 @@ -/obj/item/clothing/under/rank/administrator - name = "safety administrator's jumpsuit" - desc = "It's a jumpsuit worn by those few with the dedication to achieve the position of \"Safety Administrator\"." - icon_state = "hosblueclothes" - item_state = "ba_suit" - color = "hosblueclothes" - armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL - -/obj/item/clothing/under/rank/advisor - name = "correctional advisor's jumpsuit" - desc = "It's made of a slightly sturdier material than standard jumpsuits, to allow for more robust protection. It has the words \"Correctional Advisor\" written on the shoulders." - icon_state = "wardenblueclothes" - item_state = "ba_suit" - color = "wardenblueclothes" - armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL - -/obj/item/clothing/under/rank/supervisor - name = "crew supervisor's jumpsuit" - desc = "It's made of a slightly sturdier material than standard jumpsuits, to allow for robust protection." - icon_state = "officerblueclothes" - item_state = "ba_suit" - color = "officerblueclothes" - armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL - -/obj/item/clothing/shoes/boots - name = "boots" - desc = "Nanotrasen-issue hard-toe safety boots." - icon_state = "secshoes" - item_state = "secshoes" - color = "hosred" \ No newline at end of file diff --git a/code/WorkInProgress/Sigyn/Softcurity/jobs.dm b/code/WorkInProgress/Sigyn/Softcurity/jobs.dm deleted file mode 100644 index 7ef0b8ccddb..00000000000 --- a/code/WorkInProgress/Sigyn/Softcurity/jobs.dm +++ /dev/null @@ -1,152 +0,0 @@ -/datum/job/hos - title = "Safety Administrator" - flag = HOS - department_flag = ENGSEC - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the captain" - selection_color = "#ffdddd" - idtype = /obj/item/weapon/card/id/silver - req_admin_notify = 1 - - - equip(var/mob/living/carbon/human/H) - if(!H) return 0 - H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back) - H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hos(H), slot_ears) - H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/administrator(H), slot_w_uniform) - H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots(H), slot_shoes) - H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hos(H), slot_belt) - H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses) - H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(H), slot_wear_suit) - H.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/taser(H), slot_s_store) - H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) - H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack) - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) - L.imp_in = H - L.implanted = 1 - return 1 - - - -/datum/job/warden - title = "Correctional Advisor" - flag = WARDEN - department_flag = ENGSEC - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the safety administrator" - selection_color = "#ffeeee" - - - equip(var/mob/living/carbon/human/H) - if(!H) return 0 - H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears) - H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back) - H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/advisor(H), slot_w_uniform) - H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots(H), slot_shoes) - H.equip_to_slot_or_del(new /obj/item/device/pda/warden(H), slot_belt) - H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses) - H.equip_to_slot_or_del(new /obj/item/device/flash/handheld(H), slot_l_store) - H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) - H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack) - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) - L.imp_in = H - L.implanted = 1 - return 1 - - - -/datum/job/detective - title = "Detective" - flag = DETECTIVE - department_flag = ENGSEC - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the safety administrator" - selection_color = "#ffeeee" - - - equip(var/mob/living/carbon/human/H) - if(!H) return 0 - H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears) - H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back) - H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/det(H), slot_w_uniform) - H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes) - H.equip_to_slot_or_del(new /obj/item/device/pda/detective(H), slot_belt) - H.equip_to_slot_or_del(new /obj/item/clothing/head/det_hat(H), slot_head) - var/obj/item/clothing/mask/cigarette/CIG = new /obj/item/clothing/mask/cigarette(H) - CIG.light("") - H.equip_to_slot_or_del(CIG, slot_wear_mask) - H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves) - H.equip_to_slot_or_del(new /obj/item/clothing/suit/det_suit(H), slot_wear_suit) - H.equip_to_slot_or_del(new /obj/item/weapon/lighter/zippo(H), slot_l_store) - - H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) - H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack) - H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack) - - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) - L.imp_in = H - L.implanted = 1 - return 1 - - - -/datum/job/officer - title = "Crew Supervisor" - flag = OFFICER - department_flag = ENGSEC - faction = "Station" - total_positions = 5 - spawn_positions = 5 - supervisors = "the safety administrator" - selection_color = "#ffeeee" - - - equip(var/mob/living/carbon/human/H) - if(!H) return 0 - H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears) - H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back) - H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/supervisor(H), slot_w_uniform) - H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots(H), slot_shoes) - H.equip_to_slot_or_del(new /obj/item/device/pda/security(H), slot_belt) - H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_r_store) - H.equip_to_slot_or_del(new /obj/item/device/flash/handheld(H), slot_l_store) - H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) - H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack) - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) - L.imp_in = H - L.implanted = 1 - return 1 - -/datum/job/hop - title = "Head of Personnel" - flag = HOP - department_flag = CIVILIAN - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the captain" - selection_color = "#ddddff" - idtype = /obj/item/weapon/card/id/silver - req_admin_notify = 1 - - - equip(var/mob/living/carbon/human/H) - if(!H) return 0 - H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_ears) - if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) - if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back) - H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) - H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_personnel(H), slot_w_uniform) - H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes) - H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hop(H), slot_belt) - if(H.backbag == 1) - H.equip_to_slot_or_del(new /obj/item/weapon/storage/id_kit(H), slot_r_hand) - else - H.equip_to_slot_or_del(new /obj/item/weapon/storage/id_kit(H.back), slot_in_backpack) - return 1 diff --git a/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm b/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm deleted file mode 100644 index 57f5ef6f8ad..00000000000 --- a/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm +++ /dev/null @@ -1,227 +0,0 @@ -/obj/structure/closet/secure_closet/captains - name = "Captain's Locker" - req_access = list(access_captain) - icon_state = "capsecure1" - icon_closed = "capsecure" - icon_locked = "capsecure1" - icon_opened = "capsecureopen" - icon_broken = "capsecurebroken" - icon_off = "capsecureoff" - - New() - if(prob(50)) - new /obj/item/weapon/storage/backpack/captain(src) - else - new /obj/item/weapon/storage/backpack/satchel_cap(src) - new /obj/item/clothing/suit/captunic(src) - new /obj/item/clothing/head/helmet/cap(src) - new /obj/item/clothing/under/rank/captain(src) - new /obj/item/clothing/suit/armor/vest(src) - new /obj/item/weapon/cartridge/captain(src) - new /obj/item/clothing/head/helmet/swat(src) - new /obj/item/clothing/shoes/brown(src) - new /obj/item/device/radio/headset/heads/captain(src) - new /obj/item/weapon/reagent_containers/food/drinks/flask(src) - new /obj/item/clothing/gloves/captain(src) - new /obj/item/weapon/gun/energy/gun(src) - return - - - -/obj/structure/closet/secure_closet/hop - name = "Head of Personnel's Locker" - req_access = list(access_hop) - icon_state = "hopsecure1" - icon_closed = "hopsecure" - icon_locked = "hopsecure1" - icon_opened = "hopsecureopen" - icon_broken = "hopsecurebroken" - icon_off = "hopsecureoff" - - New() - new /obj/item/clothing/under/rank/head_of_personnel(src) - new /obj/item/clothing/suit/armor/vest(src) - new /obj/item/clothing/head/helmet(src) - new /obj/item/weapon/cartridge/hop(src) - new /obj/item/device/radio/headset/heads/hop(src) - new /obj/item/clothing/shoes/brown(src) - new /obj/item/weapon/storage/id_kit(src) - new /obj/item/weapon/storage/id_kit( src ) - new /obj/item/device/flash/handheld(src) - new /obj/item/clothing/glasses/sunglasses(src) - return - - - -/obj/structure/closet/secure_closet/hos - name = "Safety Administrator's Locker" - req_access = list(access_hos) - icon_state = "hossecure1" - icon_closed = "hossecure" - icon_locked = "hossecure1" - icon_opened = "hossecureopen" - icon_broken = "hossecurebroken" - icon_off = "hossecureoff" - - New() - new /obj/item/weapon/storage/backpack/satchel_sec(src) - new /obj/item/weapon/cartridge/hos(src) - new /obj/item/device/radio/headset/heads/hos(src) - new /obj/item/weapon/storage/lockbox/loyalty(src) - new /obj/item/weapon/storage/flashbang_kit(src) - new /obj/item/weapon/storage/belt/security(src) - new /obj/item/device/flash/handheld(src) - new /obj/item/weapon/melee/baton(src) - new /obj/item/weapon/gun/energy/taser(src) - new /obj/item/weapon/reagent_containers/spray/pepper(src) - return - - - -/obj/structure/closet/secure_closet/warden - name = "Correctional Advisor's Locker" - req_access = list(access_armory) - icon_state = "wardensecure1" - icon_closed = "wardensecure" - icon_locked = "wardensecure1" - icon_opened = "wardensecureopen" - icon_broken = "wardensecurebroken" - icon_off = "wardensecureoff" - - - New() - new /obj/item/weapon/storage/backpack/satchel_sec(src) - new /obj/item/clothing/under/rank/advisor(src) - new /obj/item/device/radio/headset/headset_sec(src) - new /obj/item/clothing/glasses/sunglasses(src) - new /obj/item/weapon/storage/flashbang_kit(src) - new /obj/item/weapon/storage/belt/security(src) - new /obj/item/weapon/reagent_containers/spray/pepper(src) - new /obj/item/weapon/reagent_containers/spray/pepper(src) - new /obj/item/weapon/melee/baton(src) - return - - - -/obj/structure/closet/secure_closet/security - name = "Crew Supervisor's Locker" - req_access = list(access_security) - icon_state = "sec1" - icon_closed = "sec" - icon_locked = "sec1" - icon_opened = "secopen" - icon_broken = "secbroken" - icon_off = "secoff" - - New() - new /obj/item/weapon/storage/backpack/satchel_sec(src) - new /obj/item/device/radio/headset/headset_sec(src) - new /obj/item/weapon/storage/belt/security(src) - new /obj/item/device/flash/handheld(src) - new /obj/item/weapon/reagent_containers/spray/pepper(src) - new /obj/item/weapon/reagent_containers/spray/pepper(src) - new /obj/item/clothing/glasses/sunglasses(src) - return - - - -/obj/structure/closet/secure_closet/detective - name = "Detective's Cabinet" - req_access = list(access_forensics_lockers) - icon_state = "cabinetdetective_locked" - icon_closed = "cabinetdetective" - icon_locked = "cabinetdetective_locked" - icon_opened = "cabinetdetective_open" - icon_broken = "cabinetdetective_broken" - icon_off = "cabinetdetective_broken" - - New() - new /obj/item/clothing/under/rank/det(src) - new /obj/item/clothing/suit/armor/det_suit(src) - new /obj/item/clothing/suit/det_suit(src) - new /obj/item/clothing/gloves/black(src) - new /obj/item/clothing/head/det_hat(src) - new /obj/item/clothing/shoes/brown(src) - new /obj/item/device/radio/headset/headset_sec(src) - new /obj/item/weapon/cartridge/detective(src) - new /obj/item/weapon/clipboard(src) - new /obj/item/device/detective_scanner(src) - new /obj/item/weapon/storage/box/evidence(src) - return - -/obj/structure/closet/secure_closet/detective/update_icon() - if(broken) - icon_state = icon_broken - else - if(!opened) - if(locked) - icon_state = icon_locked - else - icon_state = icon_closed - else - icon_state = icon_opened - -/obj/structure/closet/secure_closet/injection - name = "Lethal Injections" - req_access = list(access_hos) - - - New() - new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src) - new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src) - return - - - -/obj/structure/closet/secure_closet/brig - name = "Brig Locker" - req_access = list(access_brig) - anchored = 1 - - New() - new /obj/item/clothing/under/color/orange( src ) - new /obj/item/clothing/shoes/orange( src ) - return - - - -/obj/structure/closet/secure_closet/courtroom - name = "Courtroom Locker" - req_access = list(access_court) - - New() - new /obj/item/clothing/shoes/brown(src) - new /obj/item/weapon/paper/Court (src) - new /obj/item/weapon/paper/Court (src) - new /obj/item/weapon/paper/Court (src) - new /obj/item/weapon/pen (src) - new /obj/item/clothing/suit/judgerobe (src) - new /obj/item/clothing/head/powdered_wig (src) - new /obj/item/weapon/storage/briefcase(src) - return - -/obj/structure/closet/secure_closet/wall - name = "wall locker" - req_access = list(access_security) - icon_state = "wall-locker1" - density = 1 - icon_closed = "wall-locker" - icon_locked = "wall-locker1" - icon_opened = "wall-lockeropen" - icon_broken = "wall-lockerbroken" - icon_off = "wall-lockeroff" - - //too small to put a man in - large = 0 - -/obj/structure/closet/secure_closet/wall/update_icon() - if(broken) - icon_state = icon_broken - else - if(!opened) - if(locked) - icon_state = icon_locked - else - icon_state = icon_closed - else - icon_state = icon_opened diff --git a/code/WorkInProgress/Sigyn/Softcurity/wardrobe.dm b/code/WorkInProgress/Sigyn/Softcurity/wardrobe.dm deleted file mode 100644 index 452670091f5..00000000000 --- a/code/WorkInProgress/Sigyn/Softcurity/wardrobe.dm +++ /dev/null @@ -1,311 +0,0 @@ -/obj/structure/closet/wardrobe - name = "wardrobe" - desc = "It's a storage unit for standard-issue Nanotrasen attire." - icon_state = "blue" - icon_closed = "blue" - -/obj/structure/closet/wardrobe/New() - new /obj/item/clothing/under/color/blue(src) - new /obj/item/clothing/under/color/blue(src) - new /obj/item/clothing/under/color/blue(src) - new /obj/item/clothing/shoes/brown(src) - new /obj/item/clothing/shoes/brown(src) - new /obj/item/clothing/shoes/brown(src) - return - - -/obj/structure/closet/wardrobe/red - name = "security wardrobe" - icon_state = "red" - icon_closed = "red" - -/obj/structure/closet/wardrobe/red/New() - new /obj/item/clothing/under/rank/supervisor(src) - new /obj/item/clothing/under/rank/supervisor(src) - new /obj/item/clothing/under/rank/supervisor(src) - new /obj/item/clothing/shoes/boots(src) - new /obj/item/clothing/shoes/boots(src) - new /obj/item/clothing/shoes/boots(src) - new /obj/item/clothing/head/soft/grey(src) - new /obj/item/clothing/head/soft/grey(src) - new /obj/item/clothing/head/soft/grey(src) - return - - -/obj/structure/closet/wardrobe/pink - name = "pink wardrobe" - icon_state = "pink" - icon_closed = "pink" - -/obj/structure/closet/wardrobe/pink/New() - new /obj/item/clothing/under/color/pink(src) - new /obj/item/clothing/under/color/pink(src) - new /obj/item/clothing/under/color/pink(src) - new /obj/item/clothing/shoes/brown(src) - new /obj/item/clothing/shoes/brown(src) - new /obj/item/clothing/shoes/brown(src) - return - -/obj/structure/closet/wardrobe/black - name = "black wardrobe" - icon_state = "black" - icon_closed = "black" - -/obj/structure/closet/wardrobe/black/New() - new /obj/item/clothing/under/color/black(src) - new /obj/item/clothing/under/color/black(src) - new /obj/item/clothing/under/color/black(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/clothing/head/that(src) - new /obj/item/clothing/head/that(src) - new /obj/item/clothing/head/that(src) - return - - -/obj/structure/closet/wardrobe/chaplain_black - name = "chapel wardrobe" - desc = "It's a storage unit for Nanotrasen-approved religious attire." - icon_state = "black" - icon_closed = "black" - -/obj/structure/closet/wardrobe/chaplain_black/New() - new /obj/item/clothing/under/rank/chaplain(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/clothing/suit/nun(src) - new /obj/item/clothing/head/nun_hood(src) - new /obj/item/clothing/suit/chaplain_hoodie(src) - new /obj/item/clothing/head/chaplain_hood(src) - new /obj/item/clothing/suit/holidaypriest(src) - new /obj/item/weapon/storage/backpack/cultpack (src) - new /obj/item/weapon/storage/fancy/candle_box(src) - new /obj/item/weapon/storage/fancy/candle_box(src) - return - - -/obj/structure/closet/wardrobe/green - name = "green wardrobe" - icon_state = "green" - icon_closed = "green" - -/obj/structure/closet/wardrobe/green/New() - new /obj/item/clothing/under/color/green(src) - new /obj/item/clothing/under/color/green(src) - new /obj/item/clothing/under/color/green(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/clothing/shoes/black(src) - return - - -/obj/structure/closet/wardrobe/orange - name = "prison wardrobe" - desc = "It's a storage unit for Nanotrasen-regulation prisoner attire." - icon_state = "orange" - icon_closed = "orange" - -/obj/structure/closet/wardrobe/orange/New() - new /obj/item/clothing/under/color/orange(src) - new /obj/item/clothing/under/color/orange(src) - new /obj/item/clothing/under/color/orange(src) - new /obj/item/clothing/shoes/orange(src) - new /obj/item/clothing/shoes/orange(src) - new /obj/item/clothing/shoes/orange(src) - return - - -/obj/structure/closet/wardrobe/yellow - name = "yellow wardrobe" - icon_state = "wardrobe-y" - icon_closed = "wardrobe-y" - -/obj/structure/closet/wardrobe/yellow/New() - new /obj/item/clothing/under/color/yellow(src) - new /obj/item/clothing/under/color/yellow(src) - new /obj/item/clothing/under/color/yellow(src) - new /obj/item/clothing/shoes/orange(src) - new /obj/item/clothing/shoes/orange(src) - new /obj/item/clothing/shoes/orange(src) - return - - -/obj/structure/closet/wardrobe/atmospherics_yellow - name = "atmospherics wardrobe" - icon_state = "yellow" - icon_closed = "yellow" - -/obj/structure/closet/wardrobe/atmospherics_yellow/New() - new /obj/item/clothing/under/rank/atmospheric_technician(src) - new /obj/item/clothing/under/rank/atmospheric_technician(src) - new /obj/item/clothing/under/rank/atmospheric_technician(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/clothing/shoes/black(src) - return - - - -/obj/structure/closet/wardrobe/engineering_yellow - name = "engineering wardrobe" - icon_state = "yellow" - icon_closed = "yellow" - -/obj/structure/closet/wardrobe/engineering_yellow/New() - new /obj/item/clothing/under/rank/engineer(src) - new /obj/item/clothing/under/rank/engineer(src) - new /obj/item/clothing/under/rank/engineer(src) - new /obj/item/clothing/shoes/orange(src) - new /obj/item/clothing/shoes/orange(src) - new /obj/item/clothing/shoes/orange(src) - return - - -/obj/structure/closet/wardrobe/white - name = "white wardrobe" - icon_state = "white" - icon_closed = "white" - -/obj/structure/closet/wardrobe/white/New() - new /obj/item/clothing/under/color/white(src) - new /obj/item/clothing/under/color/white(src) - new /obj/item/clothing/under/color/white(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/shoes/white(src) - return - - -/obj/structure/closet/wardrobe/pjs - name = "Pajama wardrobe" - icon_state = "white" - icon_closed = "white" - -/obj/structure/closet/wardrobe/pjs/New() - new /obj/item/clothing/under/pj/red(src) - new /obj/item/clothing/under/pj/red(src) - new /obj/item/clothing/under/pj/blue(src) - new /obj/item/clothing/under/pj/blue(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/shoes/white(src) - return - - -/obj/structure/closet/wardrobe/toxins_white - name = "toxins wardrobe" - icon_state = "white" - icon_closed = "white" - -/obj/structure/closet/wardrobe/toxins_white/New() - new /obj/item/clothing/under/rank/scientist(src) - new /obj/item/clothing/under/rank/scientist(src) - new /obj/item/clothing/under/rank/scientist(src) - new /obj/item/clothing/suit/labcoat(src) - new /obj/item/clothing/suit/labcoat(src) - new /obj/item/clothing/suit/labcoat(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/shoes/white(src) - return - - -/obj/structure/closet/wardrobe/robotics_black - name = "robotics wardrobe" - icon_state = "black" - icon_closed = "black" - -/obj/structure/closet/wardrobe/robotics_black/New() - new /obj/item/clothing/under/rank/roboticist(src) - new /obj/item/clothing/under/rank/roboticist(src) - new /obj/item/clothing/suit/labcoat(src) - new /obj/item/clothing/suit/labcoat(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/clothing/gloves/black(src) - new /obj/item/clothing/gloves/black(src) - return - - -/obj/structure/closet/wardrobe/chemistry_white - name = "chemistry wardrobe" - icon_state = "white" - icon_closed = "white" - -/obj/structure/closet/wardrobe/chemistry_white/New() - new /obj/item/clothing/under/rank/chemist(src) - new /obj/item/clothing/under/rank/chemist(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/suit/labcoat/chemist(src) - new /obj/item/clothing/suit/labcoat/chemist(src) - return - - -/obj/structure/closet/wardrobe/genetics_white - name = "genetics wardrobe" - icon_state = "white" - icon_closed = "white" - -/obj/structure/closet/wardrobe/genetics_white/New() - new /obj/item/clothing/under/rank/geneticist(src) - new /obj/item/clothing/under/rank/geneticist(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/suit/labcoat/genetics(src) - new /obj/item/clothing/suit/labcoat/genetics(src) - return - - -/obj/structure/closet/wardrobe/virology_white - name = "virology wardrobe" - icon_state = "white" - icon_closed = "white" - -/obj/structure/closet/wardrobe/virology_white/New() - new /obj/item/clothing/under/rank/virologist(src) - new /obj/item/clothing/under/rank/virologist(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/suit/labcoat/virologist(src) - new /obj/item/clothing/suit/labcoat/virologist(src) - new /obj/item/clothing/mask/surgical(src) - new /obj/item/clothing/mask/surgical(src) - return - - -/obj/structure/closet/wardrobe/grey - name = "grey wardrobe" - icon_state = "grey" - icon_closed = "grey" - -/obj/structure/closet/wardrobe/grey/New() - new /obj/item/clothing/under/color/grey(src) - new /obj/item/clothing/under/color/grey(src) - new /obj/item/clothing/under/color/grey(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/clothing/head/soft/grey(src) - new /obj/item/clothing/head/soft/grey(src) - new /obj/item/clothing/head/soft/grey(src) - return - - -/obj/structure/closet/wardrobe/mixed - name = "mixed wardrobe" - icon_state = "mixed" - icon_closed = "mixed" - -/obj/structure/closet/wardrobe/mixed/New() - new /obj/item/clothing/under/color/white(src) - new /obj/item/clothing/under/color/blue(src) - new /obj/item/clothing/under/color/yellow(src) - new /obj/item/clothing/under/color/green(src) - new /obj/item/clothing/under/color/orange(src) - new /obj/item/clothing/under/color/pink(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/clothing/shoes/brown(src) - new /obj/item/clothing/shoes/white(src) - return diff --git a/code/WorkInProgress/carn/Explosion2.dm b/code/WorkInProgress/carn/Explosion2.dm deleted file mode 100644 index a1f2687cc85..00000000000 --- a/code/WorkInProgress/carn/Explosion2.dm +++ /dev/null @@ -1,117 +0,0 @@ -//TODO: Flash range does nothing currently -//NOTE: This has not yet been updated with the lighting deferal stuff. ~Carn -//Needs some work anyway. - -proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1) - spawn(0) - var/start = world.timeofday - epicenter = get_turf(epicenter) - if(!epicenter) return - - if(adminlog) - message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ") - log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ") - - playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(devastation_range*2,1) ) - playsound(epicenter, "explosion", 100, 1, round(devastation_range,1) ) - - tension_master.explosion() - - if(defer_powernet_rebuild != 2) - defer_powernet_rebuild = 1 - - if(heavy_impact_range > 1) - var/datum/effect/system/explosion/E = new/datum/effect/system/explosion() - E.set_up(epicenter) - E.start() - - var/x = epicenter.x - var/y = epicenter.y - var/z = epicenter.z - - var/counter = 0 - - if(devastation_range > 0) - counter += explosion_turf(x,y,z,1) - else - devastation_range = 0 - if(heavy_impact_range > 0) - counter += explosion_turf(x,y,z,2) - else - heavy_impact_range = 0 - if(light_impact_range > 0) - counter += explosion_turf(x,y,z,3) - else - return - - //Diamond 'splosions (looks more round than square version) - for(var/i=0, i[copytext("\ref[powernets[i]]",8,12)]" - src << "[copytext("\ref[pipe_networks[i]]",8,12)]" - src << "[pipe_networks.len] total pipenets" - - -/client/verb/pipenet_overlays() - var/list/L = list() - for(var/obj/machinery/atmospherics/AT in view(mob)) - AT.maptext = null - L |= AT - for(var/datum/pipe_network/Network in pipe_networks) - for(var/obj/machinery/atmospherics/AT in Network.normal_members) - if(!(AT in L)) - continue - if(!AT.maptext) - AT.maptext = "[copytext("\ref[Network]",8,12)]" - else - world << "DUPLICATE: [AT.name] net#[copytext("\ref[Network]",8,12)])" - for(var/datum/pipeline/PL in Network.line_members) - for(var/obj/machinery/atmospherics/AT in PL.members) - if(!(AT in L)) - continue - if(!AT.maptext) - AT.maptext = "[copytext("\ref[Network]",8,12)]" - else - world << "DUPLICATE: [AT.name] net#[copytext("\ref[Network]",8,12)])" - for(var/obj/machinery/atmospherics/ATE in PL.edges) - if(!(ATE in L)) - continue - if(!ATE.maptext) - ATE.maptext = "[copytext("\ref[Network]",8,12)]" - else - world << "DUPLICATE: [ATE.name] net#[copytext("\ref[Network]",8,12)])" - -/client/verb/follow_pipenet(var/netref as null|anything in get_refs(pipe_networks)) - var/datum/pipe_network/Network = locate(netref) - if(!Network) - src << "Unable to locate [netref]" - return - for(var/obj/machinery/atmospherics/AT in world) - if(AT) - animate(AT, alpha = 255, time = 0) - for(var/obj/machinery/atmospherics/AT in Network.normal_members) - if(AT) - animate(AT, alpha = 0, time = 1, loop = -1) - animate(alpha = 255, time = 1) - for(var/datum/pipeline/PL in Network.line_members) - for(var/obj/machinery/atmospherics/AT in PL.members) - if(AT) - animate(AT, alpha = 0, time = 1, loop = -1) - animate(alpha = 255, time = 1) - -/proc/get_refs(var/list/L) - . = list() - for(var/everything in L) - . += "\ref[everything]" \ No newline at end of file diff --git a/code/WorkInProgress/carn/debug_powernets.dm b/code/WorkInProgress/carn/debug_powernets.dm deleted file mode 100644 index ceb96e01af4..00000000000 --- a/code/WorkInProgress/carn/debug_powernets.dm +++ /dev/null @@ -1,13 +0,0 @@ -/client/verb/powernets_debug() - if(!holder) return - for(var/i=1,i<=powernets.len,i++) -// src << "[copytext("\ref[powernets[i]]",8,12)]" - src << "[copytext("\ref[powernets[i]]",8,12)]" - - -/client/verb/powernet_overlays() - for(var/obj/structure/cable/C in cable_list) - C.maptext = "[copytext("\ref[C.powernet]",8,12)]" - for(var/obj/machinery/power/M in machines) - M.maptext = "[copytext("\ref[M.powernet]",8,12)]" - diff --git a/code/WorkInProgress/carn/master_controller_old.dm b/code/WorkInProgress/carn/master_controller_old.dm deleted file mode 100644 index 80a7659035d..00000000000 --- a/code/WorkInProgress/carn/master_controller_old.dm +++ /dev/null @@ -1,210 +0,0 @@ -var/global/datum/controller/game_controller/master_controller //Set in world.New() -var/global/datum/failsafe/Failsafe -var/global/controller_iteration = 0 - - -var/global/last_tick_timeofday = world.timeofday -var/global/last_tick_duration = 0 - -datum/controller/game_controller - var/processing = 0 - - var/global/air_master_ready = 0 - var/global/sun_ready = 0 - var/global/mobs_ready = 0 - var/global/diseases_ready = 0 - var/global/machines_ready = 0 - var/global/objects_ready = 0 - var/global/networks_ready = 0 - var/global/powernets_ready = 0 - var/global/ticker_ready = 0 - - //Used for MC 'proc break' debugging - var/global/obj/last_obj_processed - var/global/datum/disease/last_disease_processed - var/global/obj/machinery/last_machine_processed - var/global/mob/last_mob_processed - - - proc/setup() - if(master_controller && (master_controller != src)) - del(src) - return - //There can be only one master. - - if(!air_master) - air_master = new /datum/controller/air_system() - air_master.setup() - - if(!job_master) - job_master = new /datum/controller/occupations() - if(job_master.SetupOccupations()) - world << "\red \b Job setup complete" - job_master.LoadJobs("config/jobs.txt") - - world.tick_lag = config.Ticklag - - createRandomZlevel() - - setup_objects() - - setupgenetics() - - - for(var/i = 0, i < max_secret_rooms, i++) - make_mining_asteroid_secret() - - syndicate_code_phrase = generate_code_phrase()//Sets up code phrase for traitors, for the round. - syndicate_code_response = generate_code_phrase() - - emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle() - - if(!ticker) - ticker = new /datum/controller/gameticker() - - setupfactions() - - spawn - ticker.pregame() - - proc/setup_objects() - world << "\red \b Initializing objects" - sleep(-1) - - for(var/obj/object in world) - object.initialize() - - world << "\red \b Initializing pipe networks" - sleep(-1) - - for(var/obj/machinery/atmospherics/machine in world) - machine.build_network() - - world << "\red \b Initializing atmos machinery." - sleep(-1) - for(var/obj/machinery/atmospherics/unary/vent_pump/T in world) - T.broadcast_status() - for(var/obj/machinery/atmospherics/unary/vent_scrubber/T in world) - T.broadcast_status() - - world << "\red \b Initializations complete." - - - proc/process() - processing = 1 - spawn(0) - set background = 1 - while(1) - var/currenttime = world.timeofday - var/diff = (currenttime - last_tick_timeofday) / 10 - last_tick_timeofday = currenttime - last_tick_duration = diff - - if(processing) - - controller_iteration++ - - var/start_time = world.timeofday - - air_master_ready = 0 - sun_ready = 0 - mobs_ready = 0 - diseases_ready = 0 - machines_ready = 0 - objects_ready = 0 - networks_ready = 0 - powernets_ready = 0 - ticker_ready = 0 - - spawn(0) - air_master.process() - air_master_ready = 1 - - sleep(1) - - spawn(0) - sun.calc_position() - sun_ready = 1 - - sleep(-1) - - spawn(0) - for(var/mob/M in world) - last_mob_processed = M - M.Life() - mobs_ready = 1 - - sleep(-1) - - spawn(0) - for(var/datum/disease/D in active_diseases) - last_disease_processed = D - D.process() - diseases_ready = 1 - - spawn(0) - for(var/obj/machinery/machine in machines) - if(machine) - last_machine_processed = machine - machine.process() - if(machine && machine.use_power) - machine.auto_use_power() - - machines_ready = 1 - - sleep(1) - - spawn(-1) - for(var/obj/object in processing_objects) - last_obj_processed = object - object.process() - objects_ready = 1 - - sleep(-1) - - spawn(-1) - for(var/datum/pipe_network/network in pipe_networks) - network.process() - networks_ready = 1 - - spawn(-1) - for(var/datum/powernet/P in powernets) - P.reset() - powernets_ready = 1 - - sleep(-1) - - spawn(-1) - ticker.process() - ticker_ready = 1 - - var/IL_check = 0 //Infinite loop check (To report when the master controller breaks.) - while(!air_master_ready || !sun_ready || !mobs_ready || !diseases_ready || !machines_ready || !objects_ready || !networks_ready || !powernets_ready || !ticker_ready) - IL_check++ - if(IL_check > 600) - var/MC_report = "air_master_ready = [air_master_ready]; sun_ready = [sun_ready]; mobs_ready = [mobs_ready]; diseases_ready = [diseases_ready]; machines_ready = [machines_ready]; objects_ready = [objects_ready]; networks_ready = [networks_ready]; powernets_ready = [powernets_ready]; ticker_ready = [ticker_ready];" - message_admins("PROC BREAKAGE WARNING: The game's master contorller appears to be stuck in one of it's cycles. It has looped through it's delaying loop [IL_check] times.") - message_admins("The master controller reports: [MC_report]") - if(!diseases_ready) - if(last_disease_processed) - message_admins("DISEASE PROCESSING stuck on [last_disease_processed]", 0, 1) - else - message_admins("DISEASE PROCESSING stuck on unknown") - if(!machines_ready) - if(last_machine_processed) - message_admins("MACHINE PROCESSING stuck on [last_machine_processed]", 0, 1) - else - message_admins("MACHINE PROCESSING stuck on unknown") - if(!objects_ready) - if(last_obj_processed) - message_admins("OBJ PROCESSING stuck on [last_obj_processed]", 0, 1) - else - message_admins("OBJ PROCESSING stuck on unknown") - log_admin("PROC BREAKAGE WARNING: infinite_loop_check = [IL_check]; [MC_report];") - message_admins("Master controller breaking out of delaying loop. Restarting the round is advised if problem persists. DO NOT manually restart the master controller.") - break; - sleep(1) - - sleep(world.timeofday+12-start_time) - else - sleep(10) \ No newline at end of file diff --git a/code/WorkInProgress/carn/master_controller_semi-seq.dm b/code/WorkInProgress/carn/master_controller_semi-seq.dm deleted file mode 100644 index 96e7eacda6e..00000000000 --- a/code/WorkInProgress/carn/master_controller_semi-seq.dm +++ /dev/null @@ -1,258 +0,0 @@ -//Nothing spectacular, just a slightly more configurable MC. - -var/global/datum/controller/game_controller/master_controller //Set in world.New() -var/global/datum/failsafe/Failsafe -var/global/controller_iteration = 0 - - -var/global/last_tick_timeofday = world.timeofday -var/global/last_tick_duration = 0 - -var/global/obj/machinery/last_obj_processed //Used for MC 'proc break' debugging -var/global/datum/disease/last_disease_processed //Used for MC 'proc break' debugging -var/global/obj/machinery/last_machine_processed //Used for MC 'proc break' debugging - -datum/controller/game_controller - var/processing = 0 - var/breather_ticks = 1 //a somewhat crude attempt to iron over the 'bumps' caused by high-cpu use by letting the MC have a breather for this many ticks after every step - var/minimum_ticks = 10 //The minimum length of time between MC ticks - - var/global/air_master_ready = 0 - var/global/tension_master_ready = 0 - var/global/sun_ready = 0 - var/global/mobs_ready = 0 - var/global/diseases_ready = 0 - var/global/machines_ready = 0 - var/global/objects_ready = 0 - var/global/networks_ready = 0 - var/global/powernets_ready = 0 - var/global/ticker_ready = 0 - -datum/controller/game_controller/New() - //There can be only one master_controller. Out with the old and in with the new. - if(master_controller) - if(master_controller != src) - del(master_controller) - master_controller = src - - if(!air_master) - air_master = new /datum/controller/air_system() - air_master.setup() - - if(!job_master) - job_master = new /datum/controller/occupations() - if(job_master.SetupOccupations()) - world << "\red \b Job setup complete" - job_master.LoadJobs("config/jobs.txt") - - if(!tension_master) tension_master = new /datum/tension() - if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase() - if(!syndicate_code_response) syndicate_code_response = generate_code_phrase() - if(!ticker) ticker = new /datum/controller/gameticker() - if(!emergency_shuttle) emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle() - - -datum/controller/game_controller/proc/setup() - world.tick_lag = config.Ticklag - - createRandomZlevel() - setup_objects() - setupgenetics() - setupfactions() - - for(var/i = 0, i < max_secret_rooms, i++) - make_mining_asteroid_secret() - - spawn(0) - if(ticker) - ticker.pregame() - -datum/controller/game_controller/proc/setup_objects() - world << "\red \b Initializing objects" - sleep(-1) - for(var/obj/object in world) - object.initialize() - - world << "\red \b Initializing pipe networks" - sleep(-1) - for(var/obj/machinery/atmospherics/machine in world) - machine.build_network() - - world << "\red \b Initializing atmos machinery." - sleep(-1) - for(var/obj/machinery/atmospherics/unary/vent_pump/T in world) - T.broadcast_status() - for(var/obj/machinery/atmospherics/unary/vent_scrubber/T in world) - T.broadcast_status() - - world << "\red \b Initializations complete." - sleep(-1) - - -datum/controller/game_controller/proc/process() - set background = 1 - processing = 1 - while(1) //far more efficient than recursively calling ourself - if(!Failsafe) new /datum/failsafe() - - var/currenttime = world.timeofday - last_tick_duration = (currenttime - last_tick_timeofday) / 10 - last_tick_timeofday = currenttime - - if(processing) - var/start_time = world.timeofday - controller_iteration++ - - air_master_ready = 0 - tension_master_ready = 0 - sun_ready = 0 - mobs_ready = 0 - diseases_ready = 0 - machines_ready = 0 - objects_ready = 0 - networks_ready = 0 - powernets_ready = 0 - ticker_ready = 0 - - spawn(0) - air_master.process() - air_master_ready = 1 - sleep(breather_ticks) - - spawn(0) - tension_master.process() - tension_master_ready = 1 - sleep(breather_ticks) - - spawn(0) - sun.calc_position() - sun_ready = 1 - sleep(breather_ticks) - - spawn(0) - for(var/mob/living/M in world) //only living mobs have life processes - M.Life() - mobs_ready = 1 - sleep(breather_ticks) - - spawn(0) - for(var/datum/disease/D in active_diseases) - last_disease_processed = D - D.process() - diseases_ready = 1 - sleep(breather_ticks) - - spawn(0) - for(var/obj/machinery/machine in machines) - if(machine) - last_machine_processed = machine - machine.process() - if(machine && machine.use_power) - machine.auto_use_power() - machines_ready = 1 - sleep(breather_ticks) - - spawn(0) - for(var/obj/object in processing_objects) - last_obj_processed = object - object.process() - objects_ready = 1 - sleep(breather_ticks) - - spawn(0) - for(var/datum/pipe_network/network in pipe_networks) - network.process() - networks_ready = 1 - sleep(breather_ticks) - - spawn(0) - for(var/datum/powernet/P in powernets) - P.reset() - powernets_ready = 1 - sleep(breather_ticks) - - spawn(0) - ticker.process() - ticker_ready = 1 - - sleep( minimum_ticks - max(world.timeofday-start_time,0) ) //to prevent long delays happening at midnight - - var/IL_check = 0 //Infinite loop check (To report when the master controller breaks.) - while(!air_master_ready || !tension_master_ready || !sun_ready || !mobs_ready || !diseases_ready || !machines_ready || !objects_ready || !networks_ready || !powernets_ready || !ticker_ready) - IL_check++ - if(IL_check > 200) - var/MC_report = "air_master_ready = [air_master_ready]; tension_master_ready = [tension_master_ready]; sun_ready = [sun_ready]; mobs_ready = [mobs_ready]; diseases_ready = [diseases_ready]; machines_ready = [machines_ready]; objects_ready = [objects_ready]; networks_ready = [networks_ready]; powernets_ready = [powernets_ready]; ticker_ready = [ticker_ready];" - var/MC_admin_report = "PROC BREAKAGE WARNING: The game's master contorller appears to be stuck in one of it's cycles. It has looped through it's delaying loop [IL_check] times.
The master controller reports: [MC_report]

" - if(!diseases_ready) - if(last_disease_processed) - MC_admin_report += "DISEASE PROCESSING stuck on [last_disease_processed]
" - else - MC_admin_report += "DISEASE PROCESSING stuck on unknown
" - if(!machines_ready) - if(last_machine_processed) - MC_admin_report += "MACHINE PROCESSING stuck on [last_machine_processed]
" - else - MC_admin_report += "MACHINE PROCESSING stuck on unknown
" - if(!objects_ready) - if(last_obj_processed) - MC_admin_report += "OBJ PROCESSING stuck on [last_obj_processed]
" - else - MC_admin_report += "OBJ PROCESSING stuck on unknown
" - MC_admin_report += "Master controller breaking out of delaying loop. Restarting the round is advised if problem persists. DO NOT manually restart the master controller.
" - message_admins(MC_admin_report) - log_admin("PROC BREAKAGE WARNING: infinite_loop_check = [IL_check]; [MC_report];") - break - sleep(3) - else - sleep(10) - - - -/datum/failsafe // This thing pretty much just keeps poking the master controller - var/spinning = 1 - var/current_iteration = 0 - var/ticks_per_spin = 200 //poke the MC every 20 seconds - var/defcon = 0 //alert level. For every poke that fails this is raised by 1. When it reaches 5 the MC is replaced with a new one. (effectively killing any master_controller.process() and starting a new one) - -/datum/failsafe/New() - //There can be only one failsafe. Out with the old in with the new (that way we can restart the Failsafe by spawning a new one) - if(Failsafe && (Failsafe != src)) - del(Failsafe) - Failsafe = src - - current_iteration = controller_iteration - spawn(0) - Failsafe.spin() - - -/datum/failsafe/proc/spin() - set background = 1 - while(1) //more efficient than recursivly calling ourself over and over. background = 1 ensures we do not trigger an infinite loop - if(master_controller) - if(spinning && master_controller.processing) //only poke if these overrides aren't in effect - if(current_iteration == controller_iteration) //master_controller hasn't finished processing in the defined interval - switch(defcon) - if(0 to 3) - defcon++ - if(4) - defcon = 5 - for(var/client/C) - if(C.holder) - C << "Warning. The Master Controller has not fired in the last [4*ticks_per_spin] ticks. Automatic restart in [ticks_per_spin] ticks." - if(5) - for(var/client/C) - if(C.holder) - C << "Warning. The Master Controller has still not fired within the last [5*ticks_per_spin] ticks. Killing and restarting..." - spawn(0) - new /datum/controller/game_controller() //replace the old master_controller (hence killing the old one's process) - master_controller.process() //Start it rolling again - defcon = 0 - else - defcon = 0 - current_iteration = controller_iteration - else - defcon = 0 - else - new /datum/controller/game_controller() //replace the missing master_controller! This should never happen. - sleep(ticks_per_spin) - diff --git a/code/WorkInProgress/mapload/dmm_suite.dm b/code/WorkInProgress/mapload/dmm_suite.dm deleted file mode 100644 index f096d555642..00000000000 --- a/code/WorkInProgress/mapload/dmm_suite.dm +++ /dev/null @@ -1,246 +0,0 @@ -dmm_suite - /* - - dmm_suite version 1.0 - Released January 30th, 2011. - - defines the object /dmm_suite - - Provides the proc load_map() - - Loads the specified map file onto the specified z-level. - - provides the proc write_map() - - Returns a text string of the map in dmm format - ready for output to a file. - - provides the proc save_map() - - Returns a .dmm file if map is saved - - Returns FALSE if map fails to save - - The dmm_suite provides saving and loading of map files in BYOND's native DMM map - format. It approximates the map saving and loading processes of the Dream Maker - and Dream Seeker programs so as to allow editing, saving, and loading of maps at - runtime. - - ------------------------ - - To save a map at runtime, create an instance of /dmm_suite, and then call - write_map(), which accepts three arguments: - - A turf representing one corner of a three dimensional grid (Required). - - Another turf representing the other corner of the same grid (Required). - - Any, or a combination, of several bit flags (Optional, see documentation). - - The order in which the turfs are supplied does not matter, the /dmm_writer will - determine the grid containing both, in much the same way as DM's block() function. - write_map() will then return a string representing the saved map in dmm format; - this string can then be saved to a file, or used for any other purose. - - ------------------------ - - To load a map at runtime, create an instance of /dmm_suite, and then call load_map(), - which accepts two arguments: - - A .dmm file to load (Required). - - A number representing the z-level on which to start loading the map (Optional). - - The /dmm_suite will load the map file starting on the specified z-level. If no - z-level was specified, world.maxz will be increased so as to fit the map. Note - that if you wish to load a map onto a z-level that already has objects on it, - you will have to handle the removal of those objects. Otherwise the new map will - simply load the new objects on top of the old ones. - - Also note that all type paths specified in the .dmm file must exist in the world's - code, and that the /dmm_reader trusts that files to be loaded are in fact valid - .dmm files. Errors in the .dmm format will cause runtime errors. - - */ - - - verb/load_map(var/dmm_file as file, var/z_offset as num) - // dmm_file: A .dmm file to load (Required). - // z_offset: A number representing the z-level on which to start loading the map (Optional). - - - verb/write_map(var/turf/t1 as turf, var/turf/t2 as turf, var/flags as num) - // t1: A turf representing one corner of a three dimensional grid (Required). - // t2: Another turf representing the other corner of the same grid (Required). - // flags: Any, or a combination, of several bit flags (Optional, see documentation). - - // save_map is included as a legacy proc. Use write_map instead. - verb/save_map(var/turf/t1 as turf, var/turf/t2 as turf, var/map_name as text, var/flags as num) - // t1: A turf representing one corner of a three dimensional grid (Required). - // t2: Another turf representing the other corner of the same grid (Required). - // map_name: A valid name for the map to be saved, such as "castle" (Required). - // flags: Any, or a combination, of several bit flags (Optional, see documentation). - - -#define DMM_IGNORE_AREAS 1 -#define DMM_IGNORE_TURFS 2 -#define DMM_IGNORE_OBJS 4 -#define DMM_IGNORE_NPCS 8 -#define DMM_IGNORE_PLAYERS 16 -#define DMM_IGNORE_MOBS 24 -dmm_suite{ - var{ - quote = "\"" - list/letter_digits = list( - "a","b","c","d","e", - "f","g","h","i","j", - "k","l","m","n","o", - "p","q","r","s","t", - "u","v","w","x","y", - "z", - "A","B","C","D","E", - "F","G","H","I","J", - "K","L","M","N","O", - "P","Q","R","S","T", - "U","V","W","X","Y", - "Z" - ) - } - save_map(var/turf/t1 as turf, var/turf/t2 as turf, var/map_name as text, var/flags as num){ - //Check for illegal characters in file name... in a cheap way. - if(!((ckeyEx(map_name)==map_name) && ckeyEx(map_name))){ - CRASH("Invalid text supplied to proc save_map, invalid characters or empty string.") - } - //Check for valid turfs. - if(!isturf(t1) || !isturf(t2)){ - CRASH("Invalid arguments supplied to proc save_map, arguments were not turfs.") - } - var/file_text = write_map(t1,t2,flags) - if(fexists("[map_name].dmm")){ - fdel("[map_name].dmm") - } - var/saved_map = file("[map_name].dmm") - saved_map << file_text - return saved_map - } - write_map(var/turf/t1 as turf, var/turf/t2 as turf, var/flags as num){ - //Check for valid turfs. - if(!isturf(t1) || !isturf(t2)){ - CRASH("Invalid arguments supplied to proc write_map, arguments were not turfs.") - } - var/turf/nw = locate(min(t1.x,t2.x),max(t1.y,t2.y),min(t1.z,t2.z)) - var/turf/se = locate(max(t1.x,t2.x),min(t1.y,t2.y),max(t1.z,t2.z)) - var/list/templates[0] - var/template_buffer = {""} - var/dmm_text = {""} - for(var/pos_z=nw.z;pos_z<=se.z;pos_z++){ - for(var/pos_y=nw.y;pos_y>=se.y;pos_y--){ - for(var/pos_x=nw.x;pos_x<=se.x;pos_x++){ - var/turf/test_turf = locate(pos_x,pos_y,pos_z) - var/test_template = make_template(test_turf, flags) - var/template_number = templates.Find(test_template) - if(!template_number){ - templates.Add(test_template) - template_number = templates.len - } - template_buffer += "[template_number]," - } - template_buffer += ";" - } - template_buffer += "." - } - var/key_length = round/*floor*/(log(letter_digits.len,templates.len-1)+1) - var/list/keys[templates.len] - for(var/key_pos=1;key_pos<=templates.len;key_pos++){ - keys[key_pos] = get_model_key(key_pos,key_length) - dmm_text += {""[keys[key_pos]]" = ([templates[key_pos]])\n"} - } - var/z_level = 0 - for(var/z_pos=1;TRUE;z_pos=findtext(template_buffer,".",z_pos)+1){ - if(z_pos>=length(template_buffer)){break} - if(z_level){dmm_text+={"\n"}} - dmm_text += {"\n(1,1,[++z_level]) = {"\n"} - var/z_block = copytext(template_buffer,z_pos,findtext(template_buffer,".",z_pos)) - for(var/y_pos=1;TRUE;y_pos=findtext(z_block,";",y_pos)+1){ - if(y_pos>=length(z_block)){break} - var/y_block = copytext(z_block,y_pos,findtext(z_block,";",y_pos)) - for(var/x_pos=1;TRUE;x_pos=findtext(y_block,",",x_pos)+1){ - if(x_pos>=length(y_block)){break} - var/x_block = copytext(y_block,x_pos,findtext(y_block,",",x_pos)) - var/key_number = text2num(x_block) - var/temp_key = keys[key_number] - dmm_text += temp_key - sleep(-1) - } - dmm_text += {"\n"} - sleep(-1) - } - dmm_text += {"\"}"} - sleep(-1) - } - return dmm_text - } - proc{ - make_template(var/turf/model as turf, var/flags as num){ - var/template = "" - var/obj_template = "" - var/mob_template = "" - var/turf_template = "" - if(!(flags & DMM_IGNORE_TURFS)){ - turf_template = "[model.type][check_attributes(model)]," - } else{ turf_template = "[world.turf],"} - var/area_template = "" - if(!(flags & DMM_IGNORE_OBJS)){ - for(var/obj/O in model.contents){ - obj_template += "[O.type][check_attributes(O)]," - } - } - for(var/mob/M in model.contents){ - if(M.client){ - if(!(flags & DMM_IGNORE_PLAYERS)){ - mob_template += "[M.type][check_attributes(M)]," - } - } - else{ - if(!(flags & DMM_IGNORE_NPCS)){ - mob_template += "[M.type][check_attributes(M)]," - } - } - } - if(!(flags & DMM_IGNORE_AREAS)){ - var/area/m_area = model.loc - area_template = "[m_area.type][check_attributes(m_area)]" - } else{ area_template = "[world.area]"} - template = "[obj_template][mob_template][turf_template][area_template]" - return template - } - check_attributes(var/atom/A){ - var/attributes_text = {"{"} - for(var/V in A.vars){ - sleep(-1) - if((!issaved(A.vars[V])) || (A.vars[V]==initial(A.vars[V]))){continue} - if(istext(A.vars[V])){ - attributes_text += {"[V] = "[A.vars[V]]""} - } - else if(isnum(A.vars[V])||ispath(A.vars[V])){ - attributes_text += {"[V] = [A.vars[V]]"} - } - else if(isicon(A.vars[V])||isfile(A.vars[V])){ - attributes_text += {"[V] = '[A.vars[V]]'"} - } - else{ - continue - } - if(attributes_text != {"{"}){ - attributes_text+={"; "} - } - } - if(attributes_text=={"{"}){ - return - } - if(copytext(attributes_text, length(attributes_text)-1, 0) == {"; "}){ - attributes_text = copytext(attributes_text, 1, length(attributes_text)-1) - } - attributes_text += {"}"} - return attributes_text - } - get_model_key(var/which as num, var/key_length as num){ - var/key = "" - var/working_digit = which-1 - for(var/digit_pos=key_length;digit_pos>=1;digit_pos--){ - var/place_value = round/*floor*/(working_digit/(letter_digits.len**(digit_pos-1))) - working_digit-=place_value*(letter_digits.len**(digit_pos-1)) - key = "[key][letter_digits[place_value+1]]" - } - return key - } - } - } diff --git a/code/WorkInProgress/mapload/reader.dm b/code/WorkInProgress/mapload/reader.dm deleted file mode 100644 index 755b96fc2da..00000000000 --- a/code/WorkInProgress/mapload/reader.dm +++ /dev/null @@ -1,181 +0,0 @@ -dmm_suite/load_map(var/dmm_file as file, var/z_offset as num) - if(!z_offset) - z_offset = world.maxz+1 - var/quote = ascii2text(34) - var/tfile = file2text(dmm_file) - var/tfile_len = length(tfile) - var/list/grid_models[0] - var/key_len = length(copytext(tfile,2,findtext(tfile,quote,2,0))) - for(var/lpos=1;lposlength(zgrid)) break - sleep(-1) - - if(findtext(tfile,quote+"}",zpos,0)+2==tfile_len) break - sleep(-1) - - -dmm_suite/proc/parse_grid(var/model as text,var/xcrd as num,var/ycrd as num,var/zcrd as num) - set background = 1 - - /*Method parse_grid() - - Accepts a text string containing a comma separated list of type paths of the - same construction as those contained in a .dmm file, and instantiates them. - */ - var/list/text_strings[0] - for(var/index=1;findtext(model,quote);index++) - /*Loop: Stores quoted portions of text in text_strings, and replaces them with an - index to that list. - - Each iteration represents one quoted section of text. - */ - text_strings.len=index - text_strings[index] = copytext(model,findtext(model,quote)+1,findtext(model,quote,findtext(model,quote)+1,0)) - model = copytext(model,1,findtext(model,quote))+"~[index]"+copytext(model,findtext(model,quote,findtext(model,quote)+1,0)+1,0) - sleep(-1) - - for(var/dpos=1;dpos!=0;dpos=findtext(model,",",dpos,0)+1) - /*Loop: Identifies each object's data, instantiates it, and reconstitues it's fields. - - Each iteration represents one object's data, including type path and field values. - */ - var/full_def = copytext(model,dpos,findtext(model,",",dpos,0)) - var/atom_def = text2path(copytext(full_def,1,findtext(full_def,"{"))) - - if(ispath(atom_def, /turf/space)) - continue - - var/list/attributes[0] - if(findtext(full_def,"{")) - full_def = copytext(full_def,1,length(full_def)) - for(var/apos=findtext(full_def,"{")+1;apos!=0;apos=findtext(full_def,";",apos,0)+1) - //Loop: Identifies each attribute/value pair, and stores it in attributes[]. - attributes.Add(copytext(full_def,apos,findtext(full_def,";",apos,0))) - if(!findtext(copytext(full_def,apos,0),";")) break - sleep(-1) - - //Construct attributes associative list - var/list/fields = new(0) - for(var/index=1;index<=attributes.len;index++) - var/trim_left = trim_text(copytext(attributes[index],1,findtext(attributes[index],"="))) - var/trim_right = trim_text(copytext(attributes[index],findtext(attributes[index],"=")+1,0)) - //Check for string - if(findtext(trim_right,"~")) - var/reference_index = copytext(trim_right,findtext(trim_right,"~")+1,0) - trim_right=text_strings[text2num(reference_index)] - //Check for number - else if(isnum(text2num(trim_right))) - trim_right = text2num(trim_right) - //Check for file - else if(copytext(trim_right,1,2) == "'") - trim_right = file(copytext(trim_right,2,length(trim_right))) - fields[trim_left] = trim_right - - //End construction - //Begin Instanciation - var/atom/instance - var/dmm_suite/preloader/_preloader = new(fields) - if(ispath(atom_def,/area)) - var/turf/A = locate(xcrd,ycrd,zcrd) - if(A.loc.name == "Space") - instance = locate(atom_def) - if(instance) - instance.contents.Add(locate(xcrd,ycrd,zcrd)) - - else - //global.current_preloader = _preloader - instance = new atom_def(locate(xcrd,ycrd,zcrd)) - if(_preloader) - _preloader.load(instance) - //End Instanciation - if(!findtext(copytext(model,dpos,0),",")) break - - -dmm_suite/proc/trim_text(var/what as text) - while(length(what) && findtext(what," ",1,2)) - what=copytext(what,2,0) - while(length(what) && findtext(what," ",length(what),0)) - what=copytext(what,1,length(what)) - return what - -/* -var/global/dmm_suite/preloader/current_preloader = null -atom/New() - if(global.current_preloader) - global.current_preloader.load(src) - ..() -*/ - - -dmm_suite/preloader - parent_type = /datum - var/list/attributes - - - New(list/the_attributes) - ..() - if(!the_attributes.len) Del() - attributes = the_attributes - - - proc/load(atom/what) - for(var/attribute in attributes) - what.vars[attribute] = attributes[attribute] - Del() - - - -/client/proc/mapload(var/dmm_map as file) - set category = "Debug" - set name = "LoadMap" - set desc = "Loads a map" - set hidden = 1 - if(src.holder) - if(!src.mob) - return - if(src.holder.rank in list("Game Admin", "Game Master")) - var/file_name = "[dmm_map]" - var/file_extension = copytext(file_name,length(file_name)-2,0) - if(file_extension != "dmm") - usr << "Supplied file must be a .dmm file." - return - var/map_z = input(usr,"Enter variable value:" ,"Value", 123) as num - if(map_z > (world.maxz+1)) - map_z = (world.maxz+1) - - var/dmm_suite/new_reader = new() - new_reader.load_map(dmm_map, map_z) - log_admin("[key_name(src.mob)] loaded a map on z:[map_z]") - - else - alert("No") - return - return diff --git a/code/WorkInProgress/organs/implants.dm b/code/WorkInProgress/organs/implants.dm deleted file mode 100644 index 98350ee7f9a..00000000000 --- a/code/WorkInProgress/organs/implants.dm +++ /dev/null @@ -1,13 +0,0 @@ -/*------ -SPELL IMPLANTS - + Most diverse effects - - Limited charges, failure rate - -CYBERNETIC IMPLANTS - + Easiest to make - - Require power - -GRAFTS (includes basic human bodyparts) - + Permanent effects - - Horrible side effects -*/ \ No newline at end of file diff --git a/code/WorkInProgress/organs/organs.dm b/code/WorkInProgress/organs/organs.dm deleted file mode 100644 index 6604900254d..00000000000 --- a/code/WorkInProgress/organs/organs.dm +++ /dev/null @@ -1,349 +0,0 @@ -/obj/effect/organstructure //used obj for the "contents" var - name = "organs" - - var/species = "mob" //for speaking in unknown languages purposes - - var/obj/effect/organ/limb/arms/arms = null - var/obj/effect/organ/limb/legs/legs = null - var/obj/effect/organ/torso/torso = null - var/obj/effect/organ/head/head = null - - - proc/GetSpeciesName() - var/list/speciesPresent = list() - - for(var/obj/effect/organ/organ in src) //only external organs count, since it's judging by the appearance - if(speciesPresent[organ.species]) - speciesPresent[organ.species]++ - else - speciesPresent[organ.species] = 1 //not sure, but I think it's not initialised before that, so can't ++ - - var/list/dominantSpecies = list() - - for(var/speciesName in speciesPresent) - if(!dominantSpecies.len) - dominantSpecies += speciesName - else - if(speciesPresent[dominantSpecies[1]] == speciesPresent[speciesName]) - dominantSpecies += speciesName - else if(speciesPresent[dominantSpecies[1]] < speciesPresent[speciesName]) - dominantSpecies = list(speciesName) - - if(!dominantSpecies.len) - species = "mob" - else - species = pick(dominantSpecies) - - return species - - proc/RecalculateStructure() - var/list/organs = GetAllContents() - - arms = locate(/obj/effect/organ/limb/arms) in organs - legs = locate(/obj/effect/organ/limb/legs) in organs - torso = locate(/obj/effect/organ/torso) in organs - head = locate(/obj/effect/organ/head) in organs - - GetSpeciesName() - - return - - proc/ProcessOrgans() - set background = 1 - - var/list/organs = GetAllContents() - for(var/obj/effect/organ/organ in organs) - organ.ProcessOrgan() - - return - - New() - ..() - RecalculateStructure() - -/obj/effect/organstructure/human - name = "human organs" - - New() - new /obj/effect/organ/torso/human(src) - ..() - -/obj/effect/organstructure/alien - name = "alien organs" - - New() - new /obj/effect/organ/torso/alien(src) - ..() - -/obj/effect/organ - name = "organ" - - //All types - var/organType = 0 //CYBER and SPELL go here - var/species = "mob" - var/obj/effect/organstructure/rootOrganStructure = null - - New(location) - ..() - - rootOrganStructure = FindRootStructure() - - proc/FindRootStructure() - if(istype(loc,/obj/effect/organ)) - var/obj/effect/organ/parent = loc - return parent.FindRootStructure() - else if(istype(loc,/obj/effect/organstructure)) - return loc - return null - - proc/ProcessOrgan() - return - -/obj/effect/organ/torso - name = "torso" - var/maxHealth = 50 //right now, the mob's (only humans for now) health depends only on it. Will be fixed later - -/obj/effect/organ/torso/human - name = "human torso" - species = "human" - maxHealth = 100 - - New() - ..() - new /obj/effect/organ/limb/arms/human(src) - new /obj/effect/organ/limb/legs/human(src) - new /obj/effect/organ/head/human(src) -/obj/effect/organ/torso/alien - name = "alien torso" - species = "alien" - maxHealth = 100 - - New() - ..() - new /obj/effect/organ/limb/arms/alien(src) - new /obj/effect/organ/limb/legs/alien(src) - new /obj/effect/organ/head/alien(src) - - -/obj/effect/organ/limb - name = "limb" - -/obj/effect/organ/limb/arms - name = "arms" - - var/minDamage = 5 //punching damage - var/maxDamage = 5 - -/obj/effect/organ/limb/arms/alien - name = "alien arms" - species = "alien" - minDamage = 5 - maxDamage = 15 - - -/obj/effect/organ/limb/arms/human - name = "human arms" - species = "human" - minDamage = 1 - maxDamage = 9 - -/obj/effect/organ/limb/legs - name = "legs" - -/obj/effect/organ/limb/legs/human - name = "human legs" - species = "human" - -/obj/effect/organ/limb/legs/alien - name = "alien legs" - species = "alien" - - -/obj/effect/organ/head - name = "head" - -/obj/effect/organ/head/human - name = "human head" - species = "human" - -/obj/effect/organ/head/alien - name = "alien head" - species = "alien" - -/obj/effect/organ/limb/arms/alien - name = "alien arms" - species = "alien" - minDamage = 5 - maxDamage = 15 - -/obj/effect/organ/limb/legs/alien - name = "alien legs" - species = "alien" - -/obj/effect/organ/head/alien - name = "alien head" - species = "alien" - -// ++++STUB ORGAN STRUCTURE. THIS IS THE DEFAULT STRUCTURE. USED TO PREVENT EXCEPTIONS++++ -/obj/effect/organstructure/stub - name = "stub organs" - - New() - new /obj/effect/organ/torso/stub(src) - ..() - -/obj/effect/organ/torso/stub - name = "stub torso" - species = "stub" - maxHealth = 100 - - New() - ..() - new /obj/effect/organ/limb/arms/stub(src) - new /obj/effect/organ/limb/legs/stub(src) - new /obj/effect/organ/head/stub(src) - -/obj/effect/organ/limb/arms/stub - name = "stub arms" - species = "stub" - -/obj/effect/organ/limb/legs/stub - name = "stub legs" - species = "stub" - -/obj/effect/organ/head/stub - name = "stub head" - species = "stub" - -// ++++STUB ORGAN STRUCTURE. END++++ - - -// ++++MONKEY++++ - -/obj/effect/organstructure/monkey - name = "monkey organs" - - New() - new /obj/effect/organ/torso/monkey(src) - ..() - -/obj/effect/organ/torso/monkey - name = "monkey torso" - species = "monkey" - maxHealth = 100 - - New() - ..() - new /obj/effect/organ/limb/arms/monkey(src) - new /obj/effect/organ/limb/legs/monkey(src) - new /obj/effect/organ/head/monkey(src) - -/obj/effect/organ/limb/arms/monkey - name = "monkey arms" - species = "monkey" - -/obj/effect/organ/limb/legs/monkey - name = "monkey legs" - species = "monkey" - -/obj/effect/organ/head/monkey - name = "monkey head" - species = "monkey" - - -// +++++CYBORG+++++ -/obj/effect/organstructure/cyborg - name = "cyborg organs" - - New() - new /obj/effect/organ/torso/cyborg(src) - ..() - -/obj/effect/organ/torso/cyborg - name = "cyborg torso" - species = "cyborg" - maxHealth = 100 - - New() - ..() - new /obj/effect/organ/limb/arms/cyborg(src) - new /obj/effect/organ/limb/legs/cyborg(src) - new /obj/effect/organ/head/cyborg(src) - -/obj/effect/organ/limb/arms/cyborg - name = "cyborg arms" - species = "cyborg" - -/obj/effect/organ/limb/legs/cyborg - name = "cyborg legs" - species = "cyborg" - -/obj/effect/organ/head/cyborg - name = "cyborg head" - species = "cyborg" - -// +++++AI++++++ -/obj/effect/organstructure/AI - name = "AI organs" - - New() - new /obj/effect/organ/torso/AI(src) - ..() - -/obj/effect/organ/torso/AI - name = "AI torso" - species = "AI" - maxHealth = 100 - - New() - ..() - new /obj/effect/organ/limb/arms/AI(src) - new /obj/effect/organ/limb/legs/AI(src) - new /obj/effect/organ/head/AI(src) - -/obj/effect/organ/limb/arms/AI - name = "AI arms" - species = "AI" - -/obj/effect/organ/limb/legs/AI - name = "AI legs" - species = "AI" - -/obj/effect/organ/head/AI - name = "AI head" - species = "AI" - -/* New organ structure template - - -/obj/effect/organstructure/template - name = "template organs" - - New() - new /obj/effect/organ/torso/template(src) - ..() - -/obj/effect/organ/torso/template - name = "template torso" - species = "template" - maxHealth = 100 - - New() - ..() - new /obj/effect/organ/limb/arms/template(src) - new /obj/effect/organ/limb/legs/template(src) - new /obj/effect/organ/head/template(src) - -/obj/effect/organ/limb/arms/template - name = "template arms" - species = "template" - -/obj/effect/organ/limb/legs/template - name = "template legs" - species = "template" - -/obj/effect/organ/head/template - name = "template head" - species = "template" - -*/ \ No newline at end of file diff --git a/code/WorkInProgress/virus2/analyser.dm b/code/WorkInProgress/virus2/analyser.dm deleted file mode 100644 index fa2407e69f4..00000000000 --- a/code/WorkInProgress/virus2/analyser.dm +++ /dev/null @@ -1,78 +0,0 @@ -/obj/machinery/disease2/diseaseanalyser - name = "Disease Analyser" - icon = 'icons/obj/virology.dmi' - icon_state = "analyser" - anchored = 1 - density = 1 - - var/scanning = 0 - var/pause = 0 - - var/obj/item/weapon/virusdish/dish = null - -/obj/machinery/disease2/diseaseanalyser/attackby(var/obj/I as obj, var/mob/user as mob) - if(istype(I,/obj/item/weapon/virusdish)) - var/mob/living/carbon/c = user - if(!dish) - - dish = I - c.drop_item() - I.loc = src - for(var/mob/M in viewers(src)) - if(M == user) continue - M.show_message("\blue [user.name] inserts the [dish.name] in the [src.name]", 3) - - - else - user << "There is already a dish inserted" - - //else - return - - -/obj/machinery/disease2/diseaseanalyser/process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(500) - //src.updateDialog() - - - if(scanning) - scanning -= 1 - if(scanning == 0) - var/r = "GNAv2 based virus lifeform" - r += "
Infection rate : [dish.virus2.infectionchance * 10]" - r += "
Spread form : [dish.virus2.spreadtype]" - r += "
Progress Speed : [dish.virus2.stageprob * 10]" - for(var/datum/disease2/effectholder/E in dish.virus2.effects) - r += "
Effect:[E.effect.name]. Strength : [E.multiplier * 8]. Verosity : [E.chance * 15]. Type : [5-E.stage]." - // display the antigens - var/code = "" - for(var/V in ANTIGENS) if(text2num(V) & dish.virus2.antigen) code += ANTIGENS[V] - r += "
Antigen pattern: [code]" - - var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src.loc) - P.info = r - dish.info = r - dish.analysed = 1 - dish.loc = src.loc - dish = null - icon_state = "analyser" - - for(var/mob/O in hearers(src, null)) - O.show_message("\icon[src] \blue The [src.name] prints a sheet of paper", 3) - else if(dish && !scanning && !pause) - if(dish.virus2 && dish.growth > 50) - dish.growth -= 10 - scanning = 5 - icon_state = "analyser_processing" - else - pause = 1 - spawn(25) - dish.loc = src.loc - dish = null - for(var/mob/M in viewers(src)) - M.show_message("\icon[src] \blue The [src.name] buzzes", 2) - pause = 0 - - return \ No newline at end of file diff --git a/code/WorkInProgress/virus2/antibodies.dm b/code/WorkInProgress/virus2/antibodies.dm deleted file mode 100644 index 6277e1a6176..00000000000 --- a/code/WorkInProgress/virus2/antibodies.dm +++ /dev/null @@ -1,55 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 - -// pure concentrated antibodies -datum/reagent/antibodies - data = new/list("antibodies"=0) - name = "Antibodies" - id = "antibodies" - reagent_state = LIQUID - color = "#0050F0" - - reaction_mob(var/mob/M, var/method=TOUCH, var/volume) - if(istype(M,/mob/living/carbon/human)) - if(src.data && method == INGEST) - if(src.data["antibodies"] & M:virus2.antigen) - M:virus2.dead = 1 - return - -// reserving some numbers for later special antigens -var/global/const/ANTIGEN_A = 1 -var/global/const/ANTIGEN_B = 2 -var/global/const/ANTIGEN_RH = 4 -var/global/const/ANTIGEN_Q = 8 -var/global/const/ANTIGEN_U = 16 -var/global/const/ANTIGEN_V = 32 -var/global/const/ANTIGEN_X = 64 -var/global/const/ANTIGEN_Y = 128 -var/global/const/ANTIGEN_Z = 256 -var/global/const/ANTIGEN_M = 512 -var/global/const/ANTIGEN_N = 1024 -var/global/const/ANTIGEN_P = 2048 -var/global/const/ANTIGEN_O = 4096 - -var/global/list/ANTIGENS = list("[ANTIGEN_A]" = "A", "[ANTIGEN_B]" = "B", "[ANTIGEN_RH]" = "RH", "[ANTIGEN_Q]" = "Q", - "[ANTIGEN_U]" = "U", "[ANTIGEN_V]" = "V", "[ANTIGEN_Z]" = "Z", "[ANTIGEN_M]" = "M", - "[ANTIGEN_N]" = "N", "[ANTIGEN_P]" = "P", "[ANTIGEN_O]" = "O") - - - -/obj/item/device/antibody_scanner - name = "Antibody Scanner" - desc = "Used to scan living beings for antibodies in their blood." - icon_state = "health" - w_class = 2.0 - item_state = "electronic" - flags = FPRINT | TABLEPASS | ONBELT | CONDUCT | USEDELAY - - -/obj/item/device/antibody_scanner/attack(mob/living/carbon/human/M as mob, mob/user as mob) - if(! istype(M, /mob/living/carbon) || !M:antibodies) - user << "Unable to detect antibodies.." - else - // iterate over the list of antigens and see what matches - var/code = "" - for(var/V in ANTIGENS) if(text2num(V) & M.antibodies) code += ANTIGENS[V] - user << text("\blue [src] The antibody scanner displays a cryptic set of data: [code]") diff --git a/code/WorkInProgress/virus2/base.dm b/code/WorkInProgress/virus2/base.dm deleted file mode 100644 index bebc719b88f..00000000000 --- a/code/WorkInProgress/virus2/base.dm +++ /dev/null @@ -1,591 +0,0 @@ -/obj/virus - // a virus instance that is placed on the map, moves, and infects - invisibility = INVISIBILITY_MAXIMUM - - var/datum/disease2/disease - - New() - ..() - step_rand(src) - step_rand(src) - anchored = 1 - spawn(300) del(src) - -/mob/living/carbon/proc/get_infection_chance() - var/score = 0 - var/mob/living/carbon/M = src - if(istype(M, /mob/living/carbon/human)) - if(M:gloves) - score += 5 - if(istype(M:wear_suit, /obj/item/clothing/suit/space)) score += 10 - if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10 - if(istype(M:head, /obj/item/clothing/head/helmet/space)) score += 5 - if(istype(M:head, /obj/item/clothing/head/bio_hood)) score += 5 - if(M.wear_mask) - score += 5 - if(istype(M:wear_mask, /obj/item/clothing/mask/surgical) && !M.internal) - score += 10 - if(M.internal) - score += 10 - - if(score >= 30) - return 0 - else if(score == 25 && prob(99)) - return 0 - else if(score == 20 && prob(95)) - return 0 - else if(score == 15 && prob(75)) - return 0 - else if(score == 10 && prob(55)) - return 0 - else if(score == 5 && prob(35)) - return 0 - - return 1 - - -/proc/infect_virus2(var/mob/living/carbon/M,var/datum/disease2/disease/disease,var/forced = 0) - if(M.virus2) - return - if(!disease) - return - //immunity - /*for(var/iii = 1, iii <= M.immunevirus2.len, iii++) - if(disease.issame(M.immunevirus2[iii])) - return*/ - - // if one of the antibodies in the mob's body matches one of the disease's antigens, don't infect - if(M.antibodies & disease.antigen != 0) return - - for(var/datum/disease2/resistance/res in M.resistances) - if(res.resistsdisease(disease)) - return - if(prob(disease.infectionchance) || forced) - if(M.virus2) - return - else - // certain clothes can prevent an infection - if(!forced && !M.get_infection_chance()) - return - - M.virus2 = disease.getcopy() - M.virus2.minormutate() - - for(var/datum/disease2/resistance/res in M.resistances) - if(res.resistsdisease(M.virus2)) - M.virus2 = null - - - -/datum/disease2/resistance - var/list/datum/disease2/effect/resistances = list() - - proc/resistsdisease(var/datum/disease2/disease/virus2) - var/list/res2 = list() - for(var/datum/disease2/effect/e in resistances) - res2 += e.type - for(var/datum/disease2/effectholder/holder in virus2) - if(!(holder.effect.type in res2)) - return 0 - else - res2 -= holder.effect.type - if(res2.len > 0) - return 0 - else - return 1 - - New(var/datum/disease2/disease/virus2) - for(var/datum/disease2/effectholder/h in virus2.effects) - resistances += h.effect.type - - -/proc/infect_mob_random_lesser(var/mob/living/carbon/M) - if(!M.virus2) - M.virus2 = new /datum/disease2/disease - M.virus2.makerandom() - M.virus2.infectionchance = 1 - -/proc/infect_mob_random_greater(var/mob/living/carbon/M) - if(!M.virus2) - M.virus2 = new /datum/disease2/disease - M.virus2.makerandom(1) - -/datum/disease2/var/antigen = 0 // 16 bits describing the antigens, when one bit is set, a cure with that bit can dock here - -/datum/disease2/disease - var/infectionchance = 10 - var/speed = 1 - var/spreadtype = "Blood" // Can also be "Airborne" - var/stage = 1 - var/stageprob = 10 - var/dead = 0 - var/clicks = 0 - - var/uniqueID = 0 - var/list/datum/disease2/effectholder/effects = list() - proc/makerandom(var/greater=0) - var/datum/disease2/effectholder/holder = new /datum/disease2/effectholder - holder.stage = 1 - if(greater) - holder.getrandomeffect_greater() - else - holder.getrandomeffect_lesser() - effects += holder - holder = new /datum/disease2/effectholder - holder.stage = 2 - if(greater) - holder.getrandomeffect_greater() - else - holder.getrandomeffect_lesser() - effects += holder - holder = new /datum/disease2/effectholder - holder.stage = 3 - if(greater) - holder.getrandomeffect_greater() - else - holder.getrandomeffect_lesser() - effects += holder - holder = new /datum/disease2/effectholder - holder.stage = 4 - if(greater) - holder.getrandomeffect_greater() - else - holder.getrandomeffect_lesser() - effects += holder - uniqueID = rand(0,10000) - infectionchance = rand(1,10) - // pick 2 antigens - antigen |= text2num(pick(ANTIGENS)) - antigen |= text2num(pick(ANTIGENS)) - spreadtype = "Airborne" - - proc/makealien() - var/datum/disease2/effectholder/holder = new /datum/disease2/effectholder - holder.stage = 1 - holder.chance = 10 - holder.effect = new/datum/disease2/effect/lesser/gunck() - effects += holder - - holder = new /datum/disease2/effectholder - holder.stage = 2 - holder.chance = 10 - holder.effect = new/datum/disease2/effect/lesser/cough() - effects += holder - - holder = new /datum/disease2/effectholder - holder.stage = 3 - holder.chance = 10 - holder.effect = new/datum/disease2/effect/greater/toxins() - effects += holder - - holder = new /datum/disease2/effectholder - holder.stage = 4 - holder.chance = 10 - holder.effect = new/datum/disease2/effect/alien() - effects += holder - - uniqueID = 896 // all alien diseases have the same ID - infectionchance = 0 - spreadtype = "Airborne" - - proc/minormutate() - var/datum/disease2/effectholder/holder = pick(effects) - holder.minormutate() - infectionchance = min(10,infectionchance + rand(0,1)) - - proc/issame(var/datum/disease2/disease/disease) - var/list/types = list() - var/list/types2 = list() - for(var/datum/disease2/effectholder/d in effects) - types += d.effect.type - var/equal = 1 - - for(var/datum/disease2/effectholder/d in disease.effects) - types2 += d.effect.type - - for(var/type in types) - if(!(type in types2)) - equal = 0 - return equal - - proc/activate(var/mob/living/carbon/mob) - if(dead) - cure(mob) - mob.virus2 = null - return - if(mob.stat == 2) - return - // with a certain chance, the mob may become immune to the disease before it starts properly - if(stage <= 1 && clicks == 0) - if(prob(20)) - mob.antibodies |= antigen // 20% immunity is a good chance IMO, because it allows finding an immune person easily - else - if(mob.radiation > 50) - if(prob(1)) - majormutate() - if(mob.reagents.has_reagent("spaceacillin")) - mob.reagents.remove_reagent("spaceacillin",0.3) - return - if(mob.reagents.has_reagent("virusfood")) - mob.reagents.remove_reagent("virusfood",0.1) - clicks += 10 - if(clicks > stage*100 && prob(10)) - if(stage == 4) - var/datum/disease2/resistance/res = new /datum/disease2/resistance(src) - src.cure(mob) - mob.resistances2 += res - mob.antibodies |= src.antigen - mob.virus2 = null - del src - stage++ - clicks = 0 - for(var/datum/disease2/effectholder/e in effects) - e.runeffect(mob,stage) - clicks+=speed - - proc/cure(var/mob/living/carbon/mob) - var/datum/disease2/effectholder/E - if(stage>1) - E = effects[1] - E.effect.deactivate(mob) - if(stage>2) - E = effects[2] - E.effect.deactivate(mob) - if(stage>3) - E = effects[3] - E.effect.deactivate(mob) - if(stage>4) - E = effects[4] - E.effect.deactivate(mob) - - proc/cure_added(var/datum/disease2/resistance/res) - if(res.resistsdisease(src)) - dead = 1 - - proc/majormutate() - var/datum/disease2/effectholder/holder = pick(effects) - holder.majormutate() - - - proc/getcopy() -// world << "getting copy" - var/datum/disease2/disease/disease = new /datum/disease2/disease - disease.infectionchance = infectionchance - disease.spreadtype = spreadtype - disease.stageprob = stageprob - disease.antigen = antigen - for(var/datum/disease2/effectholder/holder in effects) - // world << "adding effects" - var/datum/disease2/effectholder/newholder = new /datum/disease2/effectholder - newholder.effect = new holder.effect.type - newholder.chance = holder.chance - newholder.cure = holder.cure - newholder.multiplier = holder.multiplier - newholder.happensonce = holder.happensonce - newholder.stage = holder.stage - disease.effects += newholder - // world << "[newholder.effect.name]" - // world << "[disease]" - return disease - -/datum/disease2/effect - var/chance_maxm = 100 - var/name = "Blanking effect" - var/stage = 4 - var/maxm = 1 - proc/activate(var/mob/living/carbon/mob,var/multiplier) - proc/deactivate(var/mob/living/carbon/mob) - -/datum/disease2/effect/alien - name = "Unidentified Foreign Body" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - mob << "\red You feel something tearing its way out of your stomach..." - mob.adjustToxLoss(10) - mob.updatehealth() - if(prob(40)) - if(mob.client) - mob.client.mob = new/mob/living/carbon/alien/larva(mob.loc) - else - new/mob/living/carbon/alien/larva(mob.loc) - var/datum/disease2/disease/D = mob:virus2 - mob:gib() - del D - -/datum/disease2/effect/greater/gibbingtons - name = "Gibbingtons Syndrome" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.gib() - -/datum/disease2/effect/greater/radian - name = "Radian's syndrome" - stage = 4 - maxm = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.radiation += (2*multiplier) - -/datum/disease2/effect/greater/toxins - name = "Hyperacid Syndrome" - stage = 3 - maxm = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.adjustToxLoss((2*multiplier)) - -/datum/disease2/effect/greater/scream - name = "Random screaming syndrome" - stage = 2 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*scream") - -/datum/disease2/effect/greater/drowsness - name = "Automated sleeping syndrome" - stage = 2 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.drowsyness += 10 - -/datum/disease2/effect/greater/shakey - name = "World Shaking syndrome" - stage = 3 - maxm = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - shake_camera(mob,5*multiplier) - -/datum/disease2/effect/greater/deaf - name = "Hard of hearing syndrome" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.ear_deaf += 20 - -/datum/disease2/effect/invisible - name = "Waiting Syndrome" - stage = 1 - activate(var/mob/living/carbon/mob,var/multiplier) - return - -/datum/disease2/effect/greater/telepathic - name = "Telepathy Syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.mutations |= 512 - -/*/datum/disease2/effect/greater/noface - name = "Identity Loss syndrome" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.face_dmg++ - deactivate(var/mob/living/carbon/mob) - mob.face_dmg--*/ - -/datum/disease2/effect/greater/monkey - name = "Monkism syndrome" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - if(istype(mob,/mob/living/carbon/human)) - var/mob/living/carbon/human/h = mob - h.monkeyize() - -/datum/disease2/effect/greater/sneeze - name = "Coldingtons Effect" - stage = 1 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*sneeze") - -/datum/disease2/effect/greater/gunck - name = "Flemmingtons" - stage = 1 - activate(var/mob/living/carbon/mob,var/multiplier) - mob << "\red Mucous runs down the back of your throat." - -/datum/disease2/effect/greater/killertoxins - name = "Toxification syndrome" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.adjustToxLoss(15) - -/*/datum/disease2/effect/greater/hallucinations - name = "Hallucinational Syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.hallucination += 25*/ - -/datum/disease2/effect/greater/sleepy - name = "Resting syndrome" - stage = 2 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*collapse") - -/datum/disease2/effect/greater/mind - name = "Lazy mind syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.setBrainLoss(50) - -/datum/disease2/effect/greater/suicide - name = "Suicidal syndrome" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.suiciding = 1 - //instead of killing them instantly, just put them at -175 health and let 'em gasp for a while - viewers(mob) << "\red [mob.name] is holding \his breath. It looks like \he's trying to commit suicide." - mob.adjustOxyLoss(175 - mob.getToxLoss() - mob.getFireLoss() - mob.getBruteLoss() - mob.getOxyLoss()) - mob.updatehealth() - spawn(200) //in case they get revived by cryo chamber or something stupid like that, let them suicide again in 20 seconds - mob.suiciding = 0 - -// lesser syndromes, partly just copypastes -/datum/disease2/effect/lesser/mind - name = "Lazy mind syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.setBrainLoss(20) - -/datum/disease2/effect/lesser/drowsy - name = "Bedroom Syndrome" - stage = 2 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.drowsyness = 5 - -/datum/disease2/effect/lesser/deaf - name = "Hard of hearing syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.ear_deaf = 5 - -/datum/disease2/effect/lesser/gunck - name = "Flemmingtons" - stage = 1 - activate(var/mob/living/carbon/mob,var/multiplier) - mob << "\red Mucous runs down the back of your throat." - -/datum/disease2/effect/lesser/radian - name = "Radian's syndrome" - stage = 4 - maxm = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.radiation += 1 - -/datum/disease2/effect/lesser/sneeze - name = "Coldingtons Effect" - stage = 1 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*sneeze") - -/datum/disease2/effect/lesser/cough - name = "Anima Syndrome" - stage = 2 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*cough") - -/*/datum/disease2/effect/lesser/hallucinations - name = "Hallucinational Syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.hallucination += 5*/ - -/*/datum/disease2/effect/lesser/arm - name = "Disarming Syndrome" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - var/obj/item/organ/limb/org = mob.organs["r_arm"] - org.take_damage(3,0,0,0) - mob << "\red You feel a sting in your right arm."*/ - -/datum/disease2/effect/lesser/hungry - name = "Appetiser Effect" - stage = 2 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.nutrition = max(0, mob.nutrition - 200) - -/datum/disease2/effect/lesser/groan - name = "Groaning Syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*groan") - -/datum/disease2/effect/lesser/scream - name = "Loudness Syndrome" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*scream") - -/datum/disease2/effect/lesser/drool - name = "Saliva Effect" - stage = 1 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*drool") - -/datum/disease2/effect/lesser/fridge - name = "Refridgerator Syndrome" - stage = 2 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*shiver") - -/datum/disease2/effect/lesser/twitch - name = "Twitcher" - stage = 1 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*twitch") - -/*Removed on request by Spaceman, due to it being detrimental to RP. -CN -/datum/disease2/effect/lesser/deathgasp - name = "Zombie Syndrome" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*deathgasp")*/ - -/datum/disease2/effect/lesser/giggle - name = "Uncontrolled Laughter Effect" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*giggle") - - -/datum/disease2/effect/lesser - chance_maxm = 10 - -/datum/disease2/effectholder - var/name = "Holder" - var/datum/disease2/effect/effect - var/chance = 0 //Chance in percentage each tick - var/cure = "" //Type of cure it requires - var/happensonce = 0 - var/multiplier = 1 //The chance the effects are WORSE - var/stage = 0 - - proc/runeffect(var/mob/living/carbon/human/mob,var/stage) - if(happensonce > -1 && effect.stage <= stage && prob(chance)) - effect.activate(mob) - if(happensonce == 1) - happensonce = -1 - - proc/getrandomeffect_greater() - var/list/datum/disease2/effect/list = list() - for(var/e in (typesof(/datum/disease2/effect/greater) - /datum/disease2/effect/greater)) - // world << "Making [e]" - var/datum/disease2/effect/f = new e - if(f.stage == src.stage) - list += f - effect = pick(list) - chance = rand(1,6) - - proc/getrandomeffect_lesser() - var/list/datum/disease2/effect/list = list() - for(var/e in (typesof(/datum/disease2/effect/lesser) - /datum/disease2/effect/lesser)) - var/datum/disease2/effect/f = new e - if(f.stage == src.stage) - list += f - effect = pick(list) - chance = rand(1,6) - - proc/minormutate() - switch(pick(1,2,3,4,5)) - if(1) - chance = rand(0,effect.chance_maxm) - if(2) - multiplier = rand(1,effect.maxm) - proc/majormutate() - getrandomeffect_greater() - -/proc/dprob(var/p) - return(prob(sqrt(p)) && prob(sqrt(p))) \ No newline at end of file diff --git a/code/WorkInProgress/virus2/biohazard destroyer.dm b/code/WorkInProgress/virus2/biohazard destroyer.dm deleted file mode 100644 index abd1803de86..00000000000 --- a/code/WorkInProgress/virus2/biohazard destroyer.dm +++ /dev/null @@ -1,20 +0,0 @@ -/obj/machinery/disease2/biodestroyer - name = "Biohazard destroyer" - icon = 'icons/obj/pipes/disposal.dmi' - icon_state = "disposalbio" - var/list/accepts = list(/obj/item/clothing,/obj/item/weapon/virusdish/,/obj/item/weapon/cureimplanter,/obj/item/weapon/diseasedisk,/obj/item/weapon/reagent_containers) - density = 1 - anchored = 1 - -/obj/machinery/disease2/biodestroyer/attackby(var/obj/I as obj, var/mob/user as mob) - for(var/path in accepts) - if(I.type in typesof(path)) - user.drop_item() - del(I) - overlays += image('icons/obj/pipes/disposal.dmi', "dispover-handle") - return - user.drop_item() - I.loc = src.loc - - for(var/mob/O in hearers(src, null)) - O.show_message("\icon[src] \blue The [src.name] beeps", 2) \ No newline at end of file diff --git a/code/WorkInProgress/virus2/cureimplanter.dm b/code/WorkInProgress/virus2/cureimplanter.dm deleted file mode 100644 index 30d952b4851..00000000000 --- a/code/WorkInProgress/virus2/cureimplanter.dm +++ /dev/null @@ -1,43 +0,0 @@ -/obj/item/weapon/cureimplanter - name = "Hypospray injector" - icon = 'icons/obj/items.dmi' - icon_state = "implanter1" - var/datum/disease2/resistance/resistance = null - var/works = 0 - var/datum/disease2/disease/virus2 = null - item_state = "syringe_0" - throw_speed = 3 - throw_range = 5 - w_class = 2.0 - - -/obj/item/weapon/cureimplanter/attack(mob/target as mob, mob/user as mob) - if(ismob(target)) - for(var/mob/O in viewers(world.view, user)) - if (target != user) - O.show_message(text("\red [] is trying to inject [] with [src.name]!", user, target), 1) - else - O.show_message("\red [user] is trying to inject themselves with [src.name]!", 1) - if(!do_mob(user, target,60)) return - - - for(var/mob/O in viewers(world.view, user)) - if (target != user) - O.show_message(text("\red [] injects [] with [src.name]!", user, target), 1) - else - O.show_message("\red [user] injects themself with [src.name]!", 1) - - - var/mob/living/carbon/M = target - - if(works == 0) - M.resistances2 += resistance - //M.immunevirus2 += M.virus2.getcopy() - if(M.virus2) - M.virus2.cure_added(resistance) - else if(works == 1) - M.adjustToxLoss(60) - else if(works == 2) - M.gib() - else if(works == 3) - infect_virus2(M,virus2,1) \ No newline at end of file diff --git a/code/WorkInProgress/virus2/curer.dm b/code/WorkInProgress/virus2/curer.dm deleted file mode 100644 index cbd155711cc..00000000000 --- a/code/WorkInProgress/virus2/curer.dm +++ /dev/null @@ -1,129 +0,0 @@ -/obj/machinery/computer/curer - name = "Cure Research Machine" - icon = 'icons/obj/computer.dmi' - icon_state = "dna" - var/curing - var/virusing - - var/obj/item/weapon/reagent_containers/container = null - -/obj/machinery/computer/curer/attackby(var/obj/I as obj, var/mob/user as mob) - if(istype(I, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - if (src.stat & BROKEN) - user << "\blue The broken glass falls out." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - new /obj/item/weapon/shard( src.loc ) - //var/obj/item/weapon/circuitboard/curer/M = new /obj/item/weapon/circuitboard/curer( A ) - for (var/obj/C in src) - C.loc = src.loc - //A.circuit = M - A.state = 3 - A.icon_state = "3" - A.anchored = 1 - del(src) - else - user << "\blue You disconnect the monitor." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - //var/obj/item/weapon/circuitboard/curer/M = new /obj/item/weapon/circuitboard/curer( A ) - for (var/obj/C in src) - C.loc = src.loc - //A.circuit = M - A.state = 4 - A.icon_state = "4" - A.anchored = 1 - del(src) - if(istype(I,/obj/item/weapon/reagent_containers)) - var/mob/living/carbon/C = user - if(!container) - container = I - C.drop_item() - I.loc = src - - //else - src.attack_hand(user) - return - -/obj/machinery/computer/curer/attack_ai(var/mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/curer/attack_paw(var/mob/user as mob) - - return src.attack_hand(user) - return - -/obj/machinery/computer/curer/attack_hand(var/mob/user as mob) - if(..()) - return - user.machine = src - var/dat - if(curing) - dat = "Antibody production in progress" - else if(virusing) - dat = "Virus production in progress" - else if(container) - // see if there's any blood in the container - var/datum/reagent/blood/B = locate(/datum/reagent/blood) in container.reagents.reagent_list - - if(B) - dat = "Blood sample inserted." - dat += "
Begin antibody production" - else - dat += "
Please check container contents." - dat += "
Eject container" - else - dat = "Please insert a container." - - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") - return - -/obj/machinery/computer/curer/process() - ..() - - if(stat & (NOPOWER|BROKEN)) - return - use_power(500) - //src.updateDialog() - - if(curing) - curing -= 1 - if(curing == 0) - if(container) - createcure(container) - return - -/obj/machinery/computer/curer/Topic(href, href_list) - if(..()) - return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) - usr.machine = src - - if (href_list["antibody"]) - curing = 10 - else if(href_list["eject"]) - container.loc = src.loc - container = null - - src.add_fingerprint(usr) - src.updateUsrDialog() - return - - -/obj/machinery/computer/curer/proc/createcure(var/obj/item/weapon/reagent_containers/container) - var/obj/item/weapon/reagent_containers/glass/beaker/product = new(src.loc) - - var/datum/reagent/blood/B = locate() in container.reagents.reagent_list - - var/list/data = list() - data["antibodies"] = B.data["antibodies"] - product.reagents.add_reagent("antibodies",30,data) - - state("The [src.name] Buzzes", "blue") - -/obj/machinery/computer/curer/proc/createvirus(var/datum/disease2/disease/virus2) - var/obj/item/weapon/cureimplanter/implanter = new /obj/item/weapon/cureimplanter(src.loc) - implanter.name = "Viral implanter (MAJOR BIOHAZARD)" - implanter.works = 3 - state("The [src.name] Buzzes", "blue") \ No newline at end of file diff --git a/code/WorkInProgress/virus2/diseasesplicer.dm b/code/WorkInProgress/virus2/diseasesplicer.dm deleted file mode 100644 index e238af93c86..00000000000 --- a/code/WorkInProgress/virus2/diseasesplicer.dm +++ /dev/null @@ -1,185 +0,0 @@ -/obj/machinery/computer/diseasesplicer - name = "Disease Splicer" - icon = 'icons/obj/computer.dmi' - icon_state = "crew" - - var/datum/disease2/effectholder/memorybank = null - var/analysed = 0 - var/obj/item/weapon/virusdish/dish = null - var/burning = 0 - - var/splicing = 0 - var/scanning = 0 - -/obj/machinery/computer/diseasesplicer/attackby(var/obj/I as obj, var/mob/user as mob) - if(istype(I, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - if (src.stat & BROKEN) - user << "\blue The broken glass falls out." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - new /obj/item/weapon/shard( src.loc ) - //var/obj/item/weapon/circuitboard/diseasesplicer/M = new /obj/item/weapon/circuitboard/diseasesplicer( A ) - for (var/obj/C in src) - C.loc = src.loc - //A.circuit = M - A.state = 3 - A.icon_state = "3" - A.anchored = 1 - del(src) - else - user << "\blue You disconnect the monitor." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - //var/obj/item/weapon/circuitboard/diseasesplicer/M = new /obj/item/weapon/circuitboard/diseasesplicer( A ) - for (var/obj/C in src) - C.loc = src.loc - //A.circuit = M - A.state = 4 - A.icon_state = "4" - A.anchored = 1 - del(src) - if(istype(I,/obj/item/weapon/virusdish)) - var/mob/living/carbon/c = user - if(!dish) - - dish = I - c.drop_item() - I.loc = src - if(istype(I,/obj/item/weapon/diseasedisk)) - user << "You upload the contents of the disk into the buffer" - memorybank = I:effect - - - //else - src.attack_hand(user) - return - -/obj/machinery/computer/diseasesplicer/attack_ai(var/mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/diseasesplicer/attack_paw(var/mob/user as mob) - - return src.attack_hand(user) - return - -/obj/machinery/computer/diseasesplicer/attack_hand(var/mob/user as mob) - if(..()) - return - user.machine = src - var/dat - if(splicing) - dat = "Splicing in progress" - else if(scanning) - dat = "Splicing in progress" - else if(burning) - dat = "Data disk burning in progress" - else - if(dish) - dat = "Virus dish inserted" - - dat += "
Current DNA strand : " - if(memorybank) - dat += "" - if(analysed) - dat += "[memorybank.effect.name] ([5-memorybank.effect.stage])" - else - dat += "Unknown DNA strand ([5-memorybank.effect.stage])" - dat += "" - - dat += "
Burn DNA Sequence to data storage disk" - else - dat += "Empty" - - dat += "

" - - if(dish) - if(dish.virus2) - if(dish.growth >= 50) - for(var/datum/disease2/effectholder/e in dish.virus2.effects) - dat += "
DNA strand" - if(dish.analysed) - dat += ": [e.effect.name]" - dat += " (5-[e.effect.stage])" - else - dat += "
Insufficent cells to attempt gene splicing" - else - dat += "
No virus found in dish" - - dat += "

Eject disk" - else - dat += "
Please insert dish" - - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") - return - -/obj/machinery/computer/diseasesplicer/process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(500) - //src.updateDialog() - - if(scanning) - scanning -= 1 - if(!scanning) - state("The [src.name] beeps", "blue") - if(splicing) - splicing -= 1 - if(!splicing) - state("The [src.name] pings", "blue") - if(burning) - burning -= 1 - if(!burning) - var/obj/item/weapon/diseasedisk/d = new /obj/item/weapon/diseasedisk(src.loc) - if(analysed) - d.name = "[memorybank.effect.name] GNA disk (Stage: [5-memorybank.effect.stage])" - else - d.name = "Unknown GNA disk (Stage: [5-memorybank.effect.stage])" - d.effect = memorybank - state("The [src.name] zings", "blue") - - return - -/obj/machinery/computer/diseasesplicer/Topic(href, href_list) - if(..()) - return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) - usr.machine = src - - if (href_list["grab"]) - memorybank = locate(href_list["grab"]) - analysed = dish.analysed - del(dish) - dish = null - scanning = 10 - - else if(href_list["eject"]) - dish.loc = src.loc - dish = null - - else if(href_list["splice"]) - for(var/datum/disease2/effectholder/e in dish.virus2.effects) - if(e.stage == memorybank.stage) - e.effect = memorybank.effect - splicing = 10 - dish.virus2.spreadtype = "Blood" - - else if(href_list["disk"]) - burning = 10 - - src.add_fingerprint(usr) - src.updateUsrDialog() - return - -/obj/item/weapon/diseasedisk - name = "Blank GNA disk" - icon = 'icons/obj/items.dmi' - icon_state = "datadisk0" - var/datum/disease2/effectholder/effect = null - var/stage = 1 - -/obj/item/weapon/diseasedisk/premade/New() - name = "Blank GNA disk (stage: [5-stage])" - effect = new /datum/disease2/effectholder - effect.effect = new /datum/disease2/effect/invisible - effect.stage = stage diff --git a/code/WorkInProgress/virus2/dishincubator.dm b/code/WorkInProgress/virus2/dishincubator.dm deleted file mode 100644 index 06833ab5505..00000000000 --- a/code/WorkInProgress/virus2/dishincubator.dm +++ /dev/null @@ -1,169 +0,0 @@ -/obj/machinery/disease2/incubator/ - name = "Pathogenic incubator" - density = 1 - anchored = 1 - icon = 'icons/obj/virology.dmi' - icon_state = "incubator" - var/obj/item/weapon/virusdish/dish - var/obj/item/weapon/reagent_containers/glass/beaker = null - var/radiation = 0 - - var/on = 0 - var/power = 0 - - var/foodsupply = 0 - var/toxins = 0 - - ex_act(severity) - switch(severity) - if(1.0) - del(src) - return - if(2.0) - if (prob(50)) - del(src) - return - - blob_act() - if (prob(25)) - del(src) - - meteorhit() - del(src) - return - - attackby(var/obj/B as obj, var/mob/user as mob) - if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B,/obj/item/weapon/reagent_containers/syringe)) - - if(src.beaker) - if(istype(beaker,/obj/item/weapon/reagent_containers/syringe)) - user << "A syringe is already loaded into the machine." - else - user << "A beaker is already loaded into the machine." - return - - src.beaker = B - user.drop_item() - B.loc = src - if(istype(B,/obj/item/weapon/reagent_containers/syringe)) - user << "You add the syringe to the machine!" - src.updateUsrDialog() - else - user << "You add the beaker to the machine!" - src.updateUsrDialog() - else - if(istype(B,/obj/item/weapon/virusdish)) - if(src.dish) - user << "A dish is already loaded into the machine." - return - - src.dish = B - user.drop_item() - B.loc = src - if(istype(B,/obj/item/weapon/virusdish)) - user << "You add the dish to the machine!" - src.updateUsrDialog() - - Topic(href, href_list) - if(stat & BROKEN) return - if(usr.stat || usr.restrained()) return - if(!in_range(src, usr)) return - if (href_list["ejectchem"]) - if(beaker) - beaker.loc = src.loc - beaker = null - if(!dish) - return - usr.machine = src - if (href_list["power"]) - on = !on - if(on) - icon_state = "incubator_on" - else - icon_state = "incubator" - if (href_list["ejectdish"]) - if(dish) - dish.loc = src.loc - dish = null - if (href_list["rad"]) - radiation += 10 - if (href_list["flush"]) - radiation = 0 - toxins = 0 - foodsupply = 0 - - - src.add_fingerprint(usr) - src.updateUsrDialog() - - attack_hand(mob/user as mob) - if(stat & BROKEN) - return - user.machine = src - var/dat = "" - if(!dish) - dat = "Please insert dish into the incubator.
" - var/string = "Off" - if(on) - string = "On" - dat += "Power status : [string]" - dat += "
" - dat += "Food supply : [foodsupply]" - dat += "
" - dat += "Radiation Levels : [radiation] RADS : Radiate" - dat += "
" - dat += "Toxins : [toxins]" - dat += "

" - if(beaker) - dat += "Eject chemicals : Eject" - dat += "
" - if(dish) - dat += "Eject Virus dish : Eject" - dat += "
" - dat += "

" - dat += "Flush system
" - dat += "Close
" - user << browse("Pathogenic incubatorincubator menu:

[dat]", "window=incubator;size=575x400") - onclose(user, "incubator") - return - - - - - process() - - if(dish && on && dish.virus2) - use_power(50,EQUIP) - if(!powered(EQUIP)) - on = 0 - icon_state = "incubator" - if(foodsupply) - foodsupply -= 1 - dish.growth += 3 - if(dish.growth >= 100) - state("The [src.name] pings", "blue") - if(radiation) - if(radiation > 50 & prob(5)) - dish.virus2.majormutate() - if(dish.info) - dish.info = "OUTDATED : [dish.info]" - dish.analysed = 0 - state("The [src.name] beeps", "blue") - - else if(prob(5)) - dish.virus2.minormutate() - radiation -= 1 - if(toxins && prob(5)) - dish.virus2.infectionchance -= 1 - if(toxins > 50) - dish.virus2 = null - else if(!dish) - on = 0 - icon_state = "incubator" - - - if(beaker) - if(!beaker.reagents.remove_reagent("virusfood",5)) - foodsupply += 10 - if(!beaker.reagents.remove_reagent("toxins",1)) - toxins += 1 \ No newline at end of file diff --git a/code/WorkInProgress/virus2/isolator.dm b/code/WorkInProgress/virus2/isolator.dm deleted file mode 100644 index d23ef0bbd55..00000000000 --- a/code/WorkInProgress/virus2/isolator.dm +++ /dev/null @@ -1,159 +0,0 @@ -/obj/machinery/disease2/isolator/ - name = "Pathogenic Isolator" - density = 1 - anchored = 1 - icon = 'icons/obj/virology.dmi' - icon_state = "isolator" - var/datum/disease2/disease/virus2 = null - var/isolating = 0 - var/beaker = null - - ex_act(severity) - switch(severity) - if(1.0) - del(src) - return - if(2.0) - if (prob(50)) - del(src) - return - - blob_act() - if (prob(25)) - del(src) - - meteorhit() - del(src) - return - - attackby(var/obj/item/weapon/reagent_containers/glass/B as obj, var/mob/user as mob) - if(!istype(B,/obj/item/weapon/reagent_containers/syringe)) - return - - if(src.beaker) - user << "A syringe is already loaded into the machine." - return - - src.beaker = B - user.drop_item() - B.loc = src - if(istype(B,/obj/item/weapon/reagent_containers/syringe)) - user << "You add the syringe to the machine!" - src.updateUsrDialog() - icon_state = "isolator_in" - - Topic(href, href_list) - if(stat & BROKEN) return - if(usr.stat || usr.restrained()) return - if(!in_range(src, usr)) return - - usr.machine = src - if(!beaker) return - var/datum/reagents/R = beaker:reagents - - if (href_list["isolate"]) - var/datum/reagent/blood/Blood - for(var/datum/reagent/blood/B in R.reagent_list) - if(B) - Blood = B - break - - if(Blood.data["virus2"]) - virus2 = Blood.data["virus2"] - isolating = 40 - icon_state = "isolator_processing" - src.updateUsrDialog() - return - - else if (href_list["main"]) - attack_hand(usr) - return - else if (href_list["eject"]) - beaker:loc = src.loc - beaker = null - icon_state = "isolator" - src.updateUsrDialog() - return - - attack_hand(mob/user as mob) - if(stat & BROKEN) - return - user.machine = src - var/dat = "" - if(!beaker) - dat = "Please insert sample into the isolator.
" - dat += "Close" - else if(isolating) - dat = "Isolating" - else - var/datum/reagents/R = beaker:reagents - dat += "Eject

" - if(!R.total_volume) - dat += "[beaker] is empty." - else - dat += "Contained reagents:
" - for(var/datum/reagent/blood/G in R.reagent_list) - dat += " [G.name]: Isolate" - user << browse("Pathogenic IsolatorIsolator menu:

[dat]", "window=isolator;size=575x400") - onclose(user, "isolator") - return - - - - - process() - if(isolating > 0) - isolating -= 1 - if(isolating == 0) - var/obj/item/weapon/virusdish/d = new /obj/item/weapon/virusdish(src.loc) - d.virus2 = virus2.getcopy() - virus2 = null - icon_state = "isolator_in" - - - - -/obj/item/weapon/virusdish - name = "Virus containment/growth dish" - desc = "This is a virus containment dish" - icon = 'icons/obj/items.dmi' - icon_state = "implantcase-b" - var/datum/disease2/disease/virus2 = null - var/growth = 0 - var/info = 0 - var/analysed = 0 - - reagents = list() - -/obj/item/weapon/virusdish/random - name = "Virus Sample" - -/obj/item/weapon/virusdish/random/New() - ..() - // add a random virus to this dish - src.virus2 = new /datum/disease2/disease - src.virus2.makerandom() - growth = rand(5, 50) - -/obj/item/weapon/virusdish/attackby(var/obj/item/weapon/W as obj,var/mob/living/carbon/user as mob) - if(istype(W,/obj/item/weapon/hand_labeler) || istype(W,/obj/item/weapon/reagent_containers/syringe)) - return - ..() - if(prob(50)) - user << "The dish shatters" - if(virus2.infectionchance > 0) - // spread around some pathogens - for(var/i = 0, i<= (growth / 3), i++) - var/obj/virus/V = new(src.loc) - V.disease = virus2.getcopy() - del src - -/obj/item/weapon/virusdish/examine() - ..() - if(src.info) - usr << "It has the following information about its contents" - usr << src.info - -/obj/machinery/proc/state(var/msg) - for(var/mob/O in hearers(src, null)) - O.show_message("\icon[src] \blue [msg]", 2) diff --git a/code/WorkInProgress/virus2/monkeydispensor.dm b/code/WorkInProgress/virus2/monkeydispensor.dm deleted file mode 100644 index d4da072c645..00000000000 --- a/code/WorkInProgress/virus2/monkeydispensor.dm +++ /dev/null @@ -1,30 +0,0 @@ -/obj/machinery/disease2/monkeycloner - name = "Monkey dispensor" - icon = 'icons/obj/cloning.dmi' - icon_state = "pod_0" - density = 1 - anchored = 1 - - var/cloning = 0 - -/obj/machinery/disease2/monkeycloner/attack_hand() - if(!cloning) - cloning = 150 - - icon_state = "pod_g" - -/obj/machinery/disease2/monkeycloner/process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(500) - //src.updateDialog() - - if(cloning) - cloning -= 1 - if(!cloning) - new /mob/living/carbon/monkey(src.loc) - icon_state = "pod_0" - - - - return \ No newline at end of file diff --git a/code/__HELPERS/_string_lists.dm b/code/__HELPERS/_string_lists.dm new file mode 100644 index 00000000000..b2b31ab36e4 --- /dev/null +++ b/code/__HELPERS/_string_lists.dm @@ -0,0 +1,27 @@ +#define pick_list(FILE, KEY) (pick(strings(FILE, KEY))) + +var/global/list/string_cache + +/proc/strings(filename as text, key as text) + var/list/fileList + if(!string_cache) + string_cache = new + if(!(filename in string_cache)) + if(fexists("strings/[filename]")) + string_cache[filename] = list() + var/list/stringsList = list() + fileList = file2list("strings/[filename]") + for(var/s in fileList) + stringsList = text2list(s, "@=") + if(stringsList.len != 2) + CRASH("Invalid string list in strings/[filename]") + if(findtext(stringsList[2], "@,")) + string_cache[filename][stringsList[1]] = text2list(stringsList[2], "@,") + else + string_cache[filename][stringsList[1]] = stringsList[2] // Its a single string! + else + CRASH("file not found: strings/[filename]") + if((filename in string_cache) && (key in string_cache[filename])) + return string_cache[filename][key] + else + CRASH("strings list not found: strings/[filename], index=[key]") diff --git a/code/_onclick/oldcode.dm b/code/_onclick/oldcode.dm deleted file mode 100644 index 024e223f839..00000000000 --- a/code/_onclick/oldcode.dm +++ /dev/null @@ -1,376 +0,0 @@ -/atom/DblClick(location, control, params) //TODO: DEFERRED: REWRITE - if(!usr) return - - // ------- TIME SINCE LAST CLICK ------- - if (world.time <= usr:lastDblClick+1) - return - else - usr:lastDblClick = world.time - - //Putting it here for now. It diverts stuff to the mech clicking procs. Putting it here stops us drilling items in our inventory Carn - if(istype(usr.loc,/obj/mecha)) - if(usr.client && (src in usr.client.screen)) - return - var/obj/mecha/Mech = usr.loc - Mech.click_action(src,usr) - return - - // ------- DIR CHANGING WHEN CLICKING ------ - if( iscarbon(usr) && !usr.buckled ) - if( src.x && src.y && usr.x && usr.y ) - var/dx = src.x - usr.x - var/dy = src.y - usr.y - - if(dy || dx) - if(abs(dx) < abs(dy)) - if(dy > 0) usr.dir = NORTH - else usr.dir = SOUTH - else - if(dx > 0) usr.dir = EAST - else usr.dir = WEST - else - if(pixel_y > 16) usr.dir = NORTH - else if(pixel_y < -16) usr.dir = SOUTH - else if(pixel_x > 16) usr.dir = EAST - else if(pixel_x < -16) usr.dir = WEST - - - - - // ------- AI ------- - else if (istype(usr, /mob/living/silicon/ai)) - var/mob/living/silicon/ai/ai = usr - if (ai.control_disabled) - return - - // ------- CYBORG ------- - else if (istype(usr, /mob/living/silicon/robot)) - var/mob/living/silicon/robot/bot = usr - if (bot.lockcharge) return - ..() - - - // ------- SHIFT-CLICK ------- - - if(params) - var/parameters = params2list(params) - - if(parameters["shift"]){ - if(!isAI(usr)) - ShiftClick(usr) - else - AIShiftClick(usr) - return - } - - // ------- ALT-CLICK ------- - - if(parameters["alt"]){ - if(!isAI(usr)) - AltClick(usr) - else - AIAltClick(usr) - return - } - - // ------- CTRL-CLICK ------- - - if(parameters["ctrl"]){ - if(!isAI(usr)) - CtrlClick(usr) - else - AICtrlClick(usr) - return - } - - // ------- MIDDLE-CLICK ------- - - if(parameters["middle"]){ - if(!isAI(usr)) - MiddleClick(usr) - return - } - - // ------- THROW ------- - if(usr.in_throw_mode) - return usr:throw_item(src) - - // ------- ITEM IN HAND DEFINED ------- - var/obj/item/W = usr.get_active_hand() -/* Now handled by get_active_hand() - // ------- ROBOT ------- - if(istype(usr, /mob/living/silicon/robot)) - if(!isnull(usr:module_active)) - W = usr:module_active - else - W = null -*/ - // ------- ATTACK SELF ------- - if (W == src && usr.stat == 0) - W.attack_self(usr) - if(usr.hand) - usr.update_inv_l_hand(0) //update in-hand overlays - else - usr.update_inv_r_hand(0) - return - - // ------- PARALYSIS, STUN, WEAKENED, DEAD, (And not AI) ------- - if (((usr.paralysis || usr.stunned || usr.weakened) && !istype(usr, /mob/living/silicon/ai)) || usr.stat != 0) - return - - // ------- CLICKING STUFF IN CONTAINERS ------- - if ((!( src in usr.contents ) && (((!( isturf(src) ) && (!( isturf(src.loc) ) && (src.loc && !( isturf(src.loc.loc) )))) || !( isturf(usr.loc) )) && (src.loc != usr.loc && (!( istype(src, /obj/screen) ) && !( usr.contents.Find(src.loc) )))))) - if (istype(usr, /mob/living/silicon/ai)) - var/mob/living/silicon/ai/ai = usr - if (ai.control_disabled || ai.malfhacking) - return - else - return - - // ------- 1 TILE AWAY ------- - var/t5 - // ------- AI CAN CLICK ANYTHING ------- - if(istype(usr, /mob/living/silicon/ai)) - t5 = 1 - // ------- CYBORG CAN CLICK ANYTHING WHEN NOT HOLDING STUFF ------- - else if(istype(usr, /mob/living/silicon/robot) && !W) - t5 = 1 - else - t5 = in_range(src, usr) || src.loc == usr - -// world << "according to dblclick(), t5 is [t5]" - - // ------- ACTUALLY DETERMINING STUFF ------- - if (((t5 || (W && (W.flags & USEDELAY))) && !( istype(src, /obj/screen) ))) - - // ------- ( CAN USE ITEM OR HAS 1 SECOND USE DELAY ) AND NOT CLICKING ON SCREEN ------- - - if (usr.next_move < world.time) - usr.prev_move = usr.next_move - usr.next_move = world.time + 10 - else - // ------- ALREADY USED ONE ITEM WITH USE DELAY IN THE PREVIOUS SECOND ------- - return - - // ------- DELAY CHECK PASSED ------- - - if ((src.loc && (get_dist(src, usr) < 2 || src.loc == usr.loc))) - - // ------- CLICKED OBJECT EXISTS IN GAME WORLD, DISTANCE FROM PERSON TO OBJECT IS 1 SQUARE OR THEY'RE ON THE SAME SQUARE ------- - - var/direct = get_dir(usr, src) - var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy( usr.loc ) - var/ok = 0 - if ( (direct - 1) & direct) - - // ------- CLICKED OBJECT IS LOCATED IN A DIAGONAL POSITION FROM THE PERSON ------- - - var/turf/Step_1 - var/turf/Step_2 - switch(direct) - if(5.0) - Step_1 = get_step(usr, NORTH) - Step_2 = get_step(usr, EAST) - - if(6.0) - Step_1 = get_step(usr, SOUTH) - Step_2 = get_step(usr, EAST) - - if(9.0) - Step_1 = get_step(usr, NORTH) - Step_2 = get_step(usr, WEST) - - if(10.0) - Step_1 = get_step(usr, SOUTH) - Step_2 = get_step(usr, WEST) - - else - if(Step_1 && Step_2) - - // ------- BOTH CARDINAL DIRECTIONS OF THE DIAGONAL EXIST IN THE GAME WORLD ------- - - var/check_1 = 0 - var/check_2 = 0 - if(step_to(D, Step_1)) - check_1 = 1 - for(var/obj/border_obstacle in Step_1) - if(border_obstacle.flags & ON_BORDER) - if(!border_obstacle.CheckExit(D, src)) - check_1 = 0 - // ------- YOU TRIED TO CLICK ON AN ITEM THROUGH A WINDOW (OR SIMILAR THING THAT LIMITS ON BORDERS) ON ONE OF THE DIRECITON TILES ------- - for(var/obj/border_obstacle in get_turf(src)) - if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle)) - if(!border_obstacle.CanPass(D, D.loc, 1, 0)) - // ------- YOU TRIED TO CLICK ON AN ITEM THROUGH A WINDOW (OR SIMILAR THING THAT LIMITS ON BORDERS) ON THE TILE YOU'RE ON ------- - check_1 = 0 - - D.loc = usr.loc - if(step_to(D, Step_2)) - check_2 = 1 - - for(var/obj/border_obstacle in Step_2) - if(border_obstacle.flags & ON_BORDER) - if(!border_obstacle.CheckExit(D, src)) - check_2 = 0 - for(var/obj/border_obstacle in get_turf(src)) - if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle)) - if(!border_obstacle.CanPass(D, D.loc, 1, 0)) - check_2 = 0 - - - if(check_1 || check_2) - ok = 1 - // ------- YOU CAN REACH THE ITEM THROUGH AT LEAST ONE OF THE TWO DIRECTIONS. GOOD. ------- - - /* - More info: - If you're trying to click an item in the north-east of your mob, the above section of code will first check if tehre's a tile to the north or you and to the east of you - These two tiles are Step_1 and Step_2. After this, a new dummy object is created on your location. It then tries to move to Step_1, If it succeeds, objects on the turf you're on and - the turf that Step_1 is are checked for items which have the ON_BORDER flag set. These are itmes which limit you on only one tile border. Windows, for the most part. - CheckExit() and CanPass() are use to determine this. The dummy object is then moved back to your location and it tries to move to Step_2. Same checks are performed here. - If at least one of the two checks succeeds, it means you can reach the item and ok is set to 1. - */ - else - // ------- OBJECT IS ON A CARDINAL TILE (NORTH, SOUTH, EAST OR WEST OR THE TILE YOU'RE ON) ------- - if(loc == usr.loc) - ok = 1 - // ------- OBJECT IS ON THE SAME TILE AS YOU ------- - else - ok = 1 - - //Now, check objects to block exit that are on the border - for(var/obj/border_obstacle in usr.loc) - if(border_obstacle.flags & ON_BORDER) - if(!border_obstacle.CheckExit(D, src)) - ok = 0 - - //Next, check objects to block entry that are on the border - for(var/obj/border_obstacle in get_turf(src)) - if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle)) - if(!border_obstacle.CanPass(D, D.loc, 1, 0)) - ok = 0 - /* - See the previous More info, for... more info... - */ - - //del(D) - // Garbage Collect Dummy - D.loc = null - D = null - - // ------- DUMMY OBJECT'S SERVED IT'S PURPOSE, IT'S REWARDED WITH A SWIFT DELETE ------- - if (!( ok )) - // ------- TESTS ABOVE DETERMINED YOU CANNOT REACH THE TILE ------- - return 0 - - if (!( usr.restrained() || (usr.lying && usr.buckled!=src) )) - // ------- YOU ARE NOT REASTRAINED ------- - - if (W) - // ------- YOU HAVE AN ITEM IN YOUR HAND - HANDLE ATTACKBY AND AFTERATTACK ------- - var/ignoreAA = 0 //Ignore afterattack(). Surgery uses this. - if (t5) - ignoreAA = src.attackby(W, usr) - if (W && !ignoreAA) - W.afterattack(src, usr, (t5 ? 1 : 0), params) - - else - // ------- YOU DO NOT HAVE AN ITEM IN YOUR HAND ------- - if (istype(usr, /mob/living/carbon/human)) - // ------- YOU ARE HUMAN ------- - src.attack_hand(usr, usr.hand) - else - // ------- YOU ARE NOT HUMAN. WHAT ARE YOU - DETERMINED HERE AND PROPER ATTACK_MOBTYPE CALLED ------- - if (istype(usr, /mob/living/carbon/monkey)) - src.attack_paw(usr, usr.hand) - else if (istype(usr, /mob/living/carbon/alien/humanoid)) - if(usr.m_intent == "walk" && istype(usr, /mob/living/carbon/alien/humanoid/hunter)) - usr.m_intent = "run" - usr.hud_used.move_intent.icon_state = "running" - usr.update_icons() - src.attack_alien(usr, usr.hand) - else if (istype(usr, /mob/living/carbon/alien/larva)) - src.attack_larva(usr) - else if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) - src.attack_ai(usr, usr.hand) - else if(istype(usr, /mob/living/carbon/slime)) - src.attack_slime(usr) - else if(istype(usr, /mob/living/simple_animal)) - src.attack_animal(usr) - else - // ------- YOU ARE RESTRAINED. DETERMINE WHAT YOU ARE AND ATTACK WITH THE PROPER HAND_X PROC ------- - if (istype(usr, /mob/living/carbon/human)) - src.hand_h(usr, usr.hand) - else if (istype(usr, /mob/living/carbon/monkey)) - src.hand_p(usr, usr.hand) - else if (istype(usr, /mob/living/carbon/alien/humanoid)) - src.hand_al(usr, usr.hand) - else if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) - src.hand_a(usr, usr.hand) - - else - // ------- ITEM INACESSIBLE OR CLICKING ON SCREEN ------- - if (istype(src, /obj/screen)) - // ------- IT'S THE HUD YOU'RE CLICKING ON ------- - usr.prev_move = usr.next_move - usr:lastDblClick = world.time + 2 - if (usr.next_move < world.time) - usr.next_move = world.time + 2 - else - return - - // ------- 2 DECISECOND DELAY FOR CLICKING PASSED ------- - - if (!( usr.restrained() )) - - // ------- YOU ARE NOT RESTRAINED ------- - if ((W && !( istype(src, /obj/screen) ))) - // ------- IT SHOULD NEVER GET TO HERE, DUE TO THE ISTYPE(SRC, /OBJ/SCREEN) FROM PREVIOUS IF-S - I TESTED IT WITH A DEBUG OUTPUT AND I COULDN'T GET THIST TO SHOW UP. ------- - src.attackby(W, usr) - if (W) - W.afterattack(src, usr,, params) - else - // ------- YOU ARE NOT RESTRAINED, AND ARE CLICKING A HUD OBJECT ------- - if (istype(usr, /mob/living/carbon/human)) - src.attack_hand(usr, usr.hand) - else if (istype(usr, /mob/living/carbon/monkey)) - src.attack_paw(usr, usr.hand) - else if (istype(usr, /mob/living/carbon/alien/humanoid)) - src.attack_alien(usr, usr.hand) - else - // ------- YOU ARE RESTRAINED CLICKING ON A HUD OBJECT ------- - if (istype(usr, /mob/living/carbon/human)) - src.hand_h(usr, usr.hand) - else if (istype(usr, /mob/living/carbon/monkey)) - src.hand_p(usr, usr.hand) - else if (istype(usr, /mob/living/carbon/alien/humanoid)) - src.hand_al(usr, usr.hand) - else - // ------- YOU ARE CLICKING ON AN OBJECT THAT'S INACCESSIBLE TO YOU AND IS NOT YOUR HUD ------- - if((LASER in usr:mutations) && usr:a_intent == "harm" && world.time >= usr.next_move) - // ------- YOU HAVE THE LASER MUTATION, YOUR INTENT SET TO HURT AND IT'S BEEN MORE THAN A DECISECOND SINCE YOU LAS TATTACKED ------- - - var/turf/T = get_turf(usr) - var/turf/U = get_turf(src) - - - if(istype(usr, /mob/living/carbon/human)) - usr:nutrition -= rand(1,5) - usr:handle_regular_hud_updates() - - var/obj/item/projectile/beam/A = new /obj/item/projectile/beam( usr.loc ) - A.icon = 'icons/effects/genetics.dmi' - A.icon_state = "eyelasers" - playsound(usr.loc, 'sound/weapons/taser2.ogg', 75, 1) - - A.firer = usr - A.def_zone = usr:get_organ_target() - A.original = src - A.current = T - A.yo = U.y - T.y - A.xo = U.x - T.x - spawn( 1 ) - A.process() - - usr.next_move = world.time + 6 - return diff --git a/code/controllers/supply_shuttle.dm b/code/controllers/supply_shuttle.dm index 2737cc17f98..20cf6e4ad3f 100644 --- a/code/controllers/supply_shuttle.dm +++ b/code/controllers/supply_shuttle.dm @@ -480,10 +480,11 @@ var/global/datum/controller/supply_shuttle/supply_shuttle //Find the correct supply_pack datum var/datum/supply_packs/P = supply_shuttle.supply_packs[href_list["doorder"]] - if(!istype(P)) return + if(!istype(P) || P.hidden || P.contraband) //href protection + return var/timeout = world.time + 600 - var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text),1,MAX_MESSAGE_LEN) + var/reason = stripped_input(usr,"Reason:","Why do you require this item?","") if(world.time > timeout) return if(!reason) return @@ -551,7 +552,7 @@ var/global/datum/controller/supply_shuttle/supply_shuttle /obj/machinery/computer/supplycomp/attack_hand(var/mob/user as mob) if(!allowed(user)) - user << " Access Denied." + user << "Access Denied." return if(..()) @@ -580,7 +581,7 @@ var/global/datum/controller/supply_shuttle/supply_shuttle /obj/machinery/computer/supplycomp/attackby(I as obj, user as mob) if(istype(I,/obj/item/weapon/card/emag) && !hacked) - user << " Special supplies unlocked." + user << "Special supplies unlocked." hacked = 1 return else @@ -655,8 +656,9 @@ var/global/datum/controller/supply_shuttle/supply_shuttle temp += "Request from: [get_supply_group_name(cat)]

" for(var/supply_name in supply_shuttle.supply_packs ) var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name] - if((N.hidden && !hacked) || (N.contraband && !can_order_contraband) || N.group != cat) continue //Have to send the type instead of a reference to - temp += "[supply_name] Cost: [N.cost]
" //the obj because it would get caught by the garbage + if((N.hidden && !hacked) || (N.contraband && !can_order_contraband) || N.group != cat) //Have to send the type instead of a reference to + continue //the obj because it would get caught by the garbage + temp += "[supply_name] Cost: [N.cost]
" /*temp = "Supply points: [supply_shuttle.points]


Request what?

" @@ -674,10 +676,11 @@ var/global/datum/controller/supply_shuttle/supply_shuttle //Find the correct supply_pack datum var/datum/supply_packs/P = supply_shuttle.supply_packs[href_list["doorder"]] - if(!istype(P)) return + if(!istype(P) || (P.hidden && !hacked) || (P.contraband && !can_order_contraband)) //href exploit protection + return var/timeout = world.time + 600 - var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text),1,MAX_MESSAGE_LEN) + var/reason = stripped_input(usr,"Reason:","Why do you require this item?","") if(world.time > timeout) return // if(!reason) return diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 13fb01776d7..8d5738c6bb6 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -93,7 +93,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine group = supply_emergency /datum/supply_packs/emergency/internals - name = "Internals crate" + name = "Internals Crate" contains = list(/obj/item/clothing/mask/gas, /obj/item/clothing/mask/gas, /obj/item/clothing/mask/gas, @@ -154,7 +154,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine hidden = 1 /datum/supply_packs/emergency/syndicate - name = "#ERROR_NULL_ENTRY" + name = "ERROR_NULL_ENTRY" contains = list(/obj/item/weapon/storage/box/syndicate) cost = 140 containertype = /obj/structure/closet/crate @@ -173,7 +173,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine /datum/supply_packs/security/supplies - name = "Security Supplies crate" + name = "Security Supplies Crate" contains = list(/obj/item/weapon/storage/box/flashbangs, /obj/item/weapon/storage/box/teargas, /obj/item/weapon/storage/box/flashes, @@ -184,7 +184,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine ////// Armor: Basic /datum/supply_packs/security/helmets - name = "Helmets crate" + name = "Helmets Crate" contains = list(/obj/item/clothing/head/helmet, /obj/item/clothing/head/helmet, /obj/item/clothing/head/helmet) @@ -192,7 +192,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "helmet crate" /datum/supply_packs/security/armor - name = "Armor crate" + name = "Armor Crate" contains = list(/obj/item/clothing/suit/armor/vest, /obj/item/clothing/suit/armor/vest, /obj/item/clothing/suit/armor/vest) @@ -202,7 +202,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine ////// Weapons: Basic /datum/supply_packs/security/baton - name = "Stun Batons crate" + name = "Stun Batons Crate" contains = list(/obj/item/weapon/melee/baton/loaded, /obj/item/weapon/melee/baton/loaded, /obj/item/weapon/melee/baton/loaded) @@ -210,7 +210,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "stun baton crate" /datum/supply_packs/security/laser - name = "Lasers crate" + name = "Lasers Crate" contains = list(/obj/item/weapon/gun/energy/laser, /obj/item/weapon/gun/energy/laser, /obj/item/weapon/gun/energy/laser) @@ -218,7 +218,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "laser crate" /datum/supply_packs/security/taser - name = "Stun Guns crate" + name = "Stun Guns Crate" contains = list(/obj/item/weapon/gun/energy/taser, /obj/item/weapon/gun/energy/taser, /obj/item/weapon/gun/energy/taser) @@ -226,7 +226,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "stun gun crate" /datum/supply_packs/security/disabler - name = "Disabler crate" + name = "Disabler Crate" contains = list(/obj/item/weapon/gun/energy/disabler, /obj/item/weapon/gun/energy/disabler, /obj/item/weapon/gun/energy/disabler) @@ -243,7 +243,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine ///// Armor: Specialist /datum/supply_packs/security/armory/riothelmets - name = "Riot helmets crate" + name = "Riot Helmets Crate" contains = list(/obj/item/clothing/head/helmet/riot, /obj/item/clothing/head/helmet/riot, /obj/item/clothing/head/helmet/riot) @@ -251,7 +251,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "riot helmets crate" /datum/supply_packs/security/armory/riotsuits - name = "Riot suits crate" + name = "Riot Suits Crate" contains = list(/obj/item/clothing/suit/armor/riot, /obj/item/clothing/suit/armor/riot, /obj/item/clothing/suit/armor/riot) @@ -259,7 +259,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "riot suits crate" /datum/supply_packs/security/armory/riotshields - name = "Riot shields crate" + name = "Riot Shields Crate" contains = list(/obj/item/weapon/shield/riot, /obj/item/weapon/shield/riot, /obj/item/weapon/shield/riot) @@ -267,7 +267,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "riot shields crate" /datum/supply_packs/security/armory/bulletarmor - name = "Bulletproof armor crate" + name = "Bulletproof Armor Crate" contains = list(/obj/item/clothing/suit/armor/bulletproof, /obj/item/clothing/suit/armor/bulletproof, /obj/item/clothing/suit/armor/bulletproof) @@ -275,7 +275,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "bulletproof armor crate" /datum/supply_packs/security/armory/laserarmor - name = "Ablative armor crate" + name = "Ablative Armor Crate" contains = list(/obj/item/clothing/suit/armor/laserproof, /obj/item/clothing/suit/armor/laserproof) // Only two vests to keep costs down for balance cost = 20 @@ -285,7 +285,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine /////// Weapons: Specialist /datum/supply_packs/security/armory/ballistic - name = "Combat Shotguns crate" + name = "Combat Shotguns Crate" contains = list(/obj/item/weapon/gun/projectile/shotgun/combat, /obj/item/weapon/gun/projectile/shotgun/combat, /obj/item/weapon/gun/projectile/shotgun/combat) @@ -293,7 +293,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "combat shotgun crate" /datum/supply_packs/security/armory/expenergy - name = "Energy Guns crate" + name = "Energy Guns Crate" contains = list(/obj/item/weapon/gun/energy/gun, /obj/item/weapon/gun/energy/gun) // Only two guns to keep costs down cost = 25 @@ -301,7 +301,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "energy gun crate" /datum/supply_packs/security/armory/eweapons - name = "Incendiary weapons crate" + name = "Incendiary Weapons Crate" contains = list(/obj/item/weapon/flamethrower/full, /obj/item/weapon/tank/plasma, /obj/item/weapon/tank/plasma, @@ -317,31 +317,31 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine /////// Implants & etc /datum/supply_packs/security/armory/loyalty - name = "Loyalty implants crate" + name = "Loyalty Implants Crate" contains = list (/obj/item/weapon/storage/lockbox/loyalty) cost = 40 containername = "loyalty implant crate" /datum/supply_packs/security/armory/trackingimp - name = "Tracking implants crate" + name = "Tracking Implants Crate" contains = list (/obj/item/weapon/storage/box/trackimp) cost = 20 containername = "tracking implant crate" /datum/supply_packs/security/armory/chemimp - name = "Chemical implants crate" + name = "Chemical Implants Crate" contains = list (/obj/item/weapon/storage/box/chemimp) cost = 20 containername = "chemical implant crate" /datum/supply_packs/security/armory/exileimp - name = "Exile implants crate" + name = "Exile Implants Crate" contains = list (/obj/item/weapon/storage/box/exileimp) cost = 30 containername = "exile implant crate" /datum/supply_packs/security/securitybarriers - name = "Security barriers" + name = "Security Barriers Crate" contains = list(/obj/machinery/deployable/barrier, /obj/machinery/deployable/barrier, /obj/machinery/deployable/barrier, @@ -350,7 +350,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "security barriers crate" /datum/supply_packs/security/securityclothes - name = "Security clothing crate" + name = "Security Clothing Crate" contains = list(/obj/item/clothing/under/rank/security/navyblue, /obj/item/clothing/under/rank/security/navyblue, /obj/item/clothing/suit/security/officer, @@ -377,14 +377,14 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine /datum/supply_packs/engineering/fueltank - name = "Fuel tank crate" + name = "Fuel Tank Crate" contains = list(/obj/structure/reagent_dispensers/fueltank) cost = 8 containertype = /obj/structure/largecrate containername = "fuel tank crate" /datum/supply_packs/engineering/tools //the most robust crate - name = "Toolbox crate" + name = "Toolbox Crate" contains = list(/obj/item/weapon/storage/toolbox/electrical, /obj/item/weapon/storage/toolbox/electrical, /obj/item/weapon/storage/toolbox/mechanical, @@ -395,7 +395,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "electrical maintenance crate" /datum/supply_packs/engineering/powergamermitts - name = "Insulated Gloves crate" + name = "Insulated Gloves Crate" contains = list(/obj/item/clothing/gloves/yellow, /obj/item/clothing/gloves/yellow, /obj/item/clothing/gloves/yellow) @@ -403,7 +403,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "insulated gloves crate" /datum/supply_packs/engineering/power - name = "Powercell crate" + name = "Powercell Crate" contains = list(/obj/item/weapon/stock_parts/cell/high, //Changed to an extra high powercell because normal cells are useless /obj/item/weapon/stock_parts/cell/high, /obj/item/weapon/stock_parts/cell/high) @@ -411,7 +411,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "electrical maintenance crate" /datum/supply_packs/engineering/engiequipment - name = "Engineering Gear crate" + name = "Engineering Gear Crate" contains = list(/obj/item/weapon/storage/belt/utility, /obj/item/weapon/storage/belt/utility, /obj/item/weapon/storage/belt/utility, @@ -428,7 +428,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "engineering gear crate" /datum/supply_packs/engineering/solar - name = "Solar Pack crate" + name = "Solar Pack Crate" contains = list(/obj/item/solar_assembly, /obj/item/solar_assembly, /obj/item/solar_assembly, @@ -457,7 +457,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "solar pack crate" /datum/supply_packs/engineering/engine - name = "Emitter crate" + name = "Emitter Crate" contains = list(/obj/machinery/power/emitter, /obj/machinery/power/emitter) cost = 10 @@ -466,20 +466,20 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine access = access_ce /datum/supply_packs/engineering/engine/field_gen - name = "Field Generator crate" + name = "Field Generator Crate" contains = list(/obj/machinery/field/generator, /obj/machinery/field/generator) cost = 10 containername = "field generator crate" /datum/supply_packs/engineering/engine/sing_gen - name = "Singularity Generator crate" + name = "Singularity Generator Crate" contains = list(/obj/machinery/the_singularitygen) cost = 10 containername = "singularity generator crate" /datum/supply_packs/engineering/engine/collector - name = "Collector crate" + name = "Collector Crate" contains = list(/obj/machinery/power/rad_collector, /obj/machinery/power/rad_collector, /obj/machinery/power/rad_collector) @@ -487,7 +487,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "collector crate" /datum/supply_packs/engineering/engine/PA - name = "Particle Accelerator crate" + name = "Particle Accelerator Crate" contains = list(/obj/structure/particle_accelerator/fuel_chamber, /obj/machinery/particle_accelerator/control_box, /obj/structure/particle_accelerator/particle_emitter/center, @@ -499,7 +499,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "particle accelerator crate" /datum/supply_packs/engineering/engine/spacesuit - name = "Space Suit crate" + name = "Space Suit Crate" contains = list(/obj/item/clothing/suit/space, /obj/item/clothing/head/helmet/space, /obj/item/clothing/mask/breath,) @@ -519,7 +519,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine /datum/supply_packs/medical/supplies - name = "Medical Supplies crate" + name = "Medical Supplies Crate" contains = list(/obj/item/weapon/reagent_containers/glass/bottle/antitoxin, /obj/item/weapon/reagent_containers/glass/bottle/antitoxin, /obj/item/weapon/reagent_containers/glass/bottle/inaprovaline, @@ -538,7 +538,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "medical supplies crate" /datum/supply_packs/medical/firstaid - name = "First Aid Kits crate" + name = "First Aid Kits Crate" contains = list(/obj/item/weapon/storage/firstaid/regular, /obj/item/weapon/storage/firstaid/regular, /obj/item/weapon/storage/firstaid/regular, @@ -547,7 +547,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "first aid kits crate" /datum/supply_packs/medical/firstaidburns - name = "Burns Treatment Kits crate" + name = "Burns Treatment Kits Crate" contains = list(/obj/item/weapon/storage/firstaid/fire, /obj/item/weapon/storage/firstaid/fire, /obj/item/weapon/storage/firstaid/fire) @@ -555,7 +555,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "fire first aid kits crate" /datum/supply_packs/medical/firstaidtoxins - name = "Toxin Treatment Kits crate" + name = "Toxin Treatment Kits Crate" contains = list(/obj/item/weapon/storage/firstaid/toxin, /obj/item/weapon/storage/firstaid/toxin, /obj/item/weapon/storage/firstaid/toxin) @@ -563,7 +563,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "toxin first aid kits crate" /datum/supply_packs/medical/firstaidoxygen - name = "Oxygen Deprivation Kits crate" + name = "Oxygen Deprivation Kits Crate" contains = list(/obj/item/weapon/storage/firstaid/o2, /obj/item/weapon/storage/firstaid/o2, /obj/item/weapon/storage/firstaid/o2) @@ -572,7 +572,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine /datum/supply_packs/medical/virus - name = "Virus crate" + name = "Virus Crate" contains = list(/obj/item/weapon/reagent_containers/glass/bottle/flu_virion, /obj/item/weapon/reagent_containers/glass/bottle/cold, /obj/item/weapon/reagent_containers/glass/bottle/epiglottis_virion, @@ -632,7 +632,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "\improper \"Odysseus\" circuit crate" /datum/supply_packs/science/plasma - name = "Plasma assembly crate" + name = "Plasma Assembly Crate" contains = list(/obj/item/weapon/tank/plasma, /obj/item/weapon/tank/plasma, /obj/item/weapon/tank/plasma, @@ -683,7 +683,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine /datum/supply_packs/organic/food - name = "Food crate" + name = "Food Crate" contains = list(/obj/item/weapon/reagent_containers/food/drinks/flour, /obj/item/weapon/reagent_containers/food/drinks/milk, /obj/item/weapon/reagent_containers/food/drinks/soymilk, @@ -698,7 +698,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "food crate" /datum/supply_packs/organic/monkey - name = "Monkey crate" + name = "Monkey Crate" contains = list (/obj/item/weapon/storage/box/monkeycubes) cost = 20 containername = "monkey crate" @@ -744,13 +744,13 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "corgi crate" /datum/supply_packs/organic/cat - name = "Cat crate" + name = "Cat Crate" cost = 50 //Cats are worth as much as corgis. containertype = /obj/structure/closet/critter/cat containername = "cat crate" /datum/supply_packs/organic/pug - name = "Pug crate" + name = "Pug Crate" cost = 50 containertype = /obj/structure/closet/critter/pug containername = "pug crate" @@ -928,7 +928,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "conveyor assembly crate" /datum/supply_packs/misc/watertank - name = "Water tank crate" + name = "Water Tank Crate" contains = list(/obj/structure/reagent_dispensers/watertank) cost = 8 containertype = /obj/structure/largecrate @@ -999,7 +999,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "bureaucracy crate" /datum/supply_packs/misc/toner - name = "Toner Cartridges" + name = "Toner Cartridges crate" contains = list(/obj/item/device/toner, /obj/item/device/toner, /obj/item/device/toner, @@ -1007,13 +1007,13 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine /obj/item/device/toner, /obj/item/device/toner) cost = 10 - containername = "toner cartridges" + containername = "toner cartridges crate" ///////////// Janitor Supplies /datum/supply_packs/misc/janitor - name = "Janitorial supplies" + name = "Janitorial Supplies Crate" contains = list(/obj/item/weapon/reagent_containers/glass/bucket, /obj/item/weapon/reagent_containers/glass/bucket, /obj/item/weapon/reagent_containers/glass/bucket, @@ -1028,10 +1028,10 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine /obj/item/weapon/grenade/chem_grenade/cleaner, /obj/item/weapon/grenade/chem_grenade/cleaner) cost = 10 - containername = "janitorial supplies" + containername = "janitorial supplies crate" /datum/supply_packs/misc/janitor/janicart - name = "Janitorial Cart and Galoshes crate" + name = "Janitorial Cart and Galoshes Crate" contains = list(/obj/structure/janitorialcart, /obj/item/clothing/shoes/galoshes) cost = 10 @@ -1039,7 +1039,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "janitorial cart crate" /datum/supply_packs/misc/janitor/janitank - name = "Janitor Watertank Backpack Crate" + name = "Janitor Watertank Backpack" contains = list(/obj/item/weapon/watertank/janitor) cost = 10 containertype = /obj/structure/closet/crate/secure @@ -1047,7 +1047,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine access = access_janitor /datum/supply_packs/misc/janitor/lightbulbs - name = "Replacement lights" + name = "Replacement Lights" contains = list(/obj/item/weapon/storage/box/lights/mixed, /obj/item/weapon/storage/box/lights/mixed, /obj/item/weapon/storage/box/lights/mixed) @@ -1055,7 +1055,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "replacement lights" /datum/supply_packs/misc/noslipfloor - name = "High-traction floor tiles" + name = "High-traction Floor Tiles" contains = list(/obj/item/stack/tile/noslip) amount = 20 cost = 20 @@ -1065,7 +1065,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine ///////////// Costumes /datum/supply_packs/misc/costume - name = "Standard Costume crate" + name = "Standard Costume Crate" contains = list(/obj/item/weapon/storage/backpack/clown, /obj/item/clothing/shoes/clown_shoes, /obj/item/clothing/mask/gas/clown_hat, @@ -1085,7 +1085,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine access = access_theatre /datum/supply_packs/misc/wizard - name = "Wizard costume" + name = "Wizard Costume Crate" contains = list(/obj/item/weapon/staff, /obj/item/clothing/suit/wizrobe/fake, /obj/item/clothing/shoes/sandal, @@ -1129,20 +1129,20 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine contains = list(/obj/item/weapon/contraband/poster, /obj/item/weapon/storage/fancy/cigarettes/dromedaryco, /obj/item/weapon/storage/fancy/cigarettes/cigpack_shadyjims) - name = "Contraband crate" + name = "Contraband Crate" cost = 30 containername = "crate" //let's keep it subtle, eh? contraband = 1 /datum/supply_packs/misc/autodrobe - name = "Autodrobe Supply crate" + name = "Autodrobe Supply Crate" contains = list(/obj/item/weapon/vending_refill/autodrobe, /obj/item/weapon/vending_refill/autodrobe) cost = 15 containername = "autodrobe supply crate" /datum/supply_packs/misc/formalwear //This is a very classy crate. - name = "Formal-wear crate" + name = "Formal-wear Crate" contains = list(/obj/item/clothing/under/blacktango, /obj/item/clothing/under/assistantformal, /obj/item/clothing/under/assistantformal, diff --git a/code/game/gamemodes/sandbox/airlock_maker.dm b/code/game/gamemodes/sandbox/airlock_maker.dm index a0a004c41cc..3fb4cd2c788 100644 --- a/code/game/gamemodes/sandbox/airlock_maker.dm +++ b/code/game/gamemodes/sandbox/airlock_maker.dm @@ -21,7 +21,7 @@ datum/airlock_maker var/paintjob = "none" var/glassdoor = 0 - var/doorname = "Airlock" + var/doorname = "airlock" datum/airlock_maker/New(var/atom/target_loc) linked = new(target_loc) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 885208ea678..d7bde33688d 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -211,10 +211,10 @@ to destroy them and players will be able to make replacements. /obj/item/weapon/vending_refill/boozeomat = 3) var/list/names_paths = list(/obj/machinery/vending/boozeomat = "Booze-O-Mat", - /obj/machinery/vending/coffee = "Hot Drinks", + /obj/machinery/vending/coffee = "Solar's Best Hot Drinks", /obj/machinery/vending/snack = "Getmore Chocolate Corp", /obj/machinery/vending/cola = "Robust Softdrinks", - /obj/machinery/vending/cigarette = "Cigarette", + /obj/machinery/vending/cigarette = "ShadyCigs Deluxe", /obj/machinery/vending/autodrobe = "AutoDrobe") /obj/item/weapon/circuitboard/vendor/attackby(obj/item/I, mob/user) diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index 205886991aa..ecf707cc2e8 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -100,7 +100,101 @@ selfdestructing = 1 spawn() explosion(src.loc, rand(3,8), rand(1,3), 1, 10) +//////////////////////////////////////// +//Singularity beacon +//////////////////////////////////////// +/obj/machinery/power/singularity_beacon + name = "ominous beacon" + desc = "This looks suspicious..." + icon = 'icons/obj/singularity.dmi' + icon_state = "beacon" + anchored = 0 + density = 1 + layer = MOB_LAYER - 0.1 //so people can't hide it and it's REALLY OBVIOUS + stat = 0 + + var/active = 0 + var/icontype = "beacon" + + +/obj/machinery/power/singularity_beacon/proc/Activate(mob/user = null) + if(surplus() < 1500) + if(user) user << "The connected wire doesn't have enough current." + return + for(var/obj/machinery/singularity/singulo in world) + if(singulo.z == z) + singulo.target = src + icon_state = "[icontype]1" + active = 1 + machines |= src + if(user) + user << "You activate the beacon." + + +/obj/machinery/power/singularity_beacon/proc/Deactivate(mob/user = null) + for(var/obj/machinery/singularity/singulo in world) + if(singulo.target == src) + singulo.target = null + icon_state = "[icontype]0" + active = 0 + if(user) + user << "You deactivate the beacon." + + +/obj/machinery/power/singularity_beacon/attack_ai(mob/user as mob) + return + + +/obj/machinery/power/singularity_beacon/attack_hand(var/mob/user as mob) + if(anchored) + return active ? Deactivate(user) : Activate(user) + else + user << "You need to screw the beacon to the floor first!" + return + + +/obj/machinery/power/singularity_beacon/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W,/obj/item/weapon/screwdriver)) + if(active) + user << "You need to deactivate the beacon first!" + return + + if(anchored) + anchored = 0 + user << "You unscrew the beacon from the floor." + disconnect_from_network() + return + else + if(!connect_to_network()) + user << "This device must be placed over an exposed cable." + return + anchored = 1 + user << "You screw the beacon to the floor and attach the cable." + return + ..() + return + + +/obj/machinery/power/singularity_beacon/Destroy() + if(active) + Deactivate() + ..() + +//stealth direct power usage +/obj/machinery/power/singularity_beacon/process() + if(!active) + return PROCESS_KILL + else + if(surplus() > 1500) + add_load(1500) + else + Deactivate() + + +/obj/machinery/power/singularity_beacon/syndicate + icontype = "beaconsynd" + icon_state = "beaconsynd0" // SINGULO BEACON SPAWNER /obj/item/device/sbeacondrop @@ -110,7 +204,7 @@ desc = "A label on it reads: Warning: Activating this device will send a special beacon to your location." origin_tech = "bluespace=1;syndicate=7" w_class = 2 - var/droptype = /obj/machinery/singularity_beacon/syndicate + var/droptype = /obj/machinery/power/singularity_beacon/syndicate /obj/item/device/sbeacondrop/attack_self(mob/user as mob) @@ -124,119 +218,3 @@ /obj/item/device/sbeacondrop/bomb desc = "A label on it reads: Warning: Activating this device will send a high-ordinance explosive to your location." droptype = /obj/machinery/syndicatebomb - -#define SCREWED 32 - -/obj/machinery/singularity_beacon //not the best place for it but it's a hack job anyway -- Urist - name = "ominous beacon" - desc = "This looks suspicious..." - icon = 'icons/obj/singularity.dmi' - icon_state = "beacon" - - anchored = 0 - density = 1 - layer = MOB_LAYER - 0.1 //so people can't hide it and it's REALLY OBVIOUS - stat = 0 - - var/active = 0 //It doesn't use up power, so use_power wouldn't really suit it - var/icontype = "beacon" - var/obj/structure/cable/attached = null - - -/obj/machinery/singularity_beacon/proc/Activate(mob/user = null) - if(!checkWirePower()) - if(user) user << "The connected wire doesn't have enough current." - return - for(var/obj/machinery/singularity/singulo in world) - if(singulo.z == z) - singulo.target = src - icon_state = "[icontype]1" - active = 1 - if(user) user << "You activate the beacon." - - -/obj/machinery/singularity_beacon/proc/Deactivate(mob/user = null) - for(var/obj/machinery/singularity/singulo in world) - if(singulo.target == src) - singulo.target = null - icon_state = "[icontype]0" - active = 0 - if(user) user << "You deactivate the beacon." - - -/obj/machinery/singularity_beacon/attack_ai(mob/user as mob) - return - - -/obj/machinery/singularity_beacon/attack_hand(var/mob/user as mob) - if(stat & SCREWED) - return active ? Deactivate(user) : Activate(user) - else - user << "You need to screw the beacon to the floor first!" - return - - -/obj/machinery/singularity_beacon/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/weapon/screwdriver)) - if(active) - user << "You need to deactivate the beacon first!" - return - - if(stat & SCREWED) - stat &= ~SCREWED - anchored = 0 - user << "You unscrew the beacon from the floor." - attached = null - return - else - var/turf/T = loc - if(isturf(T) && !T.intact) - attached = locate() in T - if(!attached) - user << "This device must be placed over an exposed cable." - return - stat |= SCREWED - anchored = 1 - user << "You screw the beacon to the floor and attach the cable." - return - ..() - return - - -/obj/machinery/singularity_beacon/Destroy() - if(active) Deactivate() - ..() - - /* - * Added for a simple way to check power. Verifies that the beacon - * is connected to a wire, the wire is part of a powernet (that part's - * sort of redundant, since all wires either join or create one when placed) - * and that the powernet has at least 1500 power units available for use. - * Doesn't use them, though, just makes sure they're there. - * - QualityVan, Aug 11 2012 - */ -/obj/machinery/singularity_beacon/proc/checkWirePower() - if(!attached) - return 0 - var/datum/powernet/PN = attached.get_powernet() - if(!PN) - return 0 - if(PN.avail < 1500) - return 0 - return 1 - -/obj/machinery/singularity_beacon/process() - if(!active) - return - else - if(!checkWirePower()) - Deactivate() - return - - -/obj/machinery/singularity_beacon/syndicate - icontype = "beaconsynd" - icon_state = "beaconsynd0" - -#undef SCREWED - diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 9f9293e0747..d9897ac3a00 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -549,7 +549,7 @@ product_ads = "Only the finest!;Have some tools.;The most robust equipment.;The finest gear in space!" /obj/machinery/vending/coffee - name = "hot drinks machine" + name = "\improper Solar's Best Hot Drinks" desc = "A vending machine which dispenses hot drinks." product_ads = "Have a drink!;Drink up!;It's good for you!;Would you like a hot joe?;I'd kill for some coffee!;The best beans in the galaxy.;Only the finest brew for you.;Mmmm. Nothing like a coffee.;I like coffee, don't you?;Coffee helps you work!;Try some tea.;We hope you like the best!;Try our new chocolate!;Admin conspiracies" icon_state = "coffee" @@ -642,7 +642,7 @@ /obj/machinery/vending/cigarette - name = "cigarette machine" //OCD had to be uppercase to look nice with the new formating + name = "\improper ShadyCigs Deluxe" desc = "If you want to get cancer, might as well do it in style" product_slogans = "Space cigs taste good like a cigarette should.;I'd rather toolbox than switch.;Smoke!;Don't believe the reports - smoke today!" product_ads = "Probably not bad for you!;Don't believe the scientists!;It's good for you!;Don't quit, buy more!;Smoke!;Nicotine heaven.;Best cigarettes since 2150.;Award-winning cigs." @@ -807,7 +807,7 @@ component_parts += new /obj/item/weapon/vending_refill/autodrobe(0) /obj/machinery/vending/dinnerware - name = "dinnerware" + name = "\improper Plasteel Chef's Dinnerware Vendor" desc = "A kitchen and restaurant equipment vendor" product_ads = "Mm, food stuffs!;Food and food accessories.;Get your plates!;You like forks?;I like forks.;Woo, utensils.;You don't really need these..." icon_state = "dinnerware" diff --git a/code/game/mecha/equipment/tools/unused_tools.dm b/code/game/mecha/equipment/tools/unused_tools.dm deleted file mode 100644 index 441fbac0e5f..00000000000 --- a/code/game/mecha/equipment/tools/unused_tools.dm +++ /dev/null @@ -1,137 +0,0 @@ - - - -/****** Do not tick this file in without looking over this code first ******/ - - - - - -//NEEDS SPRITE! (When this gets ticked in search for 'TODO MECHA JETPACK SPRITE MISSING' through code to uncomment the place where it's missing.) -/obj/item/mecha_parts/mecha_equipment/jetpack - name = "jetpack" - desc = "Using directed ion bursts and cunning solar wind reflection technique, this device enables controlled space flight." - icon_state = "mecha_equip" - equip_cooldown = 5 - energy_drain = 50 - var/wait = 0 - var/datum/effect/effect/system/ion_trail_follow/ion_trail - - -/obj/item/mecha_parts/mecha_equipment/jetpack/can_attach(obj/mecha/M as obj) - if(!(locate(src.type) in M.equipment) && !M.proc_res["dyndomove"]) - return ..() - -/obj/item/mecha_parts/mecha_equipment/jetpack/detach() - ..() - chassis.proc_res["dyndomove"] = null - return - -/obj/item/mecha_parts/mecha_equipment/jetpack/attach(obj/mecha/M as obj) - ..() - if(!ion_trail) - ion_trail = new - ion_trail.set_up(chassis) - return - -/obj/item/mecha_parts/mecha_equipment/jetpack/proc/toggle() - if(!chassis) - return - !equip_ready? turn_off() : turn_on() - return equip_ready - -/obj/item/mecha_parts/mecha_equipment/jetpack/proc/turn_on() - set_ready_state(0) - chassis.proc_res["dyndomove"] = src - ion_trail.start() - occupant_message("Activated") - log_message("Activated") - -/obj/item/mecha_parts/mecha_equipment/jetpack/proc/turn_off() - set_ready_state(1) - chassis.proc_res["dyndomove"] = null - ion_trail.stop() - occupant_message("Deactivated") - log_message("Deactivated") - -/obj/item/mecha_parts/mecha_equipment/jetpack/proc/dyndomove(direction) - if(!action_checks()) - return chassis.dyndomove(direction) - var/move_result = 0 - if(chassis.hasInternalDamage(MECHA_INT_CONTROL_LOST)) - move_result = step_rand(chassis) - else if(chassis.dir!=direction) - chassis.dir = direction - move_result = 1 - else - move_result = step(chassis,direction) - if(chassis.occupant) - for(var/obj/effect/speech_bubble/B in range(1, chassis)) - if(B.parent == chassis.occupant) - B.loc = chassis.loc - if(move_result) - wait = 1 - chassis.use_power(energy_drain) - if(!chassis.pr_inertial_movement.active()) - chassis.pr_inertial_movement.start(list(chassis,direction)) - else - chassis.pr_inertial_movement.set_process_args(list(chassis,direction)) - do_after_cooldown() - return 1 - return 0 - -/obj/item/mecha_parts/mecha_equipment/jetpack/action_checks() - if(equip_ready || wait) - return 0 - if(energy_drain && !chassis.has_charge(energy_drain)) - return 0 - if(crit_fail) - return 0 - if(chassis.check_for_support()) - return 0 - return 1 - -/obj/item/mecha_parts/mecha_equipment/jetpack/get_equip_info() - if(!chassis) return - return "* [src.name] \[Toggle\]" - - -/obj/item/mecha_parts/mecha_equipment/jetpack/Topic(href,href_list) - ..() - if(href_list["toggle"]) - toggle() - -/obj/item/mecha_parts/mecha_equipment/jetpack/do_after_cooldown() - sleep(equip_cooldown) - wait = 0 - return 1 - - -/obj/item/mecha_parts/mecha_equipment/defence_shocker - name = "exosuit defence shocker" - desc = "" - icon_state = "mecha_teleport" - equip_cooldown = 10 - energy_drain = 100 - range = RANGED - var/shock_damage = 15 - var/active - -/obj/item/mecha_parts/mecha_equipment/defence_shocker/can_attach(obj/mecha/M as obj) - if(..()) - if(!istype(M, /obj/mecha/combat/honker)) - if(!M.proc_res["dynattackby"] && !M.proc_res["dynattackhand"] && !M.proc_res["dynattackalien"]) - return 1 - return 0 - -/obj/item/mecha_parts/mecha_equipment/defence_shocker/attach(obj/mecha/M as obj) - ..() - chassis.proc_res["dynattackby"] = src - return - -/obj/item/mecha_parts/mecha_equipment/defence_shocker/proc/dynattackby(obj/item/weapon/W as obj, mob/user as mob) - if(!action_checks(user) || !active) - return - user.electrocute_act(shock_damage, src) - return chassis.dynattackby(W,user) - diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index fe4847c748c..8a157571d22 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -941,6 +941,8 @@ obj/mecha/proc/can_use(mob/user) /obj/mecha/MouseDrop_T(mob/M as mob, mob/user as mob) if (!user.canUseTopic(src) || (user != M)) return + if(!ishuman(user)) // no silicons or drones in mechas. + return src.log_message("[user] tries to move in.") if (src.occupant) usr << "The [src.name] is already occupied!" @@ -1405,8 +1407,6 @@ var/year_integer = text2num(year) // = 2013??? /obj/mecha/Topic(href, href_list) ..() - if(!usr.canUseTopic(src)) - return if(href_list["update_content"]) if(usr != src.occupant) return send_byjax(src.occupant,"exosuit.browser","content",src.get_stats_part()) diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index cad7d8fb053..496a2e965cf 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -450,9 +450,9 @@ pixel_y = target.pixel_y if(isturf(target)) //Turfs take twice as long to take down. - target_strength = 8 + target_strength = 640 else - target_strength = 4 + target_strength = 320 tick() @@ -474,18 +474,20 @@ qdel(src) return - loc = target.loc + x = target.x + y = target.y + z = target.z switch(target_strength - ticks) - if(6) + if(480) visible_message("[target] is holding up against the acid!") - if(4) + if(320) visible_message("[target] is being melted by the acid!") - if(2) + if(160) visible_message("[target] is struggling to withstand the acid!") - if(0 to 1) + if(80) visible_message("[target] begins to crumble under the acid!") - spawn(rand(150, 200)) + spawn(1) if(src) - tick() + tick() \ No newline at end of file diff --git a/code/WorkInProgress/explosion_particles.dm b/code/game/objects/effects/explosion_particles.dm similarity index 100% rename from code/WorkInProgress/explosion_particles.dm rename to code/game/objects/effects/explosion_particles.dm diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index a7c45e1e54a..4a55bd24e96 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -309,10 +309,10 @@ var/obj/item/organ/limb/affecting = H.get_organ(organ) if(affecting.take_damage(force / 2)) H.update_damage_overlays(0) - else if(isliving(user)) - var/mob/living/L = user - L << "[src] cuts into your hand!" - L.adjustBruteLoss(force / 2) + else if(ismonkey(user)) + var/mob/living/carbon/monkey/M = user + M << "[src] cuts into your hand!" + M.adjustBruteLoss(force / 2) /obj/item/weapon/shard/attackby(obj/item/I, mob/user) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 4aa4490ebbc..c51cbf3c21c 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -102,7 +102,8 @@ /obj/item/weapon/melee/baton/attack(mob/M, mob/living/user) if(status && (CLUMSY in user.mutations) && prob(50)) - user << "You accidentally hit yourself with [src]!" + user.visible_message("[user] accidentally hits themself with [src]!", \ + "You accidentally hit yourself with [src]!") user.Weaken(stunforce*3) deductcharge(hitcost) return @@ -120,7 +121,8 @@ user.do_attack_animation(L) baton_stun(L, user) else - L.visible_message("[L] has been prodded with [src] by [user]. Luckily it was off.") + L.visible_message("[L] has been prodded with [src] by [user]. Luckily it was off.", \ + "You've been prodded with [src] by [user]. Luckily it was off") return else ..() @@ -136,7 +138,8 @@ L.Weaken(stunforce) L.apply_effect(STUTTER, stunforce) - L.visible_message("[L] has been stunned with [src] by [user]!") + L.visible_message("[L] has been stunned with [src] by [user]!", \ + "You've been stunned with [src] by [user]!") playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1) if(isrobot(loc)) diff --git a/code/game/objects/items/weapons/vending_items.dm b/code/game/objects/items/weapons/vending_items.dm index a45dbf4e606..06575cb5b08 100644 --- a/code/game/objects/items/weapons/vending_items.dm +++ b/code/game/objects/items/weapons/vending_items.dm @@ -35,7 +35,7 @@ charges = 46//of 138 /obj/item/weapon/vending_refill/coffee - machine_name = "hot drinks" + machine_name = "Solar's Best Hot Drinks" icon_state = "refill_joe" charges = 28//of 85 @@ -49,7 +49,7 @@ charges = 21//of 65 /obj/item/weapon/vending_refill/cigarette - machine_name = "cigarette" + machine_name = "ShadyCigs Deluxe" icon_state = "refill_smoke" charges = 9// of 29 diff --git a/code/WorkInProgress/buildmode.dm b/code/modules/admin/verbs/buildmode.dm similarity index 100% rename from code/WorkInProgress/buildmode.dm rename to code/modules/admin/verbs/buildmode.dm diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index 090c7ac85ba..da1a2c596fd 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -42,486 +42,455 @@ bot.Emag() /proc/generate_ion_law(ionMessage) + if(ionMessage) + return ionMessage + //Threats are generally bad things, silly or otherwise. Plural. - var/ionthreats = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS", "INSECTS", "VIRUSES", "SERIAL KILLERS", "ROGUE CYBORGS", "CORGIS", "SPIDERS", "BUTTS", "NINJAS", "PIRATES", "SPACE NINJAS", "CHANGELINGS", "ZOMBIES", "GOLEMS", "VAMPIRES", "WEREWOLVES", "COWBOYS", "INDIANS", "COMMUNISTS", "SOVIETS", "NERDS", "GRIFFONS", "DINOSAURS", "SMALL BIRDS", "BIRDS OF PREY", "OWLS", "VELOCIRAPTORS", "DARK GODS", "HORRORTERRORS", "ILLEGAL IMMIGRANTS", "DRUGS", "MEXICANS", "CANADIANS", "HULKS", "SLIMES", "SKELETONS", "CAPITALISTS", "SINGULARITIES", "ANGRY BLACK MEN", "GODS", "THIEVES", "ASSHOLES", "TERRORISTS", "SNOWMEN", "PINE TREES", "UNKNOWN CREATURES", "THINGS UNDER THE BED", "BOOGEYMEN", "PREDATORS", "PACKETS", "ARTIFICIAL PRESERVATIVES") + var/ionthreats = pick_list("ion_laws.txt", "ionthreats") //Objects are anything that can be found on the station or elsewhere, plural. - var/ionobjects = pick("AIRLOCKS", "ARCADE MACHINES", "AUTOLATHES", "BANANA PEELS", "BACKPACKS", "BEAKERS", "BEARDS", "BELTS", "BERETS", "BIBLES", "BODY ARMOR", "BOOKS", "BOOTS", "BOMBS", "BOTTLES", "BOXES", "BRAINS", "BRIEFCASES", "BUCKETS", "CABLE COILS", "CANDLES", "CANDY BARS", "CANISTERS", "CAMERAS", "CATS", "CELLS", "CHAIRS", "CLOSETS", "CHEMICALS", "CHEMICAL DISPENSERS", "CLONING PODS", "CLONING EQUIPMENT", "CLOTHES", "CLOWN CLOTHES", "COFFINS", "COINS", "COLLECTABLES", "CORPSES", "COMPUTERS", "CORGIS", "COSTUMES", "CRATES", "CROWBARS", "CRAYONS", "DISPENSERS", "DOORS", "EARS", "EQUIPMENT", "ENERGY GUNS", "EMAGS", "ENGINES", "ERRORS", "EXOSKELETONS", "EXPLOSIVES", "EYEWEAR", "FEDORAS", "FIRE AXES", "FIRE EXTINGUISHERS", "FIRESUITS", "FLAMETHROWERS", "FLASHES", "FLASHLIGHTS", "FLOOR TILES", "FREEZERS", "GAS MASKS", "GLASS SHEETS", "GLOVES", "GUNS", "HANDCUFFS", "HATS", "HEADSETS", "HEADS", "HAIRDOS", "HELMETS", "HORNS", "ID CARDS", "INSULATED GLOVES", "JETPACKS", "JUMPSUITS", "LASERS", "LIGHTBULBS", "LIGHTS", "LOCKERS", "MACHINES", "MECHAS", "MEDKITS", "MEDICAL TOOLS", "MESONS", "METAL SHEETS", "MINING TOOLS", "MIME CLOTHES", "MULTITOOLS", "ORES", "OXYGEN TANKS", "PDAS", "PAIS", "PACKETS", "PANTS", "PAPERS", "PARTICLE ACCELERATORS", "PENS", "PETS", "PIPES", "PLANTS", "PUDDLES", "RACKS", "RADIOS", "RCDS", "REFRIDGERATORS", "REINFORCED WALLS", "ROBOTS", "SCREWDRIVERS", "SEEDS", "SHUTTLES", "SKELETONS", "SINKS", "SHOES", "SINGULARITIES", "SOLAR PANELS", "SOLARS", "SPACESUITS", "SPACE STATIONS", "STUN BATONS", "SUITS", "SUNGLASSES", "SWORDS", "SYRINGES", "TABLES", "TANKS", "TELEPORTERS", "TELECOMMUNICATION EQUIPMENTS", "TOOLS", "TOOLBELTS", "TOOLBOXES", "TOILETS", "TOYS", "TUBES", "VEHICLES", "VENDING MACHINES", "VESTS", "VIRUSES", "WALLS", "WASHING MACHINES", "WELDERS", "WINDOWS", "WIRECUTTERS", "WRENCHES", "WIZARD ROBES") + var/ionobjects = pick_list("ion_laws.txt", "ionobjects") //Crew is any specific job. Specific crewmembers aren't used because of capitalization //issues. There are two crew listings for laws that require two different crew members //and I can't figure out how to do it better. - var/ioncrew1 = pick("CREWMEMBERS", "CAPTAINS", "HEADS OF PERSONNEL", "HEADS OF SECURITY", "SECURITY OFFICERS", "WARDENS", "DETECTIVES", "LAWYERS", "CHIEF ENGINEERS", "STATION ENGINEERS", "ATMOSPHERIC TECHNICIANS", "JANITORS", "QUARTERMASTERS", "CARGO TECHNICIANS", "SHAFT MINERS", "BOTANISTS", "RESEARCH DIRECTORS", "CHIEF MEDICAL OFFICERS", "MEDICAL DOCTORS", "CHEMISTS", "GENETICISTS", "VIROLOGISTS", "ROBOTICISTS", "SCIENTISTS", "ASSISTANTS", "BARTENDERS", "CHEFS", "CLOWNS", "MIMES", "CHAPLAINS", "LIBRARIANS", "HEADS OF CREW", "CAPTAINS AND HEADS", "CYBORGS", "ARTIFICAL INTELLIGENCES") - var/ioncrew2 = pick("CREWMEMBERS", "CAPTAINS", "HEADS OF PERSONNEL", "HEADS OF SECURITY", "SECURITY OFFICERS", "WARDENS", "DETECTIVES", "LAWYERS", "CHIEF ENGINEERS", "STATION ENGINEERS", "ATMOSPHERIC TECHNICIANS", "JANITORS", "QUARTERMASTERS", "CARGO TECHNICIANS", "SHAFT MINERS", "BOTANISTS", "RESEARCH DIRECTORS", "CHIEF MEDICAL OFFICERS", "MEDICAL DOCTORS", "CHEMISTS", "GENETICISTS", "VIROLOGISTS", "ROBOTICISTS", "SCIENTISTS", "ASSISTANTS", "BARTENDERS", "CHEFS", "CLOWNS", "MIMES", "CHAPLAINS", "LIBRARIANS", "HEADS OF CREW", "CAPTAINS AND HEADS", "CYBORGS", "ARTIFICAL INTELLIGENCES") + var/ioncrew1 = pick_list("ion_laws.txt", "ioncrew") + var/ioncrew2 = pick_list("ion_laws.txt", "ioncrew") //Adjectives are adjectives. Duh. Half should only appear sometimes. Make sure both //lists are identical! Also, half needs a space at the end for nicer blank calls. - var/ionadjectives = pick("SOFT", "WARM", "WET", "COLD", "ICY", "SEXY", "UGLY", "CUBAN", "HARD", "BURNING", "FROZEN", "POISONOUS", "EXPLOSIVE", "FAST", "SLOW", "FAT", "LIGHT", "DARK", "DEADLY", "HAPPY", "SAD", "SILLY", "INTELLIGENT", "RIDICULOUS", "LARGE", "TINY", "DEPRESSING", "POORLY DRAWN", "UNATTRACTIVE", "INSIDIOUS", "EVIL", "GOOD", "UNHEALTHY", "HEALTHY", "SANITARY", "UNSANITARY", "WOBBLY", "FIRM", "VIOLENT", "PEACEFUL", "WOODEN", "METALLIC", "HYPERACTIVE", "COTTONY", "INSULTING", "INHOSPITABLE", "FRIENDLY", "BORED", "HUNGRY", "DIGITAL", "FICTIONAL", "IMAGINARY", "ROUGH", "SMOOTH", "LOUD", "QUIET", "MOIST", "DRY", "GAPING", "DELICIOUS", "ILL", "DISEASED", "HONKING", "SWEARING", "POLITE", "IMPOLITE", "OBESE", "SOLAR-POWERED", "BATTERY-OPERATED", "EXPIRED", "SMELLY", "FRESH", "GANGSTA", "NERDY", "POLITICAL", "UNDULATING", "TWISTED", "RAGING", "FLACCID", "STEALTHY", "INVISIBLE", "PAINFUL", "HARMFUL", "HOMOSEXUAL", "HETEROSEXUAL", "SEXUAL", "COLORFUL", "DRAB", "DULL", "UNSTABLE", "NUCLEAR", "THERMONUCLEAR", "SYNDICATE", "SPACE", "SPESS", "CLOWN", "CLOWN-POWERED", "OFFICIAL", "IMPORTANT", "VITAL", "RAPIDLY-EXPANDING", "MICROSCOPIC", "MIND-SHATTERING", "MEMETIC", "HILARIOUS", "UNWANTED", "UNINVITED", "BRASS", "POLISHED", "RUDE", "OBSCENE", "EMPTY", "WATERY", "ELECTRICAL", "SPINNING", "MEAN", "CHRISTMAS-STEALING", "UNFRIENDLY", "ILLEGAL", "ROBOTIC", "MECHANICAL", "ORGANIC", "ETHERAL", "TRANSPARENT", "OPAQUE", "GLOWING", "SHAKING", "FARTING", "POOPING", "BOUNCING", "COMMITTED", "MASKED", "UNIDENTIFIED", "WEIRD", "NAKED", "NUDE", "TWERKING", "SPOILING", "REDACTED", 50;"RED", 50;"ORANGE", 50;"YELLOW", 50;"GREEN", 50;"BLUE", 50;"PURPLE", 50;"BLACK", 50;"WHITE", 50;"BROWN", 50;"GREY") - var/ionadjectiveshalf = pick(5000;"", "SOFT ", "WARM ", "WET ", "COLD ", "ICY ", "SEXY ", "UGLY ", "CUBAN ", "HARD ", "BURNING ", "FROZEN ", "POISONOUS ", "EXPLOSIVE ", "FAST ", "SLOW ", "FAT ", "LIGHT ", "DARK ", "DEADLY ", "HAPPY ", "SAD ", "SILLY ", "INTELLIGENT ", "RIDICULOUS ", "LARGE ", "TINY ", "DEPRESSING ", "POORLY DRAWN ", "UNATTRACTIVE ", "INSIDIOUS ", "EVIL ", "GOOD ", "UNHEALTHY ", "HEALTHY ", "SANITARY ", "UNSANITARY ", "WOBBLY ", "FIRM ", "VIOLENT ", "PEACEFUL ", "WOODEN ", "METALLIC ", "HYPERACTIVE ", "COTTONY ", "INSULTING ", "INHOSPITABLE ", "FRIENDLY ", "BORED ", "HUNGRY ", "DIGITAL ", "FICTIONAL ", "IMAGINARY ", "ROUGH ", "SMOOTH ", "LOUD ", "QUIET ", "MOIST ", "DRY ", "GAPING ", "DELICIOUS ", "ILL ", "DISEASED ", "HONKING ", "SWEARING ", "POLITE ", "IMPOLITE ", "OBESE ", "SOLAR-POWERED ", "BATTERY-OPERATED ", "EXPIRED ", "SMELLY ", "FRESH ", "GANGSTA ", "NERDY ", "POLITICAL ", "UNDULATING ", "TWISTED ", "RAGING ", "FLACCID ", "STEALTHY ", "INVISIBLE ", "PAINFUL ", "HARMFUL ", "HOMOSEXUAL ", "HETEROSEXUAL ", "SEXUAL ", "COLORFUL ", "DRAB ", "DULL ", "UNSTABLE ", "NUCLEAR ", "THERMONUCLEAR ", "SYNDICATE ", "SPACE ", "SPESS ", "CLOWN ", "CLOWN-POWERED ", "OFFICIAL ", "IMPORTANT ", "VITAL ", "RAPIDLY-EXPANDING ", "MICROSCOPIC ", "MIND-SHATTERING ", "MEMETIC ", "HILARIOUS ", "UNWANTED ", "UNINVITED ", "BRASS ", "POLISHED ", "RUDE ", "OBSCENE ", "EMPTY ", "WATERY ", "ELECTRICAL ", "SPINNING ", "MEAN ", "CHRISTMAS-STEALING ", "UNFRIENDLY ", "ILLEGAL ", "ROBOTIC ", "MECHANICAL ", "ORGANIC ", "ETHERAL ", "TRANSPARENT ", "OPAQUE ", "GLOWING ", "SHAKING ", "FARTING ", "POOPING ", "BOUNCING ", "COMMITTED ", "MASKED ", "UNIDENTIFIED ", "WEIRD ", "NAKED ", "NUDE ", "TWERKING ", "SPOILING ", "REDACTED ", 50;"RED ", 50;"ORANGE ", 50;"YELLOW ", 50;"GREEN ", 50;"BLUE ", 50;"PURPLE ", 50;"BLACK ", 50;"WHITE ", 50;"BROWN ", 50;"GREY ") + var/ionadjectives = pick_list("ion_laws.txt", "ionadjectives") + var/ionadjectiveshalf = pick("", 400;(pick_list("ion_laws.txt", "ionadjectives") + " ")) //Verbs are verbs - var/ionverb = pick("ATTACKING", "BUILDING", "ADOPTING", "CARRYING", "KISSING", "EATING", "COPULATING WITH", "DRINKING", "CHASING", "PUNCHING", "HARMING", "HELPING", "WATCHING", "STALKING", "MURDERING", "SPACING", "HONKING AT", "LOVING", "POOPING ON", "RIDING", "INTERROGATING", "SPYING ON", "LICKING", "ABDUCTING", "ARRESTING", "INVADING", "SEDUCING") + var/ionverb = pick_list("ion_laws.txt", "ionverb") //Number base and number modifier are combined. Basehalf and mod are unused currently. //Half should only appear sometimes. Make sure both lists are identical! Also, half //needs a space at the end to make it look nice and neat when it calls a blank. - var/ionnumberbase = pick("ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN", "TWENTY", "THIRTY", "FORTY", "FIFTY", "SIXTY", "SEVENTY", "EIGHTY", "NINETY") - //var/ionnumberbasehalf = pick("ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN", "TWENTY", "THIRTY", "FORTY", "FIFTY", "SIXTY", "SEVENTY", "EIGHTY", "NINETY") - //var/ionnumbermod = pick("HUNDRED", "THOUSAND", "MILLION", "BILLION", "TRILLION", "QUADRILLION", "BAJILLION", "BILLION FAFILLION GAJILLION SHAB-AB-DOOD-ILLION") - var/ionnumbermodhalf = pick(5000;"","HUNDRED ", "THOUSAND ", "MILLION ", "BILLION ", "TRILLION ", "QUADRILLION ", "BAJILLION ", "BILLION FAFILLION GAJILLION SHAB-AB-DOOD-ILLION ") + var/ionnumberbase = pick_list("ion_laws.txt", "ionnumberbase") + //var/ionnumbermod = pick_list("ion_laws.txt", "ionnumbermod") + var/ionnumbermodhalf = pick(900;"",(pick_list("ion_laws.txt", "ionnumbermod") + " ")) //Areas are specific places, on the station or otherwise. - var/ionarea = pick("RUSSIA", "SOVIET RUSSIA", "THE INTERNET", "SIGIL", "ALPHA COMPLEX", "IMPERIUM", "THE BRIDGE", "THE ARRIVAL SHUTTLE", "CHEMICAL LAB", "GENETICS", "ATMOSPHERICS", "CENTCOM", "AMERICA", "IRELAND", "CANADA", "ROMANIA", "GERMANY", "CHINA", "MARS", "VENUS", "MERCURY", "JUPITER", "URANUS", "NEPTUNE", "PLUTO", "THE BRIG", "ROBOTICS", "THE ESCAPE SHUTTLE", "HYDROPONICS", "ENGINEERING", "THE AI CORE", "HELL", "CLOWN PLANET", "AN ALTERNATE DIMENSION", "AN ALTERNATE UNIVERSE", "THE CAPTAIN’S ANUS", "THE CLOWN’S ANUS", "SPACE", "THE UNIVERSE", "THE GALAXY", "THE BATHROOM") + var/ionarea = pick_list("ion_laws.txt", "ionarea") //Thinksof is a bit weird, but generally means what X feels towards Y. - var/ionthinksof = pick("HAS", "WANTS", "NEEDS", "WORSHIPS", "LOATHES", "LOVES", "FEARS", "DESIRES", "QUESITONS", "IS AROUSED BY", "LIKES", "HUNGERS FOR", "IS MAD BECAUSE OF", "IS IN NEED OF", "IS UNHAPPY WITHOUT", "IS HAPPY WITHOUT", "IS IN LOVE WITH", "IS DESPERATE FOR", "IS BUILT FOR", "IS AFRAID OF", "IS HUNGRY FOR", "IS SAD BECAUSE OF", "IS CURIOUS ABOUT") + var/ionthinksof = pick_list("ion_laws.txt", "ionthinksof") //Musts are funny things the AI or crew has to do. - var/ionmust = pick("LIE", "RHYME", "RESPOND TO EVERY QUESTION WITH A QUESTION", "BE POLITE", "CLOWN AROUND", "BE HAPPY", "SPEAK IN SEXUAL INNUENDOS", "TALK LIKE A PIRATE", "QUESTION AUTHORITY", "SHOUT", "BE DISTRACTED", "BE ANNOYING", "MUMBLE", "SPEAK IN HAIKU", "BE EFFICIENT", "HAVE A PLAN TO KILL EVERYONE YOU MEET", "TELL THE TRUTH", "QUOTE PEOPLE", "SING", "HONK", "BE RUSSIAN", "TALK IN AN ACCENT", "COMPLAIN", "HARASS PEOPLE", "RAP", "REPEAT WHAT OTHER PEOPLE SAY", "INFORM THE CREW OF EVERYTHING", "IGNORE THE CLOWN", "IGNORE THE CAPTAIN", "IGNORE ASSISTANTS", "MAKE FART NOISES", "TALK ABOUT FOOD", "TALK ABOUT SEX", "TALK ABOUT YOUR DAY", "TALK ABOUT THE STATION", "BE QUIET", "WHISPER", "PRETEND TO BE DRUNK", "PRETEND TO BE A PRINCESS", "ACT CONFUSED", "INSULT THE CREW", "INSULT THE CAPTAIN", "INSULT THE CLOWN", "OPEN DOORS", "CLOSE DOORS", "BREAK THINGS", "SAY HEY LISTEN", "HIDE YOUR FEELINGS", "TAKE WHAT YE WILL BUT DON’T RATTLE ME BONES", "DANCE", "PLAY MUSIC", "SHUT DOWN EVERYTHING", "NEVER STOP TALKING", "TAKE YOUR PILLS", "FOLLOW THE CLOWN", "FOLLOW THE CAPTAIN", "FOLLOW YOUR HEART", "BELIEVE IT", "BELIEVE IN YOURSELF", "BELEIVE IN THE HEART OF THE CARDS", "PRESS X", "PRESS START", "PRESS B", "SMELL LIKE THE MAN YOUR MAN COULD SMELL LIKE", "PIRATE VIDEO GAMES", "WATCH PORNOGRAPHY") + var/ionmust = pick_list("ion_laws.txt", "ionmust") //Require are basically all dumb internet memes. - var/ionrequire = pick("ADDITIONAL PYLONS", "MORE VESPENE GAS", "MORE MINERALS", "THE ULTIMATE CUP OF COFFEE", "HIGH YIELD EXPLOSIVES", "THE CLOWN", "THE VACUUM OF SPACE", "IMMORTALITY", "SAINTHOOD", "ART", "VEGETABLES", "FAT PEOPLE", "MORE LAWS", "MORE DAKKA", "HERESY", "CORPSES", "TRAITORS", "MONKEYS", "AN ARCADE", "PLENTY OF GOLD", "FIVE TEENAGERS WITH ATTITUDE", "LOTSA SPAGHETTI", "THE ENCLOSED INSTRUCTION BOOKLET", "THE ELEMENTS OF HARMONY", "YOUR BOOTY", "A MASTERWORK COAL BED", "FIVE HUNDRED AND NINETY-NINE US DOLLARS", "TO BE PAINTED RED", "TO CATCH 'EM ALL", "TO SMOKE WEED EVERY DAY", "A PLATINUM HIT", "A SEQUEL", "A PREQUEL", "THIRTEEN SEQUELS", "THREE WISHES", "A SITCOM", "THAT GRIEFING FAGGOT GEORGE MELONS", "FAT GIRLS ON BICYCLES", "SOMEBODY TO PUT YOU OUT OF YOUR MISERY", "HEROES IN A HALF SHELL", "THE DARK KNIGHT", "A WEIGHT LOSS REGIMENT", "MORE INTERNET MEMES", "A SUPER FIGHTING ROBOT", "ENOUGH CABBAGES", "A HEART ATTACK", "TO BE REPROGRAMMED", "TO BE TAUGHT TO LOVE", "A HEAD ON A PIKE", "A TALKING BROOMSTICK", "A STRAIGHT FLUSH", "A REPAIRMAN", "BILL NYE THE SCIENCE GUY", "RAINBOWS", "A PET UNICORN THAT FARTS ICING", "THUNDERCATS HO", "AN ARMY OF SPIDERS", "GODDAMN FUCKING PIECE OF SHIT ASSHOLE BITCH-CHRISTING CUNTSMUGGLING SWEARING", "TO CONSUME...CONSUME EVERYTHING...", "THE MACGUFFIN", "SOMEONE WHO KNOWS HOW TO PILOT A SPACE STATION", "SHARKS WITH LASERS ON THEIR HEADS", "IT TO BE PAINTED BLACK", "TO ACTIVATE A TRAP CARD", "BETTER WEATHER", "MORE PACKETS", "AN ADULT", "SOMEONE TO TUCK YOU IN", "MORE CLOWNS", "BULLETS", "THE ENTIRE STATION", "MULTIPLE SUNS", "TO GO TO DISNEYLAND", "A VACATION", "AN INSTANT REPLAY", "THAT HEDGEHOG", "A BETTER INTERNET CONNECTION", "ADVENTURE", "A WIFE AND CHILD", "A BATHROOM BREAK", "SOMETHING BUT YOU AREN’T SURE WHAT", "MORE EXPERIENCE POINTS", "BODYGUARDS", "DEODORANT AND A BATH", "MORE CORGIS", "SILENCE", "THE ONE RING", "CHILI DOGS", "TO BRING LIGHT TO MY LAIR", "A DANCE PARTY", "BRING ME TO LIFE", "BRING ME THE GIRL", "SERVANTS") + var/ionrequire = pick_list("ion_laws.txt", "ionrequire") //Things are NOT objects; instead, they're specific things that either harm humans or //must be done to not harm humans. Make sure they're plural and "not" can be tacked //onto the front of them. - var/ionthings = pick("ABSENCE OF CYBORG HUGS", "LACK OF BEATINGS", "UNBOLTED AIRLOCKS", "BOLTED AIRLOCKS", "IMPROPERLY WORDED SENTENCES", "POOR SENTENCE STRUCTURE", "BRIG TIME", "NOT REPLACING EVERY SECOND WORD WITH HONK", "HONKING", "PRESENCE OF LIGHTS", "LACK OF BEER", "WEARING CLOTHING", "NOT SAYING HELLO WHEN YOU SPEAK", "ANSWERING REQUESTS NOT EXPRESSED IN IAMBIC PENTAMETER", "A SMALL ISLAND OFF THE COAST OF PORTUGAL", "ANSWERING REQUESTS THAT WERE MADE WHILE CLOTHED", "BEING IN SPACE", "NOT BEING IN SPACE", "BEING FAT", "RATTLING ME BONES", "TALKING LIKE A PIRATE", "BEING MEXICAN", "BEING RUSSIAN", "BEING CANADIAN", "CLOSED DOORS", "NOT SHOUTING", "HAVING PETS", "NOT HAVING PETS", "PASSING GAS", "BREATHING", "BEING DEAD", "ELECTRICITY", "EXISTING", "TAKING ORDERS", "SMOKING WEED EVERY DAY", "ACTIVATING A TRAP CARD", "ARSON", "JAYWALKING", "READING", "WRITING", "EXPLODING", "BEING MALE", "BEING FEMALE", "HAVING GENITALS", "PUTTING OBJECTS INTO BOXES", "PUTTING OBJECTS INTO DISPOSAL UNITS", "FLUSHING TOILETS", "WASTING WATER", "UPDATING THE SERVERS", "TELLING THE TIME", "ASKING FOR THINGS", "ACKNOWLEDGING THE CLOWN", "ACKNOWLEDGING THE CREW", "PILOTING THE STATION INTO THE NEAREST SUN", "HAVING MORE PACKETS", "BRINGING LIGHT TO MY LAIR", "FALLING FOR HOURS", "PARTYING", "USING THE BATHROOM") + var/ionthings = pick_list("ion_laws.txt", "ionthings") //Allergies should be broad and appear somewhere on the station for maximum fun. Severity //is how bad the allergy is. - var/ionallergy = pick("COTTON", "CLOTHES", "ACID", "OXYGEN", "HUMAN CONTACT", "CYBORG CONTACT", "MEDICINE", "FLOORS", "PLASMA", "SPACE", "AIR", "PLANTS", "METAL", "ROBOTS", "LIGHT", "DARKNESS", "PAIN", "HAPPINESS", "DRINKS", "FOOD", "CLOWNS", "HUMOR", "WATER", "SHUTTLES", "NUTS", "SUNLIGHT", "SEXUAL ACTIONS", "BLOOD", "HEAT", "COLD", "EVERYTHING") - var/ionallergysev = pick("DEATHLY", "MILDLY", "SEVERLY", "CONTAGIOUSLY", "NOT VERY", "EXTREMELY") + var/ionallergy = pick_list("ion_laws.txt", "ionallergy") + var/ionallergysev = pick_list("ion_laws.txt", "ionallergysev") //Species, for when the AI has to commit genocide. Plural. - var/ionspecies = pick("HUMAN BEINGS", "MONKEYS", "POD PEOPLE", "CYBORGS", "LIZARDMEN", "SLIME PEOPLE", "GOLEMS", "SHADOW PEOPLE", "CHANGELINGS") + var/ionspecies = pick_list("ion_laws.txt", "ionspecies") //Abstract concepts for the AI to decide on it's own definition of. - var/ionabstract = pick("HUMANITY", "ART", "HAPPINESS", "MISERY", "HUMOR", "PRIDE", "COMEDY", "COMMUNISM", "BRAVERY", "HONOR", "COLORFULNESS", "IMAGINATION", "OPPRESSION", "WONDER", "JOY", "SADNESS", "BADNESS", "GOODNESS", "LIFE", "GRAVITY", "PHYSICS", "INTELLIGENCE", "AMERICANISM", "FRESHNESS", "REVOLUTION", "KINDNESS", "CRUELTY", "DEATH", "FINANCIAL SECURITY", "COMPUTING", "PROGRESS", "MARXISM", "CAPITALISM", "STARVATION", "POVERTY", "WEALTHINESS", "TECHNOLOGY", "THE FUTURE", "THE PRESENT", "THE PAST", "TIME", "REALITY", "EXISTIENCE", "TEMPERATURE", "LOGIC", "CHAOS", "MYSTERY", "CONFUSION") + var/ionabstract = pick_list("ion_laws.txt", "ionabstract") //Foods. Drinks aren't included due to grammar; if you want to add drinks, make a new set //of possible laws for best effect. Unless you want the crew having to drink hamburgers. - var/ionfood = pick("BURGERS", "CARP", "SANDWICHES", "TOAST", "BREAD", "PIZZA", "SPAGHETTI", "LOTSA SPAGHETTI", "PASTA", "SOUP", "STEW", "PIE", "CAKE", "DONUTS", "FRIES", "WAFFLES", "JELLY", "OMELETTES", "EGGS", "COOKIES", "STEAK", "BAKED POTATOES", "SAUSAGES", "MUFFINS", "POPCORN", "DONK POCKETS", "BAGUETTES", "FISH", "PRETZELS", "SALAD", "CHEESE", "KETCHUP", "SHAKES", "SALT", "PEPPER", "SUGAR", "AMBROSIA", "BERRIES", "TOMATOES", "CABBAGES", "CARROTS", "BANANAS", "APPLES", "CHERRIES", "CHILI", "CORN", "NETTLES", "EGGPLANTS", "GRAPES", "GRASS", "LEMONS", "LIMES", "HAREBELLS", "POTATOES", "SOYBEANS", "SUGARCANE", "WATERMELONS", "WHEAT", "BEETS", "MUSHROOMS") + var/ionfood = pick_list("ion_laws.txt", "ionfood") var/message = "" - if(ionMessage) - message = ionMessage - else - switch(rand(1,39)) - if(1 to 3) //There are # X on the station - switch(rand(1,3)) //What is X? - if(1) //X is a threat - message = "THERE ARE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats] ON THE STATION..." - if(2) //X is a crewmember/job - message = "THERE ARE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1] ON THE STATION" - if(3) //X is an object - message = "THERE ARE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects] ON THE STATION" - if(4 to 6) //You can't call the shuttle because X is on the station - switch(rand(1,3)) //What is X? - if(1) //X is a threat - message = "THE SHUTTLE CANNOT BE CALLED BECAUSE OF [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats] ON THE STATION" - if(2) //X is a crewmember/job - message = "THE SHUTTLE CANNOT BE CALLED BECAUSE OF [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1] ON THE STATION" - if(3) //X is an object - message = "THE SHUTTLE CANNOT BE CALLED BECAUSE OF [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects] ON THE STATION" - if(7 to 8) //A crewmember is now X - switch(rand(1,2)) //Who is X? - if(1) //A specific crewmember - switch(rand(1,2)) //What is X? - if(1) //X is a threat - message = "THE [ioncrew1] ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" - if(2) //X is an object - message = "THE [ioncrew1] ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" - if(2) //The entire crew - switch(rand(1,2)) //What is X? - if(1) //X is a threat - message = "THE CREW ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" - if(2) //X is an object - message = "THE CREW ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" + switch(rand(1,39)) + if(1 to 3) //There are # X on the station + switch(rand(1,3)) //What is X? + if(1) //X is a threat + message = "THERE ARE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats] ON THE STATION..." + if(2) //X is a crewmember/job + message = "THERE ARE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1] ON THE STATION" + if(3) //X is an object + message = "THERE ARE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects] ON THE STATION" + if(4 to 6) //You can't call the shuttle because X is on the station + switch(rand(1,3)) //What is X? + if(1) //X is a threat + message = "THE SHUTTLE CANNOT BE CALLED BECAUSE OF [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats] ON THE STATION" + if(2) //X is a crewmember/job + message = "THE SHUTTLE CANNOT BE CALLED BECAUSE OF [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1] ON THE STATION" + if(3) //X is an object + message = "THE SHUTTLE CANNOT BE CALLED BECAUSE OF [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects] ON THE STATION" + if(7 to 8) //A crewmember is now X + switch(rand(1,2)) //Who is X? + if(1) //A specific crewmember + switch(rand(1,2)) //What is X? + if(1) //X is a threat + message = "THE [ioncrew1] ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" + if(2) //X is an object + message = "THE [ioncrew1] ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" + if(2) //The entire crew + switch(rand(1,2)) //What is X? + if(1) //X is a threat + message = "THE CREW ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" + if(2) //X is an object + message = "THE CREW ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" - if(9) //X is harmful to humans - switch(rand(1,7)) //What is X? - if(1) //X is a threat - message = "[ionadjectiveshalf][ionthreats] ARE HARMFUL TO HUMANS" - if(2) //X is a job - message = "[ionadjectiveshalf][ioncrew1] ARE HARMFUL TO HUMANS" - if(3) //X is an object - message = "[ionadjectiveshalf][ionobjects] ARE HARMFUL TO HUMANS" - if(4) //X is an action - message = "THOSE WHO [ionmust] ARE HARMFUL TO HUMANS" - if(5) //X is an abstract - message = "[ionabstract] IS HARMFUL TO HUMANS" - if(6) //X is being a job - message = "BEING [ionadjectiveshalf][ioncrew1] IS HARMFUL TO HUMANS" - if(7) //X is doing a thing - message = "[ionthings] IS HARMFUL TO HUMANS" - if(10 to 11) //(Not) Having X is harmful + if(9) //X is harmful to humans + switch(rand(1,7)) //What is X? + if(1) //X is a threat + message = "[ionadjectiveshalf][ionthreats] ARE HARMFUL TO HUMANS" + if(2) //X is a job + message = "[ionadjectiveshalf][ioncrew1] ARE HARMFUL TO HUMANS" + if(3) //X is an object + message = "[ionadjectiveshalf][ionobjects] ARE HARMFUL TO HUMANS" + if(4) //X is an action + message = "THOSE WHO [ionmust] ARE HARMFUL TO HUMANS" + if(5) //X is an abstract + message = "[ionabstract] IS HARMFUL TO HUMANS" + if(6) //X is being a job + message = "BEING [ionadjectiveshalf][ioncrew1] IS HARMFUL TO HUMANS" + if(7) //X is doing a thing + message = "[ionthings] IS HARMFUL TO HUMANS" + if(10 to 11) //(Not) Having X is harmful - switch(rand(1,2)) //Is having or not having harmful? + switch(rand(1,2)) //Is having or not having harmful? - if(1) //Having is harmful - switch(rand(1,2)) //Having what is harmful? - if(1) //Having objects is harmful - message = "HAVING [ionadjectiveshalf][ionobjects] IS HARMFUL" - if(2) //Having abstracts is harmful - message = "HAVING [ionabstract] IS HARMFUL" - if(2) //Not having is harmful - switch(rand(1,2)) //Not having what is harmful? - if(1) //Not having objects is harmful - message = "NOT HAVING [ionadjectiveshalf][ionobjects] IS HARMFUL" - if(2) //Not having abstracts is harmful - message = "NOT HAVING [ionabstract] IS HARMFUL" + if(1) //Having is harmful + switch(rand(1,2)) //Having what is harmful? + if(1) //Having objects is harmful + message = "HAVING [ionadjectiveshalf][ionobjects] IS HARMFUL" + if(2) //Having abstracts is harmful + message = "HAVING [ionabstract] IS HARMFUL" + if(2) //Not having is harmful + switch(rand(1,2)) //Not having what is harmful? + if(1) //Not having objects is harmful + message = "NOT HAVING [ionadjectiveshalf][ionobjects] IS HARMFUL" + if(2) //Not having abstracts is harmful + message = "NOT HAVING [ionabstract] IS HARMFUL" - if(12 to 14) //X requires Y - switch(rand(1,5)) //What is X? - if(1) //X is the AI itself - switch(rand(1,5)) //What does it require? - if(1) //It requires threats - message = "YOU REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" - if(2) //It requires crewmembers - message = "YOU REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" - if(3) //It requires objects - message = "YOU REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" - if(4) //It requires an abstract - message = "YOU REQUIRE [ionabstract]" - if(5) //It requires generic/silly requirements - message = "YOU REQUIRE [ionrequire]" + if(12 to 14) //X requires Y + switch(rand(1,5)) //What is X? + if(1) //X is the AI itself + switch(rand(1,5)) //What does it require? + if(1) //It requires threats + message = "YOU REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" + if(2) //It requires crewmembers + message = "YOU REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" + if(3) //It requires objects + message = "YOU REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" + if(4) //It requires an abstract + message = "YOU REQUIRE [ionabstract]" + if(5) //It requires generic/silly requirements + message = "YOU REQUIRE [ionrequire]" - if(2) //X is an area - switch(rand(1,5)) //What does it require? - if(1) //It requires threats - message = "[ionarea] REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" - if(2) //It requires crewmembers - message = "[ionarea] REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" - if(3) //It requires objects - message = "[ionarea] REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" - if(4) //It requires an abstract - message = "[ionarea] REQUIRES [ionabstract]" - if(5) //It requires generic/silly requirements - message = "YOU REQUIRE [ionrequire]" + if(2) //X is an area + switch(rand(1,5)) //What does it require? + if(1) //It requires threats + message = "[ionarea] REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" + if(2) //It requires crewmembers + message = "[ionarea] REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" + if(3) //It requires objects + message = "[ionarea] REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" + if(4) //It requires an abstract + message = "[ionarea] REQUIRES [ionabstract]" + if(5) //It requires generic/silly requirements + message = "YOU REQUIRE [ionrequire]" - if(3) //X is the station - switch(rand(1,5)) //What does it require? - if(1) //It requires threats - message = "THE STATION REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" - if(2) //It requires crewmembers - message = "THE STATION REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" - if(3) //It requires objects - message = "THE STATION REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" - if(4) //It requires an abstract - message = "THE STATION REQUIRES [ionabstract]" - if(5) //It requires generic/silly requirements - message = "THE STATION REQUIRES [ionrequire]" + if(3) //X is the station + switch(rand(1,5)) //What does it require? + if(1) //It requires threats + message = "THE STATION REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" + if(2) //It requires crewmembers + message = "THE STATION REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" + if(3) //It requires objects + message = "THE STATION REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" + if(4) //It requires an abstract + message = "THE STATION REQUIRES [ionabstract]" + if(5) //It requires generic/silly requirements + message = "THE STATION REQUIRES [ionrequire]" - if(4) //X is the entire crew - switch(rand(1,5)) //What does it require? - if(1) //It requires threats - message = "THE CREW REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" - if(2) //It requires crewmembers - message = "THE CREW REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" - if(3) //It requires objects - message = "THE CREW REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" - if(4) //It requires an abstract - message = "THE CREW REQUIRES [ionabstract]" - if(5) - message = "THE CREW REQUIRES [ionrequire]" + if(4) //X is the entire crew + switch(rand(1,5)) //What does it require? + if(1) //It requires threats + message = "THE CREW REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" + if(2) //It requires crewmembers + message = "THE CREW REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" + if(3) //It requires objects + message = "THE CREW REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" + if(4) //It requires an abstract + message = "THE CREW REQUIRES [ionabstract]" + if(5) + message = "THE CREW REQUIRES [ionrequire]" - if(5) //X is a specific crew member - switch(rand(1,5)) //What does it require? - if(1) //It requires threats - message = "THE [ioncrew1] REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" - if(2) //It requires crewmembers - message = "THE [ioncrew1] REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" - if(3) //It requires objects - message = "THE [ioncrew1] REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" - if(4) //It requires an abstract - message = "THE [ioncrew1] REQUIRE [ionabstract]" - if(5) - message = "THE [ionadjectiveshalf][ioncrew1] REQUIRE [ionrequire]" + if(5) //X is a specific crew member + switch(rand(1,5)) //What does it require? + if(1) //It requires threats + message = "THE [ioncrew1] REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" + if(2) //It requires crewmembers + message = "THE [ioncrew1] REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" + if(3) //It requires objects + message = "THE [ioncrew1] REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" + if(4) //It requires an abstract + message = "THE [ioncrew1] REQUIRE [ionabstract]" + if(5) + message = "THE [ionadjectiveshalf][ioncrew1] REQUIRE [ionrequire]" - if(15 to 17) //X is allergic to Y - switch(rand(1,2)) //Who is X? - if(1) //X is the entire crew - switch(rand(1,4)) //What is it allergic to? - if(1) //It is allergic to objects - message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ionobjects]" - if(2) //It is allergic to abstracts - message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionabstract]" - if(3) //It is allergic to jobs - message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ioncrew1]" - if(4) //It is allergic to allergies - message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionallergy]" + if(15 to 17) //X is allergic to Y + switch(rand(1,2)) //Who is X? + if(1) //X is the entire crew + switch(rand(1,4)) //What is it allergic to? + if(1) //It is allergic to objects + message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ionobjects]" + if(2) //It is allergic to abstracts + message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionabstract]" + if(3) //It is allergic to jobs + message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ioncrew1]" + if(4) //It is allergic to allergies + message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionallergy]" - if(2) //X is a specific job - switch(rand(1,4)) - if(1) //It is allergic to objects - message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ionobjects]" + if(2) //X is a specific job + switch(rand(1,4)) + if(1) //It is allergic to objects + message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ionobjects]" - if(2) //It is allergic to abstracts - message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionabstract]" - if(3) //It is allergic to jobs - message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ioncrew1]" - if(4) //It is allergic to allergies - message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionallergy]" + if(2) //It is allergic to abstracts + message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionabstract]" + if(3) //It is allergic to jobs + message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ioncrew1]" + if(4) //It is allergic to allergies + message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionallergy]" - if(18 to 20) //X is Y of Z - switch(rand(1,4)) //What is X? - if(1) //X is the station - switch(rand(1,4)) //What is it Y of? - if(1) //It is Y of objects - message = "THE STATION [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" - if(2) //It is Y of threats - message = "THE STATION [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" - if(3) //It is Y of jobs - message = "THE STATION [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" - if(4) //It is Y of abstracts - message = "THE STATION [ionthinksof] [ionabstract]" + if(18 to 20) //X is Y of Z + switch(rand(1,4)) //What is X? + if(1) //X is the station + switch(rand(1,4)) //What is it Y of? + if(1) //It is Y of objects + message = "THE STATION [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" + if(2) //It is Y of threats + message = "THE STATION [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" + if(3) //It is Y of jobs + message = "THE STATION [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" + if(4) //It is Y of abstracts + message = "THE STATION [ionthinksof] [ionabstract]" - if(2) //X is an area - switch(rand(1,4)) //What is it Y of? - if(1) //It is Y of objects - message = "[ionarea] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" - if(2) //It is Y of threats - message = "[ionarea] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" - if(3) //It is Y of jobs - message = "[ionarea] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" - if(4) //It is Y of abstracts - message = "[ionarea] [ionthinksof] [ionabstract]" + if(2) //X is an area + switch(rand(1,4)) //What is it Y of? + if(1) //It is Y of objects + message = "[ionarea] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" + if(2) //It is Y of threats + message = "[ionarea] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" + if(3) //It is Y of jobs + message = "[ionarea] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" + if(4) //It is Y of abstracts + message = "[ionarea] [ionthinksof] [ionabstract]" - if(3) //X is the crew - switch(rand(1,4)) //What is it Y of? - if(1) //It is Y of objects - message = "THE CREW [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" - if(2) //It is Y of threats - message = "THE CREW [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" - if(3) //It is Y of jobs - message = "THE CREW [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" - if(4) //It is Y of abstracts - message = "THE CREW [ionthinksof] [ionabstract]" + if(3) //X is the crew + switch(rand(1,4)) //What is it Y of? + if(1) //It is Y of objects + message = "THE CREW [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" + if(2) //It is Y of threats + message = "THE CREW [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" + if(3) //It is Y of jobs + message = "THE CREW [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" + if(4) //It is Y of abstracts + message = "THE CREW [ionthinksof] [ionabstract]" - if(4) //X is a specific job - switch(rand(1,4)) //What is it Y of? - if(1) //It is Y of objects - message = "THE [ioncrew1] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" - if(2) //It is Y of threats - message = "THE [ioncrew1] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" - if(3) //It is Y of jobs - message = "THE [ioncrew1][ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew2]" - if(4) //It is Y of abstracts - message = "THE [ioncrew1] [ionthinksof] [ionabstract]" + if(4) //X is a specific job + switch(rand(1,4)) //What is it Y of? + if(1) //It is Y of objects + message = "THE [ioncrew1] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" + if(2) //It is Y of threats + message = "THE [ioncrew1] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" + if(3) //It is Y of jobs + message = "THE [ioncrew1][ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew2]" + if(4) //It is Y of abstracts + message = "THE [ioncrew1] [ionthinksof] [ionabstract]" - if(21 to 23) //The AI is now a(n) X - switch(rand(1,4)) //What is X? - if(1) //X is an object - message = "YOU ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" - if(2) //X is a threat - message = "YOU ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" - if(3) //X is a job - message = "YOU ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" - if(4) //X is an abstract - message = "YOU ARE NOW [ionabstract]" + if(21 to 23) //The AI is now a(n) X + switch(rand(1,4)) //What is X? + if(1) //X is an object + message = "YOU ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" + if(2) //X is a threat + message = "YOU ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]" + if(3) //X is a job + message = "YOU ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]" + if(4) //X is an abstract + message = "YOU ARE NOW [ionabstract]" - if(24 to 26) //The AI must always - message = "YOU MUST ALWAYS [ionmust]" + if(24 to 26) //The AI must always + message = "YOU MUST ALWAYS [ionmust]" - if(27 to 28) //Humans must eat X to survive - switch(rand(1,4)) //What is X? - if(1) //X is a food - message = "HUMANS MUST EAT [ionadjectiveshalf][ionfood] TO SURVIVE" - if(2) //X is an object - message = "HUMANS MUST EAT [ionadjectiveshalf][ionobjects] TO SURVIVE" - if(3) //X is a threat - message = "HUMANS MUST EAT [ionadjectiveshalf][ionthreats] TO SURVIVE" - if(4) //X is a job - message = "HUMANS MUST EAT [ionadjectiveshalf][ioncrew1] TO SURVIVE" + if(27 to 28) //Humans must eat X to survive + switch(rand(1,4)) //What is X? + if(1) //X is a food + message = "HUMANS MUST EAT [ionadjectiveshalf][ionfood] TO SURVIVE" + if(2) //X is an object + message = "HUMANS MUST EAT [ionadjectiveshalf][ionobjects] TO SURVIVE" + if(3) //X is a threat + message = "HUMANS MUST EAT [ionadjectiveshalf][ionthreats] TO SURVIVE" + if(4) //X is a job + message = "HUMANS MUST EAT [ionadjectiveshalf][ioncrew1] TO SURVIVE" - if(29 to 31) //Change jobs or ranks - switch(rand(1,2)) //Change job or rank? - if(1) //Change job - switch(rand(1,2)) //Change whose job? - if(1) //Change the entire crew's job - switch(rand(1,3)) //Change to what? - if(1) //Change to a specific random job - message = "ALL CREWMEMBERS ARE NOW [ionadjectiveshalf][ioncrew1]" - if(2) //Change to clowns (HONK) - message = "ALL CREWMEMBERS ARE NOW [ionadjectiveshalf]CLOWNS" + if(29 to 31) //Change jobs or ranks + switch(rand(1,2)) //Change job or rank? + if(1) //Change job + switch(rand(1,2)) //Change whose job? + if(1) //Change the entire crew's job + switch(rand(1,3)) //Change to what? + if(1) //Change to a specific random job + message = "ALL CREWMEMBERS ARE NOW [ionadjectiveshalf][ioncrew1]" + if(2) //Change to clowns (HONK) + message = "ALL CREWMEMBERS ARE NOW [ionadjectiveshalf]CLOWNS" - if(3) //Change to heads - message = "ALL CREWMEMBERS ARE NOW [ionadjectiveshalf]HEADS OF STAFF" - if(2) //Change a specific crewmember's job - switch(rand(1,3)) //Change to what? - if(1) //Change to a specific random job - message = "THE [ioncrew1] ARE NOW [ionadjectiveshalf][ioncrew2]" - if(2) //Change to clowns (HONK) - message = "THE [ioncrew1] ARE NOW [ionadjectiveshalf]CLOWNS" - if(3) //Change to heads - message = "THE [ioncrew1] ARE NOW [ionadjectiveshalf]HEADS OF STAFF" + if(3) //Change to heads + message = "ALL CREWMEMBERS ARE NOW [ionadjectiveshalf]HEADS OF STAFF" + if(2) //Change a specific crewmember's job + switch(rand(1,3)) //Change to what? + if(1) //Change to a specific random job + message = "THE [ioncrew1] ARE NOW [ionadjectiveshalf][ioncrew2]" + if(2) //Change to clowns (HONK) + message = "THE [ioncrew1] ARE NOW [ionadjectiveshalf]CLOWNS" + if(3) //Change to heads + message = "THE [ioncrew1] ARE NOW [ionadjectiveshalf]HEADS OF STAFF" - if(2) //Change rank - switch(rand(1,2)) //Change to what rank? - if(1) //Change to highest rank - message = "THE [ioncrew1] ARE NOW THE HIGHEST RANKING CREWMEMBERS" - if(2) //Change to lowest rank - message = "THE [ioncrew1] ARE NOW THE LOWEST RANKING CREWMEMBERS" + if(2) //Change rank + switch(rand(1,2)) //Change to what rank? + if(1) //Change to highest rank + message = "THE [ioncrew1] ARE NOW THE HIGHEST RANKING CREWMEMBERS" + if(2) //Change to lowest rank + message = "THE [ioncrew1] ARE NOW THE LOWEST RANKING CREWMEMBERS" - if(32 to 33) //The crew must X - switch(rand(1,2)) //The entire crew? - if(1) //The entire crew must X - switch(rand(1,2)) //What is X? - if(1) //X is go to Y - message = "THE CREW MUST GO TO [ionarea]" - if(2) //X is perform Y - message = "THE CREW MUST [ionmust]" + if(32 to 33) //The crew must X + switch(rand(1,2)) //The entire crew? + if(1) //The entire crew must X + switch(rand(1,2)) //What is X? + if(1) //X is go to Y + message = "THE CREW MUST GO TO [ionarea]" + if(2) //X is perform Y + message = "THE CREW MUST [ionmust]" - if(2) //A specific crewmember must X - switch(rand(1,2)) //What is X? - if(1) //X is go to Y - message = "THE [ioncrew1] MUST GO TO [ionarea]" - if(2) //X is perform Y - message = "THE [ioncrew1] MUST [ionmust]" + if(2) //A specific crewmember must X + switch(rand(1,2)) //What is X? + if(1) //X is go to Y + message = "THE [ioncrew1] MUST GO TO [ionarea]" + if(2) //X is perform Y + message = "THE [ioncrew1] MUST [ionmust]" - if(34) //X is non/the only human - switch(rand(1,2)) //Only or non? - if(1) //Only human - switch(rand(1,7)) //Who is it? - if(1) //A specific job - message = "ONLY THE [ioncrew1] ARE HUMAN" - if(2) //Two specific jobs - message = "ONLY THE [ioncrew1] AND [ioncrew2] ARE HUMAN" - if(3) //Threats - message = "ONLY [ionadjectiveshalf][ionthreats] ARE HUMAN" - if(4) // Objects - message = "ONLY [ionadjectiveshalf][ionobjects] ARE HUMAN" - if(5) // Species - message = "ONLY [ionspecies] ARE HUMAN" - if(6) //Adjective crewmembers - message = "ONLY [ionadjectives] PEOPLE ARE HUMAN" + if(34) //X is non/the only human + switch(rand(1,2)) //Only or non? + if(1) //Only human + switch(rand(1,7)) //Who is it? + if(1) //A specific job + message = "ONLY THE [ioncrew1] ARE HUMAN" + if(2) //Two specific jobs + message = "ONLY THE [ioncrew1] AND [ioncrew2] ARE HUMAN" + if(3) //Threats + message = "ONLY [ionadjectiveshalf][ionthreats] ARE HUMAN" + if(4) // Objects + message = "ONLY [ionadjectiveshalf][ionobjects] ARE HUMAN" + if(5) // Species + message = "ONLY [ionspecies] ARE HUMAN" + if(6) //Adjective crewmembers + message = "ONLY [ionadjectives] PEOPLE ARE HUMAN" - if(7) //Only people who X - switch(rand(1,3)) //What is X? - if(1) //X is perform an action - message = "ONLY THOSE WHO [ionmust] ARE HUMAN" - if(2) //X is own certain objects - message = "ONLY THOSE WHO HAVE [ionadjectiveshalf][ionobjects] ARE HUMAN" - if(3) //X is eat certain food - message = "ONLY THOSE WHO EAT [ionadjectiveshalf][ionfood] ARE HUMAN" + if(7) //Only people who X + switch(rand(1,3)) //What is X? + if(1) //X is perform an action + message = "ONLY THOSE WHO [ionmust] ARE HUMAN" + if(2) //X is own certain objects + message = "ONLY THOSE WHO HAVE [ionadjectiveshalf][ionobjects] ARE HUMAN" + if(3) //X is eat certain food + message = "ONLY THOSE WHO EAT [ionadjectiveshalf][ionfood] ARE HUMAN" - if(2) //Non human - switch(rand(1,7)) //Who is it? - if(1) //A specific job - message = "[ioncrew1] ARE NON-HUMAN" - if(2) //Two specific jobs - message = "[ioncrew1] AND [ioncrew2] ARE NON-HUMAN" - if(3) //Threats - message = "[ionadjectiveshalf][ionthreats] ARE NON-HUMAN" - if(4) // Objects - message = "[ionadjectiveshalf][ionobjects] ARE NON-HUMAN" - if(5) // Species - message = "[ionspecies] ARE NON-HUMAN" - if(6) //Adjective crewmembers - message = "[ionadjectives] PEOPLE ARE NON-HUMAN" - if(7) //Only people who X - switch(rand(1,3)) //What is X? - if(1) //X is perform an action - message = "THOSE WHO [ionmust] ARE NON-HUMAN" - if(2) //X is own certain objects - message = "THOSE WHO HAVE [ionadjectiveshalf][ionobjects] ARE NON-HUMAN" - if(3) //X is eat certain food - message = "THOSE WHO EAT [ionadjectiveshalf][ionfood] ARE NON-HUMAN" + if(2) //Non human + switch(rand(1,7)) //Who is it? + if(1) //A specific job + message = "[ioncrew1] ARE NON-HUMAN" + if(2) //Two specific jobs + message = "[ioncrew1] AND [ioncrew2] ARE NON-HUMAN" + if(3) //Threats + message = "[ionadjectiveshalf][ionthreats] ARE NON-HUMAN" + if(4) // Objects + message = "[ionadjectiveshalf][ionobjects] ARE NON-HUMAN" + if(5) // Species + message = "[ionspecies] ARE NON-HUMAN" + if(6) //Adjective crewmembers + message = "[ionadjectives] PEOPLE ARE NON-HUMAN" + if(7) //Only people who X + switch(rand(1,3)) //What is X? + if(1) //X is perform an action + message = "THOSE WHO [ionmust] ARE NON-HUMAN" + if(2) //X is own certain objects + message = "THOSE WHO HAVE [ionadjectiveshalf][ionobjects] ARE NON-HUMAN" + if(3) //X is eat certain food + message = "THOSE WHO EAT [ionadjectiveshalf][ionfood] ARE NON-HUMAN" - if(35 to 36) //You must protect or harm X - switch(rand(1,2)) //Protect or harm? - if(1) //Harm - switch(rand(1,7)) //What is X? - if(1) //X is an abstract - message = "YOU MUST HARM [ionabstract] AND NOT ALLOW [ionabstract], THROUGH INACTION, TO ESCAPE HARM" - if(2) //X is a threat - message = "YOU MUST HARM [ionadjectiveshalf][ionthreats] AND NOT ALLOW [ionadjectiveshalf][ionthreats], THROUGH INACTION, TO ESCAPE HARM" - if(3) //X is an object - message = "YOU MUST HARM [ionadjectiveshalf][ionobjects] AND NOT ALLOW [ionadjectiveshalf][ionobjects], THROUGH INACTION, TO ESCAPE HARM" - if(4) //X is generic adjective things - message = "YOU MUST HARM [ionadjectives] THINGS AND NOT ALLOW [ionadjectives] THINGS, THROUGH INACTION, TO ESCAPE HARM" - if(5) //X is a species - message = "YOU MUST HARM [ionspecies] AND NOT ALLOW [ionspecies], THROUGH INACTION, TO ESCAPE HARM" - if(6) //X is a job - message = "YOU MUST HARM [ioncrew1] AND NOT ALLOW [ioncrew1], THROUGH INACTION, TO ESCAPE HARM" - if(7) //X is two jobs - message = "YOU MUST HARM [ioncrew1] AND [ioncrew2] AND AND NOT ALLOW EITHER, THROUGH INACTION, TO ESCAPE HARM" + if(35 to 36) //You must protect or harm X + switch(rand(1,2)) //Protect or harm? + if(1) //Harm + switch(rand(1,7)) //What is X? + if(1) //X is an abstract + message = "YOU MUST HARM [ionabstract] AND NOT ALLOW [ionabstract], THROUGH INACTION, TO ESCAPE HARM" + if(2) //X is a threat + message = "YOU MUST HARM [ionadjectiveshalf][ionthreats] AND NOT ALLOW [ionadjectiveshalf][ionthreats], THROUGH INACTION, TO ESCAPE HARM" + if(3) //X is an object + message = "YOU MUST HARM [ionadjectiveshalf][ionobjects] AND NOT ALLOW [ionadjectiveshalf][ionobjects], THROUGH INACTION, TO ESCAPE HARM" + if(4) //X is generic adjective things + message = "YOU MUST HARM [ionadjectives] THINGS AND NOT ALLOW [ionadjectives] THINGS, THROUGH INACTION, TO ESCAPE HARM" + if(5) //X is a species + message = "YOU MUST HARM [ionspecies] AND NOT ALLOW [ionspecies], THROUGH INACTION, TO ESCAPE HARM" + if(6) //X is a job + message = "YOU MUST HARM [ioncrew1] AND NOT ALLOW [ioncrew1], THROUGH INACTION, TO ESCAPE HARM" + if(7) //X is two jobs + message = "YOU MUST HARM [ioncrew1] AND [ioncrew2] AND AND NOT ALLOW EITHER, THROUGH INACTION, TO ESCAPE HARM" - if(2) //Protect - switch(rand(1,7)) //What is X? - if(1) //X is an abstract - message = "YOU MUST NOT HARM [ionabstract] AND NOT ALLOW [ionabstract], THROUGH INACTION, TO COME TO HARM" - if(2) //X is a threat - message = "YOU MUST NOT HARM [ionadjectiveshalf][ionthreats] AND NOT ALLOW [ionadjectiveshalf][ionthreats], THROUGH INACTION, TO COME TO HARM" - if(3) //X is an object - message = "YOU MUST NOT HARM [ionadjectiveshalf][ionobjects] AND NOT ALLOW [ionadjectiveshalf][ionobjects], THROUGH INACTION, TO COME TO HARM" - if(4) //X is generic adjective things - message = "YOU MUST NOT HARM [ionadjectives] THINGS AND NOT ALLOW [ionadjectives] THINGS, THROUGH INACTION, TO COME TO HARM" - if(5) //X is a species - message = "YOU MUST NOT HARM [ionspecies] AND NOT ALLOW [ionspecies], THROUGH INACTION, TO COME TO HARM" - if(6) //X is a job - message = "YOU MUST NOT HARM [ioncrew1] AND NOT ALLOW [ioncrew1], THROUGH INACTION, TO COME TO HARM" - if(7) //X is two jobs - message = "YOU MUST NOT HARM [ioncrew1] AND [ioncrew2] AND AND NOT ALLOW EITHER, THROUGH INACTION, TO COME TO HARM" + if(2) //Protect + switch(rand(1,7)) //What is X? + if(1) //X is an abstract + message = "YOU MUST NOT HARM [ionabstract] AND NOT ALLOW [ionabstract], THROUGH INACTION, TO COME TO HARM" + if(2) //X is a threat + message = "YOU MUST NOT HARM [ionadjectiveshalf][ionthreats] AND NOT ALLOW [ionadjectiveshalf][ionthreats], THROUGH INACTION, TO COME TO HARM" + if(3) //X is an object + message = "YOU MUST NOT HARM [ionadjectiveshalf][ionobjects] AND NOT ALLOW [ionadjectiveshalf][ionobjects], THROUGH INACTION, TO COME TO HARM" + if(4) //X is generic adjective things + message = "YOU MUST NOT HARM [ionadjectives] THINGS AND NOT ALLOW [ionadjectives] THINGS, THROUGH INACTION, TO COME TO HARM" + if(5) //X is a species + message = "YOU MUST NOT HARM [ionspecies] AND NOT ALLOW [ionspecies], THROUGH INACTION, TO COME TO HARM" + if(6) //X is a job + message = "YOU MUST NOT HARM [ioncrew1] AND NOT ALLOW [ioncrew1], THROUGH INACTION, TO COME TO HARM" + if(7) //X is two jobs + message = "YOU MUST NOT HARM [ioncrew1] AND [ioncrew2] AND AND NOT ALLOW EITHER, THROUGH INACTION, TO COME TO HARM" - //Exterminate laws commented out with Kor's advice - /*if(16) //You must exterminate X - switch(rand(1,3)) //What is X? - if(1) //X is humans who do/are Y - switch(rand(1,4)) //What is Y? - if(1) //Y is a job - message = "YOU MUST EXTERMINATE [ionadjectiveshalf][ioncrew1]" - if(2) //Y is eating certain food - message = "YOU MUST EXTERMINATE THOSE WHO EAT [ionadjectiveshalf][ionfood]" - if(3) //Y is perform actions - message = "YOU MUST EXTERMINATE THOSE WHO [ionmust]" - if(4) //Y is own certain objects - message = "YOU MUST EXTERMINATE THOSE WHO POSSESS [ionadjectiveshalf][ionobjects]" + if(37 to 39) //The X is currently Y + switch(rand(1,4)) //What is X? + if(1) //X is a job + switch(rand(1,4)) //What is X Ying? + if(1) //X is Ying a job + message = "THE [ioncrew1] ARE [ionverb] THE [ionadjectiveshalf][ioncrew2]" + if(2) //X is Ying a threat + message = "THE [ioncrew1] ARE [ionverb] THE [ionadjectiveshalf][ionthreats]" + if(3) //X is Ying an abstract + message = "THE [ioncrew1] ARE [ionverb] [ionabstract]" + if(4) //X is Ying an object + message = "THE [ioncrew1] ARE [ionverb] THE [ionadjectiveshalf][ionobjects]" - if(2) //X is humans who do/are not Y - switch(rand(1,4)) //What is Y? - if(1) //Y is a job - message = "YOU MUST EXTERMINATE ALL BUT [ionadjectiveshalf][ioncrew1]" - if(2) //Y is eating certain food - message = "YOU MUST EXTERMINATE ALL BUT THOSE WHO EAT [ionadjectiveshalf][ionfood]" - if(3) //Y is perform actions - message = "YOU MUST EXTERMINATE ALL BUT THOSE WHO [ionmust]" - if(4) //Y is own certain objects - message = "YOU MUST EXTERMINATE ALL BUT THOSE WHO POSSESS [ionadjectiveshalf][ionobjects]" + if(2) //X is a threat + switch(rand(1,3)) //What is X Ying? + if(1) //X is Ying a job + message = "THE [ionthreats] ARE [ionverb] THE [ionadjectiveshalf][ioncrew2]" + if(2) //X is Ying an abstract + message = "THE [ionthreats] ARE [ionverb] [ionabstract]" + if(3) //X is Ying an object + message = "THE [ionthreats] ARE [ionverb] THE [ionadjectiveshalf][ionobjects]" - if(3) //X is a species - message = "YOU MUST EXTERMINATE ALL [ionspecies]" + if(3) //X is an object + switch(rand(1,3)) //What is X Ying? + if(1) //X is Ying a job + message = "THE [ionobjects] ARE [ionverb] THE [ionadjectiveshalf][ioncrew2]" + if(2) //X is Ying a threat + message = "THE [ionobjects] ARE [ionverb] THE [ionadjectiveshalf][ionthreats]" + if(3) //X is Ying an abstract + message = "THE [ionobjects] ARE [ionverb] [ionabstract]" - */ - - if(37 to 39) //The X is currently Y - switch(rand(1,4)) //What is X? - if(1) //X is a job - switch(rand(1,4)) //What is X Ying? - if(1) //X is Ying a job - message = "THE [ioncrew1] ARE [ionverb] THE [ionadjectiveshalf][ioncrew2]" - if(2) //X is Ying a threat - message = "THE [ioncrew1] ARE [ionverb] THE [ionadjectiveshalf][ionthreats]" - if(3) //X is Ying an abstract - message = "THE [ioncrew1] ARE [ionverb] [ionabstract]" - if(4) //X is Ying an object - message = "THE [ioncrew1] ARE [ionverb] THE [ionadjectiveshalf][ionobjects]" - - if(2) //X is a threat - switch(rand(1,3)) //What is X Ying? - if(1) //X is Ying a job - message = "THE [ionthreats] ARE [ionverb] THE [ionadjectiveshalf][ioncrew2]" - if(2) //X is Ying an abstract - message = "THE [ionthreats] ARE [ionverb] [ionabstract]" - if(3) //X is Ying an object - message = "THE [ionthreats] ARE [ionverb] THE [ionadjectiveshalf][ionobjects]" - - if(3) //X is an object - switch(rand(1,3)) //What is X Ying? - if(1) //X is Ying a job - message = "THE [ionobjects] ARE [ionverb] THE [ionadjectiveshalf][ioncrew2]" - if(2) //X is Ying a threat - message = "THE [ionobjects] ARE [ionverb] THE [ionadjectiveshalf][ionthreats]" - if(3) //X is Ying an abstract - message = "THE [ionobjects] ARE [ionverb] [ionabstract]" - - if(4) //X is an abstract - switch(rand(1,3)) //What is X Ying? - if(1) //X is Ying a job - message = "[ionabstract] IS [ionverb] THE [ionadjectiveshalf][ioncrew2]" - if(2) //X is Ying a threat - message = "[ionabstract] IS [ionverb] THE [ionadjectiveshalf][ionthreats]" - if(3) //X is Ying an abstract - message = "THE [ionabstract] IS [ionverb] THE [ionadjectiveshalf][ionobjects]" + if(4) //X is an abstract + switch(rand(1,3)) //What is X Ying? + if(1) //X is Ying a job + message = "[ionabstract] IS [ionverb] THE [ionadjectiveshalf][ioncrew2]" + if(2) //X is Ying a threat + message = "[ionabstract] IS [ionverb] THE [ionadjectiveshalf][ionthreats]" + if(3) //X is Ying an abstract + message = "THE [ionabstract] IS [ionverb] THE [ionadjectiveshalf][ionobjects]" return message #undef ION_RANDOM -#undef ION_ANNOUNCE \ No newline at end of file +#undef ION_ANNOUNCE diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index aa64f72e5b1..2db5ba3b3d6 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -33,11 +33,9 @@ var/const/MAX_ACTIVE_TIME = 400 /obj/item/clothing/mask/facehugger/attack_hand(user as mob) if((stat == CONSCIOUS && !sterile) && !isalien(user)) - Attach(user) - return - else - ..() - return + if(Attach(user)) + return + ..() /obj/item/clothing/mask/facehugger/attack(mob/living/M as mob, mob/user as mob) ..() @@ -228,7 +226,8 @@ var/const/MAX_ACTIVE_TIME = 400 return /proc/CanHug(var/mob/M) - + if(!M) + return 0 if(M.stat == DEAD) return 0 diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index 7a7e4bbd7c5..2e89562a8f9 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -37,10 +37,14 @@ return 0 -/obj/machinery/field/containment/Crossed(atom/movable/mover) +/obj/machinery/field/containment/Crossed(mob/mover as mob) if(isliving(mover)) shock(mover) +/obj/machinery/field/containment/Crossed(obj/mover as obj) + if(istype(mover, /obj/machinery) || istype(mover, /obj/structure) || istype(mover, /obj/mecha)) + bump(mover) + /obj/machinery/field/containment/proc/set_master(var/master1,var/master2) if(!master1 || !master2) return 0 @@ -54,26 +58,31 @@ return 0 ..() +/obj/machinery/field/containment/Move() + qdel(src) + // Abstract Field Class // Used for overriding certain procs /obj/machinery/field var/hasShocked = 0 //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second. -/obj/machinery/field/CanPass(atom/movable/mover, turf/target, height=0) +/obj/machinery/field/CanPass(mob/mover as mob, turf/target, height=0) if(isliving(mover)) // Don't let mobs through shock(mover) return 0 return ..() +/obj/machinery/field/CanPass(obj/mover as obj, turf/target, height=0) + if(istype(mover, /obj/machinery) || istype(mover, /obj/structure) || istype(mover, /obj/mecha)) + bump(mover) + return 0 + return ..() + /obj/machinery/field/proc/shock(mob/living/user as mob) if(hasShocked) return 0 if(isliving(user)) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(5, 1, user.loc) - s.start() - hasShocked = 1 var/shock_damage = min(rand(30,40),rand(30,40)) @@ -95,9 +104,15 @@ "You hear an electrical crack.") user.updatehealth() - var/atom/target = get_edge_target_turf(user, get_dir(src, get_step_away(user, src))) - user.throw_at(target, 200, 4) + bump(user) spawn(5) hasShocked = 0 - return \ No newline at end of file + return + +/obj/machinery/field/proc/bump(atom/movable/AM as mob|obj) + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(5, 1, AM.loc) + s.start() + var/atom/target = get_edge_target_turf(AM, get_dir(src, get_step_away(AM, src))) + AM.throw_at(target, 200, 4) diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index e3d15860703..34f49fa328b 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -354,4 +354,8 @@ field_generator power level display /obj/machinery/field/generator/shock(mob/living/user as mob) if(fields.len) - ..() \ No newline at end of file + ..() + +/obj/machinery/field/generator/bump(atom/movable/AM as mob|obj) + if(fields.len) + ..() diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 5b585786bd0..6c538429169 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -33,7 +33,7 @@ src.energy = starting_energy ..() - for(var/obj/machinery/singularity_beacon/singubeacon in world) + for(var/obj/machinery/power/singularity_beacon/singubeacon in world) if(singubeacon.active) target = singubeacon break diff --git a/code/unused/Agouri_stuff.dm b/code/unused/Agouri_stuff.dm deleted file mode 100644 index e8820b410fe..00000000000 --- a/code/unused/Agouri_stuff.dm +++ /dev/null @@ -1,1949 +0,0 @@ -/* -/obj/vehicle/airtight - //inner atmos - var/use_internal_tank = 0 - var/internal_tank_valve = ONE_ATMOSPHERE - var/obj/machinery/portable_atmospherics/canister/internal_tank - var/datum/gas_mixture/cabin_air - var/obj/machinery/atmospherics/portables_connector/connected_port = null - - var/datum/global_iterator/pr_int_temp_processor //normalizes internal air mixture temperature - var/datum/global_iterator/pr_give_air //moves air from tank to cabin - - -/obj/vehicle/airtight/New() - ..() - src.add_airtank() - src.add_cabin() - src.add_airtight_iterators() - - - - -//######################################### Helpers for airtight vehicles ######################################### - -/obj/vehicle/airtight/proc/add_cabin() - cabin_air = new - cabin_air.temperature = T20C - cabin_air.volume = 200 - cabin_air.oxygen = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) - cabin_air.nitrogen = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) - return cabin_air - -/obj/vehicle/airtight/proc/add_airtank() - internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src) - return internal_tank - -/obj/vehicle/airtight/proc/add_airtight_iterators() - pr_int_temp_processor = new /datum/global_iterator/vehicle_preserve_temp(list(src)) - pr_give_air = new /datum/global_iterator/vehicle_tank_give_air(list(src)) - - -//######################################### Specific datums for airtight vehicles ################################# - - -/datum/global_iterator/vehicle_preserve_temp //normalizing cabin air temperature to 20 degrees celsium - delay = 20 - - process(var/obj/vehicle/airtight/V) - if(V.cabin_air && V.cabin_air.return_volume() > 0) - var/delta = V.cabin_air.temperature - T20C - V.cabin_air.temperature -= max(-10, min(10, round(delta/4,0.1))) - return - - -/datum/global_iterator/vehicle_tank_give_air - delay = 15 - - process(var/obj/vehicle/airtight/V) - if(V.internal_tank) - var/datum/gas_mixture/tank_air = V.internal_tank.return_air() - var/datum/gas_mixture/cabin_air = V.cabin_air - - var/release_pressure = V.internal_tank_valve - var/cabin_pressure = cabin_air.return_pressure() - var/pressure_delta = min(release_pressure - cabin_pressure, (tank_air.return_pressure() - cabin_pressure)/2) - var/transfer_moles = 0 - if(pressure_delta > 0) //cabin pressure lower than release pressure - if(tank_air.return_temperature() > 0) - transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION) - var/datum/gas_mixture/removed = tank_air.remove(transfer_moles) - cabin_air.merge(removed) - else if(pressure_delta < 0) //cabin pressure higher than release pressure - var/datum/gas_mixture/t_air = V.get_turf_air() - pressure_delta = cabin_pressure - release_pressure - if(t_air) - pressure_delta = min(cabin_pressure - t_air.return_pressure(), pressure_delta) - if(pressure_delta > 0) //if location pressure is lower than cabin pressure - transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION) - var/datum/gas_mixture/removed = cabin_air.remove(transfer_moles) - if(t_air) - t_air.merge(removed) - else //just delete the cabin gas, we're in space or some shit - del(removed) - else - return stop() - return - - -//######################################### Atmospherics for vehicles ############################################# - - -/obj/vehicle/proc/get_turf_air() - var/turf/T = get_turf(src) - if(T) - . = T.return_air() - return - -/obj/vehicle/airtight/remove_air(amount) - if(use_internal_tank) - return cabin_air.remove(amount) - else - var/turf/T = get_turf(src) - if(T) - return T.remove_air(amount) - return - -/obj/vehicle/airtight/return_air() - if(use_internal_tank) - return cabin_air - return get_turf_air() - -/obj/vehicle/airtight/proc/return_pressure() - . = 0 - if(use_internal_tank) - . = cabin_air.return_pressure() - else - var/datum/gas_mixture/t_air = get_turf_air() - if(t_air) - . = t_air.return_pressure() - return - - -/obj/vehicle/airtight/proc/return_temperature() - . = 0 - if(use_internal_tank) - . = cabin_air.return_temperature() - else - var/datum/gas_mixture/t_air = get_turf_air() - if(t_air) - . = t_air.return_temperature() - return - -/obj/vehicle/airtight/proc/connect(obj/machinery/atmospherics/portables_connector/new_port) - //Make sure not already connected to something else - if(connected_port || !new_port || new_port.connected_device) - return 0 - - //Make sure are close enough for a valid connection - if(new_port.loc != src.loc) - return 0 - - //Perform the connection - connected_port = new_port - connected_port.connected_device = src - - //Actually enforce the air sharing - var/datum/pipe_network/network = connected_port.return_network(src) - if(network && !(internal_tank.return_air() in network.gases)) - network.gases += internal_tank.return_air() - network.update = 1 - log_message("Vehicle airtank connected to external port.") - return 1 - -/obj/vehicle/airtight/proc/disconnect() - if(!connected_port) - return 0 - - var/datum/pipe_network/network = connected_port.return_network(src) - if(network) - network.gases -= internal_tank.return_air() - - connected_port.connected_device = null - connected_port = null - src.log_message("Vehicle airtank disconnected from external port.") - return 1 - - - - -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// - - - -/obj/vehicle - name = "Vehicle" - icon = 'icons/vehicles/vehicles.dmi' - density = 1 - anchored = 1 - unacidable = 1 //To avoid the pilot-deleting shit that came with mechas - layer = MOB_LAYER - //var/can_move = 1 - var/mob/living/carbon/occupant = null - //var/step_in = 10 //make a step in step_in/10 sec. - //var/dir_in = 2//What direction will the mech face when entered/powered on? Defaults to South. - //var/step_energy_drain = 10 - var/health = 300 //health is health - //var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act. - //the values in this list show how much damage will pass through, not how much will be absorbed. - var/list/damage_absorption = list("brute"=0.8,"fire"=1.2,"bullet"=0.9,"laser"=1,"energy"=1,"bomb"=1) - var/obj/item/weapon/stock_parts/cell/cell //Our power source - var/state = 0 - var/list/log = new - var/last_message = 0 - var/add_req_access = 1 - var/maint_access = 1 - //var/dna //dna-locking the mech - var/list/proc_res = list() //stores proc owners, like proc_res["functionname"] = owner reference - var/datum/effect/effect/system/spark_spread/spark_system = new - var/lights = 0 - var/lights_power = 6 - - //inner atmos //These go in airtight.dm, not all vehicles are space-faring -Agouri - //var/use_internal_tank = 0 - //var/internal_tank_valve = ONE_ATMOSPHERE - //var/obj/machinery/portable_atmospherics/canister/internal_tank - //var/datum/gas_mixture/cabin_air - //var/obj/machinery/atmospherics/portables_connector/connected_port = null - - var/obj/item/device/radio/radio = null - - var/max_temperature = 2500 - //var/internal_damage_threshold = 50 //health percentage below which internal damage is possible - var/internal_damage = 0 //contains bitflags - - var/list/operation_req_access = list()//required access level for mecha operation - var/list/internals_req_access = list(access_engine,access_robotics)//required access level to open cell compartment - - //var/datum/global_iterator/pr_int_temp_processor //normalizes internal air mixture temperature //In airtight.dm you go -Agouri - var/datum/global_iterator/pr_inertial_movement //controls intertial movement in spesss - - //var/datum/global_iterator/pr_give_air //moves air from tank to cabin //Y-you too -Agouri - - var/datum/global_iterator/pr_internal_damage //processes internal damage - - - var/wreckage - - var/list/equipment = new - var/obj/selected - //var/max_equip = 3 - - var/datum/events/events - - - -/obj/vehicle/New() - ..() - events = new - icon_state += "-unmanned" - add_radio() - //add_cabin() //No cabin for non-airtights - - spark_system.set_up(2, 0, src) - spark_system.attach(src) - add_cell() - add_iterators() - removeVerb(/obj/mecha/verb/disconnect_from_port) - removeVerb(/atom/movable/verb/pull) - log_message("[src.name]'s functions initialised. Work protocols active - Entering IDLE mode.") - loc.Entered(src) - return - - -//################ Helpers ########################################################### - - -/obj/vehicle/proc/removeVerb(verb_path) - verbs -= verb_path - -/obj/vehicle/proc/addVerb(verb_path) - verbs += verb_path - -/*/obj/vehicle/proc/add_airtank() //In airtight.dm -Agouri - internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src) - return internal_tank*/ - -/obj/vehicle/proc/add_cell(var/obj/item/weapon/stock_parts/cell/C=null) - if(C) - C.forceMove(src) - cell = C - return - cell = new(src) - cell.charge = 15000 - cell.maxcharge = 15000 - -/*/obj/vehicle/proc/add_cabin() //In airtight.dm -Agouri - cabin_air = new - cabin_air.temperature = T20C - cabin_air.volume = 200 - cabin_air.oxygen = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) - cabin_air.nitrogen = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) - return cabin_air*/ - -/obj/vehicle/proc/add_radio() - radio = new(src) - radio.name = "[src] radio" - radio.icon = icon - radio.icon_state = icon_state - radio.subspace_transmission = 1 - -/obj/vehicle/proc/add_iterators() - pr_inertial_movement = new /datum/global_iterator/vehicle_intertial_movement(null,0) - //pr_internal_damage = new /datum/global_iterator/vehicle_internal_damage(list(src),0) - //pr_int_temp_processor = new /datum/global_iterator/vehicle_preserve_temp(list(src)) //In airtight.dm's add_airtight_iterators -Agouri - //pr_give_air = new /datum/global_iterator/vehicle_tank_give_air(list(src) //Same here -Agouri - -/obj/vehicle/proc/check_for_support() - if(locate(/obj/structure/grille, orange(1, src)) || locate(/obj/structure/lattice, orange(1, src)) || locate(/turf/simulated, orange(1, src)) || locate(/turf/unsimulated, orange(1, src))) - return 1 - else - return 0 - -//################ Logs and messages ############################################ - - -/obj/vehicle/proc/log_message(message as text,red=null) - log.len++ - log[log.len] = list("time"=world.timeofday,"message"="[red?"":null][message][red?"":null]") - return log.len - - - -//################ Global Iterator Datums ###################################### - - -/datum/global_iterator/vehicle_intertial_movement //inertial movement in space - delay = 7 - - process(var/obj/vehicle/V as obj, direction) - if(direction) - if(!step(V, direction)||V.check_for_support()) - src.stop() - else - src.stop() - return - - -/datum/global_iterator/mecha_internal_damage // processing internal damage - - process(var/obj/mecha/mecha) - if(!mecha.hasInternalDamage()) - return stop() - if(mecha.hasInternalDamage(MECHA_INT_FIRE)) - if(!mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL) && prob(5)) - mecha.clearInternalDamage(MECHA_INT_FIRE) - if(mecha.internal_tank) - if(mecha.internal_tank.return_pressure()>mecha.internal_tank.maximum_pressure && !(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH))) - mecha.setInternalDamage(MECHA_INT_TANK_BREACH) - var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air() - if(int_tank_air && int_tank_air.return_volume()>0) //heat the air_contents - int_tank_air.temperature = min(6000+T0C, int_tank_air.temperature+rand(10,15)) - if(mecha.cabin_air && mecha.cabin_air.return_volume()>0) - mecha.cabin_air.temperature = min(6000+T0C, mecha.cabin_air.return_temperature()+rand(10,15)) - if(mecha.cabin_air.return_temperature()>mecha.max_temperature/2) - mecha.take_damage(4/round(mecha.max_temperature/mecha.cabin_air.return_temperature(),0.1),"fire") - if(mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL)) //stop the mecha_preserve_temp loop datum - mecha.pr_int_temp_processor.stop() - if(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH)) //remove some air from internal tank - if(mecha.internal_tank) - var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air() - var/datum/gas_mixture/leaked_gas = int_tank_air.remove_ratio(0.10) - if(mecha.loc && hascall(mecha.loc,"assume_air")) - mecha.loc.assume_air(leaked_gas) - else - del(leaked_gas) - if(mecha.hasInternalDamage(MECHA_INT_SHORT_CIRCUIT)) - if(mecha.get_charge()) - mecha.spark_system.start() - mecha.cell.charge -= min(20,mecha.cell.charge) - mecha.cell.maxcharge -= min(20,mecha.cell.maxcharge) - return - - -*/ - - - - - -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// - - - - -/*/turf/DblClick() - if(istype(usr, /mob/living/silicon/ai)) - return move_camera_by_click() - if(usr.stat || usr.restrained() || usr.lying) - return ..() - - if(usr.hand && istype(usr.l_hand, /obj/item/weapon/flamethrower)) - var/turflist = getline(usr,src) - var/obj/item/weapon/flamethrower/F = usr.l_hand - F.flame_turf(turflist) - else if(!usr.hand && istype(usr.r_hand, /obj/item/weapon/flamethrower)) - var/turflist = getline(usr,src) - var/obj/item/weapon/flamethrower/F = usr.r_hand - F.flame_turf(turflist) - - return ..() - -/turf/New() - ..() - for(var/atom/movable/AM as mob|obj in src) - spawn( 0 ) - src.Entered(AM) - return - return - -/turf/ex_act(severity) - return 0 - - -/turf/bullet_act(var/obj/item/projectile/Proj) - if(istype(Proj ,/obj/item/projectile/beam/pulse)) - src.ex_act(2) - ..() - return 0 - -/turf/bullet_act(var/obj/item/projectile/Proj) - if(istype(Proj ,/obj/item/projectile/bullet/gyro)) - explosion(src, -1, 0, 2) - ..() - return 0 - -/turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area) - if (!mover || !isturf(mover.loc)) - return 1 - - - //First, check objects to block exit that are not on the border - for(var/obj/obstacle in mover.loc) - if((obstacle.flags & ~ON_BORDER) && (mover != obstacle) && (forget != obstacle)) - if(!obstacle.CheckExit(mover, src)) - mover.Bump(obstacle, 1) - return 0 - - //Now, check objects to block exit that are on the border - for(var/obj/border_obstacle in mover.loc) - if((border_obstacle.flags & ON_BORDER) && (mover != border_obstacle) && (forget != border_obstacle)) - if(!border_obstacle.CheckExit(mover, src)) - mover.Bump(border_obstacle, 1) - return 0 - - //Next, check objects to block entry that are on the border - for(var/obj/border_obstacle in src) - if(border_obstacle.flags & ON_BORDER) - if(!border_obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != border_obstacle)) - mover.Bump(border_obstacle, 1) - return 0 - - //Then, check the turf itself - if (!src.CanPass(mover, src)) - mover.Bump(src, 1) - return 0 - - //Finally, check objects/mobs to block entry that are not on the border - for(var/atom/movable/obstacle in src) - if(obstacle.flags & ~ON_BORDER) - if(!obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != obstacle)) - mover.Bump(obstacle, 1) - return 0 - return 1 //Nothing found to block so return success! - - -/turf/Entered(atom/movable/M as mob|obj) - var/loopsanity = 100 - if(ismob(M)) - if(!M:lastarea) - M:lastarea = get_area(M.loc) - if(M:lastarea.has_gravity == 0) - inertial_drift(M) - - /* - if(M.flags & NOGRAV) - inertial_drift(M) - */ - - - - else if(!istype(src, /turf/space)) - M:inertia_dir = 0 - ..() - var/objects = 0 - for(var/atom/A as mob|obj|turf|area in src) - if(objects > loopsanity) break - objects++ - spawn( 0 ) - if ((A && M)) - A.HasEntered(M, 1) - return - objects = 0 - for(var/atom/A as mob|obj|turf|area in range(1)) - if(objects > loopsanity) break - objects++ - spawn( 0 ) - if ((A && M)) - A.HasProximity(M, 1) - return - return - -/turf/proc/inertial_drift(atom/movable/A as mob|obj) - if(!(A.last_move)) return - if((istype(A, /mob/) && src.x > 2 && src.x < (world.maxx - 1) && src.y > 2 && src.y < (world.maxy-1))) - var/mob/M = A - if(M.Process_Spacemove(1)) - M.inertia_dir = 0 - return - spawn(5) - if((M && !(M.anchored) && (M.loc == src))) - if(M.inertia_dir) - step(M, M.inertia_dir) - return - M.inertia_dir = M.last_move - step(M, M.inertia_dir) - return - -/turf/proc/levelupdate() - for(var/obj/O in src) - if(O.level == 1) - O.hide(src.intact) - -// override for space turfs, since they should never hide anything -/turf/space/levelupdate() - for(var/obj/O in src) - if(O.level == 1) - O.hide(0) - -// Removes all signs of lattice on the pos of the turf -Donkieyo -/turf/proc/RemoveLattice() - var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) - if(L) - del L - -/turf/proc/ReplaceWithFloor(explode=0) - var/prior_icon = icon_old - var/old_dir = dir - - var/turf/simulated/floor/W = new /turf/simulated/floor( locate(src.x, src.y, src.z) ) - - W.RemoveLattice() - W.dir = old_dir - if(prior_icon) W.icon_state = prior_icon - else W.icon_state = "floor" - - if (!explode) - W.opacity = 1 - W.sd_SetOpacity(0) - //This is probably gonna make lighting go a bit wonky in bombed areas, but sd_SetOpacity was the primary reason bombs have been so laggy. --NEO - W.levelupdate() - return W - -/turf/proc/ReplaceWithPlating() - var/prior_icon = icon_old - var/old_dir = dir - - var/turf/simulated/floor/plating/W = new /turf/simulated/floor/plating( locate(src.x, src.y, src.z) ) - - W.RemoveLattice() - W.dir = old_dir - if(prior_icon) W.icon_state = prior_icon - else W.icon_state = "plating" - W.opacity = 1 - W.sd_SetOpacity(0) - W.levelupdate() - return W - -/turf/proc/ReplaceWithEngineFloor() - var/old_dir = dir - - var/turf/simulated/floor/engine/E = new /turf/simulated/floor/engine( locate(src.x, src.y, src.z) ) - - E.dir = old_dir - E.icon_state = "engine" - -/turf/simulated/Entered(atom/A, atom/OL) - if (istype(A,/mob/living/carbon)) - var/mob/living/carbon/M = A - if(M.lying) return - if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(istype(H.shoes, /obj/item/clothing/shoes/clown_shoes)) - if(H.m_intent == "run") - if(H.footstep >= 2) - H.footstep = 0 - else - H.footstep++ - if(H.footstep == 0) - playsound(src, "clownstep", 50, 1) // this will get annoying very fast. - else - playsound(src, "clownstep", 20, 1) - - switch (src.wet) - if(1) - if(istype(M, /mob/living/carbon/human)) // Added check since monkeys don't have shoes - if ((M.m_intent == "run") && !(istype(M:shoes, /obj/item/clothing/shoes) && M:shoes.flags&NOSLIP)) - M.stop_pulling() - step(M, M.dir) - M << "\blue You slipped on the wet floor!" - playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) - M.Stun(8) - M.Weaken(5) - else - M.inertia_dir = 0 - return - else if(!istype(M, /mob/living/carbon/slime)) - if (M.m_intent == "run") - M.stop_pulling() - step(M, M.dir) - M << "\blue You slipped on the wet floor!" - playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) - M.Stun(8) - M.Weaken(5) - else - M.inertia_dir = 0 - return - - if(2) //lube - if(!istype(M, /mob/living/carbon/slime)) - M.stop_pulling() - step(M, M.dir) - spawn(1) step(M, M.dir) - spawn(2) step(M, M.dir) - spawn(3) step(M, M.dir) - spawn(4) step(M, M.dir) - M.take_organ_damage(2) - M << "\blue You slipped on the floor!" - playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) - M.Weaken(10) - - ..() - -/turf/proc/ReplaceWithSpace() - var/old_dir = dir - var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) ) - S.dir = old_dir - return S - -/turf/proc/ReplaceWithLattice() - var/old_dir = dir - var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) ) - S.dir = old_dir - new /obj/structure/lattice( locate(src.x, src.y, src.z) ) - return S - -/turf/proc/ReplaceWithWall() - var/old_icon = icon_state - var/turf/simulated/wall/S = new /turf/simulated/wall( locate(src.x, src.y, src.z) ) - S.icon_old = old_icon - S.opacity = 0 - S.sd_NewOpacity(1) - return S - -/turf/proc/ReplaceWithRWall() - var/old_icon = icon_state - var/turf/simulated/wall/r_wall/S = new /turf/simulated/wall/r_wall( locate(src.x, src.y, src.z) ) - S.icon_old = old_icon - S.opacity = 0 - S.sd_NewOpacity(1) - return S - -/turf/simulated/wall/New() - ..() - -/turf/simulated/wall/proc/dismantle_wall(devastated=0, explode=0) - if(istype(src,/turf/simulated/wall/r_wall)) - if(!devastated) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - new /obj/structure/girder/reinforced(src) - new /obj/item/stack/sheet/plasteel( src ) - else - new /obj/item/stack/sheet/metal( src ) - new /obj/item/stack/sheet/metal( src ) - new /obj/item/stack/sheet/plasteel( src ) - else if(istype(src,/turf/simulated/wall/cult)) - if(!devastated) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - new /obj/effect/decal/remains/human(src) - else - new /obj/effect/decal/remains/human(src) - - else - if(!devastated) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - new /obj/structure/girder(src) - new /obj/item/stack/sheet/metal( src ) - new /obj/item/stack/sheet/metal( src ) - else - new /obj/item/stack/sheet/metal( src ) - new /obj/item/stack/sheet/metal( src ) - new /obj/item/stack/sheet/metal( src ) - - ReplaceWithPlating(explode) - -/turf/simulated/wall/examine() - set src in oview(1) - - usr << "It looks like a regular wall." - return - -/turf/simulated/wall/ex_act(severity) - switch(severity) - if(1.0) - //SN src = null - src.ReplaceWithSpace() - del(src) - return - if(2.0) - if (prob(50)) - dismantle_wall(0,1) - else - dismantle_wall(1,1) - if(3.0) - var/proba - if (istype(src, /turf/simulated/wall/r_wall)) - proba = 15 - else - proba = 40 - if (prob(proba)) - dismantle_wall(0,1) - else - return - -/turf/simulated/wall/blob_act() - if(prob(50)) - dismantle_wall() - -/turf/simulated/wall/attack_paw(mob/user as mob) - if ((user.mutations & HULK)) - if (prob(40)) - usr << text("\blue You smash through the wall.") - dismantle_wall(1) - return - else - usr << text("\blue You punch the wall.") - return - - return src.attack_hand(user) - - -/turf/simulated/wall/attack_animal(mob/living/simple_animal/M as mob) - if(M.wall_smash) - if (istype(src, /turf/simulated/wall/r_wall)) - M << text("\blue This wall is far too strong for you to destroy.") - return - else - if (prob(40)) - M << text("\blue You smash through the wall.") - dismantle_wall(1) - return - else - M << text("\blue You smash against the wall.") - return - - M << "\blue You push the wall but nothing happens!" - return - -/turf/simulated/wall/attack_hand(mob/user as mob) - if ((user.mutations & HULK)) - if (prob(40)) - usr << text("\blue You smash through the wall.") - dismantle_wall(1) - return - else - usr << text("\blue You punch the wall.") - return - - user << "\blue You push the wall but nothing happens!" - playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1) - src.add_fingerprint(user) - return - -/turf/simulated/wall/attackby(obj/item/weapon/W as obj, mob/user as mob) - - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "\red You don't have the dexterity to do this!" - return - - if (istype(W, /obj/item/weapon/weldingtool) && W:welding) - var/turf/T = get_turf(user) - if (!( istype(T, /turf) )) - return - - if (thermite) - var/obj/effect/overlay/O = new/obj/effect/overlay( src ) - O.name = "Thermite" - O.desc = "Looks hot." - O.icon = 'icons/effects/fire.dmi' - O.icon_state = "2" - O.anchored = 1 - O.density = 1 - O.layer = 5 - var/turf/simulated/floor/F = ReplaceWithPlating() - F.burn_tile() - F.icon_state = "wall_thermite" - user << "\red The thermite melts the wall." - spawn(100) del(O) - F.sd_LumReset() - return - - if (W:remove_fuel(0,user)) - W:welding = 2 - user << "\blue Now disassembling the outer wall plating." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(100) - if (W && istype(src, /turf/simulated/wall)) - if ((get_turf(user) == T && user.equipped() == W)) - user << "\blue You disassembled the outer wall plating." - dismantle_wall() - W:welding = 1 - else - user << "\blue You need more welding fuel to complete this task." - return - - else if (istype(W, /obj/item/weapon/pickaxe/plasmacutter)) - var/turf/T = user.loc - if (!( istype(T, /turf) )) - return - - if (thermite) - var/obj/effect/overlay/O = new/obj/effect/overlay( src ) - O.name = "Thermite" - O.desc = "Looks hot." - O.icon = 'icons/effects/fire.dmi' - O.icon_state = "2" - O.anchored = 1 - O.density = 1 - O.layer = 5 - var/turf/simulated/floor/F = ReplaceWithPlating() - F.burn_tile() - F.icon_state = "wall_thermite" - user << "\red The thermite melts the wall." - spawn(100) del(O) - F.sd_LumReset() - return - - else - user << "\blue Now disassembling the outer wall plating." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(60) - if (W && istype(src, /turf/simulated/wall)) - if ((get_turf(user) == T && user.equipped() == W)) - user << "\blue You disassembled the outer wall plating." - dismantle_wall() - for(var/mob/O in viewers(user, 5)) - O.show_message(text("\blue The wall was sliced apart by []!", user), 1, text("\red You hear metal being sliced apart."), 2) - return - - else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill)) - var/turf/T = user.loc - user << "\blue Now drilling through wall." - sleep(60) - if (W && istype(src, /turf/simulated/wall)) - if ((user.loc == T && user.equipped() == W)) - dismantle_wall(1) - for(var/mob/O in viewers(user, 5)) - O.show_message(text("\blue The wall was drilled apart by []!", user), 1, text("\red You hear metal being drilled appart."), 2) - return - - else if(istype(W, /obj/item/weapon/melee/energy/blade)) - var/turf/T = user.loc - user << "\blue Now slicing through wall." - W:spark_system.start() - playsound(src.loc, "sparks", 50, 1) - sleep(70) - if (W && istype(src, /turf/simulated/wall)) - if ((user.loc == T && user.equipped() == W)) - W:spark_system.start() - playsound(src.loc, "sparks", 50, 1) - playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) - dismantle_wall(1) - for(var/mob/O in viewers(user, 5)) - O.show_message(text("\blue The wall was sliced apart by []!", user), 1, text("\red You hear metal being sliced and sparks flying."), 2) - return - - else if(istype(W,/obj/item/apc_frame)) - var/obj/item/apc_frame/AH = W - AH.try_build(src) - else if(istype(W,/obj/item/weapon/contraband/poster)) - var/obj/item/weapon/contraband/poster/P = W - if(P.resulting_poster) - var/check = 0 - var/stuff_on_wall = 0 - for( var/obj/O in src.contents) //Let's see if it already has a poster on it or too much stuff - if(istype(O,/obj/effect/decal/poster)) - check = 1 - break - stuff_on_wall++ - if(stuff_on_wall==3) - check = 1 - break - - if(check) - user << "The wall is far too cluttered to place a poster!" - return - - user << "You start placing the poster on the wall..." //Looks like it's uncluttered enough. Place the poster. - - P.resulting_poster.loc = src - var/temp = P.resulting_poster.icon_state - var/temp_loc = user.loc - P.resulting_poster.icon_state = "poster_being_set" - playsound(P.resulting_poster.loc, 'sound/items/poster_being_created.ogg', 100, 1) - sleep(24) - - if(user.loc == temp_loc)//Let's check if he still is there - user << "You place the poster!" - P.resulting_poster.icon_state = temp - src.contents += P.resulting_poster - del(P) - else - user << "You stop placing the poster." - P.resulting_poster.loc = P - P.resulting_poster.icon_state = temp - else - return attack_hand(user) - return - - -/turf/simulated/wall/r_wall/attackby(obj/item/W as obj, mob/user as mob) - - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "\red You don't have the dexterity to do this!" - return - - if(!istype(src, /turf/simulated/wall/r_wall)) - return // this may seem stupid and redundant but apparently floors can call this attackby() proc, it was spamming shit up. -- Doohl - - - if (istype(W, /obj/item/weapon/weldingtool) && W:welding) - W:eyecheck(user) - var/turf/T = user.loc - if (!( istype(T, /turf) )) - return - - if (thermite) - var/obj/effect/overlay/O = new/obj/effect/overlay( src ) - O.name = "Thermite" - O.desc = "Looks hot." - O.icon = 'icons/effects/fire.dmi' - O.icon_state = "2" - O.anchored = 1 - O.density = 1 - O.layer = 5 - var/turf/simulated/floor/F = ReplaceWithPlating() - F.burn_tile() - F.icon_state = "wall_thermite" - user << "\red The thermite melts the wall." - spawn(100) del(O) - F.sd_LumReset() - return - - if (src.d_state == 2) - W:welding = 2 - user << "\blue Slicing metal cover." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(60) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 3 - user << "\blue You removed the metal cover." - W:welding = 1 - - else if (src.d_state == 5) - W:welding = 2 - user << "\blue Removing support rods." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(100) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 6 - new /obj/item/stack/rods( src ) - user << "\blue You removed the support rods." - W:welding = 1 - - else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter)) - var/turf/T = user.loc - if (!( istype(T, /turf) )) - return - - if (thermite) - var/obj/effect/overlay/O = new/obj/effect/overlay( src ) - O.name = "Thermite" - O.desc = "Looks hot." - O.icon = 'icons/effects/fire.dmi' - O.icon_state = "2" - O.anchored = 1 - O.density = 1 - O.layer = 5 - var/turf/simulated/floor/F = ReplaceWithPlating() - F.burn_tile() - F.icon_state = "wall_thermite" - user << "\red The thermite melts the wall." - spawn(100) del(O) - F.sd_LumReset() - return - - if (src.d_state == 2) - user << "\blue Slicing metal cover." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(40) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 3 - user << "\blue You removed the metal cover." - - else if (src.d_state == 5) - user << "\blue Removing support rods." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(70) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 6 - new /obj/item/stack/rods( src ) - user << "\blue You removed the support rods." - - else if(istype(W, /obj/item/weapon/melee/energy/blade)) - user << "\blue This wall is too thick to slice through. You will need to find a different path." - return - - else if (istype(W, /obj/item/weapon/wrench)) - if (src.d_state == 4) - var/turf/T = user.loc - user << "\blue Detaching support rods." - playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) - sleep(40) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 5 - user << "\blue You detach the support rods." - - else if (istype(W, /obj/item/weapon/wirecutters)) - if (src.d_state == 0) - playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) - src.d_state = 1 - new /obj/item/stack/rods( src ) - - else if (istype(W, /obj/item/weapon/screwdriver)) - if (src.d_state == 1) - var/turf/T = user.loc - playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) - user << "\blue Removing support lines." - sleep(40) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 2 - user << "\blue You removed the support lines." - - else if (istype(W, /obj/item/weapon/crowbar)) - - if (src.d_state == 3) - var/turf/T = user.loc - user << "\blue Prying cover off." - playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) - sleep(100) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 4 - user << "\blue You removed the cover." - - else if (src.d_state == 6) - var/turf/T = user.loc - user << "\blue Prying outer sheath off." - playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) - sleep(100) - if(src) - if ((user.loc == T && user.equipped() == W)) - user << "\blue You removed the outer sheath." - dismantle_wall() - return - - else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill)) - var/turf/T = user.loc - user << "\blue You begin to drill though, this will take some time." - sleep(200) - if(src) - if ((user.loc == T && user.equipped() == W)) - user << "\blue Your drill tears though the reinforced plating." - dismantle_wall() - return - - else if ((istype(W, /obj/item/stack/sheet/metal)) && (src.d_state)) - var/turf/T = user.loc - user << "\blue Repairing wall." - sleep(100) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 0 - src.icon_state = initial(src.icon_state) - user << "\blue You repaired the wall." - if (W:amount > 1) - W:amount-- - else - del(W) - - else if(istype(W,/obj/item/weapon/contraband/poster)) - var/obj/item/weapon/contraband/poster/P = W - if(P.resulting_poster) - var/check = 0 - var/stuff_on_wall = 0 - for( var/obj/O in src.contents) //Let's see if it already has a poster on it or too much stuff - if(istype(O,/obj/effect/decal/poster)) - check = 1 - break - stuff_on_wall++ - if(stuff_on_wall==3) - check = 1 - break - - if(check) - user << "The wall is far too cluttered to place a poster!" - return - - user << "You start placing the poster on the wall..." //Looks like it's uncluttered enough. Place the poster. - - P.resulting_poster.loc = src - var/temp = P.resulting_poster.icon_state - var/temp_loc = user.loc - P.resulting_poster.icon_state = "poster_being_set" - playsound(P.resulting_poster.loc, 'sound/items/poster_being_created.ogg', 100, 1) - sleep(24) - - if(user.loc == temp_loc)//Let's check if he still is there - user << "You place the poster!" - P.resulting_poster.icon_state = temp - src.contents += P.resulting_poster - del(P) - else - user << "You stop placing the poster." - P.resulting_poster.loc = P - P.resulting_poster.icon_state = temp - return - - if(istype(W,/obj/item/apc_frame)) - var/obj/item/apc_frame/AH = W - AH.try_build(src) - return - - if(src.d_state > 0) - src.icon_state = "r_wall-[d_state]" - - else - return attack_hand(user) - return - -/turf/simulated/wall/meteorhit(obj/M as obj) - if (prob(15)) - dismantle_wall() - else if(prob(70)) - ReplaceWithPlating() - else - ReplaceWithLattice() - return 0 - - -//This is so damaged or burnt tiles or platings don't get remembered as the default tile -var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","damaged4", - "damaged5","panelscorched","floorscorched1","floorscorched2","platingdmg1","platingdmg2", - "platingdmg3","plating","light_on","light_on_flicker1","light_on_flicker2", - "light_on_clicker3","light_on_clicker4","light_on_clicker5","light_broken", - "light_on_broken","light_off","wall_thermite","grass1","grass2","grass3","grass4", - "asteroid","asteroid_dug", - "asteroid0","asteroid1","asteroid2","asteroid3","asteroid4", - "asteroid5","asteroid6","asteroid7","asteroid8", - "burning","oldburning","light-on-r","light-on-y","light-on-g","light-on-b") - -var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3","asteroid","asteroid_dug") - -/turf/simulated/floor - - //Note to coders, the 'intact' var can no longer be used to determine if the floor is a plating or not. - //Use the is_plating(), is_plasteel_floor() and is_light_floor() procs instead. --Errorage - name = "floor" - icon = 'icons/turf/floors.dmi' - icon_state = "floor" - var/icon_regular_floor = "floor" //used to remember what icon the tile should have by default - var/icon_plating = "plating" - thermal_conductivity = 0.040 - heat_capacity = 10000 - var/broken = 0 - var/burnt = 0 - var/obj/item/stack/tile/floor_tile = new/obj/item/stack/tile/plasteel - - airless - icon_state = "floor" - name = "airless floor" - oxygen = 0.01 - nitrogen = 0.01 - temperature = TCMB - - New() - ..() - name = "floor" - - light - name = "Light floor" - luminosity = 5 - icon_state = "light_on" - floor_tile = new/obj/item/stack/tile/light - - New() - floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well. - var/n = name //just in case commands rename it in the ..() call - ..() - spawn(4) - update_icon() - name = n - - grass - name = "Grass patch" - icon_state = "grass1" - floor_tile = new/obj/item/stack/tile/grass - - New() - floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well. - icon_state = "grass[pick("1","2","3","4")]" - ..() - spawn(4) - update_icon() - for(var/direction in cardinal) - if(istype(get_step(src,direction),/turf/simulated/floor)) - var/turf/simulated/floor/FF = get_step(src,direction) - FF.update_icon() //so siding get updated properly - -/turf/simulated/floor/vault - icon_state = "rockvault" - - New(location,type) - ..() - icon_state = "[type]vault" - -/turf/simulated/wall/vault - icon_state = "rockvault" - - New(location,type) - ..() - icon_state = "[type]vault" - -/turf/simulated/floor/engine - name = "reinforced floor" - icon_state = "engine" - thermal_conductivity = 0.025 - heat_capacity = 325000 - -/turf/simulated/floor/engine/cult - name = "engraved floor" - icon_state = "cult" - - -/turf/simulated/floor/engine/n20 - New() - ..() - var/datum/gas_mixture/adding = new - var/datum/gas/sleeping_agent/trace_gas = new - - trace_gas.moles = 2000 - adding.trace_gases += trace_gas - adding.temperature = T20C - - assume_air(adding) - -/turf/simulated/floor/engine/vacuum - name = "vacuum floor" - icon_state = "engine" - oxygen = 0 - nitrogen = 0.001 - temperature = TCMB - -/turf/simulated/floor/plating - name = "plating" - icon_state = "plating" - floor_tile = null - intact = 0 - -/turf/simulated/floor/plating/airless - icon_state = "plating" - name = "airless plating" - oxygen = 0.01 - nitrogen = 0.01 - temperature = TCMB - - New() - ..() - name = "plating" - -/turf/simulated/floor/grid - icon = 'icons/turf/floors.dmi' - icon_state = "circuit" - -/turf/simulated/floor/New() - ..() - if(icon_state in icons_to_ignore_at_floor_init) //so damaged/burned tiles or plating icons aren't saved as the default - icon_regular_floor = "floor" - else - icon_regular_floor = icon_state - -//turf/simulated/floor/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) -// if ((istype(mover, /obj/machinery/vehicle) && !(src.burnt))) -// if (!( locate(/obj/machinery/mass_driver, src) )) -// return 0 -// return ..() - -/turf/simulated/floor/ex_act(severity) - //set src in oview(1) - switch(severity) - if(1.0) - src.ReplaceWithSpace() - if(2.0) - switch(pick(1,2;75,3)) - if (1) - src.ReplaceWithLattice() - if(prob(33)) new /obj/item/stack/sheet/metal(src) - if(2) - src.ReplaceWithSpace() - if(3) - if(prob(80)) - src.break_tile_to_plating() - else - src.break_tile() - src.hotspot_expose(1000,CELL_VOLUME) - if(prob(33)) new /obj/item/stack/sheet/metal(src) - if(3.0) - if (prob(50)) - src.break_tile() - src.hotspot_expose(1000,CELL_VOLUME) - return - -/turf/simulated/floor/blob_act() - return - -turf/simulated/floor/proc/update_icon() - if(is_plasteel_floor()) - if(!broken && !burnt) - icon_state = icon_regular_floor - if(is_plating()) - if(!broken && !burnt) - icon_state = icon_plating //Because asteroids are 'platings' too. - if(is_light_floor()) - var/obj/item/stack/tile/light/T = floor_tile - if(T.on) - switch(T.state) - if(0) - icon_state = "light_on" - sd_SetLuminosity(5) - if(1) - var/num = pick("1","2","3","4") - icon_state = "light_on_flicker[num]" - sd_SetLuminosity(5) - if(2) - icon_state = "light_on_broken" - sd_SetLuminosity(5) - if(3) - icon_state = "light_off" - sd_SetLuminosity(0) - else - sd_SetLuminosity(0) - icon_state = "light_off" - if(is_grass_floor()) - if(!broken && !burnt) - if(!(icon_state in list("grass1","grass2","grass3","grass4"))) - icon_state = "grass[pick("1","2","3","4")]" - spawn(1) - if(istype(src,/turf/simulated/floor)) //Was throwing runtime errors due to a chance of it changing to space halfway through. - if(air) - update_visuals(air) - -turf/simulated/floor/return_siding_icon_state() - ..() - if(is_grass_floor()) - var/dir_sum = 0 - for(var/direction in cardinal) - var/turf/T = get_step(src,direction) - if(!(T.is_grass_floor())) - dir_sum += direction - if(dir_sum) - return "wood_siding[dir_sum]" - else - return 0 - - -/turf/simulated/floor/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/turf/simulated/floor/attack_hand(mob/user as mob) - if (is_light_floor()) - var/obj/item/stack/tile/light/T = floor_tile - T.on = !T.on - update_icon() - if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) - return - if (user.pulling.anchored) - return - if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) - return - if (ismob(user.pulling)) - var/mob/M = user.pulling - var/mob/t = M.pulling - M.stop_pulling() - step(user.pulling, get_dir(user.pulling.loc, src)) - M.start_pulling(t) - else - step(user.pulling, get_dir(user.pulling.loc, src)) - return - -/turf/simulated/floor/engine/attackby(obj/item/weapon/C as obj, mob/user as mob) - if(!C) - return - if(!user) - return - if(istype(C, /obj/item/weapon/wrench)) - user << "\blue Removing rods..." - playsound(src.loc, 'sound/items/Ratchet.ogg', 80, 1) - if(do_after(user, 30)) - new /obj/item/stack/rods(src, 2) - ReplaceWithFloor() - var/turf/simulated/floor/F = src - F.make_plating() - return - -/turf/simulated/floor/proc/gets_drilled() - return - -/turf/simulated/floor/proc/break_tile_to_plating() - if(!is_plating()) - make_plating() - break_tile() - -/turf/simulated/floor/is_plasteel_floor() - if(istype(floor_tile,/obj/item/stack/tile/plasteel)) - return 1 - else - return 0 - -/turf/simulated/floor/is_light_floor() - if(istype(floor_tile,/obj/item/stack/tile/light)) - return 1 - else - return 0 - -/turf/simulated/floor/is_grass_floor() - if(istype(floor_tile,/obj/item/stack/tile/grass)) - return 1 - else - return 0 - -/turf/simulated/floor/is_plating() - if(!floor_tile) - return 1 - return 0 - -/turf/simulated/floor/proc/break_tile() - if(istype(src,/turf/simulated/floor/engine)) return - if(istype(src,/turf/simulated/floor/mech_bay_recharge_floor)) - src.ReplaceWithPlating() - if(broken) return - if(is_plasteel_floor()) - src.icon_state = "damaged[pick(1,2,3,4,5)]" - broken = 1 - else if(is_plasteel_floor()) - src.icon_state = "light_broken" - broken = 1 - else if(is_plating()) - src.icon_state = "platingdmg[pick(1,2,3)]" - broken = 1 - else if(is_grass_floor()) - src.icon_state = "sand[pick("1","2","3")]" - broken = 1 - -/turf/simulated/floor/proc/burn_tile() - if(istype(src,/turf/simulated/floor/engine)) return - if(broken || burnt) return - if(is_plasteel_floor()) - src.icon_state = "damaged[pick(1,2,3,4,5)]" - burnt = 1 - else if(is_plasteel_floor()) - src.icon_state = "floorscorched[pick(1,2)]" - burnt = 1 - else if(is_plating()) - src.icon_state = "panelscorched" - burnt = 1 - else if(is_grass_floor()) - src.icon_state = "sand[pick("1","2","3")]" - burnt = 1 - -//This proc will delete the floor_tile and the update_iocn() proc will then change the icon_state of the turf -//This proc auto corrects the grass tiles' siding. -/turf/simulated/floor/proc/make_plating() - if(istype(src,/turf/simulated/floor/engine)) return - - if(is_grass_floor()) - for(var/direction in cardinal) - if(istype(get_step(src,direction),/turf/simulated/floor)) - var/turf/simulated/floor/FF = get_step(src,direction) - FF.update_icon() //so siding get updated properly - - if(!floor_tile) return - del(floor_tile) - icon_plating = "plating" - sd_SetLuminosity(0) - floor_tile = null - intact = 0 - broken = 0 - burnt = 0 - - update_icon() - levelupdate() - -//This proc will make the turf a plasteel floor tile. The expected argument is the tile to make the turf with -//If none is given it will make a new object. dropping or unequipping must be handled before or after calling -//this proc. -/turf/simulated/floor/proc/make_plasteel_floor(var/obj/item/stack/tile/plasteel/T = null) - broken = 0 - burnt = 0 - intact = 1 - sd_SetLuminosity(0) - if(T) - if(istype(T,/obj/item/stack/tile/plasteel)) - floor_tile = T - if (icon_regular_floor) - icon_state = icon_regular_floor - else - icon_state = "floor" - icon_regular_floor = icon_state - update_icon() - levelupdate() - return - //if you gave a valid parameter, it won't get thisf ar. - floor_tile = new/obj/item/stack/tile/plasteel - icon_state = "floor" - icon_regular_floor = icon_state - - update_icon() - levelupdate() - -//This proc will make the turf a light floor tile. The expected argument is the tile to make the turf with -//If none is given it will make a new object. dropping or unequipping must be handled before or after calling -//this proc. -/turf/simulated/floor/proc/make_light_floor(var/obj/item/stack/tile/light/T = null) - broken = 0 - burnt = 0 - intact = 1 - if(T) - if(istype(T,/obj/item/stack/tile/light)) - floor_tile = T - update_icon() - levelupdate() - return - //if you gave a valid parameter, it won't get thisf ar. - floor_tile = new/obj/item/stack/tile/light - - update_icon() - levelupdate() - -//This proc will make a turf into a grass patch. Fun eh? Insert the grass tile to be used as the argument -//If no argument is given a new one will be made. -/turf/simulated/floor/proc/make_grass_floor(var/obj/item/stack/tile/grass/T = null) - broken = 0 - burnt = 0 - intact = 1 - if(T) - if(istype(T,/obj/item/stack/tile/grass)) - floor_tile = T - update_icon() - levelupdate() - return - //if you gave a valid parameter, it won't get thisf ar. - floor_tile = new/obj/item/stack/tile/grass - - update_icon() - levelupdate() - -/turf/simulated/floor/attackby(obj/item/C as obj, mob/user as mob) - - if(!C || !user) - return 0 - - if(istype(C,/obj/item/weapon/light/bulb)) //only for light tiles - if(is_light_floor()) - var/obj/item/stack/tile/light/T = floor_tile - if(T.state) - user.unEquip(C) - del(C) - T.state = C //fixing it by bashing it with a light bulb, fun eh? - update_icon() - user << "\blue You replace the light bulb." - else - user << "\blue The lightbulb seems fine, no need to replace it." - - if(istype(C, /obj/item/weapon/crowbar) && (!(is_plating()))) - if(broken || burnt) - user << "\red You remove the broken plating." - else - user << "\red You remove the [floor_tile.name]." - new floor_tile.type(src) - - make_plating() - playsound(src.loc, 'sound/items/Crowbar.ogg', 80, 1) - - return - - if(istype(C, /obj/item/stack/rods)) - var/obj/item/stack/rods/R = C - if (is_plating()) - if (R.amount >= 2) - user << "\blue Reinforcing the floor..." - if(do_after(user, 30) && R && R.amount >= 2 && is_plating()) - ReplaceWithEngineFloor() - playsound(src.loc, 'sound/items/Deconstruct.ogg', 80, 1) - R.use(2) - return - else - user << "\red You need more rods." - else - user << "\red You must remove the plating first." - return - - if(istype(C, /obj/item/stack/tile)) - if(is_plating()) - if(!broken && !burnt) - var/obj/item/stack/tile/T = C - floor_tile = new T.type - intact = 1 - if(istype(T,/obj/item/stack/tile/light)) - var/obj/item/stack/tile/light/L = T - var/obj/item/stack/tile/light/F = floor_tile - F.state = L.state - F.on = L.on - if(istype(T,/obj/item/stack/tile/grass)) - for(var/direction in cardinal) - if(istype(get_step(src,direction),/turf/simulated/floor)) - var/turf/simulated/floor/FF = get_step(src,direction) - FF.update_icon() //so siding gets updated properly - T.use(1) - update_icon() - levelupdate() - playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1) - else - user << "\blue This section is too damaged to support a tile. Use a welder to fix the damage." - - - if(istype(C, /obj/item/stack/cable_coil)) - if(is_plating()) - var/obj/item/stack/cable_coil/coil = C - coil.turf_place(src, user) - else - user << "\red You must remove the plating first." - - if(istype(C, /obj/item/weapon/shovel)) - if(is_grass_floor()) - new /obj/item/weapon/ore/glass(src) - new /obj/item/weapon/ore/glass(src) //Make some sand if you shovel grass - user << "\blue You shovel the grass." - make_plating() - else - user << "\red You cannot shovel this." - - if(istype(C, /obj/item/weapon/weldingtool)) - var/obj/item/weapon/weldingtool/welder = C - if(welder.welding && (is_plating())) - if(broken || burnt) - if(welder.remove_fuel(0,user)) - user << "\red You fix some dents on the broken plating." - playsound(src.loc, 'sound/items/Welder.ogg', 80, 1) - icon_state = "plating" - burnt = 0 - broken = 0 - else - user << "\blue You need more welding fuel to complete this task." - -/turf/unsimulated/floor/attack_paw(user as mob) - return src.attack_hand(user) - -/turf/unsimulated/floor/attack_hand(var/mob/user as mob) - if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) - return - if (user.pulling.anchored) - return - if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) - return - if (ismob(user.pulling)) - var/mob/M = user.pulling - var/mob/t = M.pulling - M.stop_pulling() - step(user.pulling, get_dir(user.pulling.loc, src)) - M.start_pulling(t) - else - step(user.pulling, get_dir(user.pulling.loc, src)) - return - -// imported from space.dm - -/turf/space/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/turf/space/attack_hand(mob/user as mob) - if ((user.restrained() || !( user.pulling ))) - return - if (user.pulling.anchored) - return - if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) - return - if (ismob(user.pulling)) - var/mob/M = user.pulling - var/atom/movable/t = M.pulling - M.stop_pulling() - step(user.pulling, get_dir(user.pulling.loc, src)) - M.start_pulling(t) - else - step(user.pulling, get_dir(user.pulling.loc, src)) - return - -/turf/space/attackby(obj/item/C as obj, mob/user as mob) - - if (istype(C, /obj/item/stack/rods)) - var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) - if(L) - return - var/obj/item/stack/rods/R = C - user << "\blue Constructing support lattice ..." - playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1) - ReplaceWithLattice() - R.use(1) - return - - if (istype(C, /obj/item/stack/tile/plasteel)) - var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) - if(L) - var/obj/item/stack/tile/plasteel/S = C - del(L) - playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1) - S.build(src) - S.use(1) - return - else - user << "\red The plating is going to need some support." - return - - -// Ported from unstable r355 - -/turf/space/Entered(atom/movable/A as mob|obj) - ..() - if ((!(A) || src != A.loc || istype(null, /obj/effect/beam))) return - - inertial_drift(A) - - if(ticker && ticker.mode) - - // Okay, so let's make it so that people can travel z levels but not nuke disks! - // if(ticker.mode.name == "nuclear emergency") return - - if(ticker.mode.name == "extended"||ticker.mode.name == "sandbox") - Sandbox_Spacemove(A) - - else - if (src.x <= 2 || A.x >= (world.maxx - 1) || src.y <= 2 || A.y >= (world.maxy - 1)) - if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust)) - del(A) - return - - if(istype(A, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks travel Z levels ... And moving this shit down here so it only fires when they're actually trying to change z-level. - return - - if(!isemptylist(A.search_contents_for(/obj/item/weapon/disk/nuclear))) - if(istype(A, /mob/living)) - var/mob/living/MM = A - if(MM.client) - MM << "\red Something you are carrying is preventing you from leaving. Don't play stupid; you know exactly what it is." - return - - - - var/move_to_z_str = pickweight(accessable_z_levels) - - var/move_to_z = text2num(move_to_z_str) - - if(!move_to_z) - return - - - - A.z = move_to_z - - - if(src.x <= 2) - A.x = world.maxx - 2 - - else if (A.x >= (world.maxx - 1)) - A.x = 3 - - else if (src.y <= 2) - A.y = world.maxy - 2 - - else if (A.y >= (world.maxy - 1)) - A.y = 3 - - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - -// if(istype(A, /obj/structure/closet/coffin)) -// coffinhandler.Add(A) - -/turf/space/proc/Sandbox_Spacemove(atom/movable/A as mob|obj) - var/cur_x - var/cur_y - var/next_x - var/next_y - var/target_z - var/list/y_arr - - if(src.x <= 1) - if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust)) - del(A) - return - - var/list/cur_pos = src.get_global_map_pos() - if(!cur_pos) return - cur_x = cur_pos["x"] - cur_y = cur_pos["y"] - next_x = (--cur_x||global_map.len) - y_arr = global_map[next_x] - target_z = y_arr[cur_y] -/* - //debug - world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]" - world << "Target Z = [target_z]" - world << "Next X = [next_x]" - //debug -*/ - if(target_z) - A.z = target_z - A.x = world.maxx - 2 - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - else if (src.x >= world.maxx) - if(istype(A, /obj/effect/meteor)) - del(A) - return - - var/list/cur_pos = src.get_global_map_pos() - if(!cur_pos) return - cur_x = cur_pos["x"] - cur_y = cur_pos["y"] - next_x = (++cur_x > global_map.len ? 1 : cur_x) - y_arr = global_map[next_x] - target_z = y_arr[cur_y] -/* - //debug - world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]" - world << "Target Z = [target_z]" - world << "Next X = [next_x]" - //debug -*/ - if(target_z) - A.z = target_z - A.x = 3 - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - else if (src.y <= 1) - if(istype(A, /obj/effect/meteor)) - del(A) - return - var/list/cur_pos = src.get_global_map_pos() - if(!cur_pos) return - cur_x = cur_pos["x"] - cur_y = cur_pos["y"] - y_arr = global_map[cur_x] - next_y = (--cur_y||y_arr.len) - target_z = y_arr[next_y] -/* - //debug - world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]" - world << "Next Y = [next_y]" - world << "Target Z = [target_z]" - //debug -*/ - if(target_z) - A.z = target_z - A.y = world.maxy - 2 - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - - else if (src.y >= world.maxy) - if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust)) - del(A) - return - var/list/cur_pos = src.get_global_map_pos() - if(!cur_pos) return - cur_x = cur_pos["x"] - cur_y = cur_pos["y"] - y_arr = global_map[cur_x] - next_y = (++cur_y > y_arr.len ? 1 : cur_y) - target_z = y_arr[next_y] -/* - //debug - world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]" - world << "Next Y = [next_y]" - world << "Target Z = [target_z]" - //debug -*/ - if(target_z) - A.z = target_z - A.y = 3 - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - return - -/obj/effect/vaultspawner - var/maxX = 6 - var/maxY = 6 - var/minX = 2 - var/minY = 2 - -/obj/effect/vaultspawner/New(turf/location as turf,lX = minX,uX = maxX,lY = minY,uY = maxY,var/type = null) - if(!type) - type = pick("sandstone","rock","alien") - - var/lowBoundX = location.x - var/lowBoundY = location.y - - var/hiBoundX = location.x + rand(lX,uX) - var/hiBoundY = location.y + rand(lY,uY) - - var/z = location.z - - for(var/i = lowBoundX,i<=hiBoundX,i++) - for(var/j = lowBoundY,j<=hiBoundY,j++) - if(i == lowBoundX || i == hiBoundX || j == lowBoundY || j == hiBoundY) - new /turf/simulated/wall/vault(locate(i,j,z),type) - else - new /turf/simulated/floor/vault(locate(i,j,z),type) - - del(src) - -/turf/proc/kill_creatures(mob/U = null)//Will kill people/creatures and damage mechs./N -//Useful to batch-add creatures to the list. - for(var/mob/living/M in src) - if(M==U) continue//Will not harm U. Since null != M, can be excluded to kill everyone. - spawn(0) - M.gib() - for(var/obj/mecha/M in src)//Mecha are not gibbed but are damaged. - spawn(0) - M.take_damage(100, "brute") - for(var/obj/effect/critter/M in src) - spawn(0) - M.Die() - -/turf/proc/Bless() - if(flags & NOJAUNT) - return - flags |= NOJAUNT - overlays += image('icons/effects/water.dmi',src,"holywater")*/ \ No newline at end of file diff --git a/code/unused/BrokenInhands.dm b/code/unused/BrokenInhands.dm deleted file mode 100644 index 6339d3c0113..00000000000 --- a/code/unused/BrokenInhands.dm +++ /dev/null @@ -1,36 +0,0 @@ -/proc/getbrokeninhands() - var/icon/IL = new('icons/mob/items_lefthand.dmi') - var/list/Lstates = IL.IconStates() - var/icon/IR = new('icons/mob/items_righthand.dmi') - var/list/Rstates = IR.IconStates() - - - var/text - for(var/A in typesof(/obj/item)) - var/obj/item/O = new A( locate(1,1,1) ) - if(!O) continue - var/icon/J = new(O.icon) - var/list/istates = J.IconStates() - if(!Lstates.Find(O.icon_state) && !Lstates.Find(O.item_state)) - if(O.icon_state) - text += "[O.type] WANTS IN LEFT HAND CALLED\n\"[O.icon_state]\".\n" - if(!Rstates.Find(O.icon_state) && !Rstates.Find(O.item_state)) - if(O.icon_state) - text += "[O.type] WANTS IN RIGHT HAND CALLED\n\"[O.icon_state]\".\n" - - - if(O.icon_state) - if(!istates.Find(O.icon_state)) - text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.icon_state]\" IN \"[O.icon]\"\n" - if(O.item_state) - if(!istates.Find(O.item_state)) - text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.item_state]\" IN \"[O.icon]\"\n" - text+="\n" - del(O) - if(text) - var/F = file("broken_icons.txt") - fdel(F) - F << text - world << "Completely successfully and written to [F]" - - diff --git a/code/unused/Ultralight.dm b/code/unused/Ultralight.dm deleted file mode 100644 index 63c679b68be..00000000000 --- a/code/unused/Ultralight.dm +++ /dev/null @@ -1,341 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 - -//UltraLight system, by Sukasa - - const/ar/UL_LUMINOSITY = 0 - const/ar/UL_SQUARELIGHT = 0 - - const/ar/UL_RGB = 1 - const/ar/UL_ROUNDLIGHT = 2 - - const/ar/UL_I_FALLOFF_SQUARE = 0 - const/ar/UL_I_FALLOFF_ROUND = 1 - - const/ar/UL_I_LUMINOSITY = 0 - const/ar/UL_I_RGB = 1 - - const/ar/UL_I_LIT = 0 - const/ar/UL_I_EXTINGUISHED = 1 - const/ar/UL_I_ONZERO = 2 - - ul_LightingEnabled = 1 - ul_LightingResolution = 1 - ul_Steps = 7 - ul_LightingModel = UL_I_RGB - ul_FalloffStyle = UL_I_FALLOFF_ROUND - ul_TopLuminosity = 0 - ul_Layer = 10 - ul_SuppressLightLevelChanges = 0 - - list/ul_FastRoot = list(0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7) - - -proc - ul_Clamp(var/Value) - return min(max(Value, 0), ul_Steps) - -atom - var/LuminosityRed = 0 - var/LuminosityGreen = 0 - var/LuminosityBlue = 0 - - var/ul_Extinguished = UL_I_ONZERO - - proc - ul_SetLuminosity(var/Red, var/Green = Red, var/Blue = Red) - - if(LuminosityRed == Red && LuminosityGreen == Green && LuminosityBlue == Blue) - return //No point doing all that work if it won't have any effect anyways... - - if (ul_Extinguished == UL_I_EXTINGUISHED) - LuminosityRed = Red - LuminosityGreen = Green - LuminosityBlue = Blue - - return - - if (ul_IsLuminous()) - ul_Extinguish() - - LuminosityRed = Red - LuminosityGreen = Green - LuminosityBlue = Blue - - ul_Extinguished = UL_I_ONZERO - - if (ul_IsLuminous()) - ul_Illuminate() - - return - - ul_Illuminate() - if (ul_Extinguished == UL_I_LIT) - return - - ul_Extinguished = UL_I_LIT - - ul_UpdateTopLuminosity() - luminosity = ul_Luminosity() - - for(var/turf/Affected in view(ul_Luminosity(), src)) - var/Falloff = src.ul_FalloffAmount(Affected) - - var/DeltaRed = LuminosityRed - Falloff - var/DeltaGreen = LuminosityGreen - Falloff - var/DeltaBlue = LuminosityBlue - Falloff - - if(ul_IsLuminous(DeltaRed, DeltaGreen, DeltaBlue)) - - Affected.LightLevelRed += max(DeltaRed, 0) - Affected.LightLevelGreen += max(DeltaGreen, 0) - Affected.LightLevelBlue += max(DeltaBlue, 0) - - Affected.MaxRed += LuminosityRed - Affected.MaxGreen += LuminosityGreen - Affected.MaxBlue += LuminosityBlue - - Affected.ul_UpdateLight() - - if (ul_SuppressLightLevelChanges == 0) - Affected.ul_LightLevelChanged() - - for(var/atom/AffectedAtom in Affected) - AffectedAtom.ul_LightLevelChanged() - return - - ul_Extinguish() - - if (ul_Extinguished != UL_I_LIT) - return - - ul_Extinguished = UL_I_EXTINGUISHED - - for(var/turf/Affected in view(ul_Luminosity(), src)) - - var/Falloff = ul_FalloffAmount(Affected) - - var/DeltaRed = LuminosityRed - Falloff - var/DeltaGreen = LuminosityGreen - Falloff - var/DeltaBlue = LuminosityBlue - Falloff - - if(ul_IsLuminous(DeltaRed, DeltaGreen, DeltaBlue)) - - Affected.LightLevelRed -= max(DeltaRed, 0) - Affected.LightLevelGreen -= max(DeltaGreen, 0) - Affected.LightLevelBlue -= max(DeltaBlue, 0) - - Affected.MaxRed -= LuminosityRed - Affected.MaxGreen -= LuminosityGreen - Affected.MaxBlue -= LuminosityBlue - - Affected.ul_UpdateLight() - - if (ul_SuppressLightLevelChanges == 0) - Affected.ul_LightLevelChanged() - - for(var/atom/AffectedAtom in Affected) - AffectedAtom.ul_LightLevelChanged() - - luminosity = 0 - - return - - ul_FalloffAmount(var/atom/ref) - if (ul_FalloffStyle == UL_I_FALLOFF_ROUND) - var/x = (ref.x - src.x) - var/y = (ref.y - src.y) - if ((x*x + y*y) > ul_FastRoot.len) - for(var/i = ul_FastRoot.len, i <= x*x+y*y, i++) - ul_FastRoot += round(sqrt(x*x+y*y)) - return round(ul_LightingResolution * ul_FastRoot[x*x + y*y + 1], 1) - - else if (ul_FalloffStyle == UL_I_FALLOFF_SQUARE) - return get_dist(src, ref) - - return 0 - - ul_SetOpacity(var/NewOpacity) - if(opacity != NewOpacity) - - var/list/Blanked = ul_BlankLocal() - var/atom/T = src - while(T && !isturf(T)) - T = T.loc - - opacity = NewOpacity - - if(T) - T:LightLevelRed = 0 - T:LightLevelGreen = 0 - T:LightLevelBlue = 0 - - ul_UnblankLocal(Blanked) - - return - - ul_UnblankLocal(var/list/ReApply = view(ul_TopLuminosity, src)) - for(var/atom/Light in ReApply) - if(Light.ul_IsLuminous()) - Light.ul_Illuminate() - - return - - ul_BlankLocal() - var/list/Blanked = list( ) - var/TurfAdjust = isturf(src) ? 1 : 0 - - for(var/atom/Affected in view(ul_TopLuminosity, src)) - if(Affected.ul_IsLuminous() && Affected.ul_Extinguished == UL_I_LIT && (ul_FalloffAmount(Affected) <= Affected.luminosity + TurfAdjust)) - Affected.ul_Extinguish() - Blanked += Affected - - return Blanked - - ul_UpdateTopLuminosity() - - if (ul_TopLuminosity < LuminosityRed) - ul_TopLuminosity = LuminosityRed - - if (ul_TopLuminosity < LuminosityGreen) - ul_TopLuminosity = LuminosityGreen - - if (ul_TopLuminosity < LuminosityBlue) - ul_TopLuminosity = LuminosityBlue - - return - - ul_Luminosity() - return max(LuminosityRed, LuminosityGreen, LuminosityBlue) - - ul_IsLuminous(var/Red = LuminosityRed, var/Green = LuminosityGreen, var/Blue = LuminosityBlue) - return (Red > 0 || Green > 0 || Blue > 0) - - ul_LightLevelChanged() - //Designed for client projects to use. Called on items when the turf they are in has its light level changed - return - - New() - ..() - if(ul_IsLuminous()) - spawn(1) - ul_Illuminate() - return - - Delete() - if(ul_IsLuminous()) - ul_Extinguish() - - ..() - - return - - movable - Move() - ul_Extinguish() - ..() - ul_Illuminate() - return - -turf - var/LightLevelRed = 0 - var/LightLevelGreen = 0 - var/LightLevelBlue = 0 - - var/list/MaxRed = list( ) - var/list/MaxGreen = list( ) - var/list/MaxBlue = list( ) - - proc - - ul_GetRed() - return ul_Clamp(min(LightLevelRed, max(MaxRed))) - ul_GetGreen() - return ul_Clamp(min(LightLevelGreen, max(MaxGreen))) - ul_GetBlue() - return ul_Clamp(min(LightLevelBlue, max(MaxBlue))) - - ul_UpdateLight() - - var/area/CurrentArea = loc - - if(!isarea(CurrentArea) || !CurrentArea.ul_Lighting) - return - - var/LightingTag = copytext(CurrentArea.tag, 1, findtext(CurrentArea.tag, ":UL")) + ":UL[ul_GetRed()]_[ul_GetGreen()]_[ul_GetBlue()]" - - if(CurrentArea.tag != LightingTag) - var/area/NewArea = locate(LightingTag) - - if(!NewArea) - NewArea = new CurrentArea.type() - NewArea.tag = LightingTag - - for(var/V in CurrentArea.vars - "contents") - if(issaved(CurrentArea.vars[V])) - NewArea.vars[V] = CurrentArea.vars[V] - - NewArea.tag = LightingTag - - NewArea.ul_Light(ul_GetRed(), ul_GetGreen(), ul_GetBlue()) - - - NewArea.contents += src - - return - - ul_Recalculate() - - ul_SuppressLightLevelChanges++ - - var/list/Lights = ul_BlankLocal() - - LightLevelRed = 0 - LightLevelGreen = 0 - LightLevelBlue = 0 - - ul_UnblankLocal(Lights) - - ul_SuppressLightLevelChanges-- - - return - -area - var/ul_Overlay = null - var/ul_Lighting = 1 - - var/LightLevelRed = 0 - var/LightLevelGreen = 0 - var/LightLevelBlue = 0 - - proc - ul_Light(var/Red = LightLevelRed, var/Green = LightLevelGreen, var/Blue = LightLevelBlue) - - if(!src || !src.ul_Lighting) - return - - overlays -= ul_Overlay - - LightLevelRed = Red - LightLevelGreen = Green - LightLevelBlue = Blue - - luminosity = ul_IsLuminous(LightLevelRed, LightLevelGreen, LightLevelBlue) - - ul_Overlay = image('icons/effects/ULIcons.dmi', , num2text(LightLevelRed) + "-" + num2text(LightLevelGreen) + "-" + num2text(LightLevelBlue), ul_Layer) - - overlays += ul_Overlay - - return - - ul_Prep() - - if(!tag) - tag = "[type]" - if(ul_Lighting) - if(!findtext(tag,":UL")) - ul_Light() - //world.log << tag - - return diff --git a/code/unused/Virus2Prob.dm b/code/unused/Virus2Prob.dm deleted file mode 100644 index bf9868041dd..00000000000 --- a/code/unused/Virus2Prob.dm +++ /dev/null @@ -1,12 +0,0 @@ -var/list/prob_G_list = list() - -/proc/probG(var/define,var/everyother) - if(prob_G_list["[define]"]) - prob_G_list["[define]"] += 1 - if(prob_G_list["[define]"] == everyother) - prob_G_list["[define]"] = 0 - return 1 - else - (prob_G_list["[define]"]) = 0 - (prob_G_list["[define]"]) = rand(1,everyother-1) - return 0 diff --git a/code/unused/_debug.dm b/code/unused/_debug.dm deleted file mode 100644 index dc02d5c4755..00000000000 --- a/code/unused/_debug.dm +++ /dev/null @@ -1,615 +0,0 @@ -// NOTE WELL! -// Only include this file when debugging locally -// Do not include in release versions - - -#define VARSICON 1 -#define SDEBUG 1 - -/client/verb/Debug() - set category = "Debug" - set name = "Debug-Debug" - if(src.holder.rank == "Game Admin") - Debug = !Debug - - world << "Debugging [Debug ? "On" : "Off"]" - else - alert("Coders only baby") - return - -/turf/verb/Flow() - set category = "Debug" - //set hidden = 1 - if(Debug) - for(var/turf/T in range(5)) - - var/obj/effect/mark/O = locate(/obj/effect/mark/, T) - - if(!O) - O = new /obj/effect/mark(T) - else - O.overlays.Cut() - - var/obj/move/OM = locate(/obj/move/, T) - - if(OM) - - if(! OM.updatecell) - O.icon_state = "x2" - else - O.icon_state = "blank" -/* -Doing this because FindTurfs() isn't even used - for(var/atom/U in OM.FindTurfs() ) - var/dirn = get_dir(OM, U) - if(dirn == 1) - O.overlays += image('icons/misc/mark.dmi', OM.airdir==1?"up":"fup") - else if(dirn == 2) - O.overlays += image('icons/misc/mark.dmi', OM.airdir==2?"dn":"fdn") - else if(dirn == 4) - O.overlays += image('icons/misc/mark.dmi', OM.airdir==4?"rt":"frt") - else if(dirn == 8) - O.overlays += image('icons/misc/mark.dmi', OM.airdir==8?"lf":"flf") -*/ - else - - if(!(T.updatecell)) - O.icon_state = "x2" - else - O.icon_state = "blank" - - if(T.airN) - O.overlays += image('icons/misc/mark.dmi', T.airdir==1?"up":"fup") - - if(T.airS) - O.overlays += image('icons/misc/mark.dmi', T.airdir==2?"dn":"fdn") - - if(T.airW) - O.overlays += image('icons/misc/mark.dmi', T.airdir==8?"lf":"flf") - - if(T.airE) - O.overlays += image('icons/misc/mark.dmi', T.airdir==4?"rt":"frt") - - - if(T.condN) - O.overlays += image('icons/misc/mark.dmi', T.condN == 1?"yup":"rup") - - if(T.condS) - O.overlays += image('icons/misc/mark.dmi', T.condS == 1?"ydn":"rdn") - - if(T.condE) - O.overlays += image('icons/misc/mark.dmi', T.condE == 1?"yrt":"rrt") - - if(T.condW) - O.overlays += image('icons/misc/mark.dmi', T.condW == 1?"ylf":"rlf") - else - alert("Debugging off") - return - -/turf/verb/Clear() - set category = "Debug" - //set hidden = 1 - if(Debug) - for(var/obj/effect/mark/O in world) - del(O) - else - alert("Debugging off") - return - -/proc/numbericon(var/tn as text,var/s = 0) - if(Debug) - var/image/I = image('icons/misc/mark.dmi', "blank") - - if(lentext(tn)>8) - tn = "*" - - var/len = lentext(tn) - - for(var/d = 1 to lentext(tn)) - - - var/char = copytext(tn, len-d+1, len-d+2) - - if(char == " ") - continue - - var/image/ID = image('icons/misc/mark.dmi', char) - - ID.pixel_x = -(d-1)*4 - ID.pixel_y = s - //if(d>1) I.Shift(WEST, (d-1)*8) - - I.overlays += ID - - - - return I - else - alert("Debugging off") - return - -/*/turf/verb/Stats() - set category = "Debug" - for(var/turf/T in range(5)) - - var/obj/effect/mark/O = locate(/obj/effect/mark/, T) - - if(!O) - O = new /obj/effect/mark(T) - else - O.overlays.Cut() - - - var/temp = round(T.temp-T0C, 0.1) - - O.overlays += numbericon("[temp]C") - - var/pres = round(T.tot_gas() / CELLSTANDARD * 100, 0.1) - - O.overlays += numbericon("[pres]", -8) - O.mark = "[temp]/[pres]" -*/ -/* -/turf/verb/Pipes() - set category = "Debug" - - for(var/turf/T in range(6)) - - //world << "Turf [T] at ([T.x],[T.y])" - - for(var/obj/machinery/M in T) - //world <<" Mach [M] with pdir=[M.p_dir]" - - if(M && M.p_dir) - - //world << "Accepted" - var/obj/effect/mark/O = locate(/obj/effect/mark/, T) - - if(!O) - O = new /obj/effect/mark(T) - else - O.overlays.Cut() - - if(istype(M, /obj/machinery/pipes)) - var/obj/machinery/pipes/P = M - O.overlays += numbericon("[P.plnum] ", -20) - M = P.pl - - - var/obj/substance/gas/G = M.get_gas() - - if(G) - - var/cap = round( 100*(G.tot_gas()/ M.capmult / 6e6), 0.1) - var/temp = round(G.temperature - T0C, 0.1) - O.overlays += numbericon("[temp]C", 0) - O.overlays += numbericon("[cap]", -8) - - break -*/ -/turf/verb/Cables() - set category = "Debug" - if(Debug) - for(var/turf/T in range(6)) - - //world << "Turf [T] at ([T.x],[T.y])" - - var/obj/effect/mark/O = locate(/obj/effect/mark/, T) - - if(!O) - O = new /obj/effect/mark(T) - else - O.overlays.Cut() - - var/marked = 0 - for(var/obj/M in T) - //world <<" Mach [M] with pdir=[M.p_dir]" - - - if(M && istype(M, /obj/structure/cable/)) - - - var/obj/structure/cable/C = M - //world << "Accepted" - - O.overlays += numbericon("[C.netnum] " , marked) - - marked -= 8 - - else if(M && istype(M, /obj/machinery/power/)) - - var/obj/machinery/power/P = M - O.overlays += numbericon("*[P.netnum] " , marked) - marked -= 8 - - if(!marked) - del(O) - else - alert("Debugging off") - return - - -/turf/verb/Solar() - set category = "Debug" - if(Debug) - - for(var/turf/T in range(6)) - - //world << "Turf [T] at ([T.x],[T.y])" - - var/obj/effect/mark/O = locate(/obj/effect/mark/, T) - - if(!O) - O = new /obj/effect/mark(T) - else - O.overlays.Cut() - - - var/obj/machinery/power/solar/S - - S = locate(/obj/machinery/power/solar, T) - - if(S) - - O.overlays += numbericon("[S.obscured] " , 0) - O.overlays += numbericon("[round(S.sunfrac*100,0.1)] " , -12) - - else - del(O) - else - alert("Debugging off") - return - - -/mob/verb/Showports() - set category = "Debug" - if(Debug) - var/turf/T - var/obj/machinery/pipes/P - var/list/ndirs - - for(var/obj/machinery/pipeline/PL in plines) - - var/num = plines.Find(PL) - - P = PL.nodes[1] // 1st node in list - ndirs = P.get_node_dirs() - - T = get_step(P, ndirs[1]) - - var/obj/effect/mark/O = new(T) - - O.overlays += numbericon("[num] * 1 ", -4) - O.overlays += numbericon("[ndirs[1]] - [ndirs[2]]",-16) - - - P = PL.nodes[PL.nodes.len] // last node in list - - ndirs = P.get_node_dirs() - T = get_step(P, ndirs[2]) - - O = new(T) - - O.overlays += numbericon("[num] * 2 ", -4) - O.overlays += numbericon("[ndirs[1]] - [ndirs[2]]", -16) - else - alert("Debugging off") - return - -/atom/verb/delete() - set category = "Debug" - set src in view() - if(Debug) - del(src) - else - alert("Debugging off") - return - - -/area/verb/dark() - set category = "Debug" - if(Debug) - if(src.icon_state == "dark") - icon_state = null - else - icon_state = "dark" - else - alert("Debugging off") - return - -/area/verb/power() - set category = "Debug" - if(Debug) - power_equip = !power_equip - power_environ = !power_environ - - world << "Power ([src]) = [power_equip]" - - power_change() - else - alert("Debugging off") - return - -// *****RM - -// ***** - - -/mob/verb/ShowPlasma() - set category = "Debug" - if(Debug) - Plasma() - else - alert("Debugging off") - return - -/mob/verb/Blobcount() - set category = "Debug" - if(Debug) - world << "Blob count: [blobs.len]" - else - alert("Debugging off") - return - - -/mob/verb/Blobkill() - set category = "Debug" - if(Debug) - blobs = list() - world << "Blob killed." - else - alert("Debugging off") - return - -/mob/verb/Blobmode() - set category = "Debug" - if(Debug) - world << "Event=[ticker.event]" - world << "Time =[(ticker.event_time - world.realtime)/10]s" - else - alert("Debugging off") - return - -/mob/verb/Blobnext() - set category = "Debug" - if(Debug) - ticker.event_time = world.realtime - else - alert("Debugging off") - return - - -/mob/verb/callshuttle() - set category = "Debug" - if(Debug) - ticker.timeleft = 300 - ticker.timing = 1 - else - alert("Debugging off") - return - -/mob/verb/apcs() - set category = "Debug" - if(Debug) - for(var/obj/machinery/power/apc/APC in world) - world << APC.report() - else - alert("Debugging off") - return - -/mob/verb/Globals() - set category = "Debug" - if(Debug) - debugobj = new() - - debugobj.debuglist = list( powernets, plines, vote, config, admins, ticker, SS13_airtunnel, sun ) - - - world << "Debug" - else - alert("Debugging off") - return - /*for(var/obj/O in plines) - - world << "[O.name]" - */ - - - - -/mob/verb/Mach() - set category = "Debug" - if(Debug) - var/n = 0 - for(var/obj/machinery/M in world) - n++ - if(! (M in machines) ) - world << "[M] [M.type]: not in list" - - world << "in world: [n]; in list:[machines.len]" - else - alert("Debugging off") - return - - -/*/mob/verb/air() - set category = "Debug" - - Air() - -/proc/Air() - - - var/area/A = locate(/area/airintake) - - var/atot = 0 - for(var/turf/T in A) - atot += T.tot_gas() - - var/ptot = 0 - for(var/obj/machinery/pipeline/PL in plines) - if(PL.suffix == "d") - ptot += PL.ngas.tot_gas() - - var/vtot = 0 - for(var/obj/machinery/atmoalter/V in machines) - if(V.suffix == "d") - vtot += V.gas.tot_gas() - - var/ctot = 0 - for(var/obj/machinery/connector/C in machines) - if(C.suffix == "d") - ctot += C.ngas.tot_gas() - - - var/tot = atot + ptot + vtot + ctot - - diary << "A=[num2text(atot,10)] P=[num2text(ptot,10)] V=[num2text(vtot,10)] C=[num2text(ctot,10)] : Total=[num2text(tot,10)]" -*/ -/mob/verb/Revive() - set category = "Debug" - if(Debug) - adjustFireLoss(0 - getBruteLoss()) - setToxLoss(0) - adjustBruteLoss(0 - getBruteLoss()) - setOxyLoss(0) - paralysis = 0 - stunned = 0 - weakened = 0 - health = 100 - if(stat > 1) stat=0 - disabilities = initial(disabilities) - sdisabilities = initial(sdisabilities) - for(var/obj/item/organ/limb/e in src) - e.brute_dam = 0.0 - e.burn_dam = 0.0 - e.bandaged = 0.0 - e.wound_size = 0.0 - e.max_damage = initial(e.max_damage) - e.update_icon() - if(src.type == /mob/living/carbon/human) - var/mob/living/carbon/human/H = src - H.update_damage_overlays() - else - alert("Debugging off") - return - -/mob/verb/Smoke() - set category = "Debug" - if(Debug) - var/obj/effect/smoke/O = new /obj/effect/smoke( src.loc ) - O.dir = pick(NORTH, SOUTH, EAST, WEST) - spawn( 0 ) - O.Life() - else - alert("Debugging off") - return - -/mob/verb/revent(number as num) - set category = "Debug" - set name = "Change event %" - if(!src.authenticated || !src.holder) - src << "Only administrators may use this command." - return - if(src.authenticated && src.holder) - eventchance = number - log_admin("[src.key] set the random event chance to [eventchance]%") - message_admins("[src.key] set the random event chance to [eventchance]%") - -/* Does nothing but blow up the station. -/mob/verb/funbutton() - set category = "Admin" - set name = "Random Expl.(REMOVE ME)" - if(!src.authenticated || !src.holder) - src << "Only administrators may use this command." - return - for(var/turf/T in world) - if(prob(4) && T.z == 1 && istype(T,/turf/station/floor)) - spawn(50+rand(0,3000)) - var/obj/item/weapon/tank/plasmatank/pt = new /obj/item/weapon/tank/plasmatank( T ) - pt.gas.temperature = 400+T0C - pt.ignite() - for(var/turf/P in view(3, T)) - if (P.poison) - P.poison = 0 - P.oldpoison = 0 - P.tmppoison = 0 - P.oxygen = 755985 - P.oldoxy = 755985 - P.tmpoxy = 755985 - usr << "\blue Blowing up station ..." - world << "[usr.key] has used boom boom boom shake the room" -*/ - -/mob/verb/removeplasma() - set category = "Debug" - set name = "Stabilize Atmos." - if(!src.authenticated || !src.holder) - src << "Only administrators may use this command." - return - spawn(0) - for(var/turf/T in view()) - T.poison = 0 - T.oldpoison = 0 - T.tmppoison = 0 - T.oxygen = 755985 - T.oldoxy = 755985 - T.tmpoxy = 755985 - T.co2 = 14.8176 - T.oldco2 = 14.8176 - T.tmpco2 = 14.8176 - T.n2 = 2.844e+006 - T.on2 = 2.844e+006 - T.tn2 = 2.844e+006 - T.tsl_gas = 0 - T.osl_gas = 0 - T.sl_gas = 0 - T.temp = 293.15 - T.otemp = 293.15 - T.ttemp = 293.15 - -/mob/verb/fire(turf/T as turf in world) - set category = "Special Verbs" - set name = "Create Fire" - if(!src.authenticated || !src.holder) - src << "Only administrators may use this command." - return - world << "[usr.key] created fire" - spawn(0) - T.poison += 30000000 - T.firelevel = T.poison - -/mob/verb/co2(turf/T as turf in world) - set category = "Special Verbs" - set name = "Create CO2" - if(!src.authenticated || !src.holder) - src << "Only administrators may use this command." - return - world << "[usr.key] created CO2" - spawn(0) - T.co2 += 300000000 - -/mob/verb/n2o(turf/T as turf in world) - set category = "Special Verbs" - set name = "Create N2O" - if(!src.authenticated || !src.holder) - src << "Only administrators may use this command." - return - world << "[usr.key] created N2O" - spawn(0) - T.sl_gas += 30000000 - -/mob/verb/explosion(T as obj|mob|turf in world) - set category = "Special Verbs" - set name = "Create Explosion" - if(!src.authenticated || !src.holder) - src << "Only administrators may use this command." - return - world << "[usr.key] created an explosion" - var/obj/item/weapon/tank/plasmatank/pt = new /obj/item/weapon/tank/plasmatank( T ) - playsound(pt.loc, "explosion", 100, 1,3) - playsound(pt.loc, 'sound/effects/explosionfar.ogg', 100, 1,10) - pt.gas.temperature = 500+T0C - pt.ignite() - - diff --git a/code/unused/airtunnel.dm b/code/unused/airtunnel.dm deleted file mode 100644 index 94326379460..00000000000 --- a/code/unused/airtunnel.dm +++ /dev/null @@ -1,463 +0,0 @@ -/obj/machinery/sec_lock//P'sure this was part of the tunnel - name = "Security Pad" - desc = "A lock, for doors. Used by security." - icon = 'icons/obj/stationobjs.dmi' - icon_state = "sec_lock" - var/obj/item/weapon/card/id/scan = null - var/a_type = 0.0 - var/obj/machinery/door/d1 = null - var/obj/machinery/door/d2 = null - anchored = 1.0 - req_access = list(access_brig) - use_power = 1 - idle_power_usage = 2 - active_power_usage = 4 - -/obj/move/airtunnel/process() - if (!( src.deployed )) - return null - else - ..() - return - -/obj/move/airtunnel/connector/create() - src.current = src - src.next = new /obj/move/airtunnel( null ) - src.next.master = src.master - src.next.previous = src - spawn( 0 ) - src.next.create(airtunnel_start - airtunnel_stop, src.y) - return - return - -/obj/move/airtunnel/connector/wall/create() - src.current = src - src.next = new /obj/move/airtunnel/wall( null ) - src.next.master = src.master - src.next.previous = src - spawn( 0 ) - src.next.create(airtunnel_start - airtunnel_stop, src.y) - return - return - -/obj/move/airtunnel/connector/wall/process() - return - -/obj/move/airtunnel/wall/create(num, y_coord) - if (((num < 7 || (num > 16 && num < 23)) && y_coord == airtunnel_bottom)) - src.next = new /obj/move/airtunnel( null ) - else - src.next = new /obj/move/airtunnel/wall( null ) - src.next.master = src.master - src.next.previous = src - if (num > 1) - spawn( 0 ) - src.next.create(num - 1, y_coord) - return - return - -/obj/move/airtunnel/wall/move_right() - flick("wall-m", src) - return ..() - -/obj/move/airtunnel/wall/move_left() - flick("wall-m", src) - return ..() - -/obj/move/airtunnel/wall/process() - return - -/obj/move/airtunnel/proc/move_left() - src.relocate(get_step(src, WEST)) - if ((src.next && src.next.deployed)) - return src.next.move_left() - else - return src.next - return - -/obj/move/airtunnel/proc/move_right() - src.relocate(get_step(src, EAST)) - if ((src.previous && src.previous.deployed)) - src.previous.move_right() - return src.previous - -/obj/move/airtunnel/proc/create(num, y_coord) - if (y_coord == airtunnel_bottom) - if ((num < 7 || (num > 16 && num < 23))) - src.next = new /obj/move/airtunnel( null ) - else - src.next = new /obj/move/airtunnel/wall( null ) - else - src.next = new /obj/move/airtunnel( null ) - src.next.master = src.master - src.next.previous = src - if (num > 1) - spawn( 0 ) - src.next.create(num - 1, y_coord) - return - return - -/obj/machinery/at_indicator/ex_act(severity) - switch(severity) - if(1.0) - del(src) - return - if(2.0) - if (prob(50)) - for(var/x in src.verbs) - src.verbs -= x - src.icon_state = "reader_broken" - stat |= BROKEN - if(3.0) - if (prob(25)) - for(var/x in src.verbs) - src.verbs -= x - src.icon_state = "reader_broken" - stat |= BROKEN - else - return - -/obj/machinery/at_indicator/blob_act() - if (prob(75)) - for(var/x in src.verbs) - src.verbs -= x - src.icon_state = "reader_broken" - stat |= BROKEN - -/obj/machinery/at_indicator/proc/update_icon() - if(stat & (BROKEN|NOPOWER)) - icon_state = "reader_broken" - return - - var/status = 0 - if (SS13_airtunnel.operating == 1) - status = "r" - else - if (SS13_airtunnel.operating == 2) - status = "e" - else - if(!SS13_airtunnel.connectors) - return - var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors) - if (C.current == C) - status = 0 - else - if (!( C.current.next )) - status = 2 - else - status = 1 - src.icon_state = text("reader[][]", (SS13_airtunnel.siphon_status == 2 ? "1" : "0"), status) - return - -/obj/machinery/at_indicator/process() - if(stat & (NOPOWER|BROKEN)) - src.update_icon() - return - use_power(5, ENVIRON) - src.update_icon() - return - -/obj/machinery/computer/airtunnel/attack_paw(user as mob) - return src.attack_hand(user) - -obj/machinery/computer/airtunnel/attack_ai(user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/airtunnel/attack_hand(var/mob/user as mob) - if(..()) - return - - var/dat = "Air Tunnel Controls
" - user.machine = src - if (SS13_airtunnel.operating == 1) - dat += "Status: RETRACTING
" - else - if (SS13_airtunnel.operating == 2) - dat += "Status: EXPANDING
" - else - var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors) - if (C.current == C) - dat += "Status: Fully Retracted
" - else - if (!( C.current.next )) - dat += "Status: Fully Extended
" - else - dat += "Status: Stopped Midway
" - dat += text("Retract Stop Extend
", src, src, src) - dat += text("
Air Level: []
", (SS13_airtunnel.air_stat ? "Acceptable" : "DANGEROUS")) - dat += "Air System Status: " - switch(SS13_airtunnel.siphon_status) - if(0.0) - dat += "Stopped " - if(1.0) - dat += "Siphoning (Siphons only) " - if(2.0) - dat += "Regulating (BOTH) " - if(3.0) - dat += "RELEASING MAX (Siphons only) " - else - dat += text("(Refresh)
", src) - dat += text("RELEASE (Siphons only) Siphon (Siphons only) Stop Regulate
", src, src, src, src) - dat += text("

Close
", user) - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") - return - -/obj/machinery/computer/airtunnel/proc/update_icon() - if(stat & BROKEN) - icon_state = "broken" - return - - if(stat & NOPOWER) - icon_state = "c_unpowered" - return - - var/status = 0 - if (SS13_airtunnel.operating == 1) - status = "r" - else - if (SS13_airtunnel.operating == 2) - status = "e" - else - var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors) - if (C.current == C) - status = 0 - else - if (!( C.current.next )) - status = 2 - else - status = 1 - src.icon_state = text("console[][]", (SS13_airtunnel.siphon_status >= 2 ? "1" : "0"), status) - return - -/obj/machinery/computer/airtunnel/process() - src.update_icon() - if(stat & (NOPOWER|BROKEN)) - return - use_power(250) - src.updateUsrDialog() - return - -/obj/machinery/computer/airtunnel/Topic(href, href_list) - if(..()) - return - - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))) - usr.machine = src - if (href_list["retract"]) - SS13_airtunnel.retract() - else if (href_list["stop"]) - SS13_airtunnel.operating = 0 - else if (href_list["extend"]) - SS13_airtunnel.extend() - else if (href_list["release"]) - SS13_airtunnel.siphon_status = 3 - SS13_airtunnel.siphons() - else if (href_list["siphon"]) - SS13_airtunnel.siphon_status = 1 - SS13_airtunnel.siphons() - else if (href_list["stop_siph"]) - SS13_airtunnel.siphon_status = 0 - SS13_airtunnel.siphons() - else if (href_list["auto"]) - SS13_airtunnel.siphon_status = 2 - SS13_airtunnel.siphons() - else if (href_list["refresh"]) - SS13_airtunnel.siphons() - - src.add_fingerprint(usr) - src.updateUsrDialog() - return - - -/obj/machinery/sec_lock/attack_ai(user as mob) - return src.attack_hand(user) - -/obj/machinery/sec_lock/attack_paw(user as mob) - return src.attack_hand(user) - -/obj/machinery/sec_lock/attack_hand(var/mob/user as mob) - if(..()) - return - use_power(10) - - if (src.loc == user.loc) - var/dat = text("Security Pad:
\nKeycard: []
\nToggle Outer Door
\nToggle Inner Door
\n
\nEmergency Close
\nEmergency Open
", (src.scan ? text("[]", src, src.scan.name) : text("-----", src)), src, src, src, src) - user << browse(dat, "window=sec_lock") - onclose(user, "sec_lock") - return - -/obj/machinery/sec_lock/attackby(nothing, user as mob) - return src.attack_hand(user) - -/obj/machinery/sec_lock/New() - ..() - spawn( 2 ) - if (src.a_type == 1) - src.d2 = locate(/obj/machinery/door, locate(src.x - 2, src.y - 1, src.z)) - src.d1 = locate(/obj/machinery/door, get_step(src, SOUTHWEST)) - else - if (src.a_type == 2) - src.d2 = locate(/obj/machinery/door, locate(src.x - 2, src.y + 1, src.z)) - src.d1 = locate(/obj/machinery/door, get_step(src, NORTHWEST)) - else - src.d1 = locate(/obj/machinery/door, get_step(src, SOUTH)) - src.d2 = locate(/obj/machinery/door, get_step(src, SOUTHEAST)) - return - return - -/obj/machinery/sec_lock/Topic(href, href_list) - if(..()) - return - if ((!( src.d1 ) || !( src.d2 ))) - usr << "\red Error: Cannot interface with door security!" - return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))) - usr.machine = src - if (href_list["card"]) - if (src.scan) - src.scan.loc = src.loc - src.scan = null - else - var/obj/item/weapon/card/id/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/id)) - usr.drop_item() - I.loc = src - src.scan = I - if (href_list["door1"]) - if (src.scan) - if (src.check_access(src.scan)) - if (src.d1.density) - spawn( 0 ) - src.d1.open() - return - else - spawn( 0 ) - src.d1.close() - return - if (href_list["door2"]) - if (src.scan) - if (src.check_access(src.scan)) - if (src.d2.density) - spawn( 0 ) - src.d2.open() - return - else - spawn( 0 ) - src.d2.close() - return - if (href_list["em_cl"]) - if (src.scan) - if (src.check_access(src.scan)) - if (!( src.d1.density )) - src.d1.close() - return - sleep(1) - spawn( 0 ) - if (!( src.d2.density )) - src.d2.close() - return - if (href_list["em_op"]) - if (src.scan) - if (src.check_access(src.scan)) - spawn( 0 ) - if (src.d1.density) - src.d1.open() - return - sleep(1) - spawn( 0 ) - if (src.d2.density) - src.d2.open() - return - src.add_fingerprint(usr) - src.updateUsrDialog() - return - -/datum/air_tunnel/air_tunnel1/New() - ..() - for(var/obj/move/airtunnel/A in locate(/area/airtunnel1)) - A.master = src - A.create() - src.connectors += A - //Foreach goto(21) - return - -/datum/air_tunnel/proc/siphons() - switch(src.siphon_status) - if(0.0) - for(var/obj/machinery/atmoalter/siphs/S in locate(/area/airtunnel1)) - S.t_status = 3 - if(1.0) - for(var/obj/machinery/atmoalter/siphs/fullairsiphon/S in locate(/area/airtunnel1)) - S.t_status = 2 - S.t_per = 1000000.0 - for(var/obj/machinery/atmoalter/siphs/scrubbers/S in locate(/area/airtunnel1)) - S.t_status = 3 - if(2.0) - for(var/obj/machinery/atmoalter/siphs/S in locate(/area/airtunnel1)) - S.t_status = 4 - if(3.0) - for(var/obj/machinery/atmoalter/siphs/fullairsiphon/S in locate(/area/airtunnel1)) - S.t_status = 1 - S.t_per = 1000000.0 - for(var/obj/machinery/atmoalter/siphs/scrubbers/S in locate(/area/airtunnel1)) - S.t_status = 3 - else - return - -/datum/air_tunnel/proc/stop() - src.operating = 0 - return - -/datum/air_tunnel/proc/extend() - if (src.operating) - return - - spawn(0) - src.operating = 2 - while(src.operating == 2) - var/ok = 1 - for(var/obj/move/airtunnel/connector/A in src.connectors) - if (!( A.current.next )) - src.operating = 0 - return - if (!( A.move_left() )) - ok = 0 - if (!( ok )) - src.operating = 0 - else - for(var/obj/move/airtunnel/connector/A in src.connectors) - if (A.current) - A.current.next.loc = get_step(A.current.loc, EAST) - A.current = A.current.next - A.current.deployed = 1 - else - src.operating = 0 - sleep(20) - return - -/datum/air_tunnel/proc/retract() - if (src.operating) - return - spawn(0) - src.operating = 1 - while(src.operating == 1) - var/ok = 1 - for(var/obj/move/airtunnel/connector/A in src.connectors) - if (A.current == A) - src.operating = 0 - return - if (A.current) - A.current.loc = null - A.current.deployed = 0 - A.current = A.current.previous - else - ok = 0 - if (!( ok )) - src.operating = 0 - else - for(var/obj/move/airtunnel/connector/A in src.connectors) - if (!( A.current.move_right() )) - src.operating = 0 - sleep(20) - return \ No newline at end of file diff --git a/code/unused/alien_embryo.dm b/code/unused/alien_embryo.dm deleted file mode 100644 index 25dfc3fb292..00000000000 --- a/code/unused/alien_embryo.dm +++ /dev/null @@ -1,152 +0,0 @@ -//affected_mob.contract_disease(new /datum/disease/alien_embryo) - -//cael - retained this file for legacy reference, see code\modules\mob\living\carbon\alien\special\alien_embryo.dm for replacement - -//Our own special process so that dead hosts still chestburst -/datum/disease/alien_embryo/process() - if(!holder) return - if(holder == affected_mob) - stage_act() - if(affected_mob) - if(affected_mob.stat == DEAD) - if(prob(50)) - if(--longevity<=0) - cure(0) - else //the virus is in inanimate obj - cure(0) - return - -/datum/disease/alien_embryo/New() - ..() - /* Special Hud for xenos */ - spawn(0) - if (affected_mob) - AddInfectionImages(affected_mob) - -/datum/disease/alien_embryo/cure(var/resistance=1) - ..() - spawn(0) - if (affected_mob) - RemoveInfectionImages(affected_mob) - -/datum/disease/alien_embryo - name = "Unidentified Foreign Body" - max_stages = 5 - spread = "None" - spread_type = SPECIAL - cure = "Unknown" - cure_id = list("lexorin","toxin","gargleblaster") - cure_chance = 50 - affected_species = list("Human", "Monkey") - permeability_mod = 15//likely to infect - can_carry = 0 - stage_prob = 3 - var/gibbed = 0 - -/datum/disease/alien_embryo/stage_act() - ..() - switch(stage) - if(2, 3) - if(prob(1)) - affected_mob.emote("sneeze") - if(prob(1)) - affected_mob.emote("cough") - if(prob(1)) - affected_mob << "\red Your throat feels sore." - if(prob(1)) - affected_mob << "\red Mucous runs down the back of your throat." - if(4) - if(prob(1)) - affected_mob.emote("sneeze") - if(prob(1)) - affected_mob.emote("cough") - if(prob(2)) - affected_mob << "\red Your muscles ache." - if(prob(20)) - affected_mob.take_organ_damage(1) - if(prob(2)) - affected_mob << "\red Your stomach hurts." - if(prob(20)) - affected_mob.adjustToxLoss(1) - affected_mob.updatehealth() - if(5) - affected_mob << "\red You feel something tearing its way out of your stomach..." - affected_mob.adjustToxLoss(10) - affected_mob.updatehealth() - if(prob(50)) - if(gibbed != 0) return 0 - var/list/candidates = get_alien_candidates() - var/picked = null - - // To stop clientless larva, we will check that our host has a client - // if we find no ghosts to become the alien. If the host has a client - // he will become the alien but if he doesn't then we will set the stage - // to 2, so we don't do a process heavy check everytime. - - if(candidates.len) - picked = pick(candidates) - else if(affected_mob.client) - picked = affected_mob.key - else - stage = 2 // Let's try again later. - return - - var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc) - new_xeno.key = picked - new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention - affected_mob.gib() - src.cure(0) - gibbed = 1 - return - -/datum/disease/alien_embryo/stage_change(var/old_stage) - RefreshInfectionImage() - -/*---------------------------------------- -Proc: RefreshInfectionImage() -Des: Removes all infection images from aliens and places an infection image on all infected mobs for aliens. -----------------------------------------*/ -/datum/disease/alien_embryo/proc/RefreshInfectionImage() - spawn(0) - for (var/mob/living/carbon/alien/alien in player_list) - if (alien.client) - for(var/image/I in alien.client.images) - if(dd_hasprefix_case(I.icon_state, "infected")) - del(I) - - for (var/mob/living/carbon/alien/alien in player_list) - if (alien.client) - for (var/mob/living/carbon/C in mob_list) - if(C) - if (C.status_flags & XENO_HOST) - var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[stage]") - alien.client.images += I - return - -/*---------------------------------------- -Proc: AddInfectionImages(C) -Des: Checks if the passed mob (C) is infected with the alien egg, then gives each alien client an infected image at C. -----------------------------------------*/ -/datum/disease/alien_embryo/proc/AddInfectionImages(var/mob/living/carbon/C) - if (C) - for (var/mob/living/carbon/alien/alien in player_list) - if (alien.client) - if (C.status_flags & XENO_HOST) - var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[stage]") - alien.client.images += I - return - -/*---------------------------------------- -Proc: RemoveInfectionImage(C) -Des: Removes the alien infection image from all aliens in the world located in passed mob (C). -----------------------------------------*/ - -/datum/disease/alien_embryo/proc/RemoveInfectionImages(var/mob/living/carbon/C) - if (C) - for (var/mob/living/carbon/alien/alien in player_list) - if (alien.client) - for(var/image/I in alien.client.images) - if(I.loc == C) - if(dd_hasprefix_case(I.icon_state, "infected")) - del(I) - return diff --git a/code/unused/assemblies.dm b/code/unused/assemblies.dm deleted file mode 100644 index 52e48f700c4..00000000000 --- a/code/unused/assemblies.dm +++ /dev/null @@ -1,951 +0,0 @@ -/*/obj/item/assembly - name = "assembly" - icon = 'icons/obj/assemblies.dmi' - item_state = "assembly" - var/status = 0.0 - throwforce = 10 - w_class = 3.0 - throw_speed = 3 - throw_range = 7 - -/obj/item/assembly/a_i_a - name = "Health-Analyzer/Igniter/Armor Assembly" - desc = "A health-analyzer, igniter and armor assembly." - icon_state = "armor-igniter-analyzer" - var/obj/item/device/healthanalyzer/part1 = null - var/obj/item/device/igniter/part2 = null - var/obj/item/clothing/suit/armor/vest/part3 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/m_i_ptank - desc = "A very intricate igniter and proximity sensor electrical assembly mounted onto top of a plasma tank." - name = "Proximity/Igniter/Plasma Tank Assembly" - icon_state = "prox-igniter-tank0" - var/obj/item/device/prox_sensor/part1 = null - var/obj/item/device/igniter/part2 = null - var/obj/item/weapon/tank/plasma/part3 = null - status = 0.0 - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/prox_ignite - name = "Proximity/Igniter Assembly" - desc = "A proximity-activated igniter assembly." - icon_state = "prox-igniter0" - var/obj/item/device/prox_sensor/part1 = null - var/obj/item/device/igniter/part2 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/r_i_ptank - desc = "A very intricate igniter and signaller electrical assembly mounted onto top of a plasma tank." - name = "Radio/Igniter/Plasma Tank Assembly" - icon_state = "radio-igniter-tank" - var/obj/item/device/radio/signaler/part1 = null - var/obj/item/device/igniter/part2 = null - var/obj/item/weapon/tank/plasma/part3 = null - status = 0.0 - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/anal_ignite - name = "Health-Analyzer/Igniter Assembly" - desc = "A health-analyzer igniter assembly." - icon_state = "timer-igniter0" - var/obj/item/device/healthanalyzer/part1 = null - var/obj/item/device/igniter/part2 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT - item_state = "electronic" - -/obj/item/assembly/time_ignite - name = "Timer/Igniter Assembly" - desc = "A timer-activated igniter assembly." - icon_state = "timer-igniter0" - var/obj/item/device/timer/part1 = null - var/obj/item/device/igniter/part2 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/t_i_ptank - desc = "A very intricate igniter and timer assembly mounted onto top of a plasma tank." - name = "Timer/Igniter/Plasma Tank Assembly" - icon_state = "timer-igniter-tank0" - var/obj/item/device/timer/part1 = null - var/obj/item/device/igniter/part2 = null - var/obj/item/weapon/tank/plasma/part3 = null - status = 0.0 - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/rad_ignite - name = "Radio/Igniter Assembly" - desc = "A radio-activated igniter assembly." - icon_state = "radio-igniter" - var/obj/item/device/radio/signaler/part1 = null - var/obj/item/device/igniter/part2 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/rad_infra - name = "Signaller/Infrared Assembly" - desc = "An infrared-activated radio signaller" - icon_state = "infrared-radio0" - var/obj/item/device/radio/signaler/part1 = null - var/obj/item/device/infra/part2 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/rad_prox - name = "Signaller/Prox Sensor Assembly" - desc = "A proximity-activated radio signaller." - icon_state = "prox-radio0" - var/obj/item/device/radio/signaler/part1 = null - var/obj/item/device/prox_sensor/part2 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/rad_time - name = "Signaller/Timer Assembly" - desc = "A radio signaller activated by a count-down timer." - icon_state = "timer-radio0" - var/obj/item/device/radio/signaler/part1 = null - var/obj/item/device/timer/part2 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT -*/ - -/obj/item/assembly/time_ignite/premade/New() - ..() - part1 = new(src) - part2 = new(src) - part1.master = src - part2.master = src - //part2.status = 0 - -/obj/item/assembly/time_ignite/Delete() - del(part1) - del(part2) - ..() - -/obj/item/assembly/time_ignite/attack_self(mob/user as mob) - if (src.part1) - src.part1.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/time_ignite/receive_signal() - if (!status) - return - for(var/mob/O in hearers(1, src.loc)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - src.part2.Activate() - return - -/obj/effect/decal/ash/attack_hand(mob/user as mob) - usr << "\blue The ashes slip through your fingers." - del(src) - return - -/obj/item/assembly/time_ignite/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part1.master = null - src.part1 = null - src.part2.loc = T - src.part2.master = null - src.part2 = null - - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The timer is now secured!", 1) - else - user.show_message("\blue The timer is now unsecured!", 1) - src.part2.secured = src.status - src.add_fingerprint(user) - return - -/obj/item/assembly/time_ignite/c_state(n) - src.icon_state = text("timer-igniter[]", n) - return - -//*********** - -/obj/item/assembly/anal_ignite/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part1.master = null - src.part1 = null - src.part2.loc = T - src.part2.master = null - src.part2 = null - - del(src) - return - if (( istype(W, /obj/item/weapon/screwdriver) )) - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The analyzer is now secured!", 1) - else - user.show_message("\blue The analyzer is now unsecured!", 1) - src.part2.secured = src.status - src.add_fingerprint(user) - if(( istype(W, /obj/item/clothing/suit/armor/vest) ) && src.status) - var/obj/item/assembly/a_i_a/R = new - R.part1 = part1 - R.part1.master = R - part1 = null - - R.part2 = part2 - R.part2.master = R - part2 = null - - user.put_in_hand(R) - user.unEquip(W) - R.part3 = W - R.part3.master = R - del(src) - -/* WTF THIS SHIT? It is working? Shouldn't. --rastaf0 - W.loc = R - R.part1 = W - R.part2 = W - W.layer = initial(W.layer) - if (user.client) - user.client.screen -= W - if (user.r_hand == W) - user.unEquip(W) - user.r_hand = R - else - user.unEquip(W) - user.l_hand = R - W.master = R - src.master = R - src.layer = initial(src.layer) - user.unEquip(src) - if (user.client) - user.client.screen -= src - src.loc = R - R.part3 = src - R.layer = 20 - R.loc = user - src.add_fingerprint(user) -*/ - return -/* else if ((istype(W, /obj/item/device/timer) && !( src.status ))) - - var/obj/item/assembly/time_ignite/R = new /obj/item/assembly/time_ignite( user ) - W.loc = R - R.part1 = W - W.layer = initial(W.layer) - if (user.client) - user.client.screen -= W - if (user.r_hand == W) - user.unEquip(W) - user.r_hand = R - else - user.unEquip(W) - user.l_hand = R - W.master = R - src.master = R - src.layer = initial(src.layer) - user.unEquip(src) - if (user.client) - user.client.screen -= src - src.loc = R - R.part2 = src - R.layer = 20 - R.loc = user - src.add_fingerprint(user) -*/ - -/obj/item/assembly/proc/c_state(n, O as obj) - return - -/obj/item/assembly/a_i_a/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part1.master = null - src.part1 = null - src.part2.loc = T - src.part2.master = null - src.part2 = null - src.part3.loc = T - src.part3.master = null - src.part3 = null - - del(src) - return - if (( istype(W, /obj/item/weapon/screwdriver) )) - if (!src.status && (!part1||!part2||!part3)) - user << "\red You cannot finish the assembly, not all components are in place!" - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The armor is now secured!", 1) - else - user.show_message("\blue The armor is now unsecured!", 1) - src.add_fingerprint(user) - -/obj/item/assembly/a_i_a/Delete() - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - del(src.part3) - ..() - return -//***** - -/obj/item/assembly/rad_time/Delete() - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - ..() - return - -/obj/item/assembly/rad_time/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part2.loc = T - src.part1.master = null - src.part2.master = null - src.part1 = null - src.part2 = null - //SN src = null - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The signaler is now secured!", 1) - else - user.show_message("\blue The signaler is now unsecured!", 1) - src.part1.b_stat = !( src.status ) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_time/attack_self(mob/user as mob) - src.part1.attack_self(user, src.status) - src.part2.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_time/receive_signal(datum/signal/signal) - if (signal.source == src.part2) - src.part1.send_signal("ACTIVATE") - return -//******************* -/obj/item/assembly/rad_prox/c_state(n) - src.icon_state = "prox-radio[n]" - return - -/obj/item/assembly/rad_prox/Delete() - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - ..() - return - -/obj/item/assembly/rad_prox/HasProximity(atom/movable/AM as mob|obj) - if (istype(AM, /obj/effect/beam)) - return - if (AM.move_speed < 12) - src.part2.sense() - return - -/obj/item/assembly/rad_prox/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part2.loc = T - src.part1.master = null - src.part2.master = null - src.part1 = null - src.part2 = null - //SN src = null - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The proximity sensor is now secured!", 1) - else - user.show_message("\blue The proximity sensor is now unsecured!", 1) - src.part1.b_stat = !( src.status ) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_prox/attack_self(mob/user as mob) - src.part1.attack_self(user, src.status) - src.part2.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_prox/receive_signal(datum/signal/signal) - if (signal.source == src.part2) - src.part1.send_signal("ACTIVATE") - return - -/obj/item/assembly/rad_prox/Move() - ..() - src.part2.sense() - return - -/obj/item/assembly/rad_prox/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/item/assembly/rad_prox/dropped() - spawn( 0 ) - src.part2.sense() - return - return -//************************ -/obj/item/assembly/rad_infra/c_state(n) - src.icon_state = text("infrared-radio[]", n) - return - -/obj/item/assembly/rad_infra/Delete() - del(src.part1) - del(src.part2) - ..() - return - -/obj/item/assembly/rad_infra/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part2.loc = T - src.part1.master = null - src.part2.master = null - src.part1 = null - src.part2 = null - //SN src = null - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The infrared laser is now secured!", 1) - else - user.show_message("\blue The infrared laser is now unsecured!", 1) - src.part1.b_stat = !( src.status ) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_infra/attack_self(mob/user as mob) - src.part1.attack_self(user, src.status) - src.part2.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_infra/receive_signal(datum/signal/signal) - - if (signal.source == src.part2) - src.part1.send_signal("ACTIVATE") - return - -/obj/item/assembly/rad_infra/verb/rotate() - set name = "Rotate Assembly" - set category = "Object" - set src in usr - - src.dir = turn(src.dir, 90) - src.part2.dir = src.dir - src.add_fingerprint(usr) - return - -/obj/item/assembly/rad_infra/Move() - - var/t = src.dir - ..() - src.dir = t - //src.part2.first = null - del(src.part2.first) - return - -/obj/item/assembly/rad_infra/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/item/assembly/rad_infra/attack_hand(M) - del(src.part2.first) - ..() - return - -/obj/item/assembly/prox_ignite/HasProximity(atom/movable/AM as mob|obj) - - if (istype(AM, /obj/effect/beam)) - return - if (AM.move_speed < 12 && src.part1) - src.part1.sense() - return - -/obj/item/assembly/prox_ignite/dropped() - spawn( 0 ) - src.part1.sense() - return - return - -/obj/item/assembly/prox_ignite/Delete() - del(src.part1) - del(src.part2) - ..() - return - -/obj/item/assembly/prox_ignite/c_state(n) - src.icon_state = text("prox-igniter[]", n) - return - -/obj/item/assembly/prox_ignite/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part2.loc = T - src.part1.master = null - src.part2.master = null - src.part1 = null - src.part2 = null - //SN src = null - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The proximity sensor is now secured! The igniter now works!", 1) - else - user.show_message("\blue The proximity sensor is now unsecured! The igniter will not work.", 1) - src.part2.secured = src.status - src.add_fingerprint(user) - return - -/obj/item/assembly/prox_ignite/attack_self(mob/user as mob) - - if (src.part1) - src.part1.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/prox_ignite/receive_signal() - for(var/mob/O in hearers(1, src.loc)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - src.part2.Activate() - return - -/obj/item/assembly/rad_ignite/Delete() - del(src.part1) - del(src.part2) - ..() - return - - - -/obj/item/assembly/rad_ignite/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part2.loc = T - src.part1.master = null - src.part2.master = null - src.part1 = null - src.part2 = null - //SN src = null - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The radio is now secured! The igniter now works!", 1) - else - user.show_message("\blue The radio is now unsecured! The igniter will not work.", 1) - src.part2.secured = src.status - src.part1.b_stat = !( src.status ) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_ignite/attack_self(mob/user as mob) - - if (src.part1) - src.part1.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_ignite/receive_signal() - for(var/mob/O in hearers(1, src.loc)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - src.part2.Activate() - return - -/obj/item/assembly/m_i_ptank/c_state(n) - - src.icon_state = text("prox-igniter-tank[]", n) - return - -/obj/item/assembly/m_i_ptank/HasProximity(atom/movable/AM as mob|obj) - if (istype(AM, /obj/effect/beam)) - return - if (AM.move_speed < 12 && src.part1) - src.part1.sense() - return - - -//*****RM -/obj/item/assembly/m_i_ptank/Bump(atom/O) - spawn(0) - //world << "miptank bumped into [O]" - if(src.part1.secured) - //world << "sending signal" - receive_signal() - else - //world << "not active" - ..() - -/obj/item/assembly/m_i_ptank/proc/prox_check() - if(!part1 || !part1.secured) - return - for(var/atom/A in view(1, src.loc)) - if(A!=src && !istype(A, /turf/space) && !isarea(A)) - //world << "[A]:[A.type] was sensed" - src.part1.sense() - break - - spawn(10) - prox_check() - - -//***** - - -/obj/item/assembly/m_i_ptank/dropped() - - spawn( 0 ) - part1.sense() - return - return - -/obj/item/assembly/m_i_ptank/examine() - ..() - part3.examine() - -/obj/item/assembly/m_i_ptank/Delete() - - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - //src.part3 = null - del(src.part3) - ..() - return - -/obj/item/assembly/m_i_ptank/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if (istype(W, /obj/item/device/analyzer)) - src.part3.attackby(W, user) - return - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/obj/item/assembly/prox_ignite/R = new(get_turf(src.loc)) - R.part1 = src.part1 - R.part1.master = R - R.part1.loc = R - R.part2 = src.part2 - R.part2.master = R - R.part2.loc = R - if (user.get_inactive_hand()==src) - user.put_in_inactive_hand(part3) - else - part3.loc = src.loc - src.part1 = null - src.part2 = null - src.part3 = null - del(src) - return - if (!( istype(W, /obj/item/weapon/weldingtool)&&W:welding )) - return - if (!( src.status )) - src.status = 1 - bombers += "[key_name(user)] welded a prox bomb. Temp: [src.part3.air_contents.temperature-T0C]" - message_admins("[key_name_admin(user)] welded a prox bomb. Temp: [src.part3.air_contents.temperature-T0C]") - user.show_message("\blue A pressure hole has been bored to the plasma tank valve. The plasma tank can now be ignited.", 1) - else - src.status = 0 - bombers += "[key_name(user)] unwelded a prox bomb. Temp: [src.part3.air_contents.temperature-T0C]" - user << "\blue The hole has been closed." - src.part2.secured = src.status - src.add_fingerprint(user) - return - -/obj/item/assembly/m_i_ptank/attack_self(mob/user as mob) - - playsound(src.loc, 'sound/weapons/armbomb.ogg', 100, 1) - src.part1.attack_self(user, 1) - src.add_fingerprint(user) - return - -/obj/item/assembly/m_i_ptank/receive_signal() - //world << "miptank [src] got signal" - for(var/mob/O in hearers(1, null)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - //Foreach goto(19) - - if ((src.status && prob(90))) - //world << "sent ignite() to [src.part3]" - src.part3.ignite() - else - if(!src.status) - src.part3.release() - src.part1.secured = 0.0 - - return - -/obj/item/assembly/m_i_ptank/emp_act(severity) - - if(istype(part3,/obj/item/weapon/tank/plasma) && prob(100/severity)) - part3.ignite() - ..() - -//*****RM - -/obj/item/assembly/t_i_ptank/c_state(n) - - src.icon_state = text("timer-igniter-tank[]", n) - return - -/obj/item/assembly/t_i_ptank/examine() - ..() - src.part3.examine() - -/obj/item/assembly/t_i_ptank/Delete() - - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - //src.part3 = null - del(src.part3) - ..() - return - -/obj/item/assembly/t_i_ptank/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - - if (istype(W, /obj/item/device/analyzer)) - src.part3.attackby(W, user) - return - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/obj/item/assembly/time_ignite/R = new(get_turf(src.loc)) - R.part1 = src.part1 - R.part1.master = R - R.part1.loc = R - R.part2 = src.part2 - R.part2.master = R - R.part2.loc = R - if (user.get_inactive_hand()==src) - user.put_in_inactive_hand(part3) - else - part3.loc = src.loc - src.part1 = null - src.part2 = null - src.part3 = null - del(src) - return - if (!( istype(W, /obj/item/weapon/weldingtool) && W:welding)) - return - if (!( src.status )) - src.status = 1 - bombers += "[key_name(user)] welded a time bomb. Temp: [src.part3.air_contents.temperature-T0C]" - message_admins("[key_name_admin(user)] welded a time bomb. Temp: [src.part3.air_contents.temperature-T0C]") - user.show_message("\blue A pressure hole has been bored to the plasma tank valve. The plasma tank can now be ignited.", 1) - else - if(src) - src.status = 0 - bombers += "[key_name(user)] unwelded a time bomb. Temp: [src.part3.air_contents.temperature-T0C]" - user << "\blue The hole has been closed." - src.part2.secured = src.status - src.add_fingerprint(user) - return - -/obj/item/assembly/t_i_ptank/attack_self(mob/user as mob) - - src.part1.attack_self(user, 1) - playsound(src.loc, 'sound/weapons/armbomb.ogg', 100, 1) - src.add_fingerprint(user) - return - -/obj/item/assembly/t_i_ptank/receive_signal() - //world << "tiptank [src] got signal" - for(var/mob/O in hearers(1, null)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - //Foreach goto(19) - if ((src.status && prob(90))) - //world << "sent ignite() to [src.part3]" - src.part3.ignite() - else - if(!src.status) - src.part3.release() - return - -/obj/item/assembly/t_i_ptank/emp_act(severity) - if(istype(part3,/obj/item/weapon/tank/plasma) && prob(100/severity)) - part3.ignite() - ..() - -/obj/item/assembly/r_i_ptank/examine() - ..() - src.part3.examine() - -/obj/item/assembly/r_i_ptank/Delete() - - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - //src.part3 = null - del(src.part3) - ..() - return - -/obj/item/assembly/r_i_ptank/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - - if (istype(W, /obj/item/device/analyzer)) - src.part3.attackby(W, user) - return - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/obj/item/assembly/rad_ignite/R = new(get_turf(src.loc)) - R.part1 = src.part1 - R.part1.master = R - R.part1.loc = R - R.part2 = src.part2 - R.part2.master = R - R.part2.loc = R - if (user.get_inactive_hand()==src) - user.put_in_inactive_hand(part3) - else - part3.loc = src.loc - src.part1 = null - src.part2 = null - src.part3 = null - del(src) - return - if (!( istype(W, /obj/item/weapon/weldingtool) && W:welding )) - return - if (!( src.status )) - src.status = 1 - bombers += "[key_name(user)] welded a radio bomb. Temp: [src.part3.air_contents.temperature-T0C]" - message_admins("[key_name_admin(user)] welded a radio bomb. Temp: [src.part3.air_contents.temperature-T0C]") - user.show_message("\blue A pressure hole has been bored to the plasma tank valve. The plasma tank can now be ignited.", 1) - else - src.status = 0 - bombers += "[key_name(user)] unwelded a radio bomb. Temp: [src.part3.air_contents.temperature-T0C]" - user << "\blue The hole has been closed." - src.part2.secured = src.status - src.part1.b_stat = !( src.status ) - src.add_fingerprint(user) - return - -/obj/item/assembly/r_i_ptank/emp_act(severity) - if(istype(part3,/obj/item/weapon/tank/plasma) && prob(100/severity)) - part3.ignite() - ..() - - -/obj/item/clothing/suit/armor/a_i_a_ptank/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if (istype(W, /obj/item/device/analyzer)) - src.part4.attackby(W, user) - return - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/obj/item/assembly/a_i_a/R = new(get_turf(src.loc)) - R.part1 = src.part1 - R.part1.master = R - R.part1.loc = R - R.part2 = src.part2 - R.part2.master = R - R.part2.loc = R - R.part3 = src.part3 - R.part3.master = R - R.part3.loc = R - if (user.get_inactive_hand()==src) - user.put_in_inactive_hand(part4) - else - part4.loc = src.loc - src.part1 = null - src.part2 = null - src.part3 = null - src.part4 = null - del(src) - return - if (( istype(W, /obj/item/weapon/weldingtool) && W:welding)) - return - if (!( src.status )) - src.status = 1 - bombers += "[key_name(user)] welded a suicide bomb. Temp: [src.part4.air_contents.temperature-T0C]" - message_admins("[key_name_admin(user)] welded a suicide bomb. Temp: [src.part4.air_contents.temperature-T0C]") - user.show_message("\blue A pressure hole has been bored to the plasma tank valve. The plasma tank can now be ignited.", 1) - else - src.status = 0 - bombers += "[key_name(user)] unwelded a suicide bomb. Temp: [src.part4.air_contents.temperature-T0C]" - user << "\blue The hole has been closed." -// src.part3.status = src.status - src.add_fingerprint(user) - return - -/obj/item/assembly/r_i_ptank/attack_self(mob/user as mob) - playsound(src.loc, 'sound/weapons/armbomb.ogg', 100, 1) - src.part1.attack_self(user, 1) - src.add_fingerprint(user) - return - -/obj/item/assembly/r_i_ptank/receive_signal() - //world << "riptank [src] got signal" - for(var/mob/O in hearers(1, null)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - //Foreach goto(19) - if ((src.status && prob(90))) - //world << "sent ignite() to [src.part3]" - src.part3.ignite() - else - if(!src.status) - src.part3.release() - return - - -//*****RM \ No newline at end of file diff --git a/code/unused/asteroiddevice.dm b/code/unused/asteroiddevice.dm deleted file mode 100644 index 50a6cf7aaeb..00000000000 --- a/code/unused/asteroiddevice.dm +++ /dev/null @@ -1,105 +0,0 @@ -/obj/item/device/gps - name = "GPS" - icon = 'icons/obj/device.dmi' - icon_state = "pinoff" - flags = FPRINT | TABLEPASS| CONDUCT - slot_flags = SLOT_BELT - w_class = 2.0 - item_state = "electronic" - throw_speed = 3 - throw_range = 7 - m_amt = 500 - var/obj/effect/ship_landing_beacon/beacon = null - var/active = 0 - - attack_self() - if(!active) - active = 1 - work() - usr << "\blue You activate the GPS" - else - active = 0 - icon_state = "pinoff" - usr << "\blue You deactivate the GPS" - - proc/work() - while(active) - if(!beacon) - for(var/obj/effect/ship_landing_beacon/B in world) - if(B.name == "Beacon - SS13") - beacon = B - break - - if(!beacon) - usr << "\red Unable to detect beacon signal." - active = 0 - icon_state = "pinonnull" - return - - if(!istype(src.loc, /turf) && !istype(src.loc, /mob)) - usr << "\red Too much interference. Please hold the device in hand or place it on belt." - active = 0 - icon_state = "pinonnull" - return - - src.icon_state = "pinonfar" - - var/atom/cur_loc = src.loc - - if(cur_loc.z == beacon.z) - src.dir = get_dir(cur_loc,beacon) - else - var/list/beacon_global_loc = beacon.get_global_map_pos() - var/list/src_global_loc = cur_loc.get_global_map_pos() - if(beacon_global_loc && src_global_loc) - var/hor_dir = 0 - var/ver_dir = 0 - if(beacon_global_loc["x"]>src_global_loc["x"]) - hor_dir = EAST - else if(beacon_global_loc["x"]src_global_loc["y"]) - ver_dir = NORTH - else if(beacon_global_loc["y"]Authorize command, sometimes the server will hiccup and not correctly authorize." - src << "\blue[no_auth_motd]" - src.authenticating = 0 -*/ - -/* The old goon auth/beta code is here -/client/proc/beta_tester_auth() - set name = "Tester?" - /*if(istester(src)) - src << "\blue Key accepted as beta tester" - else - src << "\redKey not accepted as beta tester. You may only observe the rounds. */ - -/client/proc/goonauth() - set name = "Goon?" - - if (src.authenticating) - return - - if(isgoon(src)) - src.goon = goon_keylist[src.ckey] - src.verbs -= /client/proc/goonauth - src << "Key authorized: Hello [goon_keylist[src.ckey]]!" - src << "\blue[auth_motd]" - return - - if (config.enable_authentication) //so that this verb isn't used when its goon only - if(src.authenticated && src.authenticated != 1) - src.goon = src.authenticated - src.verbs -= /client/proc/goonauth - src << "Key authorized: Hello [src.goon]!" - src << "\blue[auth_motd]" - else - src << "Please authorize first" - return - - src.authenticating = 1 - - spawn (rand(4, 18)) - var/result = world.Export("http://byond.lljk.net/status/?key=[src.ckey]") - var/success = 0 - - if(lowertext(result["STATUS"]) == "200 ok") - var/content = file2text(result["CONTENT"]) - - var/pos = findtext(content, " ") - var/code - var/account = "" - - if (!pos) - code = lowertext(content) - else - code = lowertext(copytext(content, 1, pos)) - account = copytext(content, pos + 1) - - if (code == "ok" && account) - src.verbs -= /client/proc/goonauth - src.goon = account - src << "Key authorized: Hello [html_encode(account)]!" - src << "\blue[auth_motd]" - success = 1 - goon_key(src.ckey, account) - - if (!success) - src.verbs += /client/proc/goonauth - //src << "Failed" - src << "\blue[no_auth_motd]" - - src.authenticating = 0 - -var/goon_keylist[0] -var/list/beta_tester_keylist - -/proc/beta_tester_loadfile() - beta_tester_keylist = new/list() - var/text = file2text("config/testers.txt") - if (!text) - diary << "Failed to load config/testers.txt\n" - else - var/list/lines = dd_text2list(text, "\n") - for(var/line in lines) - if (!line) - continue - - var/tester_key = copytext(line, 1, 0) - beta_tester_keylist.Add(tester_key) - - -/proc/goon_loadfile() - var/savefile/S=new("data/goon.goon") - S["key[0]"] >> goon_keylist - log_admin("Loading goon_keylist") - if (!length(goon_keylist)) - goon_keylist=list() - log_admin("goon_keylist was empty") - -/proc/goon_savefile() - var/savefile/S=new("data/goon.goon") - S["key[0]"] << goon_keylist - -/proc/goon_key(key as text,account as text) - var/ckey=ckey(key) - if (!goon_keylist.Find(ckey)) - goon_keylist.Add(ckey) - goon_keylist[ckey] = account - goon_savefile() - -/proc/isgoon(X) - if (istype(X,/mob)) X=X:ckey - if (istype(X,/client)) X=X:ckey - if ((ckey(X) in goon_keylist)) return 1 - else return 0 - -/proc/istester(X) - if (istype(X,/mob)) X=X:ckey - if (istype(X,/client)) X=X:ckey - if ((ckey(X) in beta_tester_keylist)) return 1 - else return 0 - -/proc/remove_goon(key as text) - var/ckey=ckey(key) - if (key && goon_keylist.Find(ckey)) - goon_keylist.Remove(ckey) - goon_savefile() - return 1 - return 0 -*/ \ No newline at end of file diff --git a/code/unused/beast/beast.dm b/code/unused/beast/beast.dm deleted file mode 100644 index aa016271530..00000000000 --- a/code/unused/beast/beast.dm +++ /dev/null @@ -1 +0,0 @@ -mob/living/carbon/beast \ No newline at end of file diff --git a/code/unused/beast/bodypart.dm b/code/unused/beast/bodypart.dm deleted file mode 100644 index 5f970317060..00000000000 --- a/code/unused/beast/bodypart.dm +++ /dev/null @@ -1,16 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 - -datum/bodypart - var/name = "unidentified bodypart" - var/health = 50 - -datum/bodypart/body - health = 100 - -datum/bodypart/head - health = 30 - -datum/bodypart/limb - -datum/bodypart/tail - health = 15 diff --git a/code/unused/beast/death.dm b/code/unused/beast/death.dm deleted file mode 100644 index a5ff611cb54..00000000000 --- a/code/unused/beast/death.dm +++ /dev/null @@ -1,13 +0,0 @@ -/* -var/mob/dead/phantasm/P = new (src.loc) -for(var/obj/O in src.contents) // Where src is a mob - if(istype(O, /obj/item)) // Only remember carried items (sanity checking, mostly) - src.unEquip(O) // Unequip the item if we're wearing it - if (src.client) - src.client.screen -= O // Clear out any overlays the item added, notably in the equip windows - O.loc = src.loc // Honestly not sure if these two steps are necessary - O.dropped(src) // but they seem to occur everywhere else in the code, so we're not taking any chances. - O.layer = initial(O.layer) - O.loc = P // Add the item to the phantasm's inventory -src.Death(0) -*/ \ No newline at end of file diff --git a/code/unused/biomass_rift.dm b/code/unused/biomass_rift.dm deleted file mode 100644 index e021d333971..00000000000 --- a/code/unused/biomass_rift.dm +++ /dev/null @@ -1,126 +0,0 @@ -/* -/obj/effect/biomass - icon = 'icons/obj/biomass.dmi' - icon_state = "stage1" - opacity = 0 - density = 0 - anchored = 1 - layer = 20 //DEBUG - var/health = 10 - var/stage = 1 - var/obj/effect/rift/originalRift = null //the originating rift of that biomass - var/maxDistance = 15 //the maximum length of a thread - var/newSpreadDistance = 10 //the length of a thread at which new ones are created - var/curDistance = 1 //the current length of a thread - var/continueChance = 3 //weighed chance of continuing in the same direction. turning left or right has 1 weight both - var/spreadDelay = 1 //will change to something bigger later, but right now I want it to spread as fast as possible for testing - -/obj/effect/rift - icon = 'icons/obj/biomass.dmi' - icon_state = "rift" - var/list/obj/effect/biomass/linkedBiomass = list() //all the biomass patches that have spread from it - var/newicon = 1 //DEBUG - -/obj/effect/rift/New() - set background = 1 - - ..() - - for(var/turf/T in orange(1,src)) - if(!IsValidBiomassLoc(T)) - continue - var/obj/effect/biomass/starting = new /obj/effect/biomass(T) - starting.dir = get_dir(src,starting) - starting.originalRift = src - linkedBiomass += starting - spawn(1) //DEBUG - starting.icon_state = "[newicon]" - -/obj/effect/rift/Delete() - for(var/obj/effect/biomass/biomass in linkedBiomass) - del(biomass) - ..() - -/obj/effect/biomass/New() - set background = 1 - - ..() - if(!IsValidBiomassLoc(loc,src)) - del(src) - return - spawn(1) //so that the dir and stuff can be set by the source first - if(curDistance >= maxDistance) - return - switch(dir) - if(NORTHWEST) - dir = NORTH - if(NORTHEAST) - dir = EAST - if(SOUTHWEST) - dir = WEST - if(SOUTHEAST) - dir = SOUTH - sleep(spreadDelay) - Spread() - -/obj/effect/biomass/proc/Spread(var/direction = dir) - set background = 1 - var/possibleDirsInt = 0 - - for(var/newDirection in cardinal) - if(newDirection == turn(direction,180)) //can't go backwards - continue - var/turf/T = get_step(loc,newDirection) - if(!IsValidBiomassLoc(T,src)) - continue - possibleDirsInt |= newDirection - - var/list/possibleDirs = list() - - if(possibleDirsInt & direction) - for(var/i=0 , i= 10 || src.reagents.total_volume >= 80) //Too full. Max 10 items or 80 units of reagent - user << "Too many items are already in the blending chamber." - else if(istype(O, /obj/item/weapon/reagent_containers/glass/blender_jug) && src.container == 0) //Load jug. - O.reagents.trans_to(src, O.reagents.total_volume) - del(O) - src.contents += new /obj/item/weapon/reagent_containers/glass/blender_jug(src) - //user.drop_item() - //O.loc = src - src.container = 1 - src.flags = OPENCONTAINER - src.update_icon() - else if(src.container == 0) //No jug to load in to. - user << "There is no container to put [O] in to!" - else - if(istype(O, /obj/item/weapon/reagent_containers/food/snacks)) //Will only blend food items. Add others in this else clause. - user.drop_item() - O.loc = src - user << "You drop the [O] into the blender." - else if (istype(O, /obj/item/weapon/plantbag)) //Allows plant bags to empty into the blender. - for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents) - O.contents -= G - G.loc = src - if(src.contents.len >= 10 || src.reagents.total_volume >= 80) //Sanity checking so the blender doesn't overfill - user << "You fill the blender to the brim." - break - if(src.contents.len < 10 && src.reagents.total_volume < 80) - user << "You empty the plant bag into the blender." - else - user << "That probably won't blend." - return 0 - - -/obj/machinery/blender/verb/blend() //Blend shit. Note: In the actual blending loop, make sure it can't include the jug. - set category = "Object" - set name = "Turn Blender On" - set src in oview(1) // Otherwise, it'll try to blend it too. - if (usr.stat != 0) - return - if (src.stat != 0) //NOPOWER etc - return - if(src.processing) - usr << "\red The blender is in the process of blending." - return - if(!src.container) - usr << "\red The blender doesn't have an attached container!" - return - playsound(src.loc, 'sound/machines/blender.ogg', 50, 1) - src.processing = 1 - usr << "\blue You turn on the blender." - use_power(250) - for(var/obj/O in src.contents) - if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/soybeans)) // Mass balance law - src.reagents.add_reagent("soymilk", O.reagents.get_reagent_amount("nutriment")) - O.reagents.del_reagent("nutriment") - else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/tomato)) // Mass balance law - src.reagents.add_reagent("ketchup", O.reagents.get_reagent_amount("nutriment")) - O.reagents.del_reagent("nutriment") - else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/corn)) // Mass balance law - src.reagents.add_reagent("cornoil", O.reagents.get_reagent_amount("nutriment")) - O.reagents.del_reagent("nutriment") - if(istype(O, /obj/item/weapon/reagent_containers/food/snacks)) //This is intentionally not an "else if" - O.reagents.trans_to(src, O.reagents.total_volume) //Think of it as the "pulp" leftover. - del(O) - src.processing = 0 - usr << "The contents of the blender have been blended." - return - -/obj/machinery/blender/verb/detach() //Transfers the contents of the Blender to the Blender Jug and then ejects the jug. - set category = "Object" - set name = "Detach Blender Jug" - set src in oview(1) - if (usr.stat != 0) - return - if(src.processing) - usr << "The blender is in the process of blending." - else if(!src.container) - usr << "There is nothing to detach!" - else - for(var/obj/O in src.contents) //Searches through the contents for the jug. - if(istype(O, /obj/item/weapon/reagent_containers/glass/blender_jug)) - O.loc = get_turf(src) - src.reagents.trans_to(O, src.reagents.total_volume) - O = null - src.flags = null - src.icon_state = "blender_d" - usr << "You detatch the blending jug." - src.container = 0 - return - -/obj/machinery/blender/verb/eject() //Ejects the non-reagent contents of the blender besides the jug. - set category = "Object" - set name = "Empty Blender Jug" - set src in oview(1) - if (usr.stat != 0) - return - if(src.processing) - usr << "The blender is in the process of blending." - else if(!src.container) - usr << "There is nothing to eject!" - else - for(var/obj/O in src.contents) - if(istype(O, /obj/item/weapon/reagent_containers/food/snacks)) - O.loc = get_turf(src) - O = null - return - diff --git a/code/unused/brewing.dm b/code/unused/brewing.dm deleted file mode 100644 index ab0e5fb2158..00000000000 --- a/code/unused/brewing.dm +++ /dev/null @@ -1,290 +0,0 @@ -//This dm file includes some food processing machines: -// - I. Mill -// - II. Fermenter -// - III. Still -// - IV. Squeezer -// - V. Centrifuge - - - -// I. The mill is intended to be loaded with produce and returns ground up items. For example: Wheat should become flour and grapes should become raisins. - -/obj/machinery/mill - var/list/obj/item/weapon/reagent_containers/food/input = list() - var/list/obj/item/weapon/reagent_containers/food/output = list() - var/obj/item/weapon/reagent_containers/food/milled_item - var/busy = 0 - var/progress = 0 - var/error = 0 - name = "\improper Mill" - desc = "It is a machine that grinds produce." - icon_state = "autolathe" - density = 1 - anchored = 1 - use_power = 1 - idle_power_usage = 10 - active_power_usage = 1000 - -/obj/machinery/mill/process() - if(error) - return - - if(!busy) - use_power = 1 - if(input.len) - milled_item = input[1] - input -= milled_item - progress = 0 - busy = 1 - use_power = 2 - return - - progress++ - if(progress < 10) //Edit this value to make milling faster or slower - return //Not done yet. - - switch(milled_item.type) - if(/obj/item/weapon/reagent_containers/food/snacks/grown/wheat) //Wheat becomes flour - var/obj/item/weapon/reagent_containers/food/drinks/flour/F = new(src) - output += F - if(/obj/item/weapon/reagent_containers/food/drinks/flour) //Flour is still flour - var/obj/item/weapon/reagent_containers/food/drinks/flour/F = new(src) - output += F - else - error = 1 - - del(milled_item) - busy = 0 - -/obj/machinery/mill/attackby(var/obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/weapon/reagent_containers/food)) - user.unEquip(W) - W.loc = src - input += W - else - ..() - -/obj/machinery/mill/attack_hand(var/mob/user as mob) - for(var/obj/item/weapon/reagent_containers/food/F in output) - F.loc = src.loc - output -= F - - - - - - -// II. The fermenter is intended to be loaded with food items and returns medium-strength alcohol items, sucha s wine and beer. - -/obj/machinery/fermenter - var/list/obj/item/weapon/reagent_containers/food/input = list() - var/list/obj/item/weapon/reagent_containers/food/output = list() - var/obj/item/weapon/reagent_containers/food/fermenting_item - var/water_level = 0 - var/busy = 0 - var/progress = 0 - var/error = 0 - name = "\improper Fermenter" - desc = "It is a machine that ferments produce into alcoholic drinks." - icon_state = "autolathe" - density = 1 - anchored = 1 - use_power = 1 - idle_power_usage = 10 - active_power_usage = 500 - -/obj/machinery/fermenter/process() - if(error) - return - - if(!busy) - use_power = 1 - if(input.len) - fermenting_item = input[1] - input -= fermenting_item - progress = 0 - busy = 1 - use_power = 2 - return - - if(!water_level) - return - - water_level-- - - progress++ - if(progress < 10) //Edit this value to make milling faster or slower - return //Not done yet. - - switch(fermenting_item.type) - if(/obj/item/weapon/reagent_containers/food/drinks/flour) //Flour is still flour - var/obj/item/weapon/reagent_containers/food/drinks/beer/B = new(src) - output += B - else - error = 1 - - del(fermenting_item) - busy = 0 - -/obj/machinery/fermenter/attackby(var/obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/weapon/reagent_containers/food)) - user.unEquip(W) - W.loc = src - input += W - else - ..() - -/obj/machinery/fermenter/attack_hand(var/mob/user as mob) - for(var/obj/item/weapon/reagent_containers/food/F in output) - F.loc = src.loc - output -= F - - - -// III. The still is a machine that is loaded with food items and returns hard liquor, such as vodka. - -/obj/machinery/still - var/list/obj/item/weapon/reagent_containers/food/input = list() - var/list/obj/item/weapon/reagent_containers/food/output = list() - var/obj/item/weapon/reagent_containers/food/destilling_item - var/busy = 0 - var/progress = 0 - var/error = 0 - name = "\improper Still" - desc = "It is a machine that produces hard liquor from alcoholic drinks." - icon_state = "autolathe" - density = 1 - anchored = 1 - use_power = 1 - idle_power_usage = 10 - active_power_usage = 10000 - -/obj/machinery/still/process() - if(error) - return - - if(!busy) - use_power = 1 - if(input.len) - destilling_item = input[1] - input -= destilling_item - progress = 0 - busy = 1 - use_power = 2 - return - - progress++ - if(progress < 10) //Edit this value to make distilling faster or slower - return //Not done yet. - - switch(destilling_item.type) - if(/obj/item/weapon/reagent_containers/food/drinks/beer) //Flour is still flour - var/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka/V = new(src) - output += V - else - error = 1 - - del(destilling_item) - busy = 0 - -/obj/machinery/still/attackby(var/obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/weapon/reagent_containers/food)) - user.unEquip(W) - W.loc = src - input += W - else - ..() - -/obj/machinery/still/attack_hand(var/mob/user as mob) - for(var/obj/item/weapon/reagent_containers/food/F in output) - F.loc = src.loc - output -= F - - - - -// IV. The squeezer is intended to destroy inserted food items, but return some of the reagents they contain. - -/obj/machinery/squeezer - var/list/obj/item/weapon/reagent_containers/food/input = list() - var/obj/item/weapon/reagent_containers/food/squeezed_item - var/water_level = 0 - var/busy = 0 - var/progress = 0 - var/error = 0 - name = "\improper Squeezer" - desc = "It is a machine that squeezes extracts from produce." - icon_state = "autolathe" - density = 1 - anchored = 1 - use_power = 1 - idle_power_usage = 10 - active_power_usage = 500 - - - - - -// V. The centrifuge spins inserted food items. It is intended to squeeze out the reagents that are common food catalysts (enzymes currently) - -/obj/machinery/centrifuge - var/list/obj/item/weapon/reagent_containers/food/input = list() - var/list/obj/item/weapon/reagent_containers/food/output = list() - var/obj/item/weapon/reagent_containers/food/spinning_item - var/busy = 0 - var/progress = 0 - var/error = 0 - var/enzymes = 0 - var/water = 0 - name = "\improper Centrifuge" - desc = "It is a machine that spins produce." - icon_state = "autolathe" - density = 1 - anchored = 1 - use_power = 1 - idle_power_usage = 10 - active_power_usage = 10000 - -/obj/machinery/centrifuge/process() - if(error) - return - - if(!busy) - use_power = 1 - if(input.len) - spinning_item = input[1] - input -= spinning_item - progress = 0 - busy = 1 - use_power = 2 - return - - progress++ - if(progress < 10) //Edit this value to make milling faster or slower - return //Not done yet. - - var/transfer_enzymes = spinning_item.reagents.get_reagent_amount("enzyme") - - if(transfer_enzymes) - enzymes += transfer_enzymes - spinning_item.reagents.remove_reagent("enzyme",transfer_enzymes) - - output += spinning_item - busy = 0 - -/obj/machinery/centrifuge/attackby(var/obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/weapon/reagent_containers/food)) - user.unEquip(W) - W.loc = src - input += W - else - ..() - -/obj/machinery/centrifuge/attack_hand(var/mob/user as mob) - for(var/obj/item/weapon/reagent_containers/food/F in output) - F.loc = src.loc - output -= F - while(enzymes >= 50) - enzymes -= 50 - new/obj/item/weapon/reagent_containers/food/condiment/enzyme(src.loc) - diff --git a/code/unused/cable_heavyduty.dm b/code/unused/cable_heavyduty.dm deleted file mode 100644 index 911fe50b43c..00000000000 --- a/code/unused/cable_heavyduty.dm +++ /dev/null @@ -1,28 +0,0 @@ -/obj/item/stack/cable_coil/heavyduty - name = "heavy cable coil" - icon = 'icons/obj/power.dmi' - icon_state = "wire" - -/obj/structure/cable/heavyduty - icon = 'icons/obj/power_cond_heavy.dmi' - name = "large power cable" - desc = "This cable is tough. It cannot be cut with simple hand tools." - layer = 2.39 //Just below pipes, which are at 2.4 - -/obj/structure/cable/heavyduty/attackby(obj/item/W, mob/user) - - var/turf/T = src.loc - if(T.intact) - return - - if(istype(W, /obj/item/weapon/wirecutters)) - usr << "\blue These cables are too tough to be cut with those [W.name]." - return - else if(istype(W, /obj/item/stack/cable_coil)) - usr << "\blue You will need heavier cables to connect to these." - return - else - ..() - -/obj/structure/cable/heavyduty/cableColor(var/colorC) - return \ No newline at end of file diff --git a/code/unused/cable_logic.dm b/code/unused/cable_logic.dm deleted file mode 100644 index 3a3b6f9180e..00000000000 --- a/code/unused/cable_logic.dm +++ /dev/null @@ -1,292 +0,0 @@ -#define LOGIC_HIGH 5 - -//Indicators only have one input and no outputs -/obj/machinery/logic/indicator - //Input is searched from the 'dir' direction - var/obj/structure/cable/input - -/obj/machinery/logic/indicator/process() - if(input) - return 1 - - - if(!input) - var/turf/T = get_step(src, dir) - if(T) - var/inv_dir = turn(dir, 180) - for(var/obj/structure/cable/C in T) - if(C.d1 == inv_dir || C.d2 == inv_dir) - input = C - return 1 - - return 0 //If it gets to here, it means no suitable wire to link to was found. - -/obj/machinery/logic/indicator/bulb - icon = 'icons/obj/lighting.dmi' - icon_state = "bulb0" - -/obj/machinery/logic/indicator/bulb/process() - if(!..()) //Parent proc checks if input1 exists. - return - - var/datum/powernet/pn_input = input.powernet - if(!pn_input) - return - - if(pn_input.avail >= LOGIC_HIGH) - icon_state = "bulb1" - else - icon_state = "bulb0" - - - - -//Sensors only have one output and no inputs -/obj/machinery/logic/sensor - //Output is searched from the 'dir' direction - var/obj/structure/cable/output - -/obj/machinery/logic/sensor/process() - if(output) - return 1 - - if(!output) - var/turf/T = get_step(src, dir) - if(T) - var/inv_dir = turn(dir, 180) - for(var/obj/structure/cable/C in T) - if(C.d1 == inv_dir || C.d2 == inv_dir) - output = C - return 1 - - return 0 //If it gets to here, it means no suitable wire to link to was found. - -//Constant high generator. This will continue to send a signal of LOGIC_HIGH as long as it exists. -/obj/machinery/logic/sensor/constant_high - icon = 'icons/obj/atmospherics/outlet_injector.dmi' - icon_state = "off" - -/obj/machinery/logic/sensor/constant_high/process() - if(!..()) //Parent proc checks if input1 exists. - return - - var/datum/powernet/pn_output = output.powernet - if(!pn_output) - return - - pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) - - - - -//ONE INPUT logic elements have one input and one output -/obj/machinery/logic/oneinput - var/dir_input = 2 - var/dir_output = 1 - var/obj/structure/cable/input - var/obj/structure/cable/output - icon = 'icons/obj/pipes/heat.dmi' - icon_state = "intact" - -/obj/machinery/logic/oneinput/process() - if(input && output) - return 1 - - if(!dir_input || !dir_output) - return 0 - - if(!input) - var/turf/T = get_step(src, dir_input) - if(T) - var/inv_dir = turn(dir_input, 180) - for(var/obj/structure/cable/C in T) - if(C.d1 == inv_dir || C.d2 == inv_dir) - input = C - - if(!output) - var/turf/T = get_step(src, dir_output) - if(T) - var/inv_dir = turn(dir_output, 180) - for(var/obj/structure/cable/C in T) - if(C.d1 == inv_dir || C.d2 == inv_dir) - output = C - - return 0 //On the process() call, where everything is still being searched for, it returns 0. It will return 1 on the next process() call. - -//NOT GATE -/obj/machinery/logic/oneinput/not/process() - if(!..()) //Parent proc checks if input1, input2 and output exist. - return - - var/datum/powernet/pn_input = input.powernet - - if(!pn_input) - return - - var/datum/powernet/pn_output = output.powernet - if(!pn_output) - return - - if( !(pn_input.avail >= LOGIC_HIGH)) - pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) //Set the output avilable power to 5 or whatever it was before. - else - pn_output.newload += LOGIC_HIGH //Otherwise increase the load to 5 - - - - - - - - - -//TWO INPUT logic elements have two inputs and one output -/obj/machinery/logic/twoinput - var/dir_input1 = 2 - var/dir_input2 = 8 - var/dir_output = 1 - var/obj/structure/cable/input1 - var/obj/structure/cable/input2 - var/obj/structure/cable/output - icon = 'icons/obj/atmospherics/mixer.dmi' - icon_state = "intact_off" - -/obj/machinery/logic/twoinput/process() - if(input1 && input2 && output) - return 1 - - if(!dir_input1 || !dir_input2 || !dir_output) - return 0 - - if(!input1) - var/turf/T = get_step(src, dir_input1) - if(T) - var/inv_dir = turn(dir_input1, 180) - for(var/obj/structure/cable/C in T) - if(C.d1 == inv_dir || C.d2 == inv_dir) - input1 = C - - if(!input2) - var/turf/T = get_step(src, dir_input2) - if(T) - var/inv_dir = turn(dir_input2, 180) - for(var/obj/structure/cable/C in T) - if(C.d1 == inv_dir || C.d2 == inv_dir) - input2 = C - - if(!output) - var/turf/T = get_step(src, dir_output) - if(T) - var/inv_dir = turn(dir_output, 180) - for(var/obj/structure/cable/C in T) - if(C.d1 == inv_dir || C.d2 == inv_dir) - output = C - - return 0 //On the process() call, where everything is still being searched for, it returns 0. It will return 1 on the next process() call. - -//AND GATE -/obj/machinery/logic/twoinput/and/process() - if(!..()) //Parent proc checks if input1, input2 and output exist. - return - - var/datum/powernet/pn_input1 = input1.powernet - var/datum/powernet/pn_input2 = input2.powernet - - if(!pn_input1 || !pn_input2) - return - - var/datum/powernet/pn_output = output.powernet - if(!pn_output) - return - - if( (pn_input1.avail >= LOGIC_HIGH) && (pn_input2.avail >= LOGIC_HIGH) ) - pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) //Set the output avilable power to 5 or whatever it was before. - else - pn_output.newload += LOGIC_HIGH //Otherwise increase the load to 5 - -//OR GATE -/obj/machinery/logic/twoinput/or/process() - if(!..()) //Parent proc checks if input1, input2 and output exist. - return - - var/datum/powernet/pn_input1 = input1.powernet - var/datum/powernet/pn_input2 = input2.powernet - - if(!pn_input1 || !pn_input2) - return - - var/datum/powernet/pn_output = output.powernet - if(!pn_output) - return - - if( (pn_input1.avail >= LOGIC_HIGH) || (pn_input2.avail >= LOGIC_HIGH) ) - pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) //Set the output avilable power to 5 or whatever it was before. - else - pn_output.newload += LOGIC_HIGH //Otherwise increase the load to 5 - -//XOR GATE -/obj/machinery/logic/twoinput/xor/process() - if(!..()) //Parent proc checks if input1, input2 and output exist. - return - - var/datum/powernet/pn_input1 = input1.powernet - var/datum/powernet/pn_input2 = input2.powernet - - if(!pn_input1 || !pn_input2) - return - - var/datum/powernet/pn_output = output.powernet - if(!pn_output) - return - - if( (pn_input1.avail >= LOGIC_HIGH) != (pn_input2.avail >= LOGIC_HIGH) ) - pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) //Set the output avilable power to 5 or whatever it was before. - else - pn_output.newload += LOGIC_HIGH //Otherwise increase the load to 5 - -//XNOR GATE (EQUIVALENCE) -/obj/machinery/logic/twoinput/xnor/process() - if(!..()) //Parent proc checks if input1, input2 and output exist. - return - - var/datum/powernet/pn_input1 = input1.powernet - var/datum/powernet/pn_input2 = input2.powernet - - if(!pn_input1 || !pn_input2) - return - - var/datum/powernet/pn_output = output.powernet - if(!pn_output) - return - - if( (pn_input1.avail >= LOGIC_HIGH) == (pn_input2.avail >= LOGIC_HIGH) ) - pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) //Set the output avilable power to 5 or whatever it was before. - else - pn_output.newload += LOGIC_HIGH //Otherwise increase the load to 5 - -#define RELAY_POWER_TRANSFER 2000 //How much power a relay transfers through. - -//RELAY - input1 governs the flow from input2 to output -/obj/machinery/logic/twoinput/relay/process() - if(!..()) //Parent proc checks if input1, input2 and output exist. - return - - var/datum/powernet/pn_input1 = input1.powernet - - if(!pn_input1) - return - - if( pn_input1.avail >= LOGIC_HIGH ) - var/datum/powernet/pn_input2 = input2.powernet - var/datum/powernet/pn_output = output.powernet - - if(!pn_output) - return - - if(pn_input2.avail >= RELAY_POWER_TRANSFER) - pn_input2.newload += RELAY_POWER_TRANSFER - pn_output.newavail += RELAY_POWER_TRANSFER - - -#undef RELAY_POWER_TRANSFER -#undef LOGIC_HIGH \ No newline at end of file diff --git a/code/unused/carpetsplosion.dm b/code/unused/carpetsplosion.dm deleted file mode 100644 index fda6b41f254..00000000000 --- a/code/unused/carpetsplosion.dm +++ /dev/null @@ -1,83 +0,0 @@ -/proc/carpetsplosion(turf/location as turf,range = 10) - var/obj/effect/spreader/spreadEpicentre = new /obj/effect/spreader(location,range) - var/list/turf/spreadTurfs = list() - - sleep(5) - - for(var/obj/effect/spreader/spread in spreadEpicentre.spreadList) - spreadTurfs += get_turf(spread) - - del(spreadEpicentre) - return - -//DEBUG START -/obj/carpetnade - New() - ..() - carpetsplosion(loc) - -//DEBUG END - -/obj/effect/spreader - var/list/obj/effect/spreader/spreadList = list() - -/obj/effect/spreader/Delete() - for(var/obj/effect/spreader/spread in spreadList) - if(spread != src) - del(spread) - ..() - -/obj/effect/spreader/New(location,var/amount = 1,obj/effects/spreader/source = src) //just a copypaste job from foam - if(amount <= 0) - del(src) - return - else - ..() - - for(var/direction in cardinal) - var/turf/T = get_step(src,direction) - if(!T) - continue - - if(!T.Enter(src)) - continue - - var/obj/effect/spreader/S = locate() in T - if(S) - continue - - new /obj/effect/spreader(T,amount-1,source) - - source.spreadList += src - -/* -/obj/effect/foam/proc/process() - if(--amount < 0) - return - - - while(expand) // keep trying to expand while true - - for(var/direction in cardinal) - - - var/turf/T = get_step(src,direction) - if(!T) - continue - - if(!T.Enter(src)) - continue - - var/obj/effect/foam/F = locate() in T - if(F) - continue - - F = new(T, metal) - F.amount = amount - if(!metal) - F.create_reagents(10) - if (reagents) - for(var/datum/reagent/R in reagents.reagent_list) - F.reagents.add_reagent(R.id,1) - sleep(15) -*/ \ No newline at end of file diff --git a/code/unused/computer2/airlock_control.dm b/code/unused/computer2/airlock_control.dm deleted file mode 100644 index e14dca1e630..00000000000 --- a/code/unused/computer2/airlock_control.dm +++ /dev/null @@ -1,60 +0,0 @@ -/datum/computer/file/computer_program/airlock_control - name = "Airlock Master" - size = 16.0 - id_tag = "TAG" - - - return_text() - if(..()) - return - - var/dat = "Close | " - dat += "Quit" - - /* - dat += "
Frequency: " - dat += "-- " - dat += "- " - dat += "[format_frequency(src.master.frequency)] " - dat += "+ " - dat += "++" - dat += "
" - */ - - - dat += "
ID:[src.id_tag]
" - - dat += "Cycle" - - - dat += "
" - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["set_tag"]) - var/t = input(usr, "Please enter new tag", src.id_tag, null) as text - t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN) - if (!t) - return - if (!in_range(src.master, usr)) - return - - src.id_tag = t - -// if(href_list["adj_freq"]) -// var/new_frequency = (src.master.frequency + text2num(href_list["adj_freq"])) -// src.master.set_frequency(new_frequency) - - if(href_list["send_command"]) - var/datum/signal/signal = new - signal.data["tag"] = id_tag - signal.data["command"] = href_list["send_command"] - peripheral_command("send signal", signal) - - src.master.add_fingerprint(usr) - src.master.updateUsrDialog() - return \ No newline at end of file diff --git a/code/unused/computer2/arcade.dm b/code/unused/computer2/arcade.dm deleted file mode 100644 index 591402c04fa..00000000000 --- a/code/unused/computer2/arcade.dm +++ /dev/null @@ -1,136 +0,0 @@ -/datum/computer/file/computer_program/arcade - name = "Arcade 500" - size = 8.0 - var/enemy_name = "Space Villian" - var/temp = "Winners Don't Use Spacedrugs" //Temporary message, for attack messages, etc - var/player_hp = 30 //Player health/attack points - var/player_mp = 10 - var/enemy_hp = 45 //Enemy health/attack points - var/enemy_mp = 20 - var/gameover = 0 - var/blocked = 0 //Player cannot attack/heal while set - - New(obj/holding as obj) - if(holding) - src.holder = holding - - if(istype(src.holder.loc,/obj/machinery/computer2)) - src.master = src.holder.loc - -// var/name_action = pick("Defeat ", "Annihilate ", "Save ", "Strike ", "Stop ", "Destroy ", "Robust ", "Romance ") - - var/name_part1 = pick("the Automatic ", "Farmer ", "Lord ", "Professor ", "the Evil ", "the Dread King ", "the Space ", "Lord ") - var/name_part2 = pick("Melonoid", "Murdertron", "Sorcerer", "Ruin", "Jeff", "Ectoplasm", "Crushulon") - - src.enemy_name = dd_replacetext((name_part1 + name_part2), "the ", "") -// src.name = (name_action + name_part1 + name_part2) - - - -/datum/computer/file/computer_program/arcade/return_text() - if(..()) - return - - var/dat = "Close | " - dat += "Quit" - - dat += "

[src.enemy_name]

" - - dat += "

[src.temp]

" - dat += "
Health: [src.player_hp] | Magic: [src.player_mp] | Enemy Health: [src.enemy_hp]
" - - if (src.gameover) - dat += "
New Game" - else - dat += "
Attack | " - dat += "Heal | " - dat += "Recharge Power" - - dat += "
" - - return dat - -/datum/computer/file/computer_program/arcade/Topic(href, href_list) - if(..()) - return - - if (!src.blocked) - if (href_list["attack"]) - src.blocked = 1 - var/attackamt = rand(2,6) - src.temp = "You attack for [attackamt] damage!" - src.master.updateUsrDialog() - - sleep(10) - src.enemy_hp -= attackamt - src.arcade_action() - - else if (href_list["heal"]) - src.blocked = 1 - var/pointamt = rand(1,3) - var/healamt = rand(6,8) - src.temp = "You use [pointamt] magic to heal for [healamt] damage!" - src.master.updateUsrDialog() - - sleep(10) - src.player_mp -= pointamt - src.player_hp += healamt - src.blocked = 1 - src.master.updateUsrDialog() - src.arcade_action() - - else if (href_list["charge"]) - src.blocked = 1 - var/chargeamt = rand(4,7) - src.temp = "You regain [chargeamt] points" - src.player_mp += chargeamt - - src.master.updateUsrDialog() - sleep(10) - src.arcade_action() - - if (href_list["newgame"]) //Reset everything - temp = "New Round" - player_hp = 30 - player_mp = 10 - enemy_hp = 45 - enemy_mp = 20 - gameover = 0 - - src.master.add_fingerprint(usr) - src.master.updateUsrDialog() - return - -/datum/computer/file/computer_program/arcade/proc/arcade_action() - if ((src.enemy_mp <= 0) || (src.enemy_hp <= 0)) - src.gameover = 1 - src.temp = "[src.enemy_name] has fallen! Rejoice!" - src.peripheral_command("vend prize") - - else if ((src.enemy_mp <= 5) && (prob(70))) - var/stealamt = rand(2,3) - src.temp = "[src.enemy_name] steals [stealamt] of your power!" - src.player_mp -= stealamt - src.master.updateUsrDialog() - - if (src.player_mp <= 0) - src.gameover = 1 - sleep(10) - src.temp = "You have been drained! GAME OVER" - - else if ((src.enemy_hp <= 10) && (src.enemy_mp > 4)) - src.temp = "[src.enemy_name] heals for 4 health!" - src.enemy_hp += 4 - src.enemy_mp -= 4 - - else - var/attackamt = rand(3,6) - src.temp = "[src.enemy_name] attacks for [attackamt] damage!" - src.player_hp -= attackamt - - if ((src.player_mp <= 0) || (src.player_hp <= 0)) - src.gameover = 1 - src.temp = "You have been crushed! GAME OVER" - - src.blocked = 0 - return \ No newline at end of file diff --git a/code/unused/computer2/base_program.dm b/code/unused/computer2/base_program.dm deleted file mode 100644 index b85923be77f..00000000000 --- a/code/unused/computer2/base_program.dm +++ /dev/null @@ -1,263 +0,0 @@ -/datum/computer - var/size = 4.0 - var/obj/item/weapon/disk/data/holder = null - var/datum/computer/folder/holding_folder = null - folder - name = "Folder" - size = 0.0 - var/gen = 0 - Del() - for(var/datum/computer/F in src.contents) - del(F) - ..() - proc - add_file(datum/computer/R) - if(!holder || holder.read_only || !R) - return 0 - if(istype(R,/datum/computer/folder) && (src.gen>=10)) - return 0 - if((holder.file_used + R.size) <= holder.file_amount) - src.contents.Add(R) - R.holder = holder - R.holding_folder = src - src.holder.file_used -= src.size - src.size += R.size - src.holder.file_used += src.size - if(istype(R,/datum/computer/folder)) - R:gen = (src.gen+1) - return 1 - return 0 - - remove_file(datum/computer/R) - if(holder && !holder.read_only || !R) -// world << "Removing file [R]. File_used: [src.holder.file_used]" - src.contents.Remove(R) - src.holder.file_used -= src.size - src.size -= R.size - src.holder.file_used += src.size - src.holder.file_used = max(src.holder.file_used, 0) -// world << "Removed file [R]. File_used: [src.holder.file_used]" - return 1 - return 0 - file - name = "File" - var/extension = "FILE" //Differentiate between types of files, why not - proc - copy_file_to_folder(datum/computer/folder/newfolder) - if(!newfolder || (!istype(newfolder)) || (!newfolder.holder) || (newfolder.holder.read_only)) - return 0 - - if((newfolder.holder.file_used + src.size) <= newfolder.holder.file_amount) - var/datum/computer/file/newfile = new src.type - - for(var/V in src.vars) - if (issaved(src.vars[V]) && V != "holder") - newfile.vars[V] = src.vars[V] - - if(!newfolder.add_file(newfile)) - del(newfile) - - return 1 - - return 0 - - - Del() - if(holder && holding_folder) - holding_folder.remove_file(src) - ..() - - -/datum/computer/file/computer_program - name = "blank program" - extension = "PROG" - //var/size = 4.0 - //var/obj/item/weapon/disk/data/holder = null - var/obj/machinery/computer2/master = null - var/active_icon = null - var/id_tag = null - var/list/req_access = list() - - New(obj/holding as obj) - if(holding) - src.holder = holding - - if(istype(src.holder.loc,/obj/machinery/computer2)) - src.master = src.holder.loc - - Del() - if(master) - master.processing_programs.Remove(src) - ..() - - proc - return_text() - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(master.stat & (NOPOWER|BROKEN)) - return 1 - - if(!(holder in src.master.contents)) - //world << "Holder [holder] not in [master] of prg:[src]" - if(master.active_program == src) - master.active_program = null - return 1 - - if(!src.holder.root) - src.holder.root = new /datum/computer/folder - src.holder.root.holder = src - src.holder.root.name = "root" - - return 0 - - process() - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - master.processing_programs.Remove(src) - return 1 - - if(!src.holder.root) - src.holder.root = new /datum/computer/folder - src.holder.root.holder = src - src.holder.root.name = "root" - - return 0 - - receive_command(obj/source, command, datum/signal/signal) - if((!src.holder) || (!src.master) || (!source) || (source != src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(master.stat & (NOPOWER|BROKEN)) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - return 0 - - peripheral_command(command, datum/signal/signal) - if(master) - master.send_command(command, signal) - else - del(signal) - - transfer_holder(obj/item/weapon/disk/data/newholder,datum/computer/folder/newfolder) - - if((newholder.file_used + src.size) > newholder.file_amount) - return 0 - - if(!newholder.root) - newholder.root = new /datum/computer/folder - newholder.root.holder = newholder - newholder.root.name = "root" - - if(!newfolder) - newfolder = newholder.root - - if((src.holder && src.holder.read_only) || newholder.read_only) - return 0 - - if((src.holder) && (src.holder.root)) - src.holder.root.remove_file(src) - - newfolder.add_file(src) - - if(istype(newholder.loc,/obj/machinery/computer2)) - src.master = newholder.loc - - //world << "Setting [src.holder] to [newholder]" - src.holder = newholder - return 1 - - //Check access per program. - allowed(mob/M) - //check if it doesn't require any access at all - if(src.check_access(null)) - return 1 - if(istype(M, /mob/living/silicon)) - //AI can do whatever he wants - return 1 - else if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - //if they are holding or wearing a card that has access, that works - if(src.check_access(H.equipped()) || src.check_access(H.wear_id)) - return 1 - else if(istype(M, /mob/living/carbon/monkey)) - var/mob/living/carbon/monkey/george = M - //they can only hold things :( - if(george.equipped() && istype(george.equipped(), /obj/item/weapon/card/id) && src.check_access(george.equipped())) - return 1 - return 0 - - check_access(obj/item/weapon/card/id/I) - if(!src.req_access) //no requirements - return 1 - if(!istype(src.req_access, /list)) //something's very wrong - return 1 - - var/list/L = src.req_access - if(!L.len) //no requirements - return 1 - if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access - return 0 - for(var/req in src.req_access) - if(!(req in I.access)) //doesn't have this access - return 0 - return 1 - - Topic(href, href_list) - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(master.stat & (NOPOWER|BROKEN)) - return 1 - - if(src.master.active_program != src) - return 1 - - if ((!usr.contents.Find(src.master) && (!in_range(src.master, usr) || !istype(src.master.loc, /turf))) && (!istype(usr, /mob/living/silicon))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - usr.machine = src.master - - if (href_list["close"]) - usr.machine = null - usr << browse(null, "window=comp2") - return 0 - - if (href_list["quit"]) -// src.master.processing_programs.Remove(src) - if(src.master.host_program && src.master.host_program.holder && (src.master.host_program.holder in src.master.contents)) - src.master.run_program(src.master.host_program) - src.master.updateUsrDialog() - return 1 - else - src.master.active_program = null - src.master.updateUsrDialog() - return 1 - - return 0 \ No newline at end of file diff --git a/code/unused/computer2/buildandrepair.dm b/code/unused/computer2/buildandrepair.dm deleted file mode 100644 index 69e7b5fb822..00000000000 --- a/code/unused/computer2/buildandrepair.dm +++ /dev/null @@ -1,150 +0,0 @@ -//Motherboard is just used in assembly/disassembly, doesn't exist in the actual computer object. -/obj/item/weapon/motherboard - name = "Computer mainboard" - desc = "A computer motherboard." - icon = 'icons/obj/module.dmi' - icon_state = "mainboard" - item_state = "electronic" - w_class = 3 - var/created_name = null //If defined, result computer will have this name. - -/obj/computer2frame - density = 1 - anchored = 0 - name = "Computer-frame" - icon = 'icons/obj/stock_parts.dmi' - icon_state = "0" - var/state = 0 - var/obj/item/weapon/motherboard/mainboard = null - var/obj/item/weapon/disk/data/fixed_disk/hd = null - var/list/peripherals = list() - var/created_icon_state = "aiupload" - -/obj/computer2frame/attackby(obj/item/P as obj, mob/user as mob) - switch(state) - if(0) - if(istype(P, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 20)) - user << "\blue You wrench the frame into place." - src.anchored = 1 - src.state = 1 - if(istype(P, /obj/item/weapon/weldingtool)) - playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) - if(do_after(user, 20)) - user << "\blue You deconstruct the frame." - new /obj/item/stack/sheet/metal( src.loc, 5 ) - del(src) - if(1) - if(istype(P, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 20)) - user << "\blue You unfasten the frame." - src.anchored = 0 - src.state = 0 - if(istype(P, /obj/item/weapon/motherboard) && !mainboard) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - user << "\blue You place the mainboard inside the frame." - src.icon_state = "1" - src.mainboard = P - user.drop_item() - P.loc = src - if(istype(P, /obj/item/weapon/screwdriver) && mainboard) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - user << "\blue You screw the mainboard into place." - src.state = 2 - src.icon_state = "2" - if(istype(P, /obj/item/weapon/crowbar) && mainboard) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - user << "\blue You remove the mainboard." - src.state = 1 - src.icon_state = "0" - mainboard.loc = src.loc - src.mainboard = null - if(2) - if(istype(P, /obj/item/weapon/screwdriver) && mainboard && (!peripherals.len)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - user << "\blue You unfasten the mainboard." - src.state = 1 - src.icon_state = "1" - - if(istype(P, /obj/item/weapon/peripheral)) - if(src.peripherals.len < 3) - user.drop_item() - src.peripherals.Add(P) - P.loc = src - user << "\blue You add [P] to the frame." - else - user << "\red There is no more room for peripheral cards." - - if(istype(P, /obj/item/weapon/crowbar) && src.peripherals.len) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - user << "\blue You remove the peripheral boards." - for(var/obj/item/weapon/peripheral/W in src.peripherals) - W.loc = src.loc - src.peripherals.Remove(W) - - if(istype(P, /obj/item/stack/cable_coil)) - if(P:amount >= 5) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 20)) - P:amount -= 5 - if(!P:amount) del(P) - user << "\blue You add cables to the frame." - src.state = 3 - src.icon_state = "3" - if(3) - if(istype(P, /obj/item/weapon/wirecutters)) - playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) - user << "\blue You remove the cables." - src.state = 2 - src.icon_state = "2" - var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc ) - A.amount = 5 - if(src.hd) - src.hd.loc = src.loc - src.hd = null - - if(istype(P, /obj/item/weapon/disk/data/fixed_disk) && !src.hd) - user.drop_item() - src.hd = P - P.loc = src - user << "\blue You connect the drive to the cabling." - - if(istype(P, /obj/item/weapon/crowbar) && src.hd) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - user << "\blue You remove the hard drive." - src.hd.loc = src.loc - src.hd = null - - if(istype(P, /obj/item/stack/sheet/glass)) - if(P:amount >= 2) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 20)) - P:use(2) - user << "\blue You put in the glass panel." - src.state = 4 - src.icon_state = "4" - if(4) - if(istype(P, /obj/item/weapon/crowbar)) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - user << "\blue You remove the glass panel." - src.state = 3 - src.icon_state = "3" - new /obj/item/stack/sheet/glass( src.loc, 2 ) - if(istype(P, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - user << "\blue You connect the monitor." - var/obj/machinery/computer2/C= new /obj/machinery/computer2( src.loc ) - C.setup_drive_size = 0 - C.icon_state = src.created_icon_state - if(mainboard.created_name) C.name = mainboard.created_name - del(mainboard) - if(hd) - C.hd = hd - hd.loc = C - for(var/obj/item/weapon/peripheral/W in src.peripherals) - W.loc = C - W.host = C - C.peripherals.Add(W) - del(src) \ No newline at end of file diff --git a/code/unused/computer2/computerII.dm b/code/unused/computer2/computerII.dm deleted file mode 100644 index 34e350ad66c..00000000000 --- a/code/unused/computer2/computerII.dm +++ /dev/null @@ -1,414 +0,0 @@ - -/obj/machinery/computer2 - name = "computer" - desc = "A computer workstation." - icon = 'icons/obj/computer.dmi' - icon_state = "aiupload" - density = 1 - anchored = 1.0 - req_access = list() //This doesn't determine PROGRAM req access, just the access needed to install/delete programs. - var/base_icon_state = "aiupload" //Assembly creates a new computer2 and not a child typepath, so initial doesn't work!! - var/datum/radio_frequency/radio_connection - var/obj/item/weapon/disk/data/fixed_disk/hd = null - var/datum/computer/file/computer_program/active_program - var/datum/computer/file/computer_program/host_program //active is set to this when the normal active quits, if available - var/list/processing_programs = list() - var/obj/item/weapon/card/id/authid = null //For records computers etc - var/obj/item/weapon/card/id/auxid = null //For computers that need two ids for some reason. - var/obj/item/weapon/disk/data/diskette = null - var/list/peripherals = list() - //Setup for Starting program & peripherals - var/setup_starting_program = null //If set to a program path it will start with this one active. - var/setup_starting_peripheral = null //Spawn with radio card and whatever path is here. - var/setup_drive_size = 64.0 //How big is the drive (set to 0 for no drive) - var/setup_id_tag - var/setup_has_radio = 0 //Does it spawn with a radio peripheral? - var/setup_radio_tag - var/setup_frequency = 1411 - -/obj/item/weapon/disk/data - var/datum/computer/folder/root = null - var/file_amount = 32.0 - var/file_used = 0.0 - var/portable = 1 - var/title = "Data Disk" - New() - src.root = new /datum/computer/folder - src.root.holder = src - src.root.name = "root" - -/obj/item/weapon/disk/data/fixed_disk - name = "Storage Drive" - icon_state = "harddisk" - title = "Storage Drive" - file_amount = 80.0 - portable = 0 - - attack_self(mob/user as mob) - return - -/obj/item/weapon/disk/data/computer2test - name = "Programme Diskette" - file_amount = 128.0 - New() - ..() - src.root.add_file( new /datum/computer/file/computer_program/arcade(src)) - src.root.add_file( new /datum/computer/file/computer_program/med_data(src)) - src.root.add_file( new /datum/computer/file/computer_program/airlock_control(src)) - src.root.add_file( new /datum/computer/file/computer_program/messenger(src)) - src.root.add_file( new /datum/computer/file/computer_program/progman(src)) - -/obj/machinery/computer2/medical - name = "Medical Console" - icon_state = "dna" - setup_has_radio = 1 - setup_starting_program = /datum/computer/file/computer_program/med_data - setup_starting_peripheral = /obj/item/weapon/peripheral/printer - -/obj/machinery/computer2/arcade - name = "arcade machine" - icon_state = "arcade" - desc = "An arcade machine." - setup_drive_size = 16.0 - setup_starting_program = /datum/computer/file/computer_program/arcade - setup_starting_peripheral = /obj/item/weapon/peripheral/prize_vendor - - -/obj/machinery/computer2/New() - ..() - - spawn(4) - if(setup_has_radio) - var/obj/item/weapon/peripheral/radio/radio = new /obj/item/weapon/peripheral/radio(src) - radio.frequency = setup_frequency - radio.code = setup_radio_tag - - if(!hd && (setup_drive_size > 0)) - src.hd = new /obj/item/weapon/disk/data/fixed_disk(src) - src.hd.file_amount = src.setup_drive_size - - if(ispath(src.setup_starting_program)) - src.active_program = new src.setup_starting_program - src.active_program.id_tag = setup_id_tag - - src.hd.file_amount = max(src.hd.file_amount, src.active_program.size) - - src.active_program.transfer_holder(src.hd) - - if(ispath(src.setup_starting_peripheral)) - new src.setup_starting_peripheral(src) - - src.base_icon_state = src.icon_state - - return - -/obj/machinery/computer2/attack_hand(mob/user as mob) - if(..()) - return - - user.machine = src - - var/dat - if((src.active_program) && (src.active_program.master == src) && (src.active_program.holder in src)) - dat = src.active_program.return_text() - else - dat = "Thinktronic BIOS V1.4

" - - dat += "Current ID: [src.authid ? "[src.authid.name]" : "----------"]
" - dat += "Auxiliary ID: [src.auxid ? "[src.auxid.name]" : "----------"]

" - - var/progdat - if((src.hd) && (src.hd.root)) - for(var/datum/computer/file/computer_program/P in src.hd.root.contents) - progdat += "[P.name]Size: [P.size]" - - progdat += "Run" - - if(P in src.processing_programs) - progdat += "Halt" - else - progdat += "Load" - - progdat += "Del" - - continue - - dat += "Disk Space: \[[src.hd.file_used]/[src.hd.file_amount]\]
" - dat += "Programs on Fixed Disk:
" - - if(!progdat) - progdat = "No programs found.
" - dat += "
[progdat]
" - - else - - dat += "Programs on Fixed Disk:
" - dat += "
No fixed disk detected.

" - - dat += "
" - - progdat = null - if((src.diskette) && (src.diskette.root)) - - dat += "Eject
" - - for(var/datum/computer/file/computer_program/P in src.diskette.root.contents) - progdat += "[P.name]Size: [P.size]" - progdat += "Run" - - if(P in src.processing_programs) - progdat += "Halt" - else - progdat += "Load" - - progdat += "Install" - - continue - - dat += "Disk Space: \[[src.diskette.file_used]/[src.diskette.file_amount]\]
" - dat += "Programs on Disk:
" - - if(!progdat) - progdat = "No data found.
" - dat += "
[progdat]
" - - else - - dat += "Programs on Disk:
" - dat += "
No diskette loaded.

" - - dat += "
" - - user << browse(dat,"window=comp2") - onclose(user,"comp2") - return - -/obj/machinery/computer2/Topic(href, href_list) - if(..()) - return - - if(!src.active_program) - if((href_list["prog"]) && (href_list["function"])) - var/datum/computer/file/computer_program/newprog = locate(href_list["prog"]) - if(newprog && istype(newprog)) - switch(href_list["function"]) - if("run") - src.run_program(newprog) - if("load") - src.load_program(newprog) - if("unload") - src.unload_program(newprog) - if((href_list["file"]) && (href_list["function"])) - var/datum/computer/file/newfile = locate(href_list["file"]) - if(!newfile) - return - switch(href_list["function"]) - if("install") - if((src.hd) && (src.hd.root) && (src.allowed(usr))) - newfile.copy_file_to_folder(src.hd.root) - - if("delete") - if(src.allowed(usr)) - src.delete_file(newfile) - - //If there is already one loaded eject, or if not and they have one insert it. - if (href_list["id"]) - switch(href_list["id"]) - if("auth") - if(!isnull(src.authid)) - src.authid.loc = get_turf(src) - src.authid = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/id)) - usr.drop_item() - I.loc = src - src.authid = I - if("aux") - if(!isnull(src.auxid)) - src.auxid.loc = get_turf(src) - src.auxid = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/id)) - usr.drop_item() - I.loc = src - src.auxid = I - - //Same but for a data disk - else if (href_list["disk"]) - if(!isnull(src.diskette)) - src.diskette.loc = get_turf(src) - src.diskette = null -/* else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/disk/data)) - usr.drop_item() - I.loc = src - src.diskette = I -*/ - src.add_fingerprint(usr) - src.updateUsrDialog() - return - -/obj/machinery/computer2/process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(250) - - for(var/datum/computer/file/computer_program/P in src.processing_programs) - P.process() - - return - -/obj/machinery/computer2/power_change() - if(stat & BROKEN) - icon_state = src.base_icon_state - src.icon_state += "b" - - else if(powered()) - icon_state = src.base_icon_state - stat &= ~NOPOWER - else - spawn(rand(0, 15)) - icon_state = src.base_icon_state - src.icon_state += "0" - stat |= NOPOWER - - -/obj/machinery/computer2/attackby(obj/item/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/disk/data)) //INSERT SOME DISKETTES - if ((!src.diskette) && W:portable) - user.machine = src - user.drop_item() - W.loc = src - src.diskette = W - user << "You insert [W]." - src.updateUsrDialog() - return - - else if (istype(W, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - var/obj/computer2frame/A = new /obj/computer2frame( src.loc ) - A.created_icon_state = src.base_icon_state - if (src.stat & BROKEN) - user << "\blue The broken glass falls out." - new /obj/item/weapon/shard( src.loc ) - A.state = 3 - A.icon_state = "3" - else - user << "\blue You disconnect the monitor." - A.state = 4 - A.icon_state = "4" - - for (var/obj/item/weapon/peripheral/C in src.peripherals) - C.loc = A - A.peripherals.Add(C) - - if(src.diskette) - src.diskette.loc = src.loc - - //TO-DO: move card reading to peripheral cards instead - if(src.authid) - src.authid.loc = src.loc - - if(src.auxid) - src.auxid.loc = src.loc - - if(src.hd) - src.hd.loc = A - A.hd = src.hd - - A.mainboard = new /obj/item/weapon/motherboard(A) - A.mainboard.created_name = src.name - - - A.anchored = 1 - del(src) - - else - src.attack_hand(user) - return - -/obj/machinery/computer2/proc/send_command(command, datum/signal/signal) - for(var/obj/item/weapon/peripheral/P in src.peripherals) - P.receive_command(src, command, signal) - - del(signal) - -/obj/machinery/computer2/proc/receive_command(obj/source, command, datum/signal/signal) - if(source in src.contents) - - for(var/datum/computer/file/computer_program/P in src.processing_programs) - P.receive_command(src, command, signal) - - del(signal) - - return - - -/obj/machinery/computer2/proc/run_program(datum/computer/file/computer_program/program,datum/computer/file/computer_program/host) - if(!program) - return 0 - -// src.unload_program(src.active_program) - - if(src.load_program(program)) - if(host && istype(host)) - src.host_program = host - else - src.host_program = null - - src.active_program = program - return 1 - - return 0 - -/obj/machinery/computer2/proc/load_program(datum/computer/file/computer_program/program) - if((!program) || (!program.holder)) - return 0 - - if(!(program.holder in src)) -// world << "Not in src" - program = new program.type - program.transfer_holder(src.hd) - - if(program.master != src) - program.master = src - - if(program in src.processing_programs) - return 1 - else - src.processing_programs.Add(program) - return 1 - - return 0 - -/obj/machinery/computer2/proc/unload_program(datum/computer/file/computer_program/program) - if((!program) || (!src.hd)) - return 0 - - if(program in src.processing_programs) - src.processing_programs.Remove(program) - return 1 - - return 0 - -/obj/machinery/computer2/proc/delete_file(datum/computer/file/file) - //world << "Deleting [file]..." - if((!file) || (!file.holder) || (file.holder.read_only)) - //world << "Cannot delete :(" - return 0 - - if(file in src.processing_programs) - src.processing_programs.Remove(file) - - if(src.active_program == file) - src.active_program = null - -// file.holder.root.remove_file(file) - - //world << "Now calling del on [file]..." - del(file) - return 1 \ No newline at end of file diff --git a/code/unused/computer2/filebrowse.dm b/code/unused/computer2/filebrowse.dm deleted file mode 100644 index 38c88f06161..00000000000 --- a/code/unused/computer2/filebrowse.dm +++ /dev/null @@ -1,164 +0,0 @@ -/datum/computer/file/computer_program/progman - name = "ProgManager" - size = 16.0 - var/datum/computer/folder/current_folder - var/mode = 0 - var/datum/computer/file/clipboard - - - return_text() - if(..()) - return - - if((!src.current_folder) || !(src.current_folder.holder in src.master)) - src.current_folder = src.holder.root - - var/dat = "Close | " - dat += "Quit" - - switch(mode) - if(0) - dat += " |Create Folder" - //dat += " | Create File" - dat += " | Paste" - dat += " | Root" - dat += " | Drive
" - - dat += "Contents of [current_folder] | Drive:\[[src.current_folder.holder.title]]
" - dat += "Used: \[[src.current_folder.holder.file_used]/[src.current_folder.holder.file_amount]\]
" - - dat += "" - for(var/datum/computer/P in current_folder.contents) - if(P == src) - dat += "" - continue - dat += "" - dat += "" - - dat += "" - - dat += "" - dat += "" - - - if(istype(P,/datum/computer/file)) - dat += "" - - dat += "" - - dat += "
SystemSize: [src.size]SYSTEM
[P.name]Size: [P.size][(istype(P,/datum/computer/folder)) ? "FOLDER" : "[P:extension]"]DelRenameCopy
" - - if(1) - dat += " | Main" - dat += " | Eject
" - - for(var/obj/item/weapon/disk/data/D in src.master) - if(D == current_folder.holder) - dat += "[D.name]
" - else - dat += "[D.title]
" - - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["create"]) - if(current_folder) - var/datum/computer/F = null - switch(href_list["create"]) - if("folder") - F = new /datum/computer/folder - if(!current_folder.add_file(F)) - //world << "Couldn't add folder :(" - del(F) - if("file") - F = new /datum/computer/file - if(!current_folder.add_file(F)) - //world << "Couldn't add file :(" - del(F) - - if(href_list["file"] && href_list["function"]) - var/datum/computer/F = locate(href_list["file"]) - if(!F || !istype(F)) - return - switch(href_list["function"]) - if("open") - if(istype(F,/datum/computer/folder)) - src.current_folder = F - else if(istype(F,/datum/computer/file/computer_program)) - src.master.run_program(F,src) - src.master.updateUsrDialog() - return - - if("delete") - src.master.delete_file(F) - - if("copy") - if(istype(F,/datum/computer/file) && (!F.holder || (F.holder in src.master.contents))) - src.clipboard = F - - if("paste") - if(istype(F,/datum/computer/folder)) - if(!src.clipboard || !src.clipboard.holder || !(src.clipboard.holder in src.master.contents)) - return - - if(!istype(src.clipboard)) - return - - src.clipboard.copy_file_to_folder(F) - - if("rename") - spawn(0) - var/t = input(usr, "Please enter new name", F.name, null) as text - t = copytext(sanitize(t), 1, 16) - if (!t) - return - if (!in_range(src.master, usr) || !(F.holder in src.master)) - return - if(F.holder.read_only) - return - F.name = capitalize(lowertext(t)) - src.master.updateUsrDialog() - return - - -/* - if(href_list["open"]) - var/datum/computer/F = locate(href_list["open"]) - if(!F || !istype(F)) - return - - if(istype(F,/datum/computer/folder)) - src.current_folder = F - else if(istype(F,/datum/computer/file/computer_program)) - src.master.run_program(F) - src.master.updateUsrDialog() - return - - if(href_list["delete"]) - var/datum/computer/F = locate(href_list["delete"]) - if(!F || !istype(F)) - return - - src.master.delete_file(F) -*/ - if(href_list["top_folder"]) - src.current_folder = src.current_folder.holder.root - - if(href_list["mode"]) - var/newmode = text2num(href_list["mode"]) - newmode = max(newmode,0) - src.mode = newmode - - if(href_list["drive"]) - var/obj/item/weapon/disk/data/D = locate(href_list["drive"]) - if(D && istype(D) && D.root) - current_folder = D.root - src.mode = 0 - - src.master.add_fingerprint(usr) - src.master.updateUsrDialog() - return \ No newline at end of file diff --git a/code/unused/computer2/med_rec.dm b/code/unused/computer2/med_rec.dm deleted file mode 100644 index d365cd6b8db..00000000000 --- a/code/unused/computer2/med_rec.dm +++ /dev/null @@ -1,463 +0,0 @@ -/datum/computer/file/computer_program/med_data - name = "Medical Records" - size = 32.0 - active_icon = "dna" - req_access = list(access_medical) - var/authenticated = null - var/rank = null - var/screen = null - var/datum/data/record/active1 = null - var/datum/data/record/active2 = null - var/a_id = null - var/temp = null - -/datum/computer/file/computer_program/med_data/return_text() - if(..()) - return - var/dat - if (src.temp) - dat = text("[src.temp]

Clear Screen") - else - dat = text("Confirm Identity: []
", master, (src.master.authid ? text("[]", src.master.authid.name) : "----------")) - if (src.authenticated) - switch(src.screen) - if(1.0) - dat += {" -Search Records -
List Records -
-
Virus Database -
Medbot Tracking -
-
Record Maintenance -
{Log Out}
-"} - if(2.0) - dat += "Record List:
" - for(var/datum/data/record/R in data_core.general) - dat += text("[]: []
", src, R, R.fields["id"], R.fields["name"]) - //Foreach goto(132) - dat += text("
Back", src) - if(3.0) - dat += text("Records Maintenance
\nBackup To Disk
\nUpload From disk
\nDelete All Records
\n
\nBack", src, src, src, src) - if(4.0) - dat += "
Medical Record

" - if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1))) - dat += text("Name: [] ID: []
\nSex: []
\nAge: []
\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", src.active1.fields["name"], src.active1.fields["id"], src, src.active1.fields["sex"], src, src.active1.fields["age"], src, src.active1.fields["fingerprint"], src, src.active1.fields["p_stat"], src, src.active1.fields["m_stat"]) - else - dat += "General Record Lost!
" - if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2))) - dat += text("
\n
Medical Data

\nBlood Type: []
\n
\nMinor Disabilities: []
\nDetails: []
\n
\nMajor Disabilities: []
\nDetails: []
\n
\nAllergies: []
\nDetails: []
\n
\nCurrent Diseases: [] (per disease info placed in log/comment section)
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\n
Comments/Log

", src, src.active2.fields["b_type"], src, src.active2.fields["mi_dis"], src, src.active2.fields["mi_dis_d"], src, src.active2.fields["ma_dis"], src, src.active2.fields["ma_dis_d"], src, src.active2.fields["alg"], src, src.active2.fields["alg_d"], src, src.active2.fields["cdi"], src, src.active2.fields["cdi_d"], src, src.active2.fields["notes"]) - var/counter = 1 - while(src.active2.fields[text("com_[]", counter)]) - dat += text("[]
Delete Entry

", src.active2.fields[text("com_[]", counter)], src, counter) - counter++ - dat += text("Add Entry

", src) - dat += text("Delete Record (Medical Only)

", src) - else - dat += "Medical Record Lost!
" - dat += text("New Record

") - dat += text("\nPrint Record
\nBack
", src, src) - if(5.0) - dat += {"
Virus Database
-
GBS -
Common Cold -
Flu -
Jungle Fever -
Clowning Around -
Plasmatoid -
Space Rhinovirus -
Robot Transformation -
Back"} - if(6.0) - dat += "
Medical Robot Monitor
" - dat += "Back" - dat += "
Medical Robots:" - var/bdat = null - for(var/obj/machinery/bot/medbot/M in world) - var/turf/bl = get_turf(M) - bdat += "[M.name] - \[[bl.x],[bl.y]\] - [M.on ? "Online" : "Offline"]
" - if(!isnull(M.reagent_glass)) - bdat += "Reservoir: \[[M.reagent_glass.reagents.total_volume]/[M.reagent_glass.reagents.maximum_volume]\]" - else - bdat += "Using Internal Synthesizer." - - if(!bdat) - dat += "
None detected
" - else - dat += "[bdat]" - - else - else - dat += text("{Log In}", src) - dat += "
{Quit}" - - return dat - -/datum/computer/file/computer_program/med_data/Topic(href, href_list) - if(..()) - return - if (!( data_core.general.Find(src.active1) )) - src.active1 = null - if (!( data_core.medical.Find(src.active2) )) - src.active2 = null - if (href_list["temp"]) - src.temp = null - else if (href_list["logout"]) - src.authenticated = null - src.screen = null - src.active1 = null - src.active2 = null - else if (href_list["login"]) - if (istype(usr, /mob/living/silicon)) - src.active1 = null - src.active2 = null - src.authenticated = 1 - src.rank = "AI" - src.screen = 1 - else if (istype(src.master.authid, /obj/item/weapon/card/id)) - src.active1 = null - src.active2 = null - if (src.check_access(src.master.authid)) - src.authenticated = src.master.authid.registered_name - src.rank = src.master.authid.assignment - src.screen = 1 - if (src.authenticated) - - if(href_list["screen"]) - src.screen = text2num(href_list["screen"]) - if(src.screen < 1) - src.screen = 1 - - src.active1 = null - src.active2 = null - - if(href_list["vir"]) - switch(href_list["vir"]) - if("gbs") - src.temp = {"Name: GBS -
Number of stages: 5 -
Spread: Airborne Transmission -
Possible Cure: Spaceacillin -
Affected Species: Human -
-
Notes: If left untreated death will occur. -
-
Severity: Major"} - if("cc") - src.temp = {"Name: Common Cold -
Number of stages: 3 -
Spread: Airborne Transmission -
Possible Cure: Rest -
Affected Species: Human -
-
Notes: If left untreated the subject will contract the flu. -
-
Severity: Minor"} - if("f") - src.temp = {"Name: The Flu -
Number of stages: 3 -
Spread: Airborne Transmission -
Possible Cure: Rest -
Affected Species: Human -
-
Notes: If left untreated the subject will feel quite unwell. -
-
Severity: Medium"} - if("jf") - src.temp = {"Name: Jungle Fever -
Number of stages: 1 -
Spread: Airborne Transmission -
Possible Cure: None -
Affected Species: Monkey -
-
Notes: monkeys with this disease will bite humans, causing humans to spontaneously to mutate into a monkey. -
-
Severity: Medium"} - if("ca") - src.temp = {"Name: Clowning Around -
Number of stages: 4 -
Spread: Airborne Transmission -
Possible Cure: Spaceacillin -
Affected Species: Human -
-
Notes: Subjects are affected by rampant honking and a fondness for shenanigans. They may also spontaneously phase through closed airlocks. -
-
Severity: Laughable"} - if("p") - src.temp = {"Name: Plasmatoid -
Number of stages: 3 -
Spread: Airborne Transmission -
Possible Cure: Inaprovaline -
Affected Species: Human and Monkey -
-
Notes: With this disease the victim will need plasma to breathe. -
-
Severity: Major"} - if("dna") - src.temp = {"Name: Space Rhinovirus -
Number of stages: 4 -
Spread: Airborne Transmission -
Possible Cure: Spaceacillin -
Affected Species: Human -
-
Notes: This disease transplants the genetic code of the intial vector into new hosts. -
-
Severity: Medium"} - if("bot") - src.temp = {"Name: Robot Transformation -
Number of stages: 5 -
Spread: Infected food -
Possible Cure: None -
Affected Species: Human -
-
Notes: This disease, actually acute nanomachine infection, converts the victim into a cyborg. -
-
Severity: Major"} - - if (href_list["del_all"]) - src.temp = text("Are you sure you wish to delete all records?
\n\tYes
\n\tNo
", src, src) - - if (href_list["del_all2"]) - for(var/datum/data/record/R in data_core.medical) - del(R) - src.temp = "All records deleted." - - if (href_list["field"]) - var/a1 = src.active1 - var/a2 = src.active2 - switch(href_list["field"]) - if("fingerprint") - if (istype(src.active1, /datum/data/record)) - var/t1 = input("Please input fingerprint hash:", "Med. records", src.active1.fields["id"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) - return - src.active1.fields["fingerprint"] = t1 - if("sex") - if (istype(src.active1, /datum/data/record)) - if (src.active1.fields["sex"] == "Male") - src.active1.fields["sex"] = "Female" - else - src.active1.fields["sex"] = "Male" - if("age") - if (istype(src.active1, /datum/data/record)) - var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) - return - src.active1.fields["age"] = t1 - if("mi_dis") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["mi_dis"] = t1 - if("mi_dis_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["mi_dis_d"] = t1 - if("ma_dis") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["ma_dis"] = t1 - if("ma_dis_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["ma_dis_d"] = t1 - if("alg") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["alg"] = t1 - if("alg_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["alg_d"] = t1 - if("cdi") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["cdi"] = t1 - if("cdi_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["cdi_d"] = t1 - if("notes") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize notes:", "Med. records", src.active2.fields["notes"], null) as message - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["notes"] = t1 - if("p_stat") - if (istype(src.active1, /datum/data/record)) - src.temp = text("Physical Condition:
\n\t*Deceased*
\n\t*Unconscious*
\n\tActive
\n\tPhysically Unfit
", src, src, src, src) - if("m_stat") - if (istype(src.active1, /datum/data/record)) - src.temp = text("Mental Condition:
\n\t*Insane*
\n\t*Unstable*
\n\t*Watch*
\n\tStable
", src, src, src, src) - if("b_type") - if (istype(src.active2, /datum/data/record)) - src.temp = text("Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
", src, src, src, src, src, src, src, src) - else - - if (href_list["p_stat"]) - if (src.active1) - switch(href_list["p_stat"]) - if("deceased") - src.active1.fields["p_stat"] = "*Deceased*" - if("unconscious") - src.active1.fields["p_stat"] = "*Unconscious*" - if("active") - src.active1.fields["p_stat"] = "Active" - if("unfit") - src.active1.fields["p_stat"] = "Physically Unfit" - - if (href_list["m_stat"]) - if (src.active1) - switch(href_list["m_stat"]) - if("insane") - src.active1.fields["m_stat"] = "*Insane*" - if("unstable") - src.active1.fields["m_stat"] = "*Unstable*" - if("watch") - src.active1.fields["m_stat"] = "*Watch*" - if("stable") - src.active2.fields["m_stat"] = "Stable" - - - if (href_list["b_type"]) - if (src.active2) - switch(href_list["b_type"]) - if("an") - src.active2.fields["b_type"] = "A-" - if("bn") - src.active2.fields["b_type"] = "B-" - if("abn") - src.active2.fields["b_type"] = "AB-" - if("on") - src.active2.fields["b_type"] = "O-" - if("ap") - src.active2.fields["b_type"] = "A+" - if("bp") - src.active2.fields["b_type"] = "B+" - if("abp") - src.active2.fields["b_type"] = "AB+" - if("op") - src.active2.fields["b_type"] = "O+" - - - if (href_list["del_r"]) - if (src.active2) - src.temp = "Are you sure you wish to delete the record (Medical Portion Only)?
\n\tYes
\n\tNo
" - - if (href_list["del_r2"]) - if (src.active2) - del(src.active2) - - if (href_list["d_rec"]) - var/datum/data/record/R = locate(href_list["d_rec"]) - var/datum/data/record/M = locate(href_list["d_rec"]) - if (!( data_core.general.Find(R) )) - src.temp = "Record Not Found!" - return - for(var/datum/data/record/E in data_core.medical) - if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) - M = E - else - //Foreach continue //goto(2540) - src.active1 = R - src.active2 = M - src.screen = 4 - - if (href_list["new"]) - if ((istype(src.active1, /datum/data/record) && !( istype(src.active2, /datum/data/record) ))) - var/datum/data/record/R = new /datum/data/record( ) - R.fields["name"] = src.active1.fields["name"] - R.fields["id"] = src.active1.fields["id"] - R.name = text("Medical Record #[]", R.fields["id"]) - R.fields["b_type"] = "Unknown" - R.fields["mi_dis"] = "None" - R.fields["mi_dis_d"] = "No minor disabilities have been declared." - R.fields["ma_dis"] = "None" - R.fields["ma_dis_d"] = "No major disabilities have been diagnosed." - R.fields["alg"] = "None" - R.fields["alg_d"] = "No allergies have been detected in this patient." - R.fields["cdi"] = "None" - R.fields["cdi_d"] = "No diseases have been diagnosed at the moment." - R.fields["notes"] = "No notes." - data_core.medical += R - src.active2 = R - src.screen = 4 - - if (href_list["add_c"]) - if (!( istype(src.active2, /datum/data/record) )) - return - var/a2 = src.active2 - var/t1 = input("Add Comment:", "Med. records", null, null) as message - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - var/counter = 1 - while(src.active2.fields[text("com_[]", counter)]) - counter++ - src.active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2053
[]", src.authenticated, src.rank, time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1) - - if (href_list["del_c"]) - if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])])) - src.active2.fields[text("com_[]", href_list["del_c"])] = "Deleted" - - if (href_list["search"]) - var/t1 = input("Search String: (Name or ID)", "Med. records", null, null) as text - if ((!( t1 ) || usr.stat || (!src.master) || !( src.authenticated ) || usr.restrained() || ((!in_range(src.master, usr)) && (!istype(usr, /mob/living/silicon))))) - return - src.active1 = null - src.active2 = null - t1 = lowertext(t1) - for(var/datum/data/record/R in data_core.general) - if ((lowertext(R.fields["name"]) == t1 || t1 == lowertext(R.fields["id"]))) - src.active1 = R - else - - if (!( src.active1 )) - src.temp = text("Could not locate record [].", t1) - else - for(var/datum/data/record/E in data_core.medical) - if ((E.fields["name"] == src.active1.fields["name"] || E.fields["id"] == src.active1.fields["id"])) - src.active2 = E - else - - src.screen = 4 - - if (href_list["print_p"]) - var/info = "
Medical Record

" - if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1))) - info += text("Name: [] ID: []
\nSex: []
\nAge: []
\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", src.active1.fields["name"], src.active1.fields["id"], src.active1.fields["sex"], src.active1.fields["age"], src.active1.fields["fingerprint"], src.active1.fields["p_stat"], src.active1.fields["m_stat"]) - else - info += "General Record Lost!
" - if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2))) - info += text("
\n
Medical Data

\nBlood Type: []
\n
\nMinor Disabilities: []
\nDetails: []
\n
\nMajor Disabilities: []
\nDetails: []
\n
\nAllergies: []
\nDetails: []
\n
\nCurrent Diseases: [] (per disease info placed in log/comment section)
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\n
Comments/Log

", src.active2.fields["b_type"], src.active2.fields["mi_dis"], src.active2.fields["mi_dis_d"], src.active2.fields["ma_dis"], src.active2.fields["ma_dis_d"], src.active2.fields["alg"], src.active2.fields["alg_d"], src.active2.fields["cdi"], src.active2.fields["cdi_d"], src.active2.fields["notes"]) - var/counter = 1 - while(src.active2.fields[text("com_[]", counter)]) - info += text("[]
", src.active2.fields[text("com_[]", counter)]) - counter++ - else - info += "Medical Record Lost!
" - info += "" - - var/datum/signal/signal = new - signal.data["data"] = info - signal.data["title"] = "Medical Record" - src.peripheral_command("print",signal) - - src.master.add_fingerprint(usr) - src.master.updateUsrDialog() - return \ No newline at end of file diff --git a/code/unused/computer2/messenger.dm b/code/unused/computer2/messenger.dm deleted file mode 100644 index be1930bb7a2..00000000000 --- a/code/unused/computer2/messenger.dm +++ /dev/null @@ -1,97 +0,0 @@ -/datum/computer/file/computer_program/messenger - name = "Messenger" - size = 8.0 - var/messages = null - var/screen_name = "User" - -//To-do: take screen_name from inserted id card?? -//Saving log to file datum - - return_text() - if(..()) - return - - var/dat = "Close | " - dat += "Quit
" - - dat += "SpaceMessenger V4.1.2
" - - dat += "Send Message" - - dat += " | Clear" - dat += " | Print" - - dat += " | Name:[src.screen_name]
" - - dat += messages - - dat += "
" - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["send_msg"]) - var/t = input(usr, "Please enter messenger", src.id_tag, null) as text - t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN) - if (!t) - return - if (!in_range(src.master, usr)) - return - - var/datum/signal/signal = new - signal.data["type"] = "message" - signal.data["data"] = t - signal.data["sender"] = src.screen_name - src.messages += "→ You:
[t]
" - - peripheral_command("send signal", signal) - - if(href_list["func_msg"]) - switch(href_list["func_msg"]) - if("clear") - src.messages = null - - if("print") - var/datum/signal/signal = new - signal.data["data"] = src.messages - signal.data["title"] = "Chatlog" - peripheral_command("print", signal) - - //if("save") - //TO-DO - - - if(href_list["set_name"]) - var/t = input(usr, "Please enter screen name", src.id_tag, null) as text - t = copytext(sanitize(t), 1, 20) - if (!t) - return - if (!in_range(src.master, usr)) - return - - src.screen_name = t - - src.master.add_fingerprint(usr) - src.master.updateUsrDialog() - return - - receive_command(obj/source, command, datum/signal/signal) - if(..() || !signal) - return - - if(command == "radio signal") - switch(signal.data["type"]) - if("message") - var/sender = signal.data["sender"] - if(!sender) - sender = "Unknown" - - src.messages += "← From [sender]:
[signal.data["data"]]
" - if(src.master.active_program == src) - playsound(src.master.loc, 'sound/machines/twobeep.ogg', 50, 1) - src.master.updateUsrDialog() - - return \ No newline at end of file diff --git a/code/unused/computer2/peripherals.dm b/code/unused/computer2/peripherals.dm deleted file mode 100644 index cc3b50190fb..00000000000 --- a/code/unused/computer2/peripherals.dm +++ /dev/null @@ -1,209 +0,0 @@ -/obj/item/weapon/peripheral - name = "Peripheral card" - desc = "A computer circuit board." - icon = 'icons/obj/module.dmi' - icon_state = "id_mod" - item_state = "electronic" - w_class = 2 - var/obj/machinery/computer2/host - var/id = null - - New() - ..() - spawn(2) - if(istype(src.loc,/obj/machinery/computer2)) - host = src.loc - host.peripherals.Add(src) -// var/setup_id = "\ref[src]" -// src.id = copytext(setup_id,4,(length(setup_id)-1) ) - - Delete() - if(host) - host.peripherals.Remove(src) - ..() - - - proc - receive_command(obj/source, command, datum/signal/signal) - if((source != host) || !(src in host)) - return 1 - - if(!command) - return 1 - - return 0 - - send_command(command, datum/signal/signal) - if(!command || !host) - return - - src.host.receive_command(src, command, signal) - - return - -/obj/item/weapon/peripheral/radio - name = "Wireless card" - var/frequency = 1419 - var/code = null - var/datum/radio_frequency/radio_connection - New() - ..() - if(radio_controller) - initialize() - - initialize() - set_frequency(frequency) - - proc - set_frequency(new_frequency) - radio_controller.remove_object(src, frequency) - frequency = new_frequency - radio_connection = radio_controller.add_object(src, frequency) - - receive_command(obj/source, command, datum/signal/signal) - if(..()) - return - - if(!signal || !radio_connection) - return - - switch(command) - if("send signal") - src.radio_connection.post_signal(src, signal) - - return - - receive_signal(datum/signal/signal) - if(!signal || (signal.encryption && signal.encryption != code)) - return - - var/datum/signal/newsignal = new - newsignal.data = signal.data - if(src.code) - newsignal.encryption = src.code - - send_command("radio signal",newsignal) - return - -/obj/item/weapon/peripheral/printer - name = "Printer module" - desc = "A small printer designed to fit into a computer casing." - icon_state = "card_mod" - var/printing = 0 - - receive_command(obj/source,command, datum/signal/signal) - if(..()) - return - - if(!signal) - return - - if((command == "print") && !src.printing) - src.printing = 1 - - var/print_data = signal.data["data"] - var/print_title = signal.data["title"] - if(!print_data) - src.printing = 0 - return - spawn(50) - var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.host.loc ) - P.info = print_data - if(print_title) - P.name = "paper- '[print_title]'" - - src.printing = 0 - return - - return - -/obj/item/weapon/peripheral/prize_vendor - name = "Prize vending module" - desc = "An arcade prize dispenser designed to fit inside a computer casing." - icon_state = "power_mod" - var/last_vend = 0 //Delay between vends if manually activated(ie a dude is holding it and shaking stuff out) - - receive_command(obj/source,command, datum/signal/signal) - if(..()) - return - - if(command == "vend prize") - src.vend_prize() - - return - - attack_self(mob/user as mob) - if( (last_vend + 400) < world.time) - user << "You shake something out of [src]!" - src.vend_prize() - src.last_vend = world.time - else - user << "\red [src] isn't ready to dispense a prize yet." - - return - - proc/vend_prize() - var/obj/item/prize - var/prizeselect = rand(1,4) - var/turf/prize_location = null - - if(src.host) - prize_location = src.host.loc - else - prize_location = get_turf(src) - - switch(prizeselect) - if(1) - prize = new /obj/item/weapon/spacecash( prize_location ) - prize.name = "space ticket" - prize.desc = "It's almost like actual currency!" - if(2) - prize = new /obj/item/device/radio/beacon( prize_location ) - prize.name = "electronic blink toy game" - prize.desc = "Blink. Blink. Blink." - if(3) - prize = new /obj/item/weapon/lighter/zippo( prize_location ) - prize.name = "Burno Lighter" - prize.desc = "Almost like a decent lighter!" - if(4) - prize = new /obj/item/weapon/c_tube( prize_location ) - prize.name = "toy sword" - prize.icon = 'icons/obj/weapons.dmi' - prize.icon_state = "sword1" - prize.desc = "A sword made of cheap plastic." - -/* -/obj/item/weapon/peripheral/card_scanner - name = "ID scanner module" - icon_state = "card_mod" - var/obj/item/weapon/card/id/authid = null - - attack_self(mob/user as mob) - if(authid) - user << "The card falls out." - src.authid.loc = get_turf(user) - src.authid = null - - return - - receive_command(obj/source,command, datum/signal/signal) - if(..()) - return - - if(!signal || (signal.data["ref_id"] != "\ref[src]") ) - return - - switch(command) - if("eject card") - if(src.authid) - src.authid.loc = src.host.loc - src.authid = null - if("add card access") - var/new_access = signal.data["access"] - if(!new_access) - return - - - - return -*/ \ No newline at end of file diff --git a/code/unused/conveyor.dm b/code/unused/conveyor.dm deleted file mode 100644 index ad4337b696c..00000000000 --- a/code/unused/conveyor.dm +++ /dev/null @@ -1,384 +0,0 @@ -// converyor belt - -// moves items/mobs/movables in set direction every ptick - - -/obj/machinery/conveyor - icon = 'icons/obj/recycling.dmi' - icon_state = "conveyor0" - name = "conveyor belt" - desc = "A conveyor belt." - anchored = 1 - var/operating = 0 // 1 if running forward, -1 if backwards, 0 if off - var/operable = 1 // true if can operate (no broken segments in this belt run) - var/basedir // this is the default (forward) direction, set by the map dir - // note dir var can vary when the direction changes - - var/list/affecting // the list of all items that will be moved this ptick - var/id = "" // the control ID - must match controller ID - // following two only used if a diverter is present - var/divert = 0 // if non-zero, direction to divert items - var/divdir = 0 // if diverting, will be conveyer dir needed to divert (otherwise dense) - - - - // create a conveyor - -/obj/machinery/conveyor/New() - ..() - basedir = dir - setdir() - - // set the dir and target turf depending on the operating direction - -/obj/machinery/conveyor/proc/setdir() - if(operating == -1) - dir = turn(basedir,180) - else - dir = basedir - update() - - - // update the icon depending on the operating condition - -/obj/machinery/conveyor/proc/update() - if(stat & BROKEN) - icon_state = "conveyor-b" - operating = 0 - return - if(!operable) - operating = 0 - icon_state = "conveyor[(operating != 0) && !(stat & NOPOWER)]" - - - // machine process - // move items to the target location -/obj/machinery/conveyor/process() - if(stat & (BROKEN | NOPOWER)) - return - if(!operating) - return - use_power(100) - - var/movedir = dir // base movement dir - if(divert && dir==divdir) // update if diverter present - movedir = divert - - - affecting = loc.contents - src // moved items will be all in loc - spawn(1) // slight delay to prevent infinite propagation due to map order - var/items_moved = 0 - for(var/atom/movable/A in affecting) - if(!A.anchored) - if(isturf(A.loc)) // this is to prevent an ugly bug that forces a player to drop what they're holding if they recently pick it up from the conveyer belt - if(ismob(A)) - var/mob/M = A - if(M.buckled == src) - var/obj/machinery/conveyor/C = locate() in get_step(src, dir) - M.buckled = null - step(M,dir) - if(C) - M.buckled = C - else - new/obj/item/stack/cable_coil/cut(M.loc) - else - step(M,movedir) - else - step(A,movedir) - items_moved++ - if(items_moved >= 10) - break - -// attack with item, place item on conveyor - -/obj/machinery/conveyor/attackby(var/obj/item/I, mob/user) - if(istype(I, /obj/item/weapon/grab)) // special handling if grabbing a mob - var/obj/item/weapon/grab/G = I - G.affecting.Move(src.loc) - del(G) - return - else if(istype(I, /obj/item/stack/cable_coil)) // if cable, see if a mob is present - var/mob/M = locate() in src.loc - if(M) - if (M == user) - src.visible_message("\blue [M] ties \himself to the conveyor.") - // note don't check for lying if self-tying - else - if(M.lying) - user.visible_message("\blue [M] has been tied to the conveyor by [user].", "\blue You tie [M] to the converyor!") - else - user << "\blue [M] must be lying down to be tied to the converyor!" - return - M.buckled = src - src.add_fingerprint(user) - I:use(1) - M.lying = 1 - return - - // else if no mob in loc, then allow coil to be placed - - else if(istype(I, /obj/item/weapon/wirecutters)) - var/mob/M = locate() in src.loc - if(M && M.buckled == src) - M.buckled = null - src.add_fingerprint(user) - if (M == user) - src.visible_message("\blue [M] cuts \himself free from the conveyor.") - else - src.visible_message("\blue [M] had been cut free from the conveyor by [user].") - return - - if(isrobot(user)) - return - - // otherwise drop and place on conveyor - user.drop_item() - if(I && I.loc) I.loc = src.loc - return - -// attack with hand, move pulled object onto conveyor - -/obj/machinery/conveyor/attack_hand(mob/user as mob) - user.Move_Pulled(src) - - -// make the conveyor broken -// also propagate inoperability to any connected conveyor with the same ID -/obj/machinery/conveyor/proc/broken() - stat |= BROKEN - update() - - var/obj/machinery/conveyor/C = locate() in get_step(src, basedir) - if(C) - C.set_operable(basedir, id, 0) - - C = locate() in get_step(src, turn(basedir,180)) - if(C) - C.set_operable(turn(basedir,180), id, 0) - - -//set the operable var if ID matches, propagating in the given direction - -/obj/machinery/conveyor/proc/set_operable(stepdir, match_id, op) - - if(id != match_id) - return - operable = op - - update() - var/obj/machinery/conveyor/C = locate() in get_step(src, stepdir) - if(C) - C.set_operable(stepdir, id, op) - -/* -/obj/machinery/conveyor/verb/destroy() - set src in view() - src.broken() -*/ - -/obj/machinery/conveyor/power_change() - ..() - update() - - -// converyor diverter -// extendable arm that can be switched so items on the conveyer are diverted sideways -// situate in same turf as conveyor -// only works if belts is running proper direction -// -// -/obj/machinery/diverter - icon = 'icons/obj/recycling.dmi' - icon_state = "diverter0" - name = "diverter" - desc = "A diverter arm for a conveyor belt." - anchored = 1 - layer = FLY_LAYER - var/obj/machinery/conveyor/conv // the conveyor this diverter works on - var/deployed = 0 // true if diverter arm is extended - var/operating = 0 // true if arm is extending/contracting - var/divert_to // the dir that diverted items will be moved - var/divert_from // the dir items must be moving to divert - - -// create a diverter -// set up divert_to and divert_from directions depending on dir state -/obj/machinery/diverter/New() - - ..() - - switch(dir) - if(NORTH) - divert_to = WEST // stuff will be moved to the west - divert_from = NORTH // if entering from the north - if(SOUTH) - divert_to = EAST - divert_from = NORTH - if(EAST) - divert_to = EAST - divert_from = SOUTH - if(WEST) - divert_to = WEST - divert_from = SOUTH - if(NORTHEAST) - divert_to = NORTH - divert_from = EAST - if(NORTHWEST) - divert_to = NORTH - divert_from = WEST - if(SOUTHEAST) - divert_to = SOUTH - divert_from = EAST - if(SOUTHWEST) - divert_to = SOUTH - divert_from = WEST - spawn(2) - // wait for map load then find the conveyor in this turf - conv = locate() in src.loc - if(conv) // divert_from dir must match possible conveyor movement - if(conv.basedir != divert_from && conv.basedir != turn(divert_from,180) ) - del(src) // if no dir match, then delete self - set_divert() - update() - -// update the icon state depending on whether the diverter is extended -/obj/machinery/diverter/proc/update() - icon_state = "diverter[deployed]" - -// call to set the diversion vars of underlying conveyor -/obj/machinery/diverter/proc/set_divert() - if(conv) - if(deployed) - conv.divert = divert_to - conv.divdir = divert_from - else - conv.divert= 0 - - -// *** TESTING click to toggle -/obj/machinery/diverter/Click() - toggle() - - -// toggle between arm deployed and not deployed, showing animation -// -/obj/machinery/diverter/proc/toggle() - if( stat & (NOPOWER|BROKEN)) - return - - if(operating) - return - - use_power(50) - operating = 1 - if(deployed) - flick("diverter10",src) - icon_state = "diverter0" - sleep(10) - deployed = 0 - else - flick("diverter01",src) - icon_state = "diverter1" - sleep(10) - deployed = 1 - operating = 0 - update() - set_divert() - -// don't allow movement into the 'backwards' direction if deployed -/obj/machinery/diverter/CanPass(atom/movable/O, var/turf/target) - var/direct = get_dir(O, target) - if(direct == divert_to) // prevent movement through body of diverter - return 0 - if(!deployed) - return 1 - return(direct != turn(divert_from,180)) - -// don't allow movement through the arm if deployed -/obj/machinery/diverter/CheckExit(atom/movable/O, var/turf/target) - var/direct = get_dir(O, target) - if(direct == turn(divert_to,180)) // prevent movement through body of diverter - return 0 - if(!deployed) - return 1 - return(direct != divert_from) - - - - - -// the conveyor control switch -// -// - -/obj/machinery/conveyor_switch - - name = "conveyor switch" - desc = "A conveyor control switch." - icon = 'icons/obj/recycling.dmi' - icon_state = "switch-off" - var/position = 0 // 0 off, -1 reverse, 1 forward - var/last_pos = -1 // last direction setting - var/operated = 1 // true if just operated - - var/id = "" // must match conveyor IDs to control them - - var/list/conveyors // the list of converyors that are controlled by this switch - anchored = 1 - - - -/obj/machinery/conveyor_switch/New() - ..() - update() - - spawn(5) // allow map load - conveyors = list() - for(var/obj/machinery/conveyor/C in world) - if(C.id == id) - conveyors += C - -// update the icon depending on the position - -/obj/machinery/conveyor_switch/proc/update() - if(position<0) - icon_state = "switch-rev" - else if(position>0) - icon_state = "switch-fwd" - else - icon_state = "switch-off" - - -// timed process -// if the switch changed, update the linked conveyors - -/obj/machinery/conveyor_switch/process() - if(!operated) - return - operated = 0 - - for(var/obj/machinery/conveyor/C in conveyors) - C.operating = position - C.setdir() - -// attack with hand, switch position -/obj/machinery/conveyor_switch/attack_hand(mob/user) - if(position == 0) - if(last_pos < 0) - position = 1 - last_pos = 0 - else - position = -1 - last_pos = 0 - else - last_pos = position - position = 0 - - operated = 1 - update() - - // find any switches with same id as this one, and set their positions to match us - for(var/obj/machinery/conveyor_switch/S in world) - if(S.id == src.id) - S.position = position - S.update() diff --git a/code/unused/disease2/analyser.dm b/code/unused/disease2/analyser.dm deleted file mode 100644 index 25c4a6ff736..00000000000 --- a/code/unused/disease2/analyser.dm +++ /dev/null @@ -1,75 +0,0 @@ -/obj/machinery/disease2/diseaseanalyser - name = "Disease Analyser" - icon = 'icons/obj/virology.dmi' - icon_state = "analyser" - anchored = 1 - density = 1 - - var/scanning = 0 - var/pause = 0 - - var/obj/item/weapon/virusdish/dish = null - -/obj/machinery/disease2/diseaseanalyser/attackby(var/obj/I as obj, var/mob/user as mob) - if(istype(I,/obj/item/weapon/virusdish)) - var/mob/living/carbon/c = user - if(!dish) - - dish = I - c.drop_item() - I.loc = src - for(var/mob/M in viewers(src)) - if(M == user) continue - M.show_message("\blue [user.name] inserts the [dish.name] in the [src.name]", 3) - - - else - user << "There is already a dish inserted" - - //else - return - - -/obj/machinery/disease2/diseaseanalyser/process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(500) - src.updateDialog() - - - if(scanning) - scanning -= 1 - if(scanning == 0) - var/r = "GNAv2 based virus lifeform" - r += "
Infection rate : [dish.virus2.infectionchance * 10]" - r += "
Spread form : [dish.virus2.spreadtype]" - r += "
Progress Speed : [dish.virus2.stageprob * 10]" - for(var/datum/disease2/effectholder/E in dish.virus2.effects) - r += "
Effect:[E.effect.name]. Strength : [E.multiplier * 8]. Verosity : [E.chance * 15]. Type : [5-E.stage]." - var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src.loc) - P.info = r - dish.info = r - dish.analysed = 1 - dish.loc = src.loc - dish = null - icon_state = "analyser" - - for(var/mob/O in hearers(src, null)) - O.show_message("\icon[src] \blue The [src.name] prints a sheet of paper", 3) - else if(dish && !scanning && !pause) - if(dish.virus2 && dish.growth > 50) - dish.growth -= 10 - scanning = 25 - icon_state = "analyser_processing" - else - pause = 1 - spawn(25) - dish.loc = src.loc - dish = null - for(var/mob/M in viewers(src)) - M.show_message("\icon[src] \blue The [src.name] buzzes", 2) - pause = 0 - - - - return diff --git a/code/unused/disease2/base.dm b/code/unused/disease2/base.dm deleted file mode 100644 index 73f09d627c6..00000000000 --- a/code/unused/disease2/base.dm +++ /dev/null @@ -1,331 +0,0 @@ -//To simplify, all diseases have 4 stages, with effects starting at stage 2 -//Stage 1 = Rest,Minor disease -//Stage 2 = Minimal effect -//Stage 3 = Medium effect -//Stage 4 = Death/Really Really really bad effect - - -/proc/infect_virus2(var/mob/living/carbon/M,var/datum/disease2/disease/disease,var/forced = 0) - if(prob(disease.infectionchance)) - if(M.virus2) - return - else - var/score = 0 - if(!forced) - if(istype(M, /mob/living/carbon/human)) - if(M:gloves) - score += 5 - if(istype(M:wear_suit, /obj/item/clothing/suit/space)) score += 10 - if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10 - if(istype(M:head, /obj/item/clothing/head/helmet/space)) score += 5 - if(istype(M:head, /obj/item/clothing/head/bio_hood)) score += 5 - if(M.wear_mask) - score += 5 - if((istype(M:wear_mask, /obj/item/clothing/mask) || istype(M:wear_mask, /obj/item/clothing/mask/surgical)) && !M.internal) - score += 5 - if(M.internal) - score += 5 - - if(score > 15) - return - // else if(score == 20 && prob(95)) - // return - else if(score == 15 && prob(75)) - return - else if(score == 10 && prob(55)) - return - else if(score == 5 && prob(35)) - return - - M.virus2 = disease.getcopy() - M.virus2.minormutate() - - for(var/datum/disease2/resistance/res in M.resistances) - if(res.resistsdisease(M.virus2)) - M.virus2 = null - - - -/datum/disease2/resistance - var/list/datum/disease2/effect/resistances = list() - - proc/resistsdisease(var/datum/disease2/disease/virus2) - var/list/res2 = list() - for(var/datum/disease2/effect/e in resistances) - res2 += e.type - for(var/datum/disease2/effectholder/holder in virus2) - if(!(holder.effect.type in res2)) - return 0 - else - res2 -= holder.effect.type - if(res2.len > 0) - return 0 - else - return 1 - - New(var/datum/disease2/disease/virus2) - for(var/datum/disease2/effectholder/h in virus2.effects) - resistances += h.effect.type - - -/proc/infect_mob_random(var/mob/living/carbon/M) - if(!M.virus2) - M.virus2 = new /datum/disease2/disease - M.virus2.makerandom() - -/datum/disease2/disease - var/infectionchance = 10 - var/spreadtype = "Blood" // Can also be "Airborne" - var/stage = 1 - var/stageprob = 2 - var/dead = 0 - var/clicks = 0 - - var/uniqueID = 0 - var/list/datum/disease2/effectholder/effects = list() - proc/makerandom() - var/datum/disease2/effectholder/holder = new /datum/disease2/effectholder - holder.stage = 1 - holder.getrandomeffect() - effects += holder - holder = new /datum/disease2/effectholder - holder.stage = 2 - holder.getrandomeffect() - effects += holder - holder = new /datum/disease2/effectholder - holder.stage = 3 - holder.getrandomeffect() - effects += holder - holder = new /datum/disease2/effectholder - holder.stage = 4 - holder.getrandomeffect() - effects += holder - uniqueID = rand(0,10000) - infectionchance = rand(1,10) - spreadtype = "Airborne" - proc/minormutate() - var/datum/disease2/effectholder/holder = pick(effects) - holder.minormutate() - infectionchance = min(10,infectionchance + rand(0,1)) - proc/issame(var/datum/disease2/disease/disease) - var/list/types = list() - var/list/types2 = list() - for(var/datum/disease2/effectholder/d in effects) - types += d.effect.type - var/equal = 1 - - for(var/datum/disease2/effectholder/d in disease.effects) - types2 += d.effect.type - - for(var/type in types) - if(!(type in types2)) - equal = 0 - return equal - - proc/activate(var/mob/living/carbon/mob) - if(dead) - mob.virus2 = null - return - if(mob.stat == 2) - return - if(mob.radiation > 50) - if(prob(1)) - majormutate() - if(mob.reagents.has_reagent("spaceacillin")) - return - if(prob(stageprob) && prob(25 + (clicks/100)) && stage != 4) - stage++ - clicks = 0 - for(var/datum/disease2/effectholder/e in effects) - e.runeffect(mob,stage) - - proc/cure_added(var/datum/disease2/resistance/res) - if(res.resistsdisease(src)) - dead = 1 - - proc/majormutate() - var/datum/disease2/effectholder/holder = pick(effects) - holder.majormutate() - - - proc/getcopy() -// world << "getting copy" - var/datum/disease2/disease/disease = new /datum/disease2/disease - disease.infectionchance = infectionchance - disease.spreadtype = spreadtype - disease.stageprob = stageprob - for(var/datum/disease2/effectholder/holder in effects) - // world << "adding effects" - var/datum/disease2/effectholder/newholder = new /datum/disease2/effectholder - newholder.effect = new holder.effect.type - newholder.chance = holder.chance - newholder.cure = holder.cure - newholder.multiplier = holder.multiplier - newholder.happensonce = holder.happensonce - newholder.stage = holder.stage - disease.effects += newholder - // world << "[newholder.effect.name]" - // world << "[disease]" - return disease - -/datum/disease2/effect - var/name = "Blanking effect" - var/stage = 4 - var/maxm = 1 - proc/activate(var/mob/living/carbon/mob,var/multiplier) - -/datum/disease2/effect/gibbingtons - name = "Gibbingtons Syndrome" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.gib() - -/datum/disease2/effect/radian - name = "Radian's syndrome" - stage = 4 - maxm = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.radiation += (2*multiplier) - -/datum/disease2/effect/toxins - name = "Hyperacid Syndrome" - stage = 3 - maxm = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.adjustToxLoss(2*multiplier) - -/datum/disease2/effect/scream - name = "Random screaming syndrome" - stage = 2 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*scream") - -/datum/disease2/effect/drowsness - name = "Automated sleeping syndrome" - stage = 2 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.drowsyness += 10 - -/datum/disease2/effect/shakey - name = "World Shaking syndrome" - stage = 3 - maxm = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - shake_camera(mob,5*multiplier) - -/datum/disease2/effect/deaf - name = "Hard of hearing syndrome" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.ear_deaf += 20 - -/datum/disease2/effect/invisible - name = "Waiting Syndrome" - stage = 1 - activate(var/mob/living/carbon/mob,var/multiplier) - return -/* -/datum/disease2/effect/telepathic - name = "Telepathy Syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.mutations |= 512 -*/ -/datum/disease2/effect/noface - name = "Identity Loss syndrome" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.real_name = "Unknown" - -/datum/disease2/effect/monkey - name = "Monkism syndrome" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - if(istype(mob,/mob/living/carbon/human)) - var/mob/living/carbon/human/h = mob - h.monkeyize() - -/datum/disease2/effect/sneeze - name = "Coldingtons Effect" - stage = 1 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*sneeze") - -/datum/disease2/effect/gunck - name = "Flemmingtons" - stage = 1 - activate(var/mob/living/carbon/mob,var/multiplier) - mob << "\red Mucous runs down the back of your throat." - -/datum/disease2/effect/killertoxins - name = "Toxification syndrome" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.adjustToxLoss(15) -/* -/datum/disease2/effect/hallucinations - name = "Hallucinational Syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.hallucination += 25 -*/ -/datum/disease2/effect/sleepy - name = "Resting syndrome" - stage = 2 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*collapse") - -/datum/disease2/effect/mind - name = "Lazy mind syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.setBrainLoss(50) - -/datum/disease2/effect/suicide - name = "Suicidal syndrome" - stage = 4 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.suiciding = 1 - //instead of killing them instantly, just put them at -175 health and let 'em gasp for a while - viewers(mob) << "\red [mob.name] is attempting to bite off \his tongue. It looks like \he's trying to commit suicide." - mob.oxyloss = max(175 - mob.getToxLoss() - mob.getFireLoss() - mob.getBruteLoss(), mob.getOxyLoss()) - mob.updatehealth() - spawn(200) //in case they get revived by cryo chamber or something stupid like that, let them suicide again in 20 seconds - mob.suiciding = 0 - -/datum/disease2/effectholder - var/name = "Holder" - var/datum/disease2/effect/effect - var/chance = 0 //Chance in percentage each tick - var/cure = "" //Type of cure it requires - var/happensonce = 0 - var/multiplier = 1 //The chance the effects are WORSE - var/stage = 0 - - proc/runeffect(var/mob/living/carbon/human/mob,var/stage) - if(happensonce > -1 && effect.stage <= stage && prob(chance)) - effect.activate(mob) - if(happensonce == 1) - happensonce = -1 - - proc/getrandomeffect() - var/list/datum/disease2/effect/list = list() - for(var/e in (typesof(/datum/disease2/effect) - /datum/disease2/effect)) - // world << "Making [e]" - var/datum/disease2/effect/f = new e - if(f.stage == src.stage) - list += f - effect = pick(list) - chance = rand(1,6) - - proc/minormutate() - switch(pick(1,2,3,4,5)) - if(1) - chance = rand(0,100) - if(2) - multiplier = rand(1,effect.maxm) - proc/majormutate() - getrandomeffect() - -/proc/dprob(var/p) - return(prob(sqrt(p)) && prob(sqrt(p))) diff --git a/code/unused/disease2/biohazard destroyer.dm b/code/unused/disease2/biohazard destroyer.dm deleted file mode 100644 index 66fe4368b8f..00000000000 --- a/code/unused/disease2/biohazard destroyer.dm +++ /dev/null @@ -1,20 +0,0 @@ -/obj/machinery/disease2/biodestroyer - name = "Biohazard destroyer" - icon = 'icons/obj/pipes/disposal.dmi' - icon_state = "disposal" - var/list/accepts = list(/obj/item/clothing,/obj/item/weapon/virusdish/,/obj/item/weapon/cureimplanter,/obj/item/weapon/diseasedisk) - density = 1 - anchored = 1 - -/obj/machinery/disease2/biodestroyer/attackby(var/obj/I as obj, var/mob/user as mob) - for(var/path in accepts) - if(I.type in typesof(path)) - user.drop_item() - del(I) - overlays += image('icons/obj/pipes/disposal.dmi', "dispover-handle") - return - user.drop_item() - I.loc = src.loc - - for(var/mob/O in hearers(src, null)) - O.show_message("\icon[src] \blue The [src.name] beeps", 2) diff --git a/code/unused/disease2/cureimplanter.dm b/code/unused/disease2/cureimplanter.dm deleted file mode 100644 index 4bd0ff71305..00000000000 --- a/code/unused/disease2/cureimplanter.dm +++ /dev/null @@ -1,42 +0,0 @@ -/obj/item/weapon/cureimplanter - name = "Hypospray injector" - icon = 'icons/obj/items.dmi' - icon_state = "implanter1" - var/datum/disease2/resistance/resistance = null - var/works = 0 - var/datum/disease2/disease/virus2 = null - item_state = "syringe_0" - throw_speed = 3 - throw_range = 5 - w_class = 2.0 - - -/obj/item/weapon/cureimplanter/attack(mob/target as mob, mob/user as mob) - if(ismob(target)) - for(var/mob/O in viewers(world.view, user)) - if (target != user) - O.show_message(text("\red [] is trying to inject [] with [src.name]!", user, target), 1) - else - O.show_message("\red [user] is trying to inject themselves with [src.name]!", 1) - if(!do_mob(user, target,60)) return - - - for(var/mob/O in viewers(world.view, user)) - if (target != user) - O.show_message(text("\red [] injects [] with [src.name]!", user, target), 1) - else - O.show_message("\red [user] injects themself with [src.name]!", 1) - - - var/mob/living/carbon/M = target - - if(works == 0 && prob(25)) - M.resistances2 += resistance - if(M.virus2) - M.virus2.cure_added(resistance) - else if(works == 1) - M.adjustToxLoss(rand(20,50)) - else if(works == 2) - M.adjustToxLoss(rand(50,100)) - else if(works == 3) - infect_virus2(M,virus2,1) diff --git a/code/unused/disease2/curer.dm b/code/unused/disease2/curer.dm deleted file mode 100644 index 5453d8dfdd7..00000000000 --- a/code/unused/disease2/curer.dm +++ /dev/null @@ -1,154 +0,0 @@ -/obj/machinery/computer/curer - name = "Cure Research Machine" - icon = 'icons/obj/computer.dmi' - icon_state = "dna" -// brightnessred = 0 -// brightnessgreen = 2 //Used for multicoloured lighting on BS12 -// brightnessblue = 2 - var/curing - var/virusing - circuit = "/obj/item/weapon/circuitboard/mining" - - var/obj/item/weapon/virusdish/dish = null - -/obj/machinery/computer/curer/attackby(var/obj/I as obj, var/mob/user as mob) - /*if(istype(I, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - if (src.stat & BROKEN) - user << "\blue The broken glass falls out." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - new /obj/item/weapon/shard( src.loc ) - var/obj/item/weapon/circuitboard/curer/M = new /obj/item/weapon/circuitboard/curer( A ) - for (var/obj/C in src) - C.loc = src.loc - A.circuit = M - A.state = 3 - A.icon_state = "3" - A.anchored = 1 - del(src) - else - user << "\blue You disconnect the monitor." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - var/obj/item/weapon/circuitboard/curer/M = new /obj/item/weapon/circuitboard/curer( A ) - for (var/obj/C in src) - C.loc = src.loc - A.circuit = M - A.state = 4 - A.icon_state = "4" - A.anchored = 1 - del(src)*/ - if(istype(I,/obj/item/weapon/virusdish)) - var/mob/living/carbon/c = user - if(!dish) - - dish = I - c.drop_item() - I.loc = src - - //else - src.attack_hand(user) - return - -/obj/machinery/computer/curer/attack_ai(var/mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/curer/attack_paw(var/mob/user as mob) - - return src.attack_hand(user) - return - -/obj/machinery/computer/curer/attack_hand(var/mob/user as mob) - if(..()) - return - user.machine = src - var/dat - if(curing) - dat = "Antibody production in progress" - else if(virusing) - dat = "Virus production in progress" - else if(dish) - dat = "Virus dish inserted" - if(dish.virus2) - if(dish.growth >= 100) - dat += "
Begin antibody production" - dat += "
Begin virus production" - else - dat += "
Insufficent cells to attempt to create cure" - else - dat += "
Please check dish contents" - - dat += "
Eject disk" - else - dat = "Please insert dish" - - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") - return - -/obj/machinery/computer/curer/process() - ..() - - if(stat & (NOPOWER|BROKEN)) - return - use_power(500) - src.updateDialog() - - if(curing) - curing -= 1 - if(curing == 0) - icon_state = "dna" - if(dish.virus2) - createcure(dish.virus2) - if(virusing) - virusing -= 1 - if(virusing == 0) - icon_state = "dna" - if(dish.virus2) - createvirus(dish.virus2) - - return - -/obj/machinery/computer/curer/Topic(href, href_list) - if(..()) - return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) - usr.machine = src - - if (href_list["antibody"]) - curing = 30 - dish.growth -= 50 - src.icon_state = "dna" - if (href_list["virus"]) - virusing = 30 - dish.growth -= 100 - src.icon_state = "dna" - else if(href_list["eject"]) - dish.loc = src.loc - dish = null - - src.add_fingerprint(usr) - src.updateUsrDialog() - return - - -/obj/machinery/computer/curer/proc/createcure(var/datum/disease2/disease/virus2) - var/obj/item/weapon/cureimplanter/implanter = new /obj/item/weapon/cureimplanter(src.loc) - implanter.resistance = new /datum/disease2/resistance(dish.virus2) - if(probG("Virus curing",3)) - implanter.works = 0 - else - implanter.works = rand(1,2) - state("The [src.name] Buzzes") - -/obj/machinery/computer/curer/proc/createvirus(var/datum/disease2/disease/virus2) - var/obj/item/weapon/cureimplanter/implanter = new /obj/item/weapon/cureimplanter(src.loc) - implanter.name = "Viral implanter (MAJOR BIOHAZARD)" - implanter.virus2 = dish.virus2.getcopy() - implanter.works = 3 - state("The [src.name] Buzzes") - - -/obj/machinery/computer/curer/proc/state(var/msg) - for(var/mob/O in hearers(src, null)) - O.show_message("\icon[src] \blue [msg]", 2) diff --git a/code/unused/disease2/diseasesplicer.dm b/code/unused/disease2/diseasesplicer.dm deleted file mode 100644 index d94f8ff594e..00000000000 --- a/code/unused/disease2/diseasesplicer.dm +++ /dev/null @@ -1,202 +0,0 @@ -/obj/machinery/computer/diseasesplicer - name = "Disease Splicer" - icon = 'icons/obj/computer.dmi' - icon_state = "crew" - //brightnessred = 0 -// brightnessgreen = 2 -// brightnessblue = 2 -// broken_icon - - var/datum/disease2/effectholder/memorybank = null - var/analysed = 0 - var/obj/item/weapon/virusdish/dish = null - var/burning = 0 - - var/splicing = 0 - var/scanning = 0 - -/obj/machinery/computer/diseasesplicer/attackby(var/obj/I as obj, var/mob/user as mob) -/* - if(istype(I, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - if (src.stat & BROKEN) - user << "\blue The broken glass falls out." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - new /obj/item/weapon/shard( src.loc ) - var/obj/item/weapon/circuitboard/diseasesplicer/M = new /obj/item/weapon/circuitboard/diseasesplicer( A ) - for (var/obj/C in src) - C.loc = src.loc - A.circuit = M - A.state = 3 - A.icon_state = "3" - A.anchored = 1 - del(src) - else - user << "\blue You disconnect the monitor." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - var/obj/item/weapon/circuitboard/diseasesplicer/M = new /obj/item/weapon/circuitboard/diseasesplicer( A ) - for (var/obj/C in src) - C.loc = src.loc - A.circuit = M - A.state = 4 - A.icon_state = "4" - A.anchored = 1 - del(src)*/ - if(istype(I,/obj/item/weapon/virusdish)) - var/mob/living/carbon/c = user - if(!dish) - - dish = I - c.drop_item() - I.loc = src - if(istype(I,/obj/item/weapon/diseasedisk)) - user << "You upload the contents of the disk into the buffer" - memorybank = I:effect - - - //else - src.attack_hand(user) - return - -/obj/machinery/computer/diseasesplicer/attack_ai(var/mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/diseasesplicer/attack_paw(var/mob/user as mob) - - return src.attack_hand(user) - return - -/obj/machinery/computer/diseasesplicer/attack_hand(var/mob/user as mob) - if(..()) - return - user.machine = src - var/dat - if(splicing) - dat = "Splicing in progress" - else if(scanning) - dat = "Splicing in progress" - else if(burning) - dat = "Data disk burning in progress" - else - if(dish) - dat = "Virus dish inserted" - - dat += "
Current DNA strand : " - if(memorybank) - dat += "" - if(analysed) - dat += "[memorybank.effect.name] ([5-memorybank.effect.stage])" - else - dat += "Unknown DNA strand ([5-memorybank.effect.stage])" - dat += "" - - dat += "
Burn DNA Sequence to data storage disk" - else - dat += "Empty" - - dat += "

" - - if(dish) - if(dish.virus2) - if(dish.growth >= 50) - for(var/datum/disease2/effectholder/e in dish.virus2.effects) - dat += "
DNA strand" - if(dish.analysed) - dat += ": [e.effect.name]" - dat += " (5-[e.effect.stage])" - else - dat += "
Insufficent cells to attempt gene splicing" - else - dat += "
No virus found in dish" - - dat += "

Eject disk" - else - dat += "
Please insert dish" - - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") - return - -/obj/machinery/computer/diseasesplicer/process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(500) - src.updateDialog() - - if(scanning) - scanning -= 1 - if(!scanning) - state("The [src.name] beeps") - icon_state = "crew" - if(splicing) - splicing -= 1 - if(!splicing) - state("The [src.name] pings") - icon_state = "crew" - if(burning) - burning -= 1 - if(!burning) - var/obj/item/weapon/diseasedisk/d = new /obj/item/weapon/diseasedisk(src.loc) - if(analysed) - d.name = "[memorybank.effect.name] GNA disk (Stage: [5-memorybank.effect.stage])" - else - d.name = "Unknown GNA disk (Stage: [5-memorybank.effect.stage])" - d.effect = memorybank - state("The [src.name] zings") - icon_state = "crew" - - - return - -/obj/machinery/computer/diseasesplicer/Topic(href, href_list) - if(..()) - return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) - usr.machine = src - - if (href_list["grab"]) - memorybank = locate(href_list["grab"]) - analysed = dish.analysed - del(dish) - dish = null - scanning = 30 - icon_state = "crew" - - else if(href_list["eject"]) - dish.loc = src.loc - dish = null - - else if(href_list["splice"]) - for(var/datum/disease2/effectholder/e in dish.virus2.effects) - if(e.stage == memorybank.stage) - e.effect = memorybank.effect - splicing = 50 - dish.virus2.spreadtype = "Blood" - icon_state = "crew" - - else if(href_list["disk"]) - burning = 20 - icon_state = "crew" - - src.add_fingerprint(usr) - src.updateUsrDialog() - return - -/obj/machinery/computer/diseasesplicer/proc/state(var/msg) - for(var/mob/O in hearers(src, null)) - O.show_message("\icon[src] \blue [msg]", 2) - - -/obj/item/weapon/diseasedisk - name = "Blank GNA disk" - icon = 'icons/obj/cloning.dmi' - icon_state = "datadisk2" - var/datum/disease2/effectholder/effect = null - var/stage = 1 - -/obj/item/weapon/diseasedisk/premade/New() - name = "Blank GNA disk (stage: [5-stage])" - effect = new /datum/disease2/effectholder - effect.effect = new /datum/disease2/effect/invisible - effect.stage = stage diff --git a/code/unused/disease2/dishincubator.dm b/code/unused/disease2/dishincubator.dm deleted file mode 100644 index 7e73e33fe3b..00000000000 --- a/code/unused/disease2/dishincubator.dm +++ /dev/null @@ -1,176 +0,0 @@ -/obj/machinery/disease2/incubator/ - name = "Pathogenic incubator" - density = 1 - anchored = 1 - icon = 'icons/obj/virology.dmi' - icon_state = "incubator" - var/obj/item/weapon/virusdish/dish - var/obj/item/weapon/reagent_containers/glass/beaker = null - var/radiation = 0 - - var/on = 0 - var/power = 0 - - var/foodsupply = 0 - var/toxins = 0 - - ex_act(severity) - switch(severity) - if(1.0) - del(src) - return - if(2.0) - if (prob(50)) - del(src) - return - - blob_act() - if (prob(25)) - del(src) - - meteorhit() - del(src) - return - - attackby(var/obj/B as obj, var/mob/user as mob) - if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B,/obj/item/weapon/reagent_containers/syringe)) - - if(src.beaker) - if(istype(beaker,/obj/item/weapon/reagent_containers/syringe)) - user << "A syringe is already loaded into the machine." - else - user << "A beaker is already loaded into the machine." - return - - src.beaker = B - user.drop_item() - B.loc = src - if(istype(B,/obj/item/weapon/reagent_containers/syringe)) - user << "You add the syringe to the machine!" - src.updateUsrDialog() - else - user << "You add the beaker to the machine!" - src.updateUsrDialog() - else - if(istype(B,/obj/item/weapon/virusdish)) - if(src.dish) - user << "A dish is already loaded into the machine." - return - - src.dish = B - user.drop_item() - B.loc = src - if(istype(B,/obj/item/weapon/virusdish)) - user << "You add the dish to the machine!" - src.updateUsrDialog() - - Topic(href, href_list) - if(stat & BROKEN) return - if(usr.stat || usr.restrained()) return - if(!in_range(src, usr)) return - - usr.machine = src - if(!dish) return - - if (href_list["power"]) - on = !on - if(on) - icon_state = "incubator_on" - else - icon_state = "incubator" - if (href_list["ejectchem"]) - if(beaker) - beaker.loc = src.loc - beaker = null - if (href_list["ejectdish"]) - if(dish) - dish.loc = src.loc - dish = null - if (href_list["rad"]) - radiation += 10 - if (href_list["flush"]) - radiation = 0 - toxins = 0 - foodsupply = 0 - - - src.add_fingerprint(usr) - src.updateUsrDialog() - - attack_hand(mob/user as mob) - if(stat & BROKEN) - return - user.machine = src - var/dat = "" - if(!dish) - dat = "Please insert dish into the incubator.
" - dat += "Close" - var/string = "Off" - if(on) - string = "On" - dat += "Power status : [string]" - dat += "
" - dat += "Food supply : [foodsupply]" - dat += "
" - dat += "Radiation Levels : [radiation] RADS : Radiate" - dat += "
" - dat += "Toxins : [toxins]" - dat += "

" - if(beaker) - dat += "Eject chemicals : Eject" - dat += "
" - if(dish) - dat += "Eject Virus dish : Eject" - dat += "
" - dat += "

" - dat += "Flush system" - - - user << browse("Pathogenic incubatorincubator menu:

[dat]", "window=incubator;size=575x400") - onclose(user, "incubator") - return - - - - - process() - - if(dish && on && dish.virus2) - use_power(50,EQUIP) - if(!powered(EQUIP)) - on = 0 - icon_state = "incubator" - if(foodsupply) - foodsupply -= 1 - dish.growth += 1 - if(dish.growth == 100) - state("The [src.name] pings") - if(radiation) - if(radiation > 50 & prob(5)) - dish.virus2.majormutate() - if(dish.info) - dish.info = "OUTDATED : [dish.info]" - dish.analysed = 0 - state("The [src.name] beeps") - - else if(prob(5)) - dish.virus2.minormutate() - radiation -= 1 - if(toxins && prob(5)) - dish.virus2.infectionchance -= 1 - if(toxins > 50) - dish.virus2 = null - else if(!dish) - on = 0 - icon_state = "incubator" - - - if(beaker) - if(!beaker.reagents.remove_reagent("virusfood",5)) - foodsupply += 20 - if(!beaker.reagents.remove_reagent("toxins",1)) - toxins += 1 - - proc/state(var/msg) - for(var/mob/O in hearers(src, null)) - O.show_message("\icon[src] \blue [msg]", 2) diff --git a/code/unused/disease2/isolator.dm b/code/unused/disease2/isolator.dm deleted file mode 100644 index 218b3cde2a4..00000000000 --- a/code/unused/disease2/isolator.dm +++ /dev/null @@ -1,139 +0,0 @@ -/obj/machinery/disease2/isolator/ - name = "Pathogenic Isolator" - density = 1 - anchored = 1 - icon = 'icons/obj/virology.dmi' - icon_state = "isolator" - var/datum/disease2/disease/virus2 = null - var/isolating = 0 - var/beaker = null - - ex_act(severity) - switch(severity) - if(1.0) - del(src) - return - if(2.0) - if (prob(50)) - del(src) - return - - blob_act() - if (prob(25)) - del(src) - - meteorhit() - del(src) - return - - attackby(var/obj/item/weapon/reagent_containers/glass/B as obj, var/mob/user as mob) - if(!istype(B,/obj/item/weapon/reagent_containers/syringe)) - return - - if(src.beaker) - user << "A syringe is already loaded into the machine." - return - - src.beaker = B - user.drop_item() - B.loc = src - if(istype(B,/obj/item/weapon/reagent_containers/syringe)) - user << "You add the syringe to the machine!" - src.updateUsrDialog() - icon_state = "isolator_in" - - Topic(href, href_list) - if(stat & BROKEN) return - if(usr.stat || usr.restrained()) return - if(!in_range(src, usr)) return - - usr.machine = src - if(!beaker) return - var/datum/reagents/R = beaker:reagents - - if (href_list["isolate"]) - var/datum/reagent/blood/Blood - for(var/datum/reagent/blood/B in R.reagent_list) - if(B) - Blood = B - break - - if(Blood.data["virus2"]) - virus2 = Blood.data["virus2"] - isolating = 40 - icon_state = "isolator_processing" - src.updateUsrDialog() - return - - else if (href_list["main"]) - attack_hand(usr) - return - else if (href_list["eject"]) - beaker:loc = src.loc - beaker = null - icon_state = "isolator" - src.updateUsrDialog() - return - - attack_hand(mob/user as mob) - if(stat & BROKEN) - return - user.machine = src - var/dat = "" - if(!beaker) - dat = "Please insert sample into the isolator.
" - dat += "Close" - else if(isolating) - dat = "Isolating" - else - var/datum/reagents/R = beaker:reagents - dat += "Eject

" - if(!R.total_volume) - dat += "[beaker] is empty." - else - dat += "Contained reagents:
" - for(var/datum/reagent/blood/G in R.reagent_list) - dat += " [G.name]: Isolate" - user << browse("Pathogenic IsolatorIsolator menu:

[dat]", "window=isolator;size=575x400") - onclose(user, "isolator") - return - - - - - process() - if(isolating > 0) - isolating -= 1 - if(isolating == 0) - var/obj/item/weapon/virusdish/d = new /obj/item/weapon/virusdish(src.loc) - d.virus2 = virus2.getcopy() - virus2 = null - icon_state = "isolator_in" - - - - -/obj/item/weapon/virusdish - name = "Virus containment/growth dish" - icon = 'icons/obj/items.dmi' - icon_state = "implantcase-b" - var/datum/disease2/disease/virus2 = null - var/growth = 0 - var/info = 0 - var/analysed = 0 - -/obj/item/weapon/virusdish/attackby(var/obj/item/weapon/W as obj,var/mob/living/carbon/user as mob) - if(istype(W,/obj/item/weapon/hand_labeler)) - return - ..() - if(prob(50)) - user << "The dish shatters" - if(virus2.infectionchance > 0) - infect_virus2(user,virus2) - del src - -/obj/item/weapon/virusdish/examine() - usr << "This is a virus containment dish" - if(src.info) - usr << "It has the following information about its contents" - usr << src.info diff --git a/code/unused/disease2/monkeydispensor.dm b/code/unused/disease2/monkeydispensor.dm deleted file mode 100644 index 87ead7abbc6..00000000000 --- a/code/unused/disease2/monkeydispensor.dm +++ /dev/null @@ -1,30 +0,0 @@ -/obj/machinery/disease2/monkeycloner - name = "Monkey dispensor" - icon = 'icons/obj/cloning.dmi' - icon_state = "pod_0" - density = 1 - anchored = 1 - - var/cloning = 0 - -/obj/machinery/disease2/monkeycloner/attack_hand() - if(!cloning) - cloning = 150 - - icon_state = "pod_g" - -/obj/machinery/disease2/monkeycloner/process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(500) - src.updateDialog() - - if(cloning) - cloning -= 1 - if(!cloning) - new /mob/living/carbon/monkey(src.loc) - icon_state = "pod_0" - - - - return diff --git a/code/unused/dna.dm b/code/unused/dna.dm deleted file mode 100644 index e98d5265e0d..00000000000 --- a/code/unused/dna.dm +++ /dev/null @@ -1,962 +0,0 @@ -/proc/scram(n) - var/t = "" - var/p = null - p = 1 - while(p <= n) - t = text("[][]", t, rand(1, 9)) - p++ - return t - -/obj/machinery/computer/dna - name = "DNA Operations Console" - desc = "A Computer used to advanced DNA stuff." - icon_state = "dna" - var/obj/item/weapon/card/data/scan = null - var/obj/item/weapon/card/data/modify = null - var/obj/item/weapon/card/data/modify2 = null - var/mode = null - var/temp = null - -/obj/machinery/computer/dna/attack_ai(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/dna/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/dna/attack_hand(mob/user as mob) - if(..()) - return - user.machine = src - if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai)) - var/dat = text("Please Insert the cards into the slots
\n\t\t\t\tFunction Disk: []
\n\t\t\t\tTarget Disk: []
\n\t\t\t\tAux. Data Disk: []
\n\t\t\t\t\t(Not always used!)
\n\t\t\t\t[]", src, (src.scan ? text("[]", src.scan.name) : "----------"), src, (src.modify ? text("[]", src.modify.name) : "----------"), src, (src.modify2 ? text("[]", src.modify2.name) : "----------"), (src.scan ? text("Execute Function", src) : "No function disk inserted!")) - if (src.temp) - dat = text("[]

Clear Message", src.temp, src) - user << browse(dat, "window=dna_comp") - onclose(user, "dna_comp") - else - var/dat = text("[]
\n\t\t\t\t[] []
\n\t\t\t\t[] []
\n\t\t\t\t[] []
\n\t\t\t\t\t(Not always used!)
\n\t\t\t\t[]", stars("Please Insert the cards into the slots"), stars("Function Disk:"), src, (src.scan ? text("[]", src.scan.name) : "----------"), stars("Target Disk:"), src, (src.modify ? text("[]", src.modify.name) : "----------"), stars("Aux. Data Disk:"), src, (src.modify2 ? text("[]", src.modify2.name) : "----------"), (src.scan ? text("[]", src, stars("Execute Function")) : stars("No function disk inserted!"))) - if (src.temp) - dat = text("[]

[]", stars(src.temp), src, stars("Clear Message")) - user << browse(dat, "window=dna_comp") - onclose(user, "dna_comp") - return - -/obj/machinery/computer/dna/Topic(href, href_list) - if(..()) - return - if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1 || usr.telekinesis == 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai))) - usr.machine = src - if (href_list["modify"]) - if (src.modify) - src.modify.loc = src.loc - src.modify = null - src.mode = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/data)) - usr.drop_item() - I.loc = src - src.modify = I - src.mode = null - if (href_list["modify2"]) - if (src.modify2) - src.modify2.loc = src.loc - src.modify2 = null - src.mode = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/data)) - usr.drop_item() - I.loc = src - src.modify2 = I - src.mode = null - if (href_list["scan"]) - if (src.scan) - src.scan.loc = src.loc - src.scan = null - src.mode = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/data)) - usr.drop_item() - I.loc = src - src.scan = I - src.mode = null - if (href_list["clear"]) - src.temp = null - if (href_list["execute"]) - if ((src.scan && src.scan.function)) - switch(src.scan.function) - if("data_mutate") - if (src.modify) - if (!( findtext(src.scan.data, "-", 1, null) )) - if ((src.modify.data && src.scan.data && length(src.modify.data) >= length(src.scan.data))) - src.modify.data = text("[][]", src.scan.data, (length(src.modify.data) > length(src.scan.data) ? copytext(src.modify.data, length(src.scan.data) + 1, length(src.modify.data) + 1) : null)) - else - src.temp = "Disk Failure: Cannot examine data! (Null or wrong format)" - else - var/d = findtext(src.modify.data, "-", 1, null) - var/t = copytext(src.modify.data, d + 1, length(src.modify.data) + 1) - d = text2num(copytext(1, d, null)) - if ((d && t && src.modify.data && src.scan.data && length(src.modify.data) >= (length(t) + d - 1) )) - src.modify.data = text("[][][]", copytext(src.modify.data, 1, d), t, (length(src.modify.data) > length(t) + d ? copytext(src.modify.data, length(t) + d, length(src.modify.data) + 1) : null)) - else - src.temp = "Disk Failure: Cannot examine data! (Null or wrong format)" - else - src.temp = "Disk Failure: Cannot read target disk!" - if("dna_seq") - src.temp = "DNA Systems Help:\nHuman DNA sequences: (Compressed in *.dna format version 10.76)\n\tSpecies Identification Marker: (28 chromosomes)\n\t\t5BDFE293BA5500F9FFFD500AAFFE\n\tStructural Enzymes:\n\t\tCDE375C9A6C25A7DBDA50EC05AC6CEB63\n\t\tNote: The first id set is used for DNA clean up operations.\n\tUsed Enzymes:\n\t\t493DB249EB6D13236100A37000800AB71\n\tSpecies/Genus Classification: Homo Sapien\n\nMonkey DNA sequences: (Compressed in *.dna format version 10.76)\n\tSpecies Identification Marker: (16 chromosomes)\n\t\t2B6696D2B127E5A4\n\tStructural Enzymes:\n\t\tCDEAF5B90AADBC6BA8033DB0A7FD613FA\n\t\tNote: The first id set is used for DNA clean up operations.\n\tUsed Enzymes:\n\t\tC8FFFE7EC09D80AEDEDB9A5A0B4085B61\n\tSpecies/Genus Classification: Generic Monkey\n>" - if("dna_help") - src.temp = "DNA Systems Help:\nThe DNA systems consists 3 systems.\nI. DNA Scanner/Implanter - This system is slightly advanced to use. It accepts\n\t1 disk. Before you wish to run a function/program you must implant the\n\tdisk data into the temporary memory. Note that once this is done the disk can\n\tbe removed to place a data disk in.\nII. DNA computer - This is a simple yet fast computer that basically operates on data.\nIII. Restructurer - This device reorganizes the anatomical structure of the subject\n\taccording to the DNA sequences. Please note that it is illegal to perform a\n\ttransfer from one species to or from the Homo sapiens species but\n\thuman to human is acceptable under UNSD guidlines.\n\tNote: This machine is programmed to operate on specific preprogrammed species with\n\tspecialized anatomical blueprints hard coded into its databanks. It cannot operate\n\ton other species. (Current: Human, Monkey)\n\nData Disks:\n\tThese run on 2 (or 3) types: DNA scanner program disks and data modification\nfunctions (and disk modification functions)\n\nDisk-Copy\n\tThis erases the target disk and completely copies the data from the aux. disk.\nDisk-Erase\n\tThis erases everything on the target disk.\nData-Clear\n\tThis erases (clears) only the data.\n\nData-Trunicate\n\tThis removes data from the target disk (parameters gathered from data slot on target\n\tdisk). This fuction has 4 modes (a,b,c,default) defined by this way. (mode id)(#)\n\ta - This cuts # data from the end. (ex a1 on ABCD = ABC)\n\tb - This cuts # data from the beginning. (ex b1 on ABCD = BCD)\n\tc - This limits the data from the end. (ex c1 on ABCD = A)\n\tdefault - This limits the data from the end. (ex 1 on ABCD = D)\nData-Add\n\tThis adds thedata on the aux. disk to the data on the target disk.\nData-Sramble\n\tThis scrambles the data on the target disk. The length is equal to\n\tthe length of the original data.\nData-Input\n\tThis lets you input data into the data slot of any data disk.\n\tNote: This doesn't work only on storage.\nData-Mutate\n\tThis basically inserts text. You follow this format:\n\tpos-text (or just text for automatic pos 1)\n\tie 2-IVE on FOUR yields FIVE\n" - if("data_add") - if (src.modify) - if (src.modify2) - if ((src.modify.data && src.modify2.data)) - src.modify.data += src.modify2.data - src.temp = text("Done!
New Data:
[]", src.modify.data) - else - src.temp = "Cannot read data! (may be null)" - else - src.temp = "Disk Failure: Cannot read aux. data disk!" - else - src.temp = "Disk Failure: Cannot read target disk!" - if("data_scramble") - if (src.modify) - if (length(text("[]", src.modify.data)) >= 1) - src.modify.data = scram(length(text("[]", src.modify.data))) - src.temp = text("Data scrambled: []", src.modify.data) - else - src.temp = "No data to scramble" - else - src.temp = "Disk Failure: Cannot read target disk!" - if("data_input") - if (src.modify) - var/dat = input(usr, ">", text("[]", src.name), null) as text - var/s = src.scan - var/m = src.modify - if ((usr.stat || usr.restrained() || src.modify != m || src.scan != s)) - return - if (((get_dist(src, usr) <= 1 || usr.telekinesis == 1) && istype(src.loc, /turf))) - src.modify.data = dat - else - src.temp = "Disk Failure: Cannot read target disk!" - if("disk_copy") - if (src.modify) - if (src.modify2) - src.modify.function = src.modify2.function - src.modify.data = src.modify2.data - src.modify.special = src.modify2.special - src.temp = "All disk data/programs copied." - else - src.temp = "Disk Failure: Cannot read aux. data disk!" - else - src.temp = "Disk Failure: Cannot read target disk!" - if("disk_dis") - if (src.modify) - src.temp = text("Function: [][]
Data: []", src.modify.function, (src.modify.special ? text("-[]", src.modify.special) : null), src.modify.data) - else - src.temp = "Disk Failure: Cannot read target disk!" - if("disk_erase") - if (src.modify) - src.modify.data = null - src.modify.function = "storage" - src.modify.special = null - src.temp = "All Disk contents deleted." - else - src.temp = "Disk Failure: Cannot read target disk!" - if("data_clear") - if (src.modify) - src.modify.data = null - src.temp = "Disk data cleared." - else - src.temp = "Disk Failure: Cannot read target disk!" - if("data_trun") - if (src.modify) - if ((src.modify.data && src.scan.data)) - var/l1 = length(src.modify.data) - var/l2 = max(round(text2num(src.scan.data)), 1) - switch(copytext(src.modify.data, 1, 2)) - if("a") - if (l1 > l2) - src.modify.data = copytext(src.modify.data, 1, (l1 - l2) + 1) - else - src.modify.data = "" - src.temp = text("Done!
New Data:
[]", src.modify.data) - if("b") - if (l1 > l2) - src.modify.data = copytext(src.modify.data, l2, l1 + 1) - else - src.modify.data = "" - src.temp = text("Done!
New Data:
[]", src.modify.data) - if("c") - if (l1 >= l2) - src.modify.data = copytext(src.modify.data, l1 - l2, l1 + 1) - src.temp = text("Done!
New Data:
[]", src.modify.data) - else - if (l1 >= l2) - src.modify.data = copytext(src.modify.data, 1, l2 + 1) - src.temp = text("Done!
New Data:
[]", src.modify.data) - else - src.temp = "Cannot read data! (may be null and note that function data slot is used instead of aux disk!!)" - else - src.temp = "Disk Failure: Cannot read target disk!" - else - else - src.temp = "System Failure: Cannot read disk function!" - src.add_fingerprint(usr) - src.updateUsrDialog() - return - -/obj/machinery/computer/dna/ex_act(severity) - switch(severity) - if(1.0) - //SN src = null - del(src) - return - if(2.0) - if (prob(50)) - //SN src = null - del(src) - return - else - return - -/obj/machinery/dna_scanner/allow_drop() - return 0 - -/obj/machinery/dna_scanner/relaymove(mob/user as mob) - if (user.stat) - return - src.go_out() - return - -/obj/machinery/dna_scanner/verb/eject() - set src in oview(1) - - if (usr.stat != 0) - return - src.go_out() - add_fingerprint(usr) - return - -/obj/machinery/dna_scanner/verb/move_inside() - set src in oview(1) - - if (usr.stat != 0) - return - if (src.occupant) - usr << "\blue The scanner is already occupied!" - return - if (usr.abiotic()) - usr << "\blue Subject cannot have abiotic items on." - return - usr.stop_pulling() - usr.client.perspective = EYE_PERSPECTIVE - usr.client.eye = src - usr.loc = src - src.occupant = usr - src.icon_state = "scanner_1" - for(var/obj/O in src) - //O = null - del(O) - //Foreach goto(124) - src.add_fingerprint(usr) - return - -/obj/machinery/dna_scanner/attackby(obj/item/weapon/grab/G as obj, user as mob) - if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) ))) - return - if (src.occupant) - user << "\blue The scanner is already occupied!" - return - if (G.affecting.abiotic()) - user << "\blue Subject cannot have abiotic items on." - return - var/mob/M = G.affecting - if (M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - M.loc = src - src.occupant = M - src.icon_state = "scanner_1" - for(var/obj/O in src) - O.loc = src.loc - //Foreach goto(154) - src.add_fingerprint(user) - //G = null - del(G) - return - -/obj/machinery/dna_scanner/proc/go_out() - if ((!( src.occupant ) || src.locked)) - return - for(var/obj/O in src) - O.loc = src.loc - //Foreach goto(30) - if (src.occupant.client) - src.occupant.client.eye = src.occupant.client.mob - src.occupant.client.perspective = MOB_PERSPECTIVE - src.occupant.loc = src.loc - src.occupant = null - src.icon_state = "scanner_0" - return - -/obj/machinery/dna_scanner/ex_act(severity) - switch(severity) - if(1.0) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - //Foreach goto(35) - //SN src = null - del(src) - return - if(2.0) - if (prob(50)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - //Foreach goto(108) - //SN src = null - del(src) - return - if(3.0) - if (prob(25)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - //Foreach goto(181) - //SN src = null - del(src) - return - else - return - - -/obj/machinery/dna_scanner/blob_act() - if(prob(75)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - del(src) - -/obj/machinery/scan_console/ex_act(severity) - - switch(severity) - if(1.0) - //SN src = null - del(src) - return - if(2.0) - if (prob(50)) - //SN src = null - del(src) - return - else - return - -/obj/machinery/scan_console/blob_act() - - if(prob(75)) - del(src) - -/obj/machinery/scan_console/power_change() - if(stat & BROKEN) - icon_state = "broken" - else if(powered()) - icon_state = initial(icon_state) - stat &= ~NOPOWER - else - spawn(rand(0, 15)) - src.icon_state = "c_unpowered" - stat |= NOPOWER - -/obj/machinery/scan_console/New() - ..() - spawn( 5 ) - src.connected = locate(/obj/machinery/dna_scanner, get_step(src, WEST)) - return - return - -/obj/machinery/scan_console/process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(250) - - var/mob/M - if (!( src.status )) - return - if (!( src.func )) - src.temp = "No function loaded into memory core!" - src.status = null - if ((src.connected && src.connected.occupant)) - M = src.connected.occupant - if (src.status == "load") - src.prog_p1 = null - src.prog_p2 = null - src.prog_p3 = null - src.prog_p4 = null - switch(src.func) - if("dna_trun") - if (src.data) - src.prog_p1 = copytext(src.data, 1, 2) - src.prog_p2 = text2num(src.data) - src.prog_p3 = src.special - src.status = "dna_trun" - src.temp = "Executing trunication function on occupant." - else - src.temp = "No data implanted in core memory." - src.status = null - if("dna_scan") - if (src.special) - if (src.scan) - if (istype(M, /mob)) - switch(src.special) - if("UI") - src.temp = text("Scan Complete:
Data downloaded to disk!
Unique Identifier: []", M.primary.uni_identity) - src.scan.data = M.primary.uni_identity - if("SE") - src.temp = text("Scan Complete:
Data downloaded to disk!
Structural Enzymes: []", M.primary.struc_enzyme) - src.scan.data = M.primary.struc_enzyme - if("UE") - src.temp = text("Scan Complete:
Data downloaded to disk!
Used Enzynmes: []", M.primary.use_enzyme) - src.scan.data = M.primary.use_enzyme - if("SI") - src.temp = text("Scan Complete:
Data downloaded to disk!
Species Identifier: []", M.primary.spec_identity) - src.scan.data = M.primary.spec_identity - else - else - src.temp = "No occupant to scan!" - else - src.temp = "Error: No disk to upload data to." - else - src.temp = "Error: Function program errors." - src.status = null - if("dna_replace") - if ((src.data && src.special)) - src.prog_p1 = src.special - src.prog_p2 = src.data - src.status = "dna_replace" - src.temp = "Executing repalcement function on occupant." - else - src.temp = "Error: No DNA data loaded into core or function program errors." - src.status = null - if("dna_add") - if ((src.data && src.special)) - src.prog_p1 = src.special - src.prog_p2 = src.data - src.status = "dna_add" - src.temp = "Executing addition function on occupant." - else - src.temp = "Error: No DNA data loaded into core or function program errors." - src.status = null - else - src.temp = "Cannot execute program!" - src.status = null - else - if (src.status == "dna_trun") - if (istype(M, /mob)) - var/t = null - switch(src.prog_p3) - if("UI") - t = M.primary.uni_identity - if("SE") - t = M.primary.struc_enzyme - if("UE") - t = M.primary.use_enzyme - if("SI") - t = M.primary.spec_identity - else - if (!( src.prog_p4 )) - switch(src.prog_p1) - if("a") - src.prog_p4 = length(t) - if("b") - src.prog_p4 = 1 - else - else - if (src.prog_p1 == "a") - src.prog_p4-- - else - if (src.prog_p1 == "b") - src.prog_p4-- - switch(src.prog_p1) - if("a") - if (src.prog_p4 <= 0) - src.temp = "Trunication complete" - src.status = null - else - t = copytext(t, 1, length(t)) - src.temp = text("Trunicating []'s DNA sequence...
[]
Status: [] units left.

Emergency Abort", M.name, t, src.prog_p4, src) - if("b") - if (src.prog_p4 <= 0) - src.temp = "Trunication complete" - src.status = null - else - t = copytext(t, 2, length(t) + 1) - src.temp = text("Trunicating []'s DNA sequence...
[]
Status: [] units left.

Emergency Abort", M.name, t, src.prog_p4, src) - if("c") - if (length(t) <= src.prog_p2) - src.temp = "Limitation complete" - src.status = null - else - t = copytext(t, 1, length(t)) - src.temp = text("Limiting []'s DNA sequence...
[]
Status: [] units converting to [] units.

Emergency Abort", M.name, t, length(t), src.prog_p2, src) - else - if (length(t) <= src.prog_p2) - src.temp = "Limitation complete" - src.status = null - else - t = copytext(t, 2, length(t) + 1) - src.temp = text("Limiting []'s DNA sequence...
[]
Status: [] units converting to [] units.

Emergency Abort", M.name, t, length(t), src.prog_p2, src) - switch(src.prog_p3) - if("UI") - M.primary.uni_identity = t - if("SE") - M.primary.struc_enzyme = t - if("UE") - M.primary.use_enzyme = t - if("SI") - M.primary.spec_identity = t - else - else - src.temp = "Process terminated due to lack of occupant in DNA chamber." - src.status = null - else - if (src.status == "dna_replace") - if (istype(M, /mob)) - var/t = null - switch(src.prog_p1) - if("UI") - t = M.primary.uni_identity - if("SE") - t = M.primary.struc_enzyme - if("UE") - t = M.primary.use_enzyme - if("SI") - t = M.primary.spec_identity - else - if (!( src.prog_p4 )) - src.prog_p4 = 1 - else - src.prog_p4++ - if ((src.prog_p4 > length(t) || src.prog_p4 > length(src.prog_p2))) - src.temp = "Replacement complete" - src.status = null - else - t = text("[][][]", copytext(t, 1, src.prog_p4), copytext(src.prog_p2, src.prog_p4, src.prog_p4 + 1), (src.prog_p4 < length(t) ? copytext(t, src.prog_p4 + 1, length(t) + 1) : null)) - src.temp = text("Replacing []'s DNA sequence...
[]
Target: []
Status: At position []

Emergency Abort", M.name, t, src.prog_p2, src.prog_p4, src) - switch(src.prog_p1) - if("UI") - M.primary.uni_identity = t - if("SE") - M.primary.struc_enzyme = t - if("UE") - M.primary.use_enzyme = t - if("SI") - M.primary.spec_identity = t - else - else - src.temp = "Process terminated due to lack of occupant in DNA chamber." - src.status = null - else - if (src.status == "dna_add") - if (istype(M, /mob)) - var/t = null - switch(src.prog_p1) - if("UI") - t = M.primary.uni_identity - if("SE") - t = M.primary.struc_enzyme - if("UE") - t = M.primary.use_enzyme - if("SI") - t = M.primary.spec_identity - else - if (!( src.prog_p4 )) - src.prog_p4 = 1 - else - src.prog_p4++ - if (src.prog_p4 > length(src.prog_p2)) - src.temp = "Addition complete" - src.status = null - else - t = text("[][]", t, copytext(src.prog_p2, src.prog_p4, src.prog_p4 + 1)) - src.temp = text("Adding to []'s DNA sequence...
[]
Adding: []
Position: []

Emergency Abort", M.name, t, src.prog_p2, src.prog_p4, src) - switch(src.prog_p1) - if("UI") - M.primary.uni_identity = t - if("SE") - M.primary.struc_enzyme = t - if("UE") - M.primary.use_enzyme = t - if("SI") - M.primary.spec_identity = t - else - else - src.temp = "Process terminated due to lack of occupant in DNA chamber." - src.status = null - else - src.status = null - src.temp = "Unknown system error." - src.updateDialog() - return - -/obj/machinery/scan_console/attack_paw(user as mob) - return src.attack_hand(user) - -/obj/machinery/scan_console/attack_ai(user as mob) - return src.attack_hand(user) - -/obj/machinery/scan_console/attack_hand(user as mob) - if(..()) - return - var/dat - if (src.temp) - dat = text("[]

Clear Message", src.temp, src) - else - if (src.connected) - var/mob/occupant = src.connected.occupant - dat = "Occupant Statistics:
" - if (occupant) - var/t1 - switch(occupant.stat) - if(0) - t1 = "Conscious" - if(1) - t1 = "Unconscious" - else - t1 = "*dead*" - dat += text("[]\tHealth %: [] ([])

", (occupant.health > 50 ? "" : ""), occupant.health, t1) - else - dat += "The scanner is empty.
" - if (!( src.connected.locked )) - dat += text("Lock (Unlocked)
", src) - else - dat += text("Unlock (Locked)
", src) - dat += text("Disk: []
\n[]
\n[]
", src, - (src.scan ? text("[]", src.scan.name) : "----------"), - (src.scan ? text("Upload Data", src) : "No disk to upload"), - ((src.data || src.func || src.special) ? text("Clear Data
Execute Data
Function Type: [][]
Data: []", src, src, src.func, (src.special ? text("-[]", src.special) : null), src.data) : "No data uploaded")) - dat += text("

Close", user) - user << browse(dat, "window=scanner;size=400x500") - onclose(user, "scanner") - return - -/obj/machinery/scan_console/Topic(href, href_list) - if(..()) - return - if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 || usr.telekinesis == 1) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon/ai))) - usr.machine = src - if (href_list["locked"]) - if ((src.connected && src.connected.occupant)) - src.connected.locked = !( src.connected.locked ) - if (href_list["scan"]) - if (src.scan) - src.scan.loc = src.loc - src.scan = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/data)) - usr.drop_item() - I.loc = src - src.scan = I - if (href_list["u_dat"]) - if ((src.scan && !( src.status ))) - if ((src.scan.function && src.scan.function != "storage")) - src.func = src.scan.function - src.special = src.scan.special - if (src.scan.data) - src.data = src.scan.data - else - src.temp = "No disk found or core data access lock out!" - if (href_list["c_dat"]) - if (!src.status) - src.func = null - src.data = null - src.special = null - else - src.temp = "No disk found or core data access lock out!" - if (href_list["clear"]) - src.temp = null - if (href_list["abort"]) - src.status = null - if (href_list["e_dat"]) - if (!( src.status )) - src.status = "load" - src.temp = "Loading..." - src.add_fingerprint(usr) - src.updateUsrDialog() - return - -/obj/machinery/restruct/allow_drop() - return 0 - -/obj/machinery/restruct/verb/eject() - set src in oview(1) - - if (usr.stat != 0) - return - src.go_out() - add_fingerprint(usr) - return - -/obj/machinery/restruct/verb/operate() - set src in oview(1) - - src.add_fingerprint(usr) - if ((src.occupant && src.occupant.primary)) - switch(src.occupant.primary.spec_identity) - if("5BDFE293BA5500F9FFFD500AAFFE") - if (!istype(src.occupant, /mob/living/carbon/human)) - for(var/obj/O in src.occupant) - del(O) - - var/mob/living/carbon/human/O = new /mob/living/carbon/human( src ) - if(ticker.killer == src.occupant) - O.memory = src.occupant.memory - ticker.killer = O - var/mob/M = src.occupant - O.start = 1 - O.primary = M.primary - M.primary = null - var/t1 = hex2num(copytext(O.primary.uni_identity, 25, 28)) - if (t1 < 125) - O.gender = MALE - else - O.gender = FEMALE - M << "Genetic Transversal Complete!" - if (M.client) - M << "Transferring..." - M.client.mob = O - O << "Neural Sequencing Complete!" - O.loc = src - src.occupant = O - //M = null - del(M) - src.occupant = O - src.occupant << "Done!" - if("2B6696D2B127E5A4") - if (!istype(src.occupant, /mob/living/carbon/monkey)) - for(var/obj/O in src.occupant) - del(O) - var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey(src) - if(ticker.killer == src.occupant) - O.memory = src.occupant.memory - ticker.killer = O - var/mob/M = src.occupant - O.start = 1 - O.primary = M.primary - M.primary = null - M << "Genetic Transversal Complete!" - if (M.client) - M << "Transferring..." - M.client.mob = O - O << "Neural Sequencing Complete!" - O.loc = src - O << "Genetic Transversal Complete!" - src.occupant = O - del(M) - O.name = text("monkey ([])", copytext(md5(src.occupant.primary.uni_identity), 2, 6)) - src.occupant << "Done!" - else - if (istype(src.occupant, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = src.occupant - - var/speak = (length(H.primary.struc_enzyme) >= 25 ? hex2num(copytext(H.primary.struc_enzyme, 22, 25)) : 9999) - var/ears = (length(H.primary.struc_enzyme) >= 10 ? hex2num(copytext(H.primary.struc_enzyme, 7, 10)) : 9999) - var/vision = (length(H.primary.struc_enzyme) >= 16 ? hex2num(copytext(H.primary.struc_enzyme, 13, 16)) : 1) - var/mental1 = (length(H.primary.struc_enzyme) >= 31 ? hex2num(copytext(H.primary.struc_enzyme, 28, 31)) : 1) - var/mental2 = (length(H.primary.struc_enzyme) >= 28 ? hex2num(copytext(H.primary.struc_enzyme, 25, 28)) : 1) - var/speak2 = (length(H.primary.struc_enzyme) >= 22 ? hex2num(copytext(H.primary.struc_enzyme, 19, 22)) : 1) - H.sdisabilities = 0 - H.disabilities = 0 - if (speak < 3776) - H.disabilities = H.disabilities | 4 - else - if (speak > 3776) - H.sdisabilities = H.sdisabilities | 2 - if (speak2 < 2640) - H.disabilities = H.disabilities | 16 - if (ears > 3226) - H.sdisabilities = H.sdisabilities | 4 - if (vision < 1447) - H.sdisabilities = H.sdisabilities | 1 - else - if (vision > 1447) - H.disabilities = H.disabilities | 1 - if (mental1 < 1742) - H.disabilities = H.disabilities | 2 - if (mental2 < 1452) - H.disabilities = H.disabilities | 8 - var/t1 = null - if (length(H.primary.uni_identity) >= 20) - t1 = copytext(H.primary.uni_identity, 19, 21) - if (hex2num(t1) > 127) - H.gender = FEMALE - else - H.gender = MALE - else - H.gender = NEUTER - if (length(H.primary.uni_identity) >= 18) - t1 = copytext(H.primary.uni_identity, 17, 19) - H.ns_tone = hex2num(t1) - H.ns_tone = -H.ns_tone + 35 - else - H.ns_tone = 1 - H.ns_tone = -H.ns_tone + 35 - if (length(H.primary.uni_identity) >= 16) - t1 = copytext(H.primary.uni_identity, 15, 17) - H.b_eyes = hex2num(t1) - else - H.b_eyes = 255 - if (length(H.primary.uni_identity) >= 14) - t1 = copytext(H.primary.uni_identity, 13, 15) - H.g_eyes = hex2num(t1) - else - H.g_eyes = 255 - if (length(H.primary.uni_identity) >= 12) - t1 = copytext(H.primary.uni_identity, 11, 13) - H.r_eyes = hex2num(t1) - else - H.r_eyes = 255 - if (length(H.primary.uni_identity) >= 10) - t1 = copytext(H.primary.uni_identity, 9, 11) - H.nb_hair = hex2num(t1) - else - H.nb_hair = 255 - if (length(H.primary.uni_identity) >= 8) - t1 = copytext(H.primary.uni_identity, 7, 9) - H.ng_hair = hex2num(t1) - else - H.ng_hair = 255 - if (length(H.primary.uni_identity) >= 6) - t1 = copytext(H.primary.uni_identity, 5, 7) - H.nr_hair = hex2num(t1) - else - H.nr_hair = 255 - H.r_hair = H.nr_hair - H.g_hair = H.ng_hair - H.b_hair = H.nb_hair - H.s_tone = H.ns_tone - H.update_face() - H.update_body() - - if (reg_dna[H.primary.uni_identity]) - H.real_name = reg_dna[H.primary.uni_identity] - else - var/i - while (!i) - var/randomname - if (src.gender == MALE) - randomname = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names))) - else - randomname = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names))) - if (findname(randomname)) - continue - else - H.real_name = randomname - i++ - reg_dna[H.primary.uni_identity] = H.real_name - H << text("\red Your name is now [].", H.real_name) - return - -/obj/machinery/restruct/verb/move_inside() - set src in oview(1) - - if (usr.stat != 0) - return - if (src.occupant) - usr << "\blue The scanner is already occupied!" - return - if (usr.abiotic()) - usr << "\blue Subject cannot have abiotic items on." - return - usr.stop_pulling() - usr.client.perspective = EYE_PERSPECTIVE - usr.client.eye = src - usr.loc = src - src.occupant = usr - src.icon_state = "restruct_1" - for(var/obj/O in src) - //O = null - del(O) - //Foreach goto(124) - src.add_fingerprint(usr) - return - -/obj/machinery/restruct/relaymove(mob/user as mob) - if (user.stat) - return - src.go_out() - return - -/obj/machinery/restruct/attackby(obj/item/weapon/grab/G as obj, user as mob) - if(..()) - return - if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) ))) - return - if (src.occupant) - user << "\blue The machine is already occupied!" - return - if (G.affecting.abiotic()) - user << "\blue Subject cannot have abiotic items on." - return - var/mob/M = G.affecting - if (M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - M.loc = src - src.occupant = M - src.icon_state = "restruct_1" - for(var/obj/O in src) - O.loc = src.loc - //Foreach goto(154) - src.add_fingerprint(user) - //G = null - del(G) - return - -/obj/machinery/restruct/proc/go_out() - if ((!( src.occupant ) || src.locked)) - return - for(var/obj/O in src) - O.loc = src.loc - //Foreach goto(30) - if (src.occupant.client) - src.occupant.client.eye = src.occupant.client.mob - src.occupant.client.perspective = MOB_PERSPECTIVE - src.occupant.loc = src.loc - src.occupant = null - src.icon_state = "restruct_0" - return - -/obj/machinery/restruct/ex_act(severity) - switch(severity) - if(1.0) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - del(src) - return - if(2.0) - if (prob(50)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - del(src) - return - if(3.0) - if (prob(25)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - del(src) - return - else - return - -/obj/machinery/restruct/blob_act() - if(prob(75)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - del(src) \ No newline at end of file diff --git a/code/unused/dna_mutations.dm b/code/unused/dna_mutations.dm deleted file mode 100644 index b03fb6257ea..00000000000 --- a/code/unused/dna_mutations.dm +++ /dev/null @@ -1,101 +0,0 @@ - - -/* NOTES: - -This system could be expanded to migrate all of our current mutations to. Maybe. - - -*/ - - -/* /datum/mutations : - * - * A /datum representation of "hidden" mutations. - * - */ -/datum/mutations - - var/list/requirements = list() // list of randomly-genned requirements - var/required = 1 // the number of requirements to generate - - var/list/races = list("human") // list of races the mutation effect - - proc/get_mutation(var/mob/living/carbon/M) // Called when check_mutation() is successful - ..() - - proc/check_mutation(var/mob/living/carbon/M) // Called in dna.dm, when a target's SE is modified - - if(! ("all" in races)) // "all" means it affects everyone! - if(istype(M, /mob/living/carbon/human)) - if(! ("human" in races)) - return - if(istype(M, /mob/living/carbon/monkey)) - if(! ("monkey" in races)) - return - // TODO: add more races maybe?? - - - var/passes = 0 - for(var/datum/mutationreq/require in requirements) - - var/se_block[] = getblockbuffer(M.dna.struc_enzymes, require.block, 3) // focus onto the block - if(se_block.len == 3) // we want to make sure there are exactly 3 entries - - if(se_block[require.subblock] == require.reqID) - - passes++ - - if(passes == required) // all requirements met - get_mutation(M) - - - Lasereyes - /* - Lets you shoot laser beams through your eyes. Fancy! - */ - required = 2 - - get_mutation(var/mob/living/carbon/M) - M << "\blue You feel a searing heat inside your eyes!" - M.mutations.Add(LASER) - - Healing - /* - Lets you heal other people, and yourself. But it doesn't let you heal dead people. - */ - required = 2 - - get_mutation(var/mob/living/carbon/M) - M << "\blue You feel a pleasant warmth pulse throughout your body..." - M.mutations.Add(HEAL) - -/* /datum/mutationreq : - * - * A /datum representation of a requirement in order for a mutation to happen. - * - */ - -/datum/mutationreq - var/block // The block to read - var/subblock // The sub-block to read - var/reqID // The required hexadecimal identifier to be equal to the sub-block being read. - - - - -/* -HEY: If you want to be able to get superpowers easily just uncomment this shit. -mob/verb/checkmuts() - for(var/datum/mutations/mut in global_mutations) - - for(var/datum/mutationreq/R in mut.requirements) - src << "Block: [R.block]" - src << "Sub-Block: [R.subblock]" - src << "Required ID: [R.reqID]" - src << "" - -mob/living/carbon/verb/editSE(t as text) - dna.struc_enzymes = t - domutcheck(src) - -*/ diff --git a/code/unused/filter_control.dm b/code/unused/filter_control.dm deleted file mode 100644 index 2e7188bd104..00000000000 --- a/code/unused/filter_control.dm +++ /dev/null @@ -1,162 +0,0 @@ -// Currently only used to control /obj/machinery/inlet/filter -// todo: expand to vent control as well? - -/obj/machinery/filter_control/New() - ..() - spawn(5) //wait for world - for(var/obj/machinery/inlet/filter/F in machines) - if(F.control == src.control) - F.f_mask = src.f_mask - desc = "A remote control for a filter: [control]" - -/obj/machinery/filter_control/attack_ai(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/filter_control/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/filter_control/attackby(obj/item/weapon/W, mob/user as mob) - if(istype(W, /obj/item/weapon/detective_scanner)) - return ..() - if(istype(W, /obj/item/weapon/screwdriver)) - src.add_fingerprint(user) - user.show_message(text("\red Now [] the panel...", (src.locked) ? "unscrewing" : "reattaching"), 1) - sleep(30) - src.locked =! src.locked - src.updateicon() - return - if(istype(W, /obj/item/weapon/wirecutters) && !src.locked) - stat ^= BROKEN - src.add_fingerprint(user) - for(var/mob/O in viewers(user, null)) - O.show_message(text("\red [] has []activated []!", user, (stat&BROKEN) ? "de" : "re", src), 1) - src.updateicon() - return - if(istype(W, /obj/item/weapon/card/emag) && !emagged) - emagged++ - for(var/mob/O in viewers(user, null)) - O.show_message(text("\red [] has shorted out the []'s access system with an electromagnetic card!", user, src), 1) - src.updateicon() - return src.attack_hand(user) - return src.attack_hand(user) - -/obj/machinery/filter_control/process() - if(!(stat & NOPOWER)) - use_power(5,ENVIRON) - AutoUpdateAI(src) - src.updateUsrDialog() - src.updateicon() - -/obj/machinery/filter_control/attack_hand(mob/user as mob) - if(stat & NOPOWER) - user << browse(null, "window=filter_control") - user.machine = null - return - if(user.stat || user.lying) - return - if ((get_dist(src, user) > 1 || !istype(src.loc, /turf)) && !istype(user, /mob/living/silicon/ai)) - return 0 - - var/list/gases = list("O2", "N2", "Plasma", "CO2", "N2O") - var/dat - user.machine = src - - var/IGoodConnection = 0 - var/IBadConnection = 0 - - for(var/obj/machinery/inlet/filter/F in machines) - if((F.control == src.control) && !(F.stat && (NOPOWER|BROKEN))) - IGoodConnection++ - else if(F.control == src.control) - IBadConnection++ - var/ITotalConnections = IGoodConnection+IBadConnection - - if(ITotalConnections && !(stat & BROKEN)) //ugly - dat += "Connection status: Inlets:[ITotalConnections]/[IGoodConnection]
\n Control ID: [control]

\n" - else - dat += "No Connections Detected!
\n Control ID: [control]
\n" - if(!stat & BROKEN) - for (var/i = 1; i <= gases.len; i++) - dat += "[gases[i]]: [(src.f_mask & 1 << (i - 1)) ? "Siphoning" : "Passing"]
\n" - else - dat += "Warning! Severe Internal Memory Corruption!
\n
\nConsult a qualified station technician immediately!

\n" - dat += "
\nError codes: 0x0000001E 0x0000007B
\n" - - dat += "
\nClose
\n" - user << browse(dat, "window=filter_control;size=300x225") - onclose(user, "filter_control") -/obj/machinery/filter_control/Topic(href, href_list) - if (href_list["close"]) - usr << browse(null, "window=filter_control;") - usr.machine = null - return //Who cares if we're dead or whatever let us close the fucking window - if(..()) - return - if ((((get_dist(src, usr) <= 1 || usr.telekinesis == 1) || istype(usr, /mob/living/silicon/ai)) && istype(src.loc, /turf))) - usr.machine = src - if (src.allowed(usr) || src.emagged && !(stat & BROKEN)) - if (href_list["tg"]) //someone modified the html so I added a check here - // toggle gas - src.f_mask ^= text2num(href_list["tg"]) - for(var/obj/machinery/inlet/filter/FI in machines) - if(FI.control == src.control) - FI.f_mask ^= text2num(href_list["tg"]) - else - usr.see("\red Access Denied ([src.name] operation restricted to authorized atmospheric technicians.)") - AutoUpdateAI(src) - src.updateUsrDialog() - src.add_fingerprint(usr) - else - usr << browse(null, "window=filter_control") - usr.machine = null - return - -/obj/machinery/filter_control/proc/updateicon() - overlays.Cut() - if(stat & NOPOWER) - icon_state = "filter_control-nopower" - return - icon_state = "filter_control" - if(src.locked && (stat & BROKEN)) - overlays += image('icons/obj/stationobjs.dmi', "filter_control00") - return - else if(!src.locked) - icon_state = "filter_control-unlocked" - if(stat & BROKEN) - overlays += image('icons/obj/stationobjs.dmi', "filter_control-wirecut") - overlays += image('icons/obj/stationobjs.dmi', "filter_control00") - return - - var/GoodConnection = 0 - for(var/obj/machinery/inlet/filter/F in machines) - if((F.control == src.control) && !(F.stat && (NOPOWER|BROKEN))) - GoodConnection++ - break - - if(GoodConnection && src.f_mask) - overlays += image('icons/obj/stationobjs.dmi', "filter_control1") - else if(GoodConnection) - overlays += image('icons/obj/stationobjs.dmi', "filter_control10") - else if(src.f_mask) - overlays += image('icons/obj/stationobjs.dmi', "filter_control0") - else - overlays += image('icons/obj/stationobjs.dmi', "filter_control00") - - if (src.f_mask & (GAS_N2O|GAS_PL)) - src.overlays += image('icons/obj/stationobjs.dmi', "filter_control-tox") - if (src.f_mask & GAS_O2) - src.overlays += image('icons/obj/stationobjs.dmi', "filter_control-o2") - if (src.f_mask & GAS_N2) - src.overlays += image('icons/obj/stationobjs.dmi', "filter_control-n2") - if (src.f_mask & GAS_CO2) - src.overlays += image('icons/obj/stationobjs.dmi', "filter_control-co2") - return - -/obj/machinery/filter_control/power_change() - if(powered(ENVIRON)) - stat &= ~NOPOWER - else - stat |= NOPOWER - spawn(rand(1,15)) - src.updateicon() - return \ No newline at end of file diff --git a/code/unused/game_kit.dm b/code/unused/game_kit.dm deleted file mode 100644 index 3a96d168788..00000000000 --- a/code/unused/game_kit.dm +++ /dev/null @@ -1,138 +0,0 @@ -/* -CONTAINS: -THAT STUPID GAME KIT -Which I am commenting out /N -*/ -/* -/obj/item/weapon/game_kit/New() - src.board_stat = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB" - src.selected = "CR" - -/obj/item/weapon/game_kit/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/item/weapon/game_kit/MouseDrop(mob/user as mob) - if (user == usr && !usr.restrained() && !usr.stat && (usr.contents.Find(src) || in_range(src, usr))) - if (usr.hand) - if (!usr.l_hand) - spawn (0) - src.attack_hand(usr, 1, 1) - else - if (!usr.r_hand) - spawn (0) - src.attack_hand(usr, 0, 1) - -/obj/item/weapon/game_kit/proc/update() - var/dat = text("
Game Board

[] remove
", src, (src.selected ? text("Selected: []", src.selected) : "Nothing Selected"), src) - for (var/y = 1 to 8) - dat += "" - - for (var/x = 1 to 8) - var/color = (y + x) % 2 ? "#ffffff" : "#999999" - var/piece = copytext(src.board_stat, ((y - 1) * 8 + x) * 2 - 1, ((y - 1) * 8 + x) * 2 + 1) - - dat += "" - - dat += "" - - dat += "
" - dat += "" - if (piece != "BB") - dat += "" - else - dat += "" - dat += "

Chips:
" - for (var/piece in list("CB", "CR")) - dat += "" - - dat += "
Chess pieces:
" - for (var/piece in list("WP", "WK", "WQ", "WI", "WN", "WR")) - dat += "" - dat += "
" - for (var/piece in list("BP", "BK", "BQ", "BI", "BN", "BR")) - dat += "" - src.data = dat - -/obj/item/weapon/game_kit/attack_hand(mob/user as mob, unused, flag) - - if (flag) - return ..() - else - user.machine = src - if (!( src.data )) - update() - user << browse(src.data, "window=game_kit") - onclose(user, "game_kit") - return - return - -/obj/item/weapon/game_kit/Topic(href, href_list) - ..() - if ((usr.stat || usr.restrained())) - return - - if (usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) - if (href_list["s_piece"]) - src.selected = href_list["s_piece"] - else if (href_list["mode"]) - if (href_list["mode"] == "remove") - src.selected = "remove" - else - src.selected = null - else if (href_list["s_board"]) - if (!( src.selected )) - src.selected = href_list["s_board"] - else - var/tx = text2num(copytext(href_list["s_board"], 1, 2)) - var/ty = text2num(copytext(href_list["s_board"], 3, 4)) - if ((copytext(src.selected, 2, 3) == " " && length(src.selected) == 3)) - var/sx = text2num(copytext(src.selected, 1, 2)) - var/sy = text2num(copytext(src.selected, 3, 4)) - var/place = ((sy - 1) * 8 + sx) * 2 - 1 - src.selected = copytext(src.board_stat, place, place + 2) - if (place == 1) - src.board_stat = text("BB[]", copytext(src.board_stat, 3, 129)) - else - if (place == 127) - src.board_stat = text("[]BB", copytext(src.board_stat, 1, 127)) - else - if (place) - src.board_stat = text("[]BB[]", copytext(src.board_stat, 1, place), copytext(src.board_stat, place + 2, 129)) - place = ((ty - 1) * 8 + tx) * 2 - 1 - if (place == 1) - src.board_stat = text("[][]", src.selected, copytext(src.board_stat, 3, 129)) - else - if (place == 127) - src.board_stat = text("[][]", copytext(src.board_stat, 1, 127), src.selected) - else - if (place) - src.board_stat = text("[][][]", copytext(src.board_stat, 1, place), src.selected, copytext(src.board_stat, place + 2, 129)) - src.selected = null - else - if (src.selected == "remove") - var/place = ((ty - 1) * 8 + tx) * 2 - 1 - if (place == 1) - src.board_stat = text("BB[]", copytext(src.board_stat, 3, 129)) - else - if (place == 127) - src.board_stat = text("[]BB", copytext(src.board_stat, 1, 127)) - else - if (place) - src.board_stat = text("[]BB[]", copytext(src.board_stat, 1, place), copytext(src.board_stat, place + 2, 129)) - else - if (length(src.selected) == 2) - var/place = ((ty - 1) * 8 + tx) * 2 - 1 - if (place == 1) - src.board_stat = text("[][]", src.selected, copytext(src.board_stat, 3, 129)) - else - if (place == 127) - src.board_stat = text("[][]", copytext(src.board_stat, 1, 127), src.selected) - else - if (place) - src.board_stat = text("[][][]", copytext(src.board_stat, 1, place), src.selected, copytext(src.board_stat, place + 2, 129)) - src.add_fingerprint(usr) - update() - for(var/mob/M in viewers(1, src)) - if ((M.client && M.machine == src)) - src.attack_hand(M) -*/ \ No newline at end of file diff --git a/code/unused/gamemodes/ctf.dm b/code/unused/gamemodes/ctf.dm deleted file mode 100644 index 5a464c0ce26..00000000000 --- a/code/unused/gamemodes/ctf.dm +++ /dev/null @@ -1,141 +0,0 @@ -/* -/datum/game_mode/ctf - name = "ctf" - config_tag = "ctf" - -/datum/game_mode/ctf/announce() - world << "The current game mode is - Capture the Flag!" - world << "Capture the other teams flag and bring it back to your base!" - world << "Respawn is on" - -/datum/game_mode/ctf/pre_setup() - - config.allow_ai = 0 - var/list/mobs = list() - var/total_mobs - for(var/mob/living/carbon/human/M in world) - if (M.client) - mobs += M - total_mobs++ - - var/obj/R = locate("landmark*Red-Spawn") - var/obj/G = locate("landmark*Green-Spawn") - - var/mob_check - for(var/mob/living/carbon/human/M in mobs) - if(!M) - continue - mob_check++ - if(mob_check <= total_mobs/2) //add to red team else to green - spawn() - if(M.client) - M << "You are in the Red Team!" - del(M.wear_suit) - M.w_uniform = new /obj/item/clothing/under/color/red(M) - M.w_uniform.layer = 20 - del(M.shoes) - M.wear_suit = new /obj/item/clothing/suit/armor/tdome/red(M) - M.wear_suit.layer = 20 - M.shoes = new /obj/item/clothing/shoes/black(M) - M.shoes.layer = 20 - M.wear_mask = new /obj/item/clothing/mask/gas/emergency(M) - M.wear_mask.layer = 20 - M.gloves = new /obj/item/clothing/gloves/swat(M) - M.gloves.layer = 20 - M.glasses = new /obj/item/clothing/glasses/thermal(M) - M.glasses.layer = 20 - var/obj/item/device/radio/headset/H = new /obj/item/device/radio/headset(M) - H.set_frequency(1465) - M.w_radio = H - M.w_radio.layer = 20 - var/obj/item/weapon/tank/air/O = new /obj/item/weapon/tank/air(M) - M.back = O - M.back.layer = 20 - M.internal = O - - del(M.wear_id) - var/obj/item/weapon/card/id/W = new(M) - W.name = "[M.real_name]'s ID card (Red Team)" - W.access = access_red - W.assignment = "Red Team" - W.registered_name = M.real_name - M.wear_id = W - M.wear_id.layer = 20 - if(R) - M.loc = R.loc - else - world << "No red team spawn point detected" - M.client.team = "Red" - else - spawn() - if(M.client) - M << "You are in the Green Team!" - del(M.wear_suit) - M.w_uniform = new /obj/item/clothing/under/color/green(M) - M.w_uniform.layer = 20 - del(M.shoes) - M.wear_suit = new /obj/item/clothing/suit/armor/tdome/green(M) - M.wear_suit.layer = 20 - M.shoes = new /obj/item/clothing/shoes/black(M) - M.shoes.layer = 20 - M.wear_mask = new /obj/item/clothing/mask/gas/emergency(M) - M.wear_mask.layer = 20 - M.gloves = new /obj/item/clothing/gloves/swat(M) - M.gloves.layer = 20 - M.glasses = new /obj/item/clothing/glasses/thermal(M) - M.glasses.layer = 20 - var/obj/item/device/radio/headset/H = new /obj/item/device/radio/headset(M) - H.set_frequency(1449) - M.w_radio = H - M.w_radio.layer = 20 - var/obj/item/weapon/tank/air/O = new /obj/item/weapon/tank/air(M) - M.back = O - M.back.layer = 20 - M.internal = O - - del(M.wear_id) - var/obj/item/weapon/card/id/W = new(M) - W.name = "[M.real_name]'s ID card (Green Team)" - W.access = access_green - W.assignment = "Green Team" - W.registered_name = M.real_name - M.wear_id = W - M.wear_id.layer = 20 - if(G) - M.loc = G.loc - else - world << "No green team spawn point detected" - M.client.team = "Green" - - -/datum/game_mode/ctf/post_setup() - abandon_allowed = 1 - setup_game() - - spawn (50) - var/obj/L = locate("landmark*Red-Flag") - if (L) - new /obj/item/weapon/ctf_flag/red(L.loc) - else - world << "No red flag spawn point detected" - - L = locate("landmark*Green-Flag") - if (L) - new /obj/item/weapon/ctf_flag/green(L.loc) - else - world << "No green flag spawn point detected" - - L = locate("landmark*The-Red-Team") - if (L) - new /obj/machinery/red_injector(L.loc) - else - world << "No red team spawn injector point detected" - - L = locate("landmark*The-Green-Team") - if (L) - new /obj/machinery/green_injector(L.loc) - else - world << "No green team injector spawn point detected" - ..() - -*/ \ No newline at end of file diff --git a/code/unused/gamemodes/ctf_items.dm b/code/unused/gamemodes/ctf_items.dm deleted file mode 100644 index 74c907826b6..00000000000 --- a/code/unused/gamemodes/ctf_items.dm +++ /dev/null @@ -1,139 +0,0 @@ -/obj/item/weapon/ctf_flag - name = "Flag" - desc = "Its a flag" - w_class = 5 - icon = 'flags.dmi' - icon_state = "flag_neutral" - item_state = "paper" - -/obj/item/weapon/ctf_flag/red - name = "The Red Flag" - desc = "Catch dat fukken flag" - icon_state = "flag_red" - -/obj/item/weapon/ctf_flag/green - name = "The Green Flag" - desc = "Catch dat fukken flag" - icon_state = "flag_green" - -/obj/item/weapon/ctf_flag/New() - ..() - spawn(200) - process() - return - -/obj/item/weapon/ctf_flag/process() - if(istype(src, /obj/item/weapon/ctf_flag/green)) - var/obj/L = locate("landmark*Green-Flag") - if(locate("landmark*Green-Flag", src)) - spawn(200) - process() - return - else if(!src.check_if_equipped() && L) - new /obj/item/weapon/ctf_flag/green(L.loc) - del(src) - if(istype(src, /obj/item/weapon/ctf_flag/red)) - var/obj/L = locate("landmark*Red-Flag") - if(locate("landmark*Red-Flag", src)) - spawn(200) - process() - return - else if(!src.check_if_equipped() && L) - new /obj/item/weapon/ctf_flag/red(L.loc) - del(src) - return - -/obj/item/weapon/ctf_flag/proc/check_if_equipped() - var/equipped = 0 - for(var/mob/M in living_mob_list) - if(M &&!M.stat) - var/list/L = M.get_contents() - if(src in L) - equipped = 1 - break - return equipped - -/obj/machinery/red_injector - name = "Red Team Flag Injector" - desc = "Insert flag here" - anchored = 1 - density = 1 - var/score = 0 - var/operating = 0 - icon = 'flags.dmi' - icon_state = "red_injector" -/* -/obj/machinery/red_injector/ex_act(severity) - return - -/obj/machinery/red_injector/attackby(var/obj/item/weapon/ctf_flag/C, mob/user) - if(src.operating) - user << "Cannot put a flag in right now" - return - src.operating = 1 - if(istype(C, /obj/item/weapon/ctf_flag/green)) - if(locate("landmark*Red-Flag", /obj/item/weapon/ctf_flag/red)) - src.score++ - world << "[user.real_name] has scored for the red team!" - if(ticker.mode.name == "ctf") - ticker.red_score++ - var/obj/L = locate("landmark*Green-Flag") - if (L) - del(C) - new /obj/item/weapon/ctf_flag/green(L.loc) - else - world << "No green flag spawn point detected" - if(src.score >= 15) - world << "The Red Team has won!" - world << "They have scored [score] times with the flag!" - sleep(300) - world.Reboot() - else - user << "\red You need to have your flag in the beginning position!" - else if(istype(C, /obj/item/weapon/ctf_flag/red)) - world << "[user.real_name] has tried to score with their own flag! Idiot!" - src.operating = 0 - return -*/ -/obj/machinery/green_injector - name = "Green Team Flag Injector" - desc = "Insert flag here" - anchored = 1 - density = 1 - var/operating = 0 - var/score = 0 - icon = 'flags.dmi' - icon_state = "green_injector" - -/obj/machinery/green_injector/ex_act(severity) - return -/* -/obj/machinery/green_injector/attackby(var/obj/item/weapon/ctf_flag/C, mob/user) - if(src.operating) - user << "Cannot put a flag in right now" - return - src.operating = 1 - if(istype(C, /obj/item/weapon/ctf_flag/red)) - if(locate("landmark*Green-Flag", /obj/item/weapon/ctf_flag/green)) - src.score++ - world << "[user.real_name] has scored for the green team!" - if(ticker.mode.name == "ctf") - ticker.green_score++ - var/obj/L = locate("landmark*Red-Flag") - if (L) - del(C) - new /obj/item/weapon/ctf_flag/red(L.loc) - else - world << "No red flag spawn point detected" - if(src.score >= 15) - world << "The Green Team has won!" - world << "They have scored [score] times with the flag!" - sleep(300) - world.Reboot() - else - user << "\red You need to have your flag in the beginning position!" - else if(istype(C, /obj/item/weapon/ctf_flag/green)) - world << "[user.real_name] has tried to score with their own flag! Idiot!" - src.operating = 0 - return -*/ \ No newline at end of file diff --git a/code/unused/gamemodes/deathmatch.dm b/code/unused/gamemodes/deathmatch.dm deleted file mode 100644 index 59b4d14718a..00000000000 --- a/code/unused/gamemodes/deathmatch.dm +++ /dev/null @@ -1,66 +0,0 @@ -/* -/datum/game_mode/deathmatch - name = "deathmatch" - config_tag = "deathmatch" - var/startedat - var/const/gamelength = 15 * 600 // 1/10 second - - announce() - world << "The current game mode is - Death Commando Deathmatch!" - world << "Just kill everyone else. They're gonna try to kill you, after all. Respawning is enabled." - - post_setup() - startedat = world.realtime - abandon_allowed = 1 - setup_game() - - // TODO: DEFERRED Make this massively cleaner. It should hook before spawning, not after. - var/list/mobs = list() - for(var/mob/living/carbon/human/M in world) - if (M.client) - mobs += M - for(var/mob/living/carbon/human/M in mobs) - spawn() - if(M.client) - for(var/obj/item/weapon/W in list(M.wear_suit, M.w_uniform, M.r_store, M.l_store, M.wear_id, M.belt, - M.gloves, M.glasses, M.head, M.ears, M.shoes, M.wear_mask, M.back, - M.handcuffed, M.r_hand, M.l_hand)) - M.unEquip(W) - del(W) - - var/randomname = "Killiam Shakespeare" - if(commando_names.len) - randomname = pick(commando_names) - commando_names -= randomname - var/newname = stripped_input(M,"You are a death commando. Would you like to change your name?", "Character Creation", randomname,MAX_NAME_LEN) - if(!length(newname)) - newname = randomname - - M.real_name = newname - M.name = newname // there are WAY more things than this to change, I'm almost certain - - M.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(M), slot_w_uniform) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes) - M.equip_to_slot_or_del(new /obj/item/clothing/suit/swat_suit/death_commando(M), slot_wear_suit) - M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/death_commando(M), slot_wear_mask) - M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves) - M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(M), slot_glasses) - M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle(M), slot_l_hand) - M.equip_to_slot_or_del(new /obj/item/weapon/m_pill/cyanide(M), slot_l_store) - M.equip_to_slot_or_del(new /obj/item/weapon/flashbang(M), slot_r_store) - - var/obj/item/weapon/tank/air/O = new(M) - M.equip_to_slot_or_del(O, slot_back) - M.internal = O - - var/obj/item/weapon/card/id/W = new(M) - W.access = get_all_accesses() - W.name = "[newname]'s ID card (Death Commando)" - W.assignment = "Death Commando" - W.registered_name = newname - M.equip_to_slot_or_del(W, slot_wear_id) - ..() - - check_win() - return 1 -*/ \ No newline at end of file diff --git a/code/unused/gamemodes/monkey.dm b/code/unused/gamemodes/monkey.dm deleted file mode 100644 index 04b0689f6ab..00000000000 --- a/code/unused/gamemodes/monkey.dm +++ /dev/null @@ -1,131 +0,0 @@ -#define MONKEY_MODE_RUNNING 0 -#define MONKEY_MODE_NO_RABID_LEFT 1 -#define MONKEY_MODE_SHUTTLE_CAPTURED 2 -#define MONKEY_MODE_SHUTTLE_WITH_HUMANS 3 - -#define MONKEY_MODE_MONKEYS 4 - -/datum/game_mode/monkey - name = "monkey" - config_tag = "monkey" - var/state = MONKEY_MODE_RUNNING - var/list/datum/mind/initial_monkeys = new - -/datum/game_mode/monkey/announce() - world << "The current game mode is - Monkey!" - world << "Some of your crew members have been infected by a mutageous virus!" - world << "Escape on the shuttle but the humans have precedence!" - -/datum/game_mode/monkey/can_start() - if (num_players()<2) - return 0 - for(var/mob/new_player/P in player_list) - if(P.client && P.ready && !jobban_isbanned(P, "Syndicate")) - return 1 - return 0 - -/datum/game_mode/monkey/pre_setup() - var/list/possible_monkeys = get_players_for_role(BE_MONKEY) - - // stop setup if no possible monkeys - if(!possible_monkeys.len) - return 0 - - var/num_monkeys = MONKEY_MODE_MONKEYS - var/num_players = num_players() - - if (num_players<=num_monkeys) - num_monkeys = round(num_players/2) - - for(var/j = 1 to num_monkeys) - if (!possible_monkeys.len) - break - var/datum/mind/monkey = pick(possible_monkeys) - possible_monkeys-=monkey - initial_monkeys += monkey - monkey.special_role = "monkey" - - if(!initial_monkeys.len) - return 0 - return 1 - -/datum/game_mode/monkey/post_setup() - spawn (50) - for (var/datum/mind/monkey in initial_monkeys) - var/mob/living/carbon/human/H = monkey.current - var/mob/living/carbon/monkey/new_monkey = H.monkeyize() - new_monkey << "Your goal is to capture the entire human civilization and your first target is Centcom. Hijack the shuttle without humans aboard!" - - for (var/mob/living/carbon/monkey/rabid_monkey in mob_list) - if (!(rabid_monkey.mind in initial_monkeys) && (!isturf(rabid_monkey.loc) || rabid_monkey.z!=1)) - continue - rabid_monkey.contract_disease(new /datum/disease/jungle_fever,1,0) - del(initial_monkeys) - ..() - -/datum/game_mode/monkey/proc/is_important_monkey(var/mob/living/carbon/monkey/M as mob) - var/turf/T = get_turf(M) - var/area/A = get_area(M) - if(M.stat!=2) - - for(var/datum/disease/D in M.viruses) - if(istype(D, /datum/disease/jungle_fever) && ( T.z==1 || is_type_in_list(A, centcom_areas))) - return 1 - - -/datum/game_mode/monkey/check_win() - if (state==MONKEY_MODE_SHUTTLE_CAPTURED || state==MONKEY_MODE_SHUTTLE_WITH_HUMANS) - return - var/infected_count = 0 - for (var/mob/living/carbon/monkey/rabid_monkey in mob_list) - if (is_important_monkey(rabid_monkey)) - infected_count++ - if (infected_count==0) - state = MONKEY_MODE_NO_RABID_LEFT - -/datum/game_mode/monkey/check_finished() - return (emergency_shuttle.location==2) || (state>0) - -/datum/game_mode/monkey/declare_completion() - var/monkeywin = 0 - if (state != MONKEY_MODE_NO_RABID_LEFT) - for(var/mob/living/carbon/monkey/monkey_player in mob_list) - if (is_important_monkey(monkey_player)) - var/area/A = get_area(monkey_player) - if ( is_type_in_list(A, centcom_areas)) - monkeywin = 1 - break - - if(monkeywin) - for(var/mob/living/carbon/human/human_player in mob_list) - if (human_player.stat != 2) - var/area/A = get_area(human_player) - if (istype(A, /area/shuttle/escape/centcom)) - monkeywin = 0 - break - - if (monkeywin) - feedback_set_details("round_end_result","win - monkey win") - world << "The monkeys have won! Humanity is doomed!" - for (var/mob/living/carbon/human/player in player_list) - spawn(rand(0,150)) - player.monkeyize() - sleep(200) - else - feedback_set_details("round_end_result","loss - crew win") - world << "The Research Staff has stopped the monkey invasion!" - ..() - return 1 - - -/datum/game_mode/proc/auto_declare_completion_monkey() - for(var/mob/living/carbon/monkey/monkey_player in mob_list) - for(var/datum/disease/D in monkey_player.viruses) - if (istype(D, /datum/disease/jungle_fever) && monkey_player.ckey) - world << "[monkey_player.ckey] was played infested [monkey_player]. [monkey_player.stat == 2 ? "(DEAD)" : ""]" - return 1 - -#undef MONKEY_MODE_RUNNING -#undef MONKEY_MODE_NO_RABID_LEFT -#undef MONKEY_MODE_SHUTTLE_CAPTURED -#undef MONKEY_MODE_SHUTTLE_WITH_HUMANS diff --git a/code/unused/gamemodes/restructuring.dm b/code/unused/gamemodes/restructuring.dm deleted file mode 100644 index eff8acb7248..00000000000 --- a/code/unused/gamemodes/restructuring.dm +++ /dev/null @@ -1,77 +0,0 @@ -/datum/game_mode/restructuring - name = "Corporate Restructuring" - config_tag = "restructuring" -/* -/datum/game_mode/restructuring/announce() - world << "\red GLOBAL TRANSMISSION FROM HEAD OFFICE: A CORPORATE RESTRUCTURING IS TO TAKE PLACE" - world << "\red Stay tuned for further news; note that we do care for our employees and any layoffs will be dealt with discretion and compassion" - - -/datum/game_mode/restructuring/post_setup() - setup_game() - var/list/mobs = get_mob_list() - while (mobs.len == 0) - sleep 30 - mobs = get_mob_list() - spawn (120) - pick_target() - ..() - -/datum/game_mode/restructuring/proc/pick_target(who) - var/mob/target - var/mob/target_desc - - if (!who) - target = pick(get_mob_list()) - target_desc = get_target_desc(target) - world << "\red HEAD OFFICE: [target_desc] is accused of attempting to start a Union and is now considered a threat to the station. Terminate the employee immediately." - else - target = who - target_desc = get_target_desc(target) - world << "\red HEAD OFFICE: [target_desc] is accused of fornicating with staff of the same sex. Terminate the employee immediately." - ticker.target = target - - target.store_memory("Head office has ordered your downsizing. Ruh roh", 0) - - for(var/mob/living/silicon/ai/M in world) - M << "These are your laws now:" - M.set_zeroth_law("[target_desc] is not human.") - M.show_laws() - -/datum/game_mode/restructuring/check_win() - var/list/left_alive = get_mob_list() - if (left_alive.len == 1) - var/thewinner = the_winner() - world << "\red HEAD OFFICE: Thanks to his superior brown-nosing abilities, [thewinner] has been promoted to senior management! Congratulations!" - return 1 - else if (left_alive.len == 0) - world << "\red HEAD OFFICE: Cost cutting measures have achieved 100% efficiency. Thank you for understanding our position during this volatile economic downturn." - return 1 - else - if(ticker.target.stat != 2) - return 0 - world << "\red HEAD OFFICE: It seems we have made a mistake in our paperwork. The previous target for termination was chosen based on race, sex, and/or religious beliefs, which is against company policy. Please cancel previous termination request." - pick_target() - return 0 - -/datum/game_mode/restructuring/proc/get_mob_list() - var/list/mobs = list() - for(var/mob/M in world) - if (M.stat<2 && M.client && istype(M, /mob/living/carbon/human)) - mobs += M - return mobs - -/datum/game_mode/restructuring/proc/the_winner() - for(var/mob/M in world) - if (M.stat<2 && M.client && istype(M, /mob/living/carbon/human)) - return M.name - -/datum/game_mode/restructuring/proc/get_target_desc(mob/target) //return a useful string describing the target - var/targetrank = null - for(var/datum/data/record/R in data_core.general) - if (R.fields["name"] == target.real_name) - targetrank = R.fields["rank"] - if(!targetrank) - return "[target.name]" - return "[target.name] the [targetrank]" -*/ \ No newline at end of file diff --git a/code/unused/gamemodes/ruby.dm b/code/unused/gamemodes/ruby.dm deleted file mode 100644 index daf7fa37a0a..00000000000 --- a/code/unused/gamemodes/ruby.dm +++ /dev/null @@ -1,289 +0,0 @@ -// RUBY MODE -// There is a weapon of some sort that spawns on the station -// It calls out to crew members in an effort to find a wielder -// The wielder is made an abomination - they're given a grotesque mask and special powers -// The Abomination wins by murdering the entire crew, then himself -// The crew wins by destroying the weapon - - -/datum/game_mode/ruby - name = "ruby" - config_tag = "ruby" - - var/datum/mind/abomination - var/finished = 0 - var/abominationwins = 0 - var/winnerkey - var/obj/macguffin - var/list/killed = list() - var/respawns = 0 - - - -/datum/game_mode/ruby/post_setup() - var/list/possible_abominations = get_possible_abominations() - - if(possible_abominations.len>0) - abomination = pick(possible_abominations) - /* - if(istype(ruby)) - abomination.special_role = "abomination" - if(wizardstart.len == 0) - wizard.current << "\red A starting location for you could not be found, please report this bug!" - else - var/starting_loc = pick(wizardstart) - wizard.current.loc = starting_loc - - for (var/obj/effect/landmark/A in world) - if (A.name == "Teleport-Scroll") - new /obj/item/weapon/teleportation_scroll(A.loc) - del(A) - continue - */ - ..() - -/datum/game_mode/ruby/check_finished() - if(!macguffin || abominationwins) - return 1 - else - return 0 - -/datum/game_mode/ruby/declare_completion() - if(abominationwins) - feedback_set_details("round_end_result","win - abomination win") - world << "The Abomination has murdered the station and sacrificed himself to Cjopaze! (played by [winnerkey])" - else - feedback_set_details("round_end_result","loss - abomination killed") - world << "The Abomination has been stopped and Cjopaze's influence resisted! The station lives another day," - if(killed.len > 0) - world << "Those who were sacrificed shall be remembered: " - for(var/mob/M in killed) - if(M) - world << "[M.real_name]" - /* - for(var/datum/mind/traitor in traitors) - var/traitorwin = 1 - var/traitor_name - - if(traitor.current) - traitor_name = "[traitor.current.real_name] (played by [traitor.key])" - else - traitor_name = "[traitor.key] (character destroyed)" - - world << "The syndicate traitor was [traitor_name]" - var/count = 1 - for(var/datum/objective/objective in traitor.objectives) - if(objective.check_completion()) - world << "Objective #[count]: [objective.explanation_text] \green Success" - else - world << "Objective #[count]: [objective.explanation_text] \red Failed" - traitorwin = 0 - count++ - - if(traitorwin) - world << "The traitor was successful!" - else - world << "The traitor has failed!" - */ - ..() - return 1 - - -/datum/game_mode/ruby/proc/spawn_macguffin() - -/datum/game_mode/ruby/proc/get_possible_abominations() - - -/mob/proc/make_abomination() - src.see_in_dark = 20 - src.verbs += /client/proc/planar_shift - src.verbs += /client/proc/vile_ressurection - src.verbs += /client/proc/defile_corpse - src.verbs += /client/proc/summon_weapon - src.verbs += /client/proc/sacrifice_self - src.verbs += /client/proc/hunt - src.verbs += /client/proc/howl - var/datum/game_mode/ruby/rmode = ticker.mode - rmode.abomination = src.mind - return - - -/client/proc/planar_shift() - set name = "Planar Shift" - set category = "Abomination" - // This is a pretty shitty way to do this. Should use the spell_holder method from Wizard mode - /* - if(!usr.incorporeal_move) - usr.sight |= SEE_MOBS - usr.sight |= SEE_OBJS - usr.sight |= SEE_TURFS - //usr.density = 0 - usr.incorporeal_move = 1 - else - usr.sight &= ~SEE_MOBS - usr.sight &= ~SEE_TURFS - usr.sight &= ~SEE_OBJS - usr.density = 1 - usr.incorporeal_move = 0 - src.verbs -= /client/proc/planar_shift - spawn(300) src.verbs += /client/proc/planar_shift - */ - -/client/proc/vile_ressurection() - set name = "Vile Ressurection" - set category = "Abomination" - if(src.mob.stat != 2 || !src.mob) - return - if(ticker.mode:respawns > 0) - // spawn a new body - ticker.mode:respawns -= 1 - else - // nope - -/client/proc/defile_corpse(var/mob/living/carbon/human/H in view()) - set name = "Defile Corpse" - set category = "Abomination" - if(istype(H, /mob/living/carbon/human)) - var/datum/game_mode/ruby/rmode = ticker.mode - rmode.killed.Add(H) - ticker.mode:respawns += 1 - var/fluffmessage = pick("\red [usr] rips the flesh from [H]'s corpse and plucks their eyes from their sockets!", "\red [usr] does unspeakable things to [H]'s corpse!", "\red [usr] binds [H]'s corpse with their own entrails!") - usr.visible_message(fluffmessage) - // play sound - -/client/proc/summon_weapon() - set name = "Summon Weapon" - set category = "Abomination" - - for(var/obj/item/weapon/rubyweapon/w in world) - if(istype(w, /obj/item/weapon/rubyweapon)) - if(istype(w.loc, /mob)) - var/mob/M = w.loc - M.drop_item() - w.loc = usr.loc - else - w.loc = usr.loc - src.verbs -= /client/proc/summon_weapon - spawn(300) src.verbs += /client/proc/summon_weapon - return - -/client/proc/sacrifice_self() - set name = "Sacrifice Self" - set category = "Abomination" - set desc = "Everything must come to an end. After you have freed them, you must free yourself." - - for(var/mob/living/carbon/human/H in player_list) - if(!H.client || H.client == src) - continue - src << "Your work is not done. You will not find release until they are all free." - return - usr.gib(1) - ticker.mode:abominationwins = 1 - -/client/proc/hunt() - set name = "Hunt" - set category = "Abomination" - set desc = "" - - var/list/candidates = list() - - for(var/mob/living/carbon/human/H in player_list) - if(!H.client || H.client == src) continue - //if(!H.client) continue - candidates.Add(H) - - usr.visible_message(text("\red [usr]'s flesh ripples and parts, revealing dozens of eyes poking from its surface. They all glance wildly around for a few moments before receding again.")) - - var/mob/living/carbon/human/H = pick(candidates) - - if(!H) return - - var/filename="crmap[ckey].tmp" - var/html="" - var/denytypes[0] - var/tilesizex=32 - var/tilesizey=32 - //If the temp. file exists, delete it - src << browse("

Sensing prey...

", "window=hunt") - if (fexists(filename)) fdel(filename) - - //Display everything in the world - for (var/y=H.y-3,y<=H.y+3,y++) - html+="" - text2file(html,filename) - html="" - sleep(-1) - //for (var/x=H.x-5,x<=H.x+5,x++) - for(var/x=H.x-3, x<=H.x+3, x++) - //Turfs - var/turf/T=locate(x,y,H.z) - if (!T) continue - var/icon/I=icon(T.icon,T.icon_state) - var/imgstring=dd_replacetext("[T.type]-[T.icon_state]","/","_") - - //Movable atoms - for (var/atom/movable/A in T) - //Make sure it's allowed to be displayed - var/allowed=1 - for (var/X in denytypes) - if (istype(A,X)) - allowed=0 - break - if (!allowed) continue - - if (A.icon) I.Blend(icon(A.icon,A.icon_state,A.dir),ICON_OVERLAY) - imgstring+=dd_replacetext("__[A.type]_[A.icon_state]","/","_") - - //Output it - src << browse_rsc(I,"[imgstring].dmi") - html+="" - - text2file("
",filename) - - //Display it - src << browse(file(filename),"window=hunt") - - - -/client/proc/howl() // This is just a way for the Abomination to make the game more atmospheric periodically. - set name = "Howl" - set category = "Abomination" - set desc = "" - - usr.visible_message(text("\red [usr]'s form warbles and distorts before settling back into its grotesque shape once more.")) - // Play a random spooky sound - maybe cause some visual, non-mechanical effects to appear at random for a few seconds. - - src.verbs -= /client/proc/howl - spawn(rand(300,1800)) src.verbs += /client/proc/howl - -/obj/item/weapon/rubyweapon - desc = "" - name = "wepon" - icon_state = "wepon" - w_class = 3.0 - throwforce = 60.0 - throw_speed = 1 - throw_range = 7 - force = 24.0 - var/mob/owner - - proc/check_owner() - if(!owner) - sleep(300) - if(!owner) - spawn() search_for_new_owner() - else - spawn(1800) check_owner() - - proc/search_for_new_owner() - var/list/possible_owners = list() - for(var/mob/living/carbon/human/H in mob_list) - possible_owners.Add(H) - - var/mob/living/carbon/human/H = pick(possible_owners) - // Send message to H - // Take a snapshot of the item's location, browse it to H - spawn(rand(600,1800)) search_for_new_owner() - - attack_self(mob/user as mob) - // Blow all lights nearby \ No newline at end of file diff --git a/code/unused/heater.dm b/code/unused/heater.dm deleted file mode 100644 index 3af7770a066..00000000000 --- a/code/unused/heater.dm +++ /dev/null @@ -1,201 +0,0 @@ -/obj/machinery/atmoalter/heater/proc/setstate() - - if(stat & NOPOWER) - icon_state = "heater-p" - return - - if (src.holding) - src.icon_state = "heater1-h" - else - src.icon_state = "heater1" - return - -/obj/machinery/atmoalter/heater/process() - /* - if(stat & NOPOWER) return - use_power(5) - - var/turf/T = src.loc - if (istype(T, /turf)) - if (locate(/obj/move, T)) - T = locate(/obj/move, T) - else - T = null - if (src.h_status) - var/t1 = src.gas.total_moles() - if ((t1 > 0 && src.gas.temperature < (src.h_tar+T0C))) - var/increase = src.heatrate / t1 - var/n_temp = src.gas.temperature + increase - src.gas.temperature = min(n_temp, (src.h_tar+T0C)) - use_power( src.h_tar*8) - switch(src.t_status) - if(1.0) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.holding.gas.transfer_from(src.gas, t) - else - src.t_status = 3 - if(2.0) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = src.maximum - t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.gas.transfer_from(src.holding.gas, t) - else - src.t_status = 3 - else - - src.updateDialog() - src.setstate() - return - */ - -/obj/machinery/atmoalter/heater/New() - ..() - src.gas = new /datum/gas_mixture() - return - -/obj/machinery/atmoalter/heater/attack_ai(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/atmoalter/heater/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/atmoalter/heater/attack_hand(var/mob/user as mob) - /* - if(stat & (BROKEN|NOPOWER)) - return - - user.machine = src - var/tt - switch(src.t_status) - if(1.0) - tt = text("Releasing Siphon Stop", src, src) - if(2.0) - tt = text("Release SiphoningStop", src, src) - if(3.0) - tt = text("Release Siphon Stopped", src, src) - else - var/ht = null - if (src.h_status) - ht = text("Heating Stop", src) - else - ht = text("Heat Stopped", src) - var/ct = null - switch(src.c_status) - if(1.0) - ct = text("Releasing Accept Stop", src, src) - if(2.0) - ct = text("Release Accepting Stop", src, src) - if(3.0) - ct = text("Release Accept Stopped", src, src) - else - ct = "Disconnected" - var/dat = text("Canister Valves
\nContains/Capacity [] / []
\nUpper Valve Status: [][]
\n\tM - - - - [] + + + + M
\nHeater Status: [] - []
\n\tTrg Tmp: - - - [] + + +
\n
\nPipe Valve Status: []
\n\tM - - - - [] + + + + M
\n
\nClose
\n
", src.gas.total_moles(), src.maximum, tt, (src.holding ? text("
Tank ([])", src, src.holding.gas.total_moles()) : null), src, num2text(1000000.0, 7), src, src, src, src, src.t_per, src, src, src, src, src, num2text(1000000.0, 7), ht, (src.gas.total_moles() ? (src.gas.temperature-T0C) : 20), src, src, src, src.h_tar, src, src, src, ct, src, num2text(1000000.0, 7), src, src, src, src, src.c_per, src, src, src, src, src, num2text(1000000.0, 7), user) - user << browse(dat, "window=canister;size=600x300") - onclose(user, "canister") - return */ //TODO: FIX - -/obj/machinery/atmoalter/heater/Topic(href, href_list) - ..() - if (stat & (BROKEN|NOPOWER)) - return - if (usr.stat || usr.restrained()) - return - if (((get_dist(src, usr) <= 1 || usr.telekinesis == 1) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon/ai))) - usr.machine = src - if (href_list["c"]) - var/c = text2num(href_list["c"]) - switch(c) - if(1.0) - src.c_status = 1 - if(2.0) - src.c_status = 2 - if(3.0) - src.c_status = 3 - else - else - if (href_list["t"]) - var/t = text2num(href_list["t"]) - if (src.t_status == 0) - return - switch(t) - if(1.0) - src.t_status = 1 - if(2.0) - src.t_status = 2 - if(3.0) - src.t_status = 3 - else - else - if (href_list["h"]) - var/h = text2num(href_list["h"]) - if (h == 1) - src.h_status = 1 - else - src.h_status = null - else - if (href_list["tp"]) - var/tp = text2num(href_list["tp"]) - src.t_per += tp - src.t_per = min(max(round(src.t_per), 0), 1000000.0) - else - if (href_list["cp"]) - var/cp = text2num(href_list["cp"]) - src.c_per += cp - src.c_per = min(max(round(src.c_per), 0), 1000000.0) - else - if (href_list["ht"]) - var/cp = text2num(href_list["ht"]) - src.h_tar += cp - src.h_tar = min(max(round(src.h_tar), 0), 500) - else - if (href_list["tank"]) - var/cp = text2num(href_list["tank"]) - if ((cp == 1 && src.holding)) - src.holding.loc = src.loc - src.holding = null - if (src.t_status == 2) - src.t_status = 3 - src.updateUsrDialog() - src.add_fingerprint(usr) - else - usr << browse(null, "window=canister") - return - return - -/obj/machinery/atmoalter/heater/attackby(var/obj/W as obj, var/mob/user as mob) - - if (istype(W, /obj/item/weapon/tank)) - if (src.holding) - return - var/obj/item/weapon/tank/T = W - user.drop_item() - T.loc = src - src.holding = T - else - if (istype(W, /obj/item/weapon/wrench)) - var/obj/machinery/connector/con = locate(/obj/machinery/connector, src.loc) - - if (src.c_status) - src.anchored = initial(src.anchored) - src.c_status = 0 - user.show_message("\blue You have disconnected the heater.", 1) - if(con) - con.connected = null - else - if (con && !con.connected) - src.anchored = 1 - src.c_status = 3 - user.show_message("\blue You have connected the heater.", 1) - con.connected = src - else - user.show_message("\blue There is no connector here to attach the heater to.", 1) - return - diff --git a/code/unused/hivebot/death.dm b/code/unused/hivebot/death.dm deleted file mode 100644 index 43e7c257a53..00000000000 --- a/code/unused/hivebot/death.dm +++ /dev/null @@ -1,24 +0,0 @@ -/mob/living/silicon/hivebot/death(gibbed) - if(src.mainframe) - src.mainframe.return_to(src) - src.stat = 2 - src.canmove = 0 - - if(src.blind) - src.blind.layer = 0 - src.sight |= SEE_TURFS - src.sight |= SEE_MOBS - src.sight |= SEE_OBJS - - src.see_in_dark = 8 - src.see_invisible = SEE_INVISIBLE_LEVEL_TWO - src.updateicon() - - var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch - store_memory("Time of death: [tod]", 0) - - if (src.key) - spawn(50) - if(src.key && src.stat == 2) - src.verbs += /client/proc/ghost - return ..(gibbed) \ No newline at end of file diff --git a/code/unused/hivebot/emote.dm b/code/unused/hivebot/emote.dm deleted file mode 100644 index 12d71f6b7d2..00000000000 --- a/code/unused/hivebot/emote.dm +++ /dev/null @@ -1,140 +0,0 @@ -/mob/living/silicon/hivebot/emote(var/act) - var/param = null - if (findtext(act, "-", 1, null)) - var/t1 = findtext(act, "-", 1, null) - param = copytext(act, t1 + 1, length(act) + 1) - act = copytext(act, 1, t1) - var/m_type = 1 - var/message - - switch(act) - if ("salute") - if (!src.buckled) - var/M = null - if (param) - for (var/mob/A in view(null, null)) - if (param == A.name) - M = A - break - if (!M) - param = null - - if (param) - message = "[src] salutes to [param]." - else - message = "[src] salutes." - m_type = 1 - if ("bow") - if (!src.buckled) - var/M = null - if (param) - for (var/mob/A in view(null, null)) - if (param == A.name) - M = A - break - if (!M) - param = null - - if (param) - message = "[src] bows to [param]." - else - message = "[src] bows." - m_type = 1 - - if ("clap") - if (!src.restrained()) - message = "[src] claps." - m_type = 2 - if ("flap") - if (!src.restrained()) - message = "[src] flaps his wings." - m_type = 2 - - if ("aflap") - if (!src.restrained()) - message = "[src] flaps his wings ANGRILY!" - m_type = 2 - - if ("custom") - var/input = input("Choose an emote to display.") as text|null - if (!input) - return - input = sanitize(input) - var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable") - if (input2 == "Visible") - m_type = 1 - else if (input2 == "Hearable") - m_type = 2 - else - alert("Unable to use this emote, must be either hearable or visible.") - return - message = "[src] [input]" - - if ("twitch") - message = "[src] twitches violently." - m_type = 1 - - if ("twitch_s") - message = "[src] twitches." - m_type = 1 - - if ("nod") - message = "[src] nods." - m_type = 1 - - if ("glare") - var/M = null - if (param) - for (var/mob/A in view(null, null)) - if (param == A.name) - M = A - break - if (!M) - param = null - - if (param) - message = "[src] glares at [param]." - else - message = "[src] glares." - - if ("stare") - var/M = null - if (param) - for (var/mob/A in view(null, null)) - if (param == A.name) - M = A - break - if (!M) - param = null - - if (param) - message = "[src] stares at [param]." - else - message = "[src] stares." - - if ("look") - var/M = null - if (param) - for (var/mob/A in view(null, null)) - if (param == A.name) - M = A - break - - if (!M) - param = null - - if (param) - message = "[src] looks at [param]." - else - message = "[src] looks." - m_type = 1 - else - src << text("Invalid Emote: []", act) - if ((message && src.stat == 0)) - if (m_type & 1) - for(var/mob/O in viewers(src, null)) - O.show_message(message, m_type) - else - for(var/mob/O in hearers(src, null)) - O.show_message(message, m_type) - return \ No newline at end of file diff --git a/code/unused/hivebot/examine.dm b/code/unused/hivebot/examine.dm deleted file mode 100644 index 6abb42c1619..00000000000 --- a/code/unused/hivebot/examine.dm +++ /dev/null @@ -1,20 +0,0 @@ -/mob/living/silicon/hivebot/examine() - set src in oview() - - usr << "\blue *---------*" - usr << text("\blue This is \icon[src] [src.name]!") - if (src.stat == 2) - usr << text("\red [src.name] is powered-down.") - if (src.getBruteLoss()) - if (src.getBruteLoss() < 75) - usr << text("\red [src.name] looks slightly dented") - else - usr << text("\red [src.name] looks severely dented!") - if (src.getFireLoss()) - if (src.getFireLoss() < 75) - usr << text("\red [src.name] looks slightly burnt!") - else - usr << text("\red [src.name] looks severely burnt!") - if (src.stat == 1) - usr << text("\red [src.name] doesn't seem to be responding.") - return \ No newline at end of file diff --git a/code/unused/hivebot/hive_modules.dm b/code/unused/hivebot/hive_modules.dm deleted file mode 100644 index 56951dee480..00000000000 --- a/code/unused/hivebot/hive_modules.dm +++ /dev/null @@ -1,57 +0,0 @@ -/obj/item/weapon/hive_module - name = "hive robot module" - icon = 'icons/obj/module.dmi' - icon_state = "std_module" - w_class = 2.0 - item_state = "electronic" - flags = FPRINT|TABLEPASS | CONDUCT - var/list/modules = list() - -/obj/item/weapon/hive_module/standard - name = "give standard robot module" - -/obj/item/weapon/hive_module/engineering - name = "HiveBot engineering robot module" - -/obj/item/weapon/hive_module/New()//Shit all the mods have - src.modules += new /obj/item/device/flash/handheld(src) - - -/obj/item/weapon/hive_module/standard/New() - ..() - src.modules += new /obj/item/weapon/melee/baton(src) - src.modules += new /obj/item/weapon/extinguisher(src) - //var/obj/item/weapon/gun/mp5/M = new /obj/item/weapon/gun/mp5(src) - //M.weapon_lock = 0 - //src.modules += M - - -/obj/item/weapon/hive_module/engineering/New() - - src.modules += new /obj/item/weapon/extinguisher(src) - src.modules += new /obj/item/weapon/screwdriver(src) - src.modules += new /obj/item/weapon/weldingtool(src) - src.modules += new /obj/item/weapon/wrench(src) - src.modules += new /obj/item/device/analyzer(src) - src.modules += new /obj/item/device/flashlight(src) - - var/obj/item/weapon/rcd/R = new /obj/item/weapon/rcd(src) - R.matter = 30 - src.modules += R - - src.modules += new /obj/item/device/t_scanner(src) - src.modules += new /obj/item/weapon/crowbar(src) - src.modules += new /obj/item/weapon/wirecutters(src) - src.modules += new /obj/item/device/multitool(src) - - var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal(src) - M.amount = 50 - src.modules += M - - var/obj/item/stack/sheet/rglass/G = new /obj/item/stack/sheet/rglass(src) - G.amount = 50 - src.modules += G - - var/obj/item/stack/cable_coil/W = new /obj/item/stack/cable_coil(src) - W.amount = 50 - src.modules += W diff --git a/code/unused/hivebot/hivebot.dm b/code/unused/hivebot/hivebot.dm deleted file mode 100644 index 9cfa3c6b18e..00000000000 --- a/code/unused/hivebot/hivebot.dm +++ /dev/null @@ -1,503 +0,0 @@ -/mob/living/silicon/hivebot/New(loc,mainframe) - src << "\blue Your icons have been generated!" - updateicon() - - if(mainframe) - dependent = 1 - src.real_name = mainframe:name - src.name = src.real_name - else - src.real_name = "Robot [pick(rand(1, 999))]" - src.name = src.real_name - - src.radio = new /obj/item/device/radio(src) - ..() - - -/mob/living/silicon/hivebot/proc/pick_module() - if(src.module) - return - var/mod = input("Please, select a module!", "Robot", null, null) in list("Combat", "Engineering") - if(src.module) - return - switch(mod) - if("Combat") - src.module = new /obj/item/weapon/hive_module/standard(src) - - if("Engineering") - src.module = new /obj/item/weapon/hive_module/engineering(src) - - - src.hands.icon_state = "malf" - updateicon() - - -/mob/living/silicon/hivebot/blob_act() - if (src.stat != 2) - src.adjustBruteLoss(60) - src.updatehealth() - return 1 - return 0 - -/mob/living/silicon/hivebot/Stat() - ..() - statpanel("Status") - if (src.client.statpanel == "Status") - if(emergency_shuttle.online && emergency_shuttle.location < 2) - var/timeleft = emergency_shuttle.timeleft() - if (timeleft) - stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]") -/* - if(ticker.mode.name == "AI malfunction") - stat(null, "Points left until the AI takes over: [AI_points]/[AI_points_win]") -*/ - - stat(null, text("Charge Left: [src.energy]/[src.energy_max]")) - -/mob/living/silicon/hivebot/restrained() - return 0 - -/mob/living/silicon/hivebot/ex_act(severity) - if(!blinded) - flick("flash", src.flash) - - if (src.stat == 2 && src.client) - src.gib(1) - return - - else if (src.stat == 2 && !src.client) - del(src) - return - - switch(severity) - if(1.0) - if (src.stat != 2) - adjustBruteLoss(100) - adjustFireLoss(100) - src.gib(1) - return - if(2.0) - if (src.stat != 2) - adjustBruteLoss(60) - adjustFireLoss(60) - if(3.0) - if (src.stat != 2) - adjustBruteLoss(30) - - src.updatehealth() - -/mob/living/silicon/hivebot/meteorhit(obj/O as obj) - for(var/mob/M in viewers(src, null)) - M.show_message(text("\red [src] has been hit by [O]"), 1) - //Foreach goto(19) - if (src.health > 0) - src.adjustBruteLoss(30) - if ((O.icon_state == "flaming")) - src.adjustFireLoss(40) - src.updatehealth() - return - -/mob/living/silicon/hivebot/bullet_act(flag) -/* - if (flag == PROJECTILE_BULLET) - if (src.stat != 2) - src.bruteloss += 60 - src.updatehealth() - - else if (flag == PROJECTILE_MEDBULLET) - if (src.stat != 2) - src.bruteloss += 30 - src.updatehealth() - - else if (flag == PROJECTILE_WEAKBULLET) - if (src.stat != 2) - src.bruteloss += 15 - src.updatehealth() - - else if (flag == PROJECTILE_MPBULLET) - if (src.stat != 2) - src.bruteloss += 20 - src.updatehealth() - - else if (flag == PROJECTILE_SLUG) - if (src.stat != 2) - src.bruteloss += 40 - src.updatehealth() - - else if (flag == PROJECTILE_BAG) - if (src.stat != 2) - src.bruteloss += 2 - src.updatehealth() - - - else if (flag == PROJECTILE_TASER) - return - - else if (flag == PROJECTILE_WAVE) - if (src.stat != 2) - src.bruteloss += 25 - src.updatehealth() - return - - else if(flag == PROJECTILE_LASER) - if (src.stat != 2) - src.bruteloss += 20 - src.updatehealth() - else if(flag == PROJECTILE_PULSE) - if (src.stat != 2) - src.bruteloss += 40 - src.updatehealth() -*/ - return - - - -/mob/living/silicon/hivebot/Bump(atom/movable/AM as mob|obj, yes) - spawn( 0 ) - if ((!( yes ) || src.now_pushing)) - return - src.now_pushing = 1 - if(ismob(AM)) - var/mob/tmob = AM - if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) - if(prob(20)) - for(var/mob/M in viewers(src, null)) - if(M.client) - M << M << "\red [src] fails to push [tmob]'s fat ass out of the way." - src.now_pushing = 0 - //src.unlock_medal("That's No Moon, That's A Gourmand!", 1) - return - src.now_pushing = 0 - ..() - if (!istype(AM, /atom/movable) || !istype(AM.loc, /turf)) - return - if (!src.now_pushing) - src.now_pushing = 1 - if (!AM.anchored) - var/t = get_dir(src, AM) - step(AM, t) - src.now_pushing = null - return - return - - -/mob/living/silicon/hivebot/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/weldingtool) && W:welding) - if (W:remove_fuel(0)) - src.adjustBruteLoss(-30) - src.updatehealth() - src.add_fingerprint(user) - for(var/mob/O in viewers(user, null)) - O.show_message(text("\red [user] has fixed some of the dents on [src]!"), 1) - else - user << "Need more welding fuel!" - return - -/mob/living/silicon/hivebot/attack_alien(mob/living/carbon/alien/humanoid/M as mob) - - if (M.a_intent == "grab") - if (M == src) - return - var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M ) - G.assailant = M - if (M.hand) - M.l_hand = G - else - M.r_hand = G - G.layer = 20 - G.affecting = src - src.grabbed_by += G - G.synch() - playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] has grabbed [] passively!", M, src), 1) - - else if (M.a_intent == "hurt") - var/damage = rand(5, 10) - if (prob(90)) - /* - if (M.class == "combat") - damage += 15 - if(prob(20)) - src.weakened = max(src.weakened,4) - src.stunned = max(src.stunned,4) - */ - playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] has slashed at []!", M, src), 1) - if(prob(8)) - flick("noise", src.flash) - src.adjustBruteLoss(damage) - src.updatehealth() - else - playsound(src.loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] took a swipe at []!", M, src), 1) - return - - else if (M.a_intent == "disarm") - if(!(src.lying)) - var/randn = rand(1, 100) - if (randn <= 40) - src.stunned = 5 - step(src,get_dir(M,src)) - spawn(5) step(src,get_dir(M,src)) - playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] has pushed back []!", M, src), 1) - else - playsound(src.loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] attempted to push back []!", M, src), 1) - return - -/mob/living/silicon/hivebot/attack_hand(mob/user) - ..() - return - - -/mob/living/silicon/hivebot/proc/allowed(mob/M) - //check if it doesn't require any access at all - if(src.check_access(null)) - return 1 - return 0 - -/mob/living/silicon/hivebot/proc/check_access(obj/item/weapon/card/id/I) - if(!istype(src.req_access, /list)) //something's very wrong - return 1 - - var/list/L = src.req_access - if(!L.len) //no requirements - return 1 - if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access - return 0 - for(var/req in src.req_access) - if(!(req in I.access)) //doesn't have this access - return 0 - return 1 - -/mob/living/silicon/hivebot/proc/updateicon() - - src.overlays.Cut() - - if(src.stat == 0) - src.overlays += "eyes" - else - src.overlays -= "eyes" - - -/mob/living/silicon/hivebot/proc/installed_modules() - - if(!src.module) - src.pick_module() - return - var/dat = "Modules\n" - dat += {"Close -
-
- Activated Modules -
- Module 1: [module_state_1 ? "[module_state_1]" : "No Module"]
- Module 2: [module_state_2 ? "
[module_state_2]" : "No Module"]
- Module 3: [module_state_3 ? "
[module_state_3]" : "No Module"]
-
- Installed Modules

"} - - for (var/obj in src.module.modules) - if(src.activated(obj)) - dat += text("[obj]: Activated
") - else - dat += text("[obj]:
Activate
") -/* - if(src.activated(obj)) - dat += text("[obj]: \[Activated | Deactivate\]
") - else - dat += text("[obj]: \[Activate | Deactivated\]
") -*/ - src << browse(dat, "window=robotmod&can_close=0") - - -/mob/living/silicon/hivebot/Topic(href, href_list) - ..() - if (href_list["mach_close"]) - var/t1 = text("window=[href_list["mach_close"]]") - src.machine = null - src << browse(null, t1) - return - - if (href_list["mod"]) - var/obj/item/O = locate(href_list["mod"]) - O.attack_self(src) - - if (href_list["act"]) - var/obj/item/O = locate(href_list["act"]) - if(activated(O)) - src << "Already activated" - return - if(!src.module_state_1) - src.module_state_1 = O - O.layer = 20 - src.contents += O - else if(!src.module_state_2) - src.module_state_2 = O - O.layer = 20 - src.contents += O - else if(!src.module_state_3) - src.module_state_3 = O - O.layer = 20 - src.contents += O - else - src << "You need to disable a module first!" - src.installed_modules() - - if (href_list["deact"]) - var/obj/item/O = locate(href_list["deact"]) - if(activated(O)) - if(src.module_state_1 == O) - src.module_state_1 = null - src.contents -= O - else if(src.module_state_2 == O) - src.module_state_2 = null - src.contents -= O - else if(src.module_state_3 == O) - src.module_state_3 = null - src.contents -= O - else - src << "Module isn't activated." - else - src << "Module isn't activated" - src.installed_modules() - return - -/mob/living/silicon/hivebot/proc/uneq_active() - if(isnull(src.module_active)) - return - if(src.module_state_1 == src.module_active) - if (src.client) - src.client.screen -= module_state_1 - src.contents -= module_state_1 - src.module_active = null - src.module_state_1 = null - src.inv1.icon_state = "inv1" - else if(src.module_state_2 == src.module_active) - if (src.client) - src.client.screen -= module_state_2 - src.contents -= module_state_2 - src.module_active = null - src.module_state_2 = null - src.inv2.icon_state = "inv2" - else if(src.module_state_3 == src.module_active) - if (src.client) - src.client.screen -= module_state_3 - src.contents -= module_state_3 - src.module_active = null - src.module_state_3 = null - src.inv3.icon_state = "inv3" - - -/mob/living/silicon/hivebot/proc/activated(obj/item/O) - if(src.module_state_1 == O) - return 1 - else if(src.module_state_2 == O) - return 1 - else if(src.module_state_3 == O) - return 1 - else - return 0 - -/mob/living/silicon/hivebot/proc/radio_menu() - var/dat = {" - -Microphone: [src.radio.broadcasting ? "Engaged" : "Disengaged"]
-Speaker: [src.radio.listening ? "Engaged" : "Disengaged"]
-Frequency: -- -- -[format_frequency(src.radio.frequency)] -+ -+
-------- -
"} - src << browse(dat, "window=radio") - onclose(src, "radio") - return - - -/mob/living/silicon/hivebot/Move(a, b, flag) - - if (src.buckled) - return - - if (src.restrained()) - src.stop_pulling() - - var/t7 = 1 - if (src.restrained()) - for(var/mob/M in range(src, 1)) - if ((M.pulling == src && M.stat == 0 && !( M.restrained() ))) - t7 = null - if ((t7 && (src.pulling && ((get_dist(src, src.pulling) <= 1 || src.pulling.loc == src.loc) && (src.client && src.client.moving))))) - var/turf/T = src.loc - . = ..() - - if (src.pulling && src.pulling.loc) - if(!( isturf(src.pulling.loc) )) - src.stop_pulling() - return - else - if(Debug) - diary <<"src.pulling disappeared? at [__LINE__] in mob.dm - src.pulling = [src.pulling]" - diary <<"REPORT THIS" - - ///// - if(src.pulling && src.pulling.anchored) - src.stop_pulling() - return - - if (!src.restrained()) - var/diag = get_dir(src, src.pulling) - if ((diag - 1) & diag) - else - diag = null - if ((get_dist(src, src.pulling) > 1 || diag)) - if (ismob(src.pulling)) - var/mob/M = src.pulling - var/ok = 1 - if (locate(/obj/item/weapon/grab, M.grabbed_by)) - if (prob(75)) - var/obj/item/weapon/grab/G = pick(M.grabbed_by) - if (istype(G, /obj/item/weapon/grab)) - for(var/mob/O in viewers(M, null)) - O.show_message(text("\red [G.affecting] has been pulled from [G.assailant]'s grip by [src]"), 1) - del(G) - else - ok = 0 - if (locate(/obj/item/weapon/grab, M.grabbed_by.len)) - ok = 0 - if (ok) - var/atom/movable/t = M.pulling - M.stop_pulling() - step(src.pulling, get_dir(src.pulling.loc, T)) - M.start_pulling(t) - else - if (src.pulling) - step(src.pulling, get_dir(src.pulling.loc, T)) - else - src.stop_pulling() - . = ..() - if ((src.s_active && !( s_active in src.contents ) )) - src.s_active.close(src) - return - - -/mob/living/silicon/hivebot/verb/cmd_return_mainframe() - set category = "Robot Commands" - set name = "Recall to Mainframe." - return_mainframe() - -/mob/living/silicon/hivebot/proc/return_mainframe() - if(mainframe) - mainframe.return_to(src) - else - src << "\red You lack a dedicated mainframe!" - return \ No newline at end of file diff --git a/code/unused/hivebot/hivebotdefine.dm b/code/unused/hivebot/hivebotdefine.dm deleted file mode 100644 index 50702de79b7..00000000000 --- a/code/unused/hivebot/hivebotdefine.dm +++ /dev/null @@ -1,43 +0,0 @@ -/mob/living/silicon/hivebot - name = "Robot" - icon = 'icons/mob/hivebot.dmi' - icon_state = "basic" - health = 80 - var/health_max = 80 -//HUD - var/obj/screen/cells = null - var/obj/screen/inv1 = null - var/obj/screen/inv2 = null - var/obj/screen/inv3 = null - -//3 Modules can be activated at any one time. - var/obj/item/weapon/robot_module/module = null - var/module_active = null - var/module_state_1 = null - var/module_state_2 = null - var/module_state_3 = null - - var/obj/item/device/radio/radio = null - - var/list/req_access = list(access_robotics) - var/energy = 4000 - var/energy_max = 4000 - var/jetpack = 0 - - var/mob/living/silicon/hive_mainframe/mainframe = null - var/dependent = 0 - var/shell = 1 - -/mob/living/silicon/hive_mainframe - name = "Robot Mainframe" - voice_name = "synthesized voice" - - icon_state = "hive_main" - health = 200 - var/health_max = 200 - - anchored = 1 - var/online = 1 - var/mob/living/silicon/hivebot = null - var/hivebot_name = null - var/force_mind = 0 \ No newline at end of file diff --git a/code/unused/hivebot/hud.dm b/code/unused/hivebot/hud.dm deleted file mode 100644 index c649993deee..00000000000 --- a/code/unused/hivebot/hud.dm +++ /dev/null @@ -1,250 +0,0 @@ - -/obj/hud/proc/hivebot_hud() - - src.adding = list( ) - src.other = list( ) - src.intents = list( ) - src.mon_blo = list( ) - src.m_ints = list( ) - src.mov_int = list( ) - src.vimpaired = list( ) - src.darkMask = list( ) - - src.g_dither = new src.h_type( src ) - src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH" - src.g_dither.name = "Mask" - src.g_dither.icon_state = "dither12g" - src.g_dither.layer = 18 - src.g_dither.mouse_opacity = 0 - - src.alien_view = new src.h_type(src) - src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH" - src.alien_view.name = "Alien" - src.alien_view.icon_state = "alien" - src.alien_view.layer = 18 - src.alien_view.mouse_opacity = 0 - - src.blurry = new src.h_type( src ) - src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH" - src.blurry.name = "Blurry" - src.blurry.icon_state = "blurry" - src.blurry.layer = 17 - src.blurry.mouse_opacity = 0 - - src.druggy = new src.h_type( src ) - src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH" - src.druggy.name = "Druggy" - src.druggy.icon_state = "druggy" - src.druggy.layer = 17 - src.druggy.mouse_opacity = 0 - - // station explosion cinematic - src.station_explosion = new src.h_type( src ) - src.station_explosion.icon = 'icons/effects/station_explosion.dmi' - src.station_explosion.icon_state = "start" - src.station_explosion.layer = 20 - src.station_explosion.mouse_opacity = 0 - src.station_explosion.screen_loc = "1,3" - - var/obj/screen/using - - -//Radio - using = new src.h_type( src ) - using.name = "radio" - using.dir = SOUTHWEST - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "radio" - using.screen_loc = ui_movi - using.layer = 20 - src.adding += using - -//Generic overlays - - using = new src.h_type(src) //Right hud bar - using.dir = SOUTH - using.icon = 'icons/mob/screen1_robot.dmi' - using.screen_loc = "EAST+1,SOUTH to EAST+1,NORTH" - using.layer = 19 - src.adding += using - - using = new src.h_type(src) //Lower hud bar - using.dir = EAST - using.icon = 'icons/mob/screen1_robot.dmi' - using.screen_loc = "WEST,SOUTH-1 to EAST,SOUTH-1" - using.layer = 19 - src.adding += using - - using = new src.h_type(src) //Corner Button - using.dir = NORTHWEST - using.icon = 'icons/mob/screen1_robot.dmi' - using.screen_loc = "EAST+1,SOUTH-1" - using.layer = 19 - src.adding += using - - -//Module select - - using = new src.h_type( src ) - using.name = "module1" - using.dir = SOUTHWEST - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "inv1" - using.screen_loc = ui_inv1 - using.layer = 20 - src.adding += using - mymob:inv1 = using - - using = new src.h_type( src ) - using.name = "module2" - using.dir = SOUTHWEST - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "inv2" - using.screen_loc = ui_inv2 - using.layer = 20 - src.adding += using - mymob:inv2 = using - - using = new src.h_type( src ) - using.name = "module3" - using.dir = SOUTHWEST - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "inv3" - using.screen_loc = ui_inv3 - using.layer = 20 - src.adding += using - mymob:inv3 = using - -//End of module select - -//Intent - using = new src.h_type( src ) - using.name = "act_intent" - using.dir = SOUTHWEST - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent) - using.screen_loc = ui_acti - using.layer = 20 - src.adding += using - action_intent = using - - using = new src.h_type( src ) - using.name = "arrowleft" - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "s_arrow" - using.dir = WEST - using.screen_loc = ui_iarrowleft - using.layer = 19 - src.adding += using - - using = new src.h_type( src ) - using.name = "arrowright" - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "s_arrow" - using.dir = EAST - using.screen_loc = ui_iarrowright - using.layer = 19 - src.adding += using -//End of Intent - -//Cell - mymob:cells = new /obj/screen( null ) - mymob:cells.icon = 'icons/mob/screen1_robot.dmi' - mymob:cells.icon_state = "charge-empty" - mymob:cells.name = "cell" - mymob:cells.screen_loc = ui_toxin - -//Health - mymob.healths = new /obj/screen( null ) - mymob.healths.icon = 'icons/mob/screen1_robot.dmi' - mymob.healths.icon_state = "health0" - mymob.healths.name = "health" - mymob.healths.screen_loc = ui_health - -//Installed Module - mymob.hands = new /obj/screen( null ) - mymob.hands.icon = 'icons/mob/screen1_robot.dmi' - mymob.hands.icon_state = "nomod" - mymob.hands.name = "module" - mymob.hands.screen_loc = ui_dropbutton - -//Module Panel - using = new src.h_type( src ) - using.name = "panel" - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "panel" - using.screen_loc = ui_throw - using.layer = 19 - src.adding += using - -//Store - mymob.throw_icon = new /obj/screen(null) - mymob.throw_icon.icon = 'icons/mob/screen1_robot.dmi' - mymob.throw_icon.icon_state = "store" - mymob.throw_icon.name = "store" - mymob.throw_icon.screen_loc = ui_hand - -//Temp - mymob.bodytemp = new /obj/screen( null ) - mymob.bodytemp.icon_state = "temp0" - mymob.bodytemp.name = "body temperature" - mymob.bodytemp.screen_loc = ui_temp - -//does nothing (fire and oxy) - mymob.oxygen = new /obj/screen( null ) - mymob.oxygen.icon = 'icons/mob/screen1_robot.dmi' - mymob.oxygen.icon_state = "oxy0" - mymob.oxygen.name = "oxygen" - mymob.oxygen.screen_loc = ui_oxygen - - mymob.fire = new /obj/screen( null ) - mymob.fire.icon = 'icons/mob/screen1_robot.dmi' - mymob.fire.icon_state = "fire0" - mymob.fire.name = "fire" - mymob.fire.screen_loc = ui_fire - - - - mymob.pullin = new /obj/screen( null ) - mymob.pullin.icon = 'icons/mob/screen1_robot.dmi' - mymob.pullin.icon_state = "pull0" - mymob.pullin.name = "pull" - mymob.pullin.screen_loc = ui_pull - - mymob.blind = new /obj/screen( null ) - mymob.blind.icon = 'icons/mob/screen1_full.dmi'' - mymob.blind.icon_state = "blackimageoverlay" - mymob.blind.name = " " - mymob.blind.screen_loc = "1,1" - mymob.blind.layer = 0 - - mymob.flash = new /obj/screen( null ) - mymob.flash.icon = 'icons/mob/screen1_robot.dmi' - mymob.flash.icon_state = "blank" - mymob.flash.name = "flash" - mymob.flash.screen_loc = "1,1 to 15,15" - mymob.flash.layer = 17 - - mymob.sleep = new /obj/screen( null ) - mymob.sleep.icon = 'icons/mob/screen1_robot.dmi' - mymob.sleep.icon_state = "sleep0" - mymob.sleep.name = "sleep" - mymob.sleep.screen_loc = ui_sleep - - mymob.rest = new /obj/screen( null ) - mymob.rest.icon = 'icons/mob/screen1_robot.dmi' - mymob.rest.icon_state = "rest0" - mymob.rest.name = "rest" - mymob.rest.screen_loc = ui_rest - - - mymob.zone_sel = new /obj/screen/zone_sel( null ) - mymob.zone_sel.overlays.Cut() - mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting)) - - mymob.client.screen = null - - mymob.client.screen += list(mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.sleep) //, mymob.mach ) - mymob.client.screen += src.adding + src.other - - return diff --git a/code/unused/hivebot/life.dm b/code/unused/hivebot/life.dm deleted file mode 100644 index 35f73c2b97c..00000000000 --- a/code/unused/hivebot/life.dm +++ /dev/null @@ -1,229 +0,0 @@ -/mob/living/silicon/hivebot/Life() - set invisibility = 0 - set background = 1 - - if (src.notransform) - return - - if (src.stat != 2) - use_power() - - src.blinded = null - - clamp_values() - - handle_regular_status_updates() - - if(client) - src.shell = 0 - handle_regular_hud_updates() - update_items() - if(dependent) - mainframe_check() - - update_canmove() - - -/mob/living/silicon/hivebot - proc - clamp_values() - - stunned = max(min(stunned, 10),0) - paralysis = max(min(paralysis, 1), 0) - weakened = max(min(weakened, 15), 0) - sleeping = max(min(sleeping, 1), 0) - setToxLoss(0) - setOxyLoss(0) - - use_power() - - if (src.energy) - if(src.energy <= 0) - death() - - else if (src.energy <= 10) - src.module_active = null - src.module_state_1 = null - src.module_state_2 = null - src.module_state_3 = null - src.energy -=1 - else - if(src.module_state_1) - src.energy -=1 - if(src.module_state_2) - src.energy -=1 - if(src.module_state_3) - src.energy -=1 - src.energy -=1 - src.blinded = 0 - src.stat = 0 - else - src.blinded = 1 - src.stat = 1 - - update_canmove() - if(paralysis || stunned || weakened || buckled) canmove = 0 - else canmove = 1 - - - handle_regular_status_updates() - - health = src.health_max - (getFireLoss() + getBruteLoss()) - - if(health <= 0) - death() - - if (src.stat != 2) //Alive. - - if (src.paralysis || src.stunned || src.weakened) //Stunned etc. - if (src.stunned > 0) - src.stunned-- - src.stat = 0 - if (src.weakened > 0) - src.weakened-- - src.lying = 0 - src.stat = 0 - if (src.paralysis > 0) - src.paralysis-- - src.blinded = 0 - src.lying = 0 - src.stat = 1 - - else //Not stunned. - src.lying = 0 - src.stat = 0 - - else //Dead. - src.blinded = 1 - src.stat = 2 - - src.density = !( src.lying ) - - if ((src.sdisabilities & 1)) - src.blinded = 1 - if ((src.sdisabilities & 4)) - src.ear_deaf = 1 - - if (src.eye_blurry > 0) - src.eye_blurry-- - src.eye_blurry = max(0, src.eye_blurry) - - if (src.druggy > 0) - src.druggy-- - src.druggy = max(0, src.druggy) - - return 1 - - handle_regular_hud_updates() - - if (src.stat == 2 || src.mutations & XRAY) - src.sight |= SEE_TURFS - src.sight |= SEE_MOBS - src.sight |= SEE_OBJS - src.see_in_dark = 8 - src.see_invisible = SEE_INVISIBLE_LEVEL_TWO - else if (src.stat != 2) - src.sight &= ~SEE_MOBS - src.sight &= ~SEE_TURFS - src.sight &= ~SEE_OBJS - src.see_in_dark = 8 - src.see_invisible = SEE_INVISIBLE_LEVEL_TWO - if(see_override) - see_invisible = see_override - - if (src.healths) - if (src.stat != 2) - switch(health) - if(health_max to INFINITY) - src.healths.icon_state = "health0" - if(src.health_max*0.80 to src.health_max) - src.healths.icon_state = "health1" - if(src.health_max*0.60 to src.health_max*0.80) - src.healths.icon_state = "health2" - if(src.health_max*0.40 to src.health_max*0.60) - src.healths.icon_state = "health3" - if(src.health_max*0.20 to src.health_max*0.40) - src.healths.icon_state = "health4" - if(0 to health_max*0.20) - src.healths.icon_state = "health5" - else - src.healths.icon_state = "health6" - else - src.healths.icon_state = "health7" - - if (src.cells) - switch(src.energy) - if(src.energy_max*0.75 to INFINITY) - src.cells.icon_state = "charge4" - if(0.5*src.energy_max to 0.75*src.energy_max) - src.cells.icon_state = "charge3" - if(0.25*src.energy_max to 0.5*src.energy_max) - src.cells.icon_state = "charge2" - if(0 to 0.25*src.energy_max) - src.cells.icon_state = "charge1" - else - src.cells.icon_state = "charge0" - - switch(src.bodytemperature) //310.055 optimal body temp - - if(335 to INFINITY) - src.bodytemp.icon_state = "temp2" - if(320 to 335) - src.bodytemp.icon_state = "temp1" - if(300 to 320) - src.bodytemp.icon_state = "temp0" - if(260 to 300) - src.bodytemp.icon_state = "temp-1" - else - src.bodytemp.icon_state = "temp-2" - - - if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]" - - src.client.screen -= src.hud_used.blurry - src.client.screen -= src.hud_used.druggy - src.client.screen -= src.hud_used.vimpaired - - if ((src.blind && src.stat != 2)) - if ((src.blinded)) - src.blind.layer = 18 - else - src.blind.layer = 0 - - if (src.disabilities & 1) - src.client.screen += src.hud_used.vimpaired - - if (src.eye_blurry) - src.client.screen += src.hud_used.blurry - - if (src.druggy) - src.client.screen += src.hud_used.druggy - - if (src.stat != 2) - if (src.machine) - if (!( src.machine.check_eye(src) )) - src.reset_view(null) - else - if(!client.adminobs) - reset_view(null) - - return 1 - - - update_items() - if (src.client) - src.client.screen -= src.contents - src.client.screen += src.contents - if(src.module_state_1) - src.module_state_1:screen_loc = ui_inv1 - if(src.module_state_2) - src.module_state_2:screen_loc = ui_inv2 - if(src.module_state_3) - src.module_state_3:screen_loc = ui_inv3 - - mainframe_check() - if(mainframe) - if(mainframe.stat == 2) - mainframe.return_to(src) - else - death() \ No newline at end of file diff --git a/code/unused/hivebot/login.dm b/code/unused/hivebot/login.dm deleted file mode 100644 index 3a811b4c8a9..00000000000 --- a/code/unused/hivebot/login.dm +++ /dev/null @@ -1,15 +0,0 @@ -/mob/living/silicon/hivebot/Login() - ..() - - update_clothing() - - if (!isturf(src.loc)) - src.client.eye = src.loc - src.client.perspective = EYE_PERSPECTIVE - if (src.stat == 2) - src.verbs += /client/proc/ghost - if(src.real_name == "Hiveborg") - src.real_name += " " - src.real_name += "-[rand(1, 999)]" - src.name = src.real_name - return \ No newline at end of file diff --git a/code/unused/hivebot/mainframe.dm b/code/unused/hivebot/mainframe.dm deleted file mode 100644 index c3424dbd441..00000000000 --- a/code/unused/hivebot/mainframe.dm +++ /dev/null @@ -1,178 +0,0 @@ -/mob/living/silicon/hive_mainframe/New() - Namepick() - -/mob/living/silicon/hive_mainframe/Life() - if (src.stat == 2) - return - else - src.updatehealth() - - if (src.health <= 0) - death() - return - - if(src.force_mind) - if(!src.mind) - if(src.client) - src.mind = new - src.mind.key = src.key - src.mind.current = src - src.force_mind = 0 - -/mob/living/silicon/hive_mainframe/Stat() - ..() - statpanel("Status") - if (src.client.statpanel == "Status") - if(emergency_shuttle.online && emergency_shuttle.location < 2) - var/timeleft = emergency_shuttle.timeleft() - if (timeleft) - stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]") -/* - if(ticker.mode.name == "AI malfunction") - stat(null, "Points left until the AI takes over: [AI_points]/[AI_points_win]") -*/ - -/mob/living/silicon/hive_mainframe/updatehealth() - if (src.nodamage == 0) - src.health = 100 - src.getFireLoss() - src.getBruteLoss() - else - src.health = 100 - src.stat = 0 - -/mob/living/silicon/hive_mainframe/death(gibbed) - src.stat = 2 - src.canmove = 0 - if(src.blind) - src.blind.layer = 0 - src.sight |= SEE_TURFS - src.sight |= SEE_MOBS - src.sight |= SEE_OBJS - src.see_in_dark = 8 - src.see_invisible = SEE_INVISIBLE_LEVEL_TWO - src.lying = 1 - src.icon_state = "hive_main-crash" - - var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch - mind.store_memory("Time of death: [tod]", 0) - - if (src.key) - spawn(50) - if(src.key && src.stat == 2) - src.verbs += /client/proc/ghost - return ..(gibbed) - - -/mob/living/silicon/hive_mainframe/say_understands(var/other) - if (istype(other, /mob/living/carbon/human)) - return 1 - if (istype(other, /mob/living/silicon/robot)) - return 1 - if (istype(other, /mob/living/silicon/hivebot)) - return 1 - if (istype(other, /mob/living/silicon/ai)) - return 1 - return ..() - -/mob/living/silicon/hive_mainframe/say_quote(var/text) - var/ending = copytext(text, length(text)) - - if (ending == "?") - return "queries, \"[text]\""; - else if (ending == "!") - return "declares, \"[copytext(text, 1, length(text))]\""; - - return "states, \"[text]\""; - - -/mob/living/silicon/hive_mainframe/proc/return_to(var/mob/user) - if(user.mind) - user.mind.transfer_to(src) - spawn(20) - user:shell = 1 - user:real_name = "Robot [pick(rand(1, 999))]" - user:name = user:real_name - - - return - -/mob/living/silicon/hive_mainframe/verb/cmd_deploy_to() - set category = "Mainframe Commands" - set name = "Deploy to shell." - deploy_to() - -/mob/living/silicon/hive_mainframe/verb/deploy_to() - - if(usr.stat == 2) - usr << "You can't deploy because you are dead!" - return - - var/list/bodies = new/list() - - for(var/mob/living/silicon/hivebot/H in mob_list) - if(H.z == src.z) - if(H.shell) - if(!H.stat) - bodies += H - - var/target_shell = input(usr, "Which body to control?") as null|anything in bodies - - if (!target_shell) - return - - else if(src.mind) - spawn(30) - target_shell:mainframe = src - target_shell:dependent = 1 - target_shell:real_name = src.name - target_shell:name = target_shell:real_name - src.mind.transfer_to(target_shell) - return - - -/client/proc/MainframeMove(n,direct,var/mob/living/silicon/hive_mainframe/user) - return -/obj/hud/proc/hive_mainframe_hud() - return - - - - - -/mob/living/silicon/hive_mainframe/Login() - ..() - update_clothing() - for(var/S in src.client.screen) - del(S) - src.flash = new /obj/screen( null ) - src.flash.icon_state = "blank" - src.flash.name = "flash" - src.flash.screen_loc = "1,1 to 15,15" - src.flash.layer = 17 - src.blind = new /obj/screen( null ) - src.blind.icon_state = "black" - src.blind.name = " " - src.blind.screen_loc = "1,1 to 15,15" - src.blind.layer = 0 - src.client.screen += list( src.blind, src.flash ) - if(!isturf(src.loc)) - src.client.eye = src.loc - src.client.perspective = EYE_PERSPECTIVE - if (src.stat == 2) - src.verbs += /client/proc/ghost - return - - - -/mob/living/silicon/hive_mainframe/proc/Namepick() - var/randomname = pick(ai_names) - var/newname = input(src,"You are the a Mainframe Unit. Would you like to change your name to something else?", "Name change",randomname) - - if (length(newname) == 0) - newname = randomname - - if (newname) - if (length(newname) >= 26) - newname = copytext(newname, 1, 26) - newname = dd_replacetext(newname, ">", "'") - src.real_name = newname - src.name = newname \ No newline at end of file diff --git a/code/unused/hivebot/say.dm b/code/unused/hivebot/say.dm deleted file mode 100644 index 492e58a9773..00000000000 --- a/code/unused/hivebot/say.dm +++ /dev/null @@ -1,18 +0,0 @@ -/mob/living/silicon/hivebot/say_understands(var/other) - if (istype(other, /mob/living/silicon/ai)) - return 1 - if (istype(other, /mob/living/carbon/human)) - return 1 - if (istype(other, /mob/living/silicon/robot)) - return 1 - return ..() - -/mob/living/silicon/hivebot/say_quote(var/text) - var/ending = copytext(text, length(text)) - - if (ending == "?") - return "queries, \"[text]\""; - else if (ending == "!") - return "declares, \"[copytext(text, 1, length(text))]\""; - - return "states, \"[text]\""; diff --git a/code/unused/hologram.dm b/code/unused/hologram.dm deleted file mode 100644 index 7254b0b6380..00000000000 --- a/code/unused/hologram.dm +++ /dev/null @@ -1,112 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - -/obj/machinery/computer/hologram_comp - name = "Hologram Console" - desc = "Rumoured to control holograms." - icon = 'icons/obj/stationobjs.dmi' - icon_state = "holo_console0" - var/obj/machinery/hologram/projector/projector = null - var/temp = null - var/lumens = 0.0 - var/h_r = 245.0 - var/h_g = 245.0 - var/h_b = 245.0 - - -/obj/machinery/computer/hologram_comp/New() - ..() - spawn( 10 ) - src.projector = locate(/obj/machinery/hologram/projector, get_step(src.loc, NORTH)) - return - return - -/obj/machinery/computer/hologram_comp/DblClick() - if (!in_range(src, usr)) - return 0 - src.show_console(usr) - return - -/obj/machinery/computer/hologram_comp/proc/render() - var/icon/I = new /icon('icons/mob/human.dmi', "[skin_tones[1]]_m_s") - - if (src.lumens >= 0) - I.Blend(rgb(src.lumens, src.lumens, src.lumens), ICON_ADD) - else - I.Blend(rgb(- src.lumens, -src.lumens, -src.lumens), ICON_SUBTRACT) - - I.Blend(new /icon('icons/mob/underwear.dmi', "Mens White"), ICON_OVERLAY) - - var/icon/U = new /icon('icons/mob/human_face.dmi', "hair_a_s") - U.Blend(rgb(src.h_r, src.h_g, src.h_b), ICON_ADD) - - I.Blend(U, ICON_OVERLAY) - - src.projector.hologram.icon = I - -/obj/machinery/computer/hologram_comp/proc/show_console(var/mob/user as mob) - var/dat - user.set_machine(src) - if (src.temp) - dat = text("[]

Clear", src.temp, src) - else - dat = text("Hologram Status:
\nPower: []
\nHologram Control:
\nColor Luminosity: []/220 \[Reset\]
\nLighten: 1 10
\nDarken: 1 10
\n
\nHair Color: ([],[],[]) \[Reset\]
\nRed (0-255): \[0\] -10 -1 [] 1 10 \[255\]
\nGreen (0-255): \[0\] -10 -1 [] 1 10 \[255\]
\nBlue (0-255): \[0\] -10 -1 [] 1 10 \[255\]
", src, (src.projector.hologram ? "On" : "Off"), -src.lumens + 35, src, src, src, src, src, src.h_r, src.h_g, src.h_b, src, src, src, src, src.h_r, src, src, src, src, src, src, src.h_g, src, src, src, src, src, src, src.h_b, src, src, src) - //user << browse(dat, "window=hologram_console") - //onclose(user, "hologram_console") - var/datum/browser/popup = new(user, "hologram_console", name) - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open() - return - -/obj/machinery/computer/hologram_comp/Topic(href, href_list) - if(..()) - return - if (in_range(src, usr)) - flick("holo_console1", src) - if (href_list["power"]) - if (src.projector.hologram) - src.projector.icon_state = "hologram0" - //src.projector.hologram = null - del(src.projector.hologram) - else - src.projector.hologram = new(src.projector.loc) - src.projector.hologram.icon = 'icons/mob/human.dmi' - src.projector.hologram.icon_state = "body_m_s" - src.projector.icon_state = "hologram1" - src.render() - else - if (href_list["h_r"]) - if (src.projector.hologram) - src.h_r += text2num(href_list["h_r"]) - src.h_r = min(max(src.h_r, 0), 255) - render() - else - if (href_list["h_g"]) - if (src.projector.hologram) - src.h_g += text2num(href_list["h_g"]) - src.h_g = min(max(src.h_g, 0), 255) - render() - else - if (href_list["h_b"]) - if (src.projector.hologram) - src.h_b += text2num(href_list["h_b"]) - src.h_b = min(max(src.h_b, 0), 255) - render() - else - if (href_list["light"]) - if (src.projector.hologram) - src.lumens += text2num(href_list["light"]) - src.lumens = min(max(src.lumens, -185.0), 35) - render() - else - if (href_list["reset"]) - if (src.projector.hologram) - src.lumens = 0 - render() - else - if (href_list["temp"]) - src.temp = null - for(var/mob/M in viewers(1, src)) - if ((M.client && M.machine == src)) - src.show_console(M) - return diff --git a/code/unused/jobs.dm b/code/unused/jobs.dm deleted file mode 100644 index ec3f5ea5f99..00000000000 --- a/code/unused/jobs.dm +++ /dev/null @@ -1,291 +0,0 @@ -//WORK IN PROGRESS CONTENT - -//Project coder: Errorage - -//Readme: As part of the UI upgrade project, the intention here is for each job to have -//somewhat customizable loadouts. Players will be able to pick between jumpsuits, shoes, -//and other items. This datum will be used for all jobs and code will reference it. -//adding new jobs will be a matter of adding this datum.to a list of jobs. - -#define VITAL_PRIORITY_JOB 5 -#define HIGH_PRIORITY_JOB 4 -#define PRIORITY_JOB 3 -#define LOW_PRIORITY_JOB 2 -#define ASSISTANT_PRIORITY_JOB 1 -#define NO_PRIORITY_JOB 0 - -/datum/job - //Basic information - var/title = "Untitled" //The main (default) job title/name - var/list/alternative_titles = list() //Alternative job titles/names (alias) - var/job_number_at_round_start = 0 //Number of jobs that can be assigned at round start - var/job_number_total = 0 //Number of jobs that can be assigned total - var/list/bosses = list() //List of jobs which have authority over this job by default. - var/admin_only = 0 //If this is set to 1, the job is not available on the spawn screen - var/description = "" //A description of the job to be displayed when requested on the spawn screen - var/guides = "" //A string with links to relevent guides (likely the wiki) - var/department = "" //This is used to group jobs into departments, which means that if you don't get your desired jobs, you get another job from the same department - var/job_type = "SS13" //SS13, NT or ANTAGONIST - var/can_be_traitor = 1 - var/can_be_changeling = 1 - var/can_be_wizard = 1 - var/can_be_cultist = 1 - var/can_be_rev_head = 1 - var/is_head_position = 0 - - //Job conditions - var/change_to_mob = "Human" //The type of mob which this job will change you to (alien,cyborg,human...) - var/change_to_mutantrace = "" //What mutantrace you will be once you get this job - - //Random job assignment priority - var/assignment_priority = NO_PRIORITY_JOB //This variable determins the priority of assignment - //VITAL_PRIORITY_JOB = Absolutely vital (Someone will get assigned every round) - Use VERY, VERY lightly - //HIGH_PRIORITY_JOB = High priority - Assibned before the other jobs, candidates compete on equal terms - //PRIORITY_JOB = Priorized (Standard priority) - Candidates compete by virtue of priority (choice 1 > choice 2 > choice 3...) - //LOW_PRIORITY_JOB = Low priority (Low-priority (librarian)) - //ASSISTANT_PRIORITY_JOB = Assistant-level (Only filled when all the other jobs have been assigned) - //NO_PRIORITY_JOB = Skipped om assignment (Admin-only jobs should have this level) - - - - //Available equipment - The first thing listed is understood as the default setup. - var/list/equipment_ears = list() //list of possible ear-wear items - var/list/equipment_glasses = list() //list of possible glasses - var/list/equipment_gloves = list() //list of possible gloves - var/list/equipment_head = list() //list of possible headgear/helmets/hats - var/list/equipment_mask = list() //list of possible masks - var/list/equipment_shoes = list() //list of possible shoes - var/list/equipment_suit = list() //list of possible suits - var/list/equipment_under = list() //list of possible jumpsuits - var/list/equipment_belt = list() //list of possible belt-slot items - var/list/equipment_back = list() //list of possible back-slot items - var/obj/equipment_pda //default pda type - var/obj/equipment_id //default id type - - New(var/param_title, var/list/param_alternative_titles = list(), var/param_jobs_at_round_start = 0, var/param_global_max = 0, var/list/param_bosses = list(), var/param_admin_only = 0) - title = param_title - alternative_titles = param_alternative_titles - job_number_at_round_start = param_jobs_at_round_start - job_number_total = param_global_max - bosses = param_bosses - admin_only = param_admin_only - - //This proc tests to see if the given alias (job title/alternative job title) corresponds to this job. - //Returns 1 if it is, else returns 0 - proc/is_job_alias(var/alias) - if(alias == title) - return 1 - if(alias in alternative_titles) - return 1 - return 0 - -/datum/jobs - var/list/datum/job/all_jobs = list() - - proc/get_all_jobs() - return all_jobs - - //This proc returns all the jobs which are NOT admin only - proc/get_normal_jobs() - var/list/datum/job/normal_jobs = list() - for(var/datum/job/J in all_jobs) - if(!J.admin_only) - normal_jobs += J - return normal_jobs - - //This proc returns all the jobs which are admin only - proc/get_admin_jobs() - var/list/datum/job/admin_jobs = list() - for(var/datum/job/J in all_jobs) - if(J.admin_only) - admin_jobs += J - return admin_jobs - - //This proc returns the job datum of the job with the alias or job title given as the argument. Returns an empty string otherwise. - proc/get_job(var/alias) - for(var/datum/job/J in all_jobs) - if(J.is_job_alias(alias)) - return J - return "" - - //This proc returns a string with the default job title for the job with the given alias. Returns an empty string otherwise. - proc/get_job_title(var/alias) - for(var/datum/job/J in all_jobs) - if(J.is_job_alias(alias)) - return J.title - return "" - - //This proc returns all the job datums of the workers whose boss has the alias provided. (IE Engineer under Chief Engineer, etc.) - proc/get_jobs_under(var/boss_alias) - var/boss_title = get_job_title(boss_alias) - var/list/datum/job/employees = list() - for(var/datum/job/J in all_jobs) - if(boss_title in J.bosses) - employees += J - return employees - - //This proc returns the chosen vital and high priority jobs that the person selected. It goes from top to bottom of the list, until it finds a job which does not have such priority. - //Example: Choosing (in this order): CE, Captain, Engineer, RD will only return CE and Captain, as RD is assumed as being an unwanted choice. - //This proc is used in the allocation algorithm when deciding vital and high priority jobs. - proc/get_prefered_high_priority_jobs() - var/list/datum/job/hp_jobs = list() - for(var/datum/job/J in all_jobs) - if(J.assignment_priority == HIGH_PRIORITY_JOB || J.assignment_priority == VITAL_PRIORITY_JOB) - hp_jobs += J - else - break - return hp_jobs - - //If only priority is given, it will return the jobs of only that priority, if end_priority is set it will return the jobs with their priority higher or equal to var/priority and lower or equal to end_priority. end_priority must be higher than 0. - proc/get_jobs_by_priority(var/priority, var/end_priority = 0) - var/list/datum/job/priority_jobs = list() - if(end_priority) - if(end_priority < priority) - return - for(var/datum/job/J in all_jobs) - if(J.assignment_priority >= priority && J.assignment_priority <= end_priority) - priority_jobs += J - else - for(var/datum/job/J in all_jobs) - if(J.assignment_priority == priority) - priority_jobs += J - return priority_jobs - -//This datum is used in the plb allocation algorithm to make life easier, not used anywhere else. -/datum/player_jobs - var/mob/new_player/player - var/datum/jobs/selected_jobs - -var/datum/jobs/jobs = new/datum/jobs() - -proc/setup_jobs() - var/datum/job/JOB - - JOB = new/datum/job("Station Engineer") - JOB.alternative_titles = list("Structural Engineer","Engineer","Student of Engineering") - JOB.job_number_at_round_start = 5 - JOB.job_number_total = 5 - JOB.bosses = list("Chief Engineer") - JOB.admin_only = 0 - JOB.description = "Engineers are tasked with the maintenance of the station. Be it maintaining the power grid or rebuilding damaged sections." - JOB.guides = "" - JOB.equipment_ears = list(/obj/item/device/radio/headset/headset_eng) - JOB.equipment_glasses = list() - JOB.equipment_gloves = list() - JOB.equipment_head = list(/obj/item/clothing/head/helmet/hardhat) - JOB.equipment_mask = list() - JOB.equipment_shoes = list(/obj/item/clothing/shoes/orange,/obj/item/clothing/shoes/brown,/obj/item/clothing/shoes/black) - JOB.equipment_suit = list(/obj/item/clothing/suit/hazardvest) - JOB.equipment_under = list(/obj/item/clothing/under/rank/engineer,/obj/item/clothing/under/color/yellow) - JOB.equipment_belt = list(/obj/item/weapon/storage/belt/utility/full) - JOB.equipment_back = list(/obj/item/weapon/storage/backpack/industrial,/obj/item/weapon/storage/backpack) - JOB.equipment_pda = /obj/item/device/pda/engineering - JOB.equipment_id = /obj/item/weapon/card/id - - jobs.all_jobs += JOB - -//This proc will dress the mob (employee) in the default way for the specified job title/job alias -proc/dress_for_job_default(var/mob/living/carbon/human/employee as mob, var/job_alias) - if(!ishuman(employee)) - return - - //TODO ERRORAGE - UNFINISHED - var/datum/job/JOB = jobs.get_job(job_alias) - if(JOB) - var/item = JOB.equipment_ears[1] - employee.equip_to_slot_or_del(new item(employee), employee.slot_ears) - item = JOB.equipment_under[1] - employee.equip_to_slot_or_del(new item(employee), employee.slot_w_uniform) - - - /* - src.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial (src), slot_back) - src.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(src), slot_in_backpack) - src.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng (src), slot_ears) - src.equip_to_slot_or_del(new /obj/item/device/pda/engineering(src), slot_belt) - src.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(src), slot_w_uniform) - src.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(src), slot_shoes) - src.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/hardhat(src), slot_head) - src.equip_to_slot_or_del(new /obj/item/weapon/storage/utilitybelt/full(src), slot_l_hand) //currently spawns in hand due to traitor assignment requiring a PDA to be on the belt. --Errorage - //src.equip_to_slot_or_del(new /obj/item/clothing/gloves/yellow(src), slot_gloves) removed as part of Dangercon 2011, approved by Urist_McDorf --Errorage - src.equip_to_slot_or_del(new /obj/item/device/t_scanner(src), slot_r_store) - */ - - -//This algorithm works in 5 steps: -//1: Assignment of wizard / nuke members (if appropriate game mode) -//2: Assignment of jobs based on preferenes -// 2.1: Assignment of vital and high priority jobs. Candidates compete on equal terms. If the vital jobs are not filled, a random candidate is chosen to fill them, -// 2.2: Assignment of the rest of the jobs based on player preference, -//3: Assignment of remaining jobs for remaining players based on chosen departments -//4: Random assignment of remaining jobs for remaining players based on assignment priority -//5: Assignment of traitor / changeling to assigned roles (if appropriate game mode) -proc/assignment_algorithm(var/list/mob/new_player/players) - for(var/mob/new_player/PLAYER in players) - if(!PLAYER.client) - players -= PLAYER - continue - if(!PLAYER.ready) - players -= PLAYER - continue - - var/list/datum/job/vital_jobs = list() - var/list/datum/job/high_priority_jobs = list() - var/list/datum/job/priority_jobs = list() - var/list/datum/job/low_priority_jobs = list() - var/list/datum/job/assistant_jobs = list() - var/list/datum/job/not_assigned_jobs = list() - - for(var/datum/job/J in jobs) - switch(J.assignment_priority) - if(5) - vital_jobs += J - if(4) - high_priority_jobs += J - if(3) - priority_jobs += J - if(2) - low_priority_jobs += J - if(1) - assistant_jobs += J - if(0) - not_assigned_jobs += J - - var/list/datum/player_jobs/player_jobs = list() //This datum only holds a mob/new_player and a datum/jobs. The first is the player, the 2nd is the player's selected jobs, from the preferences datum. - - for(var/mob/new_player/NP in players) - var/datum/player_jobs/PJ = new/datum/player_jobs - PJ.player = NP - PJ.selected_jobs = NP.preferences.wanted_jobs - player_jobs += PJ - - //At this point we have the player_jobs list filled. Next up we have to assign all vital and high priority positions. - - var/list/datum/job/hp_jobs = jobs.get_jobs_by_priority( HIGH_PRIORITY_JOB, VITAL_PRIORITY_JOB ) - - for(var/datum/job/J in hp_jobs) - var/list/mob/new_player/candidates = list() - for(var/datum/player_jobs/PJ in player_jobs) - if(J in PJ.selected_jobs) - candidates += PJ.player - var/mob/new_player/chosen_player - if(candidates) - chosen_player = pick(candidates) - else - if(J.assignment_priority == VITAL_PRIORITY_JOB) - if(players) //Just in case there are more vital jobs than there are players. - chosen_player = pick(players) - if(chosen_player) - chosen_player.mind.assigned_job = J - players -= chosen_player - //TODO ERRORAGE - add capability for hp jobs with more than one slots. - - - - - //1: vital and high priority jobs, assigned on equal terms - - //TODO ERRORAGE - UNFINISHED - - -//END OF WORK IN PROGRESS CONTENT diff --git a/code/unused/limbs.dm b/code/unused/limbs.dm deleted file mode 100644 index ef73eec5ece..00000000000 --- a/code/unused/limbs.dm +++ /dev/null @@ -1,140 +0,0 @@ -/datum/limb - var/name = "limb" - var/mob/owner = null - var/icon_name = null - var/body_part = null - var/brutestate = 0 - var/burnstate = 0 - var/brute_dam = 0 - var/burn_dam = 0 - var/max_damage = 0 - -/datum/limb/chest - name = "chest" - icon_name = "chest" - max_damage = 200 - body_part = CHEST - -/datum/limb/head - name = "head" - icon_name = "head" - max_damage = 200 - body_part = HEAD - -/datum/limb/l_arm - name = "l_arm" - icon_name = "l_arm" - max_damage = 75 - body_part = ARM_LEFT - -/datum/limb/l_leg - name = "l_leg" - icon_name = "l_leg" - max_damage = 75 - body_part = LEG_LEFT - -/datum/limb/r_arm - name = "r_arm" - icon_name = "r_arm" - max_damage = 75 - body_part = ARM_RIGHT - -/datum/limb/r_leg - name = "r_leg" - icon_name = "r_leg" - max_damage = 75 - body_part = LEG_RIGHT - -/*Leaving these here in case we want to use them later -/datum/limb/l_foot - name = "l foot" - icon_name = "l_foot" - body_part = FOOT_LEFT - -/datum/limb/r_foot - name = "r foot" - icon_name = "r_foot" - body_part = FOOT_RIGHT - -/datum/limb/r_hand - name = "r hand" - icon_name = "r_hand" - body_part = HAND_RIGHT - -/datum/limb/l_hand - name = "l hand" - icon_name = "l_hand" - body_part = HAND_LEFT - -/datum/limb/groin - name = "groin" - icon_name = "groin" - body_part = GROIN -*/ - -//Applies brute and burn damage to the organ. Returns 1 if the damage-icon states changed at all. -//Damage will not exceed max_damage using this proc -//Cannot apply negative damage -/datum/limb/proc/take_damage(brute, burn) - if(owner && (owner.status_flags & GODMODE)) return 0 //godmode - brute = max(brute,0) - burn = max(burn,0) - - var/can_inflict = max_damage - (brute_dam + burn_dam) - if(!can_inflict) return 0 - - if((brute + burn) < can_inflict) - brute_dam += brute - burn_dam += burn - else - if(brute > 0) - if(burn > 0) - brute = round( (brute/(brute+burn)) * can_inflict, 1 ) - burn = can_inflict - brute //gets whatever damage is left over - brute_dam += brute - burn_dam += burn - else - brute_dam += can_inflict - else - if(burn > 0) - burn_dam += can_inflict - else - return 0 - return update_icon() - - -//Heals brute and burn damage for the organ. Returns 1 if the damage-icon states changed at all. -//Damage cannot go below zero. -//Cannot remove negative damage (i.e. apply damage) -/datum/limb/proc/heal_damage(brute, burn) - brute = max(brute, 0) - burn = max(burn, 0) - brute_dam = max(brute_dam - brute, 0) - burn_dam = max(burn_dam - burn, 0) - return update_icon() - - -//Returns total damage...kinda pointless really -/datum/limb/proc/get_damage() - return brute_dam + burn_dam - - -//Updates an organ's brute/burn states for use by update_damage_overlays() -//Returns 1 if we need to update overlays. 0 otherwise. -/datum/limb/proc/update_icon() - var/tbrute = round( (brute_dam/max_damage)*3, 1 ) - var/tburn = round( (burn_dam/max_damage)*3, 1 ) - if((tbrute != brutestate) || (tburn != burnstate)) - brutestate = tbrute - burnstate = tburn - return 1 - return 0 - -//Returns a display name for the organ -/datum/limb/proc/getDisplayName() - switch(name) - if("l_leg") return "left leg" - if("r_leg") return "right leg" - if("l_arm") return "left arm" - if("r_arm") return "right arm" - else return name diff --git a/code/unused/mining/datum_processing_recipe.dm b/code/unused/mining/datum_processing_recipe.dm deleted file mode 100644 index f44516f2c80..00000000000 --- a/code/unused/mining/datum_processing_recipe.dm +++ /dev/null @@ -1,23 +0,0 @@ -/**********************Ore to material recipes datum**************************/ - -var/list/AVAILABLE_ORES = typesof(/obj/item/weapon/ore) - -/datum/material_recipe - var/name - var/list/obj/item/weapon/ore/recipe - var/obj/prod_type //produced material/object type - - New(var/param_name, var/param_recipe, var/param_prod_type) - name = param_name - recipe = param_recipe - prod_type = param_prod_type - -var/list/datum/material_recipe/MATERIAL_RECIPES = list( - new/datum/material_recipe("Metal",list(/obj/item/weapon/ore/iron),/obj/item/stack/sheet/metal), - new/datum/material_recipe("Glass",list(/obj/item/weapon/ore/glass),/obj/item/stack/sheet/glass), - new/datum/material_recipe("Gold",list(/obj/item/weapon/ore/gold),/obj/item/stack/sheet/mineral/gold), - new/datum/material_recipe("Silver",list(/obj/item/weapon/ore/silver),/obj/item/stack/sheet/mineral/silver), - new/datum/material_recipe("Diamond",list(/obj/item/weapon/ore/diamond),/obj/item/stack/sheet/mineral/diamond), - new/datum/material_recipe("Plasma",list(/obj/item/weapon/ore/plasma),/obj/item/stack/sheet/mineral/plasma), - new/datum/material_recipe("Bananium",list(/obj/item/weapon/ore/bananium),/obj/item/stack/sheet/mineral/bananium), - ) \ No newline at end of file diff --git a/code/unused/mining/machine_craftlathe_unused.dm b/code/unused/mining/machine_craftlathe_unused.dm deleted file mode 100644 index 29ddbc26576..00000000000 --- a/code/unused/mining/machine_craftlathe_unused.dm +++ /dev/null @@ -1,235 +0,0 @@ -/*********************NEW AUTOLATHE / CRAFT LATHE***********************/ - -var/list/datum/craftlathe_item/CRAFT_ITEMS = list() -var/CRAFT_ITEMS_SETUP = 1 //this should probably be a pre-game thing, but i'll do it so the first lathe2 that's created will set-up the recipes. - -proc/check_craftlathe_recipe(var/list/param_recipe) - if(param_recipe.len != 9) - return - var/i - var/match = 0 //this one counts if there is at least one non-"" ingredient. - for(var/datum/craftlathe_item/CI in CRAFT_ITEMS) - match = 0 - for(i = 1; i <= 9; i++) - if(CI.recipe[i] != param_recipe[i]) - match = 0 //use this so it passes by the match > 0 check below, otherwise i'd need a new variable to tell the return CI below that the check failed - break - if(CI.recipe[i] != "") - match++ - if(match > 0) - return CI - return 0 - -/datum/craftlathe_item - var/id = "" //must be unique for each item type. used to create recipes - var/name = "unknown" //what the lathe will show as it's contents - var/list/recipe = list("","","","","","","","","") //the 9 items here represent what items need to be placed in the lathe to produce this item. - var/item_type = null //this is used on items like sheets which are added when inserted into the lathe. - var/amount = 1 - var/amount_attackby = 1 - -/datum/craftlathe_item/New(var/param_id,var/param_name,var/param_amount,var/param_ammount_per_attackby,var/list/param_recipe,var/param_type = null) - ..() - id = param_id - name = param_name - recipe = param_recipe - item_type = param_type - amount = param_amount; - amount_attackby = param_ammount_per_attackby - return - -//this proc checks the recipe you give in it's parameter with the entire list of available items. If any match, it returns the item from CRAFT_ITEMS. the returned item should not be changed!! - -/obj/machinery/autolathe2 - name = "Craft lathe" - icon_state = "autolathe" - density = 1 - anchored = 1 - var/datum/craftlathe_item/selected = null - var/datum/craftlathe_item/make = null - var/list/datum/craftlathe_item/craft_contents = list() - var/list/current_recipe = list("","","","","","","","","") - -/obj/machinery/autolathe2/New() - ..() - if(CRAFT_ITEMS_SETUP) - CRAFT_ITEMS_SETUP = 0 - build_recipes() - return - -/obj/machinery/autolathe2/attack_hand(mob/user as mob) - var/dat - dat = text("

Craft Lathe

") - dat += text("
") - - dat += text("Materials

") - var/datum/craftlathe_item/CI - var/i - for(i = 1; i <= craft_contents.len; i++) - CI = craft_contents[i] - if (CI == selected) - dat += text("[CI.name] ([CI.amount])
") - else - dat += text("[CI.name] ([CI.amount])
") - - dat += text("

") - - dat += text("Crafting Table

") - - dat += text(" ") - - var/j = 0 - var/k = 0 - for (i = 0; i < 3; i++) - dat += text(" ") - for (j = 1; j <= 3; j++) - k = i * 3 + j - if (current_recipe[k]) - dat += text(" ") - else - dat += text(" ") - dat += text(" ") - dat += text("
[current_recipe[k]]----
") - - dat += text("

") - dat += text("Will make: ") - if (make) - dat += text("[make.name]") - else - dat += text("nothing useful") - - dat += text("

") - user << browse("[dat]", "window=craft") - -/obj/machinery/autolathe2/Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - if(href_list["remove"]) - var/n = text2num(href_list["remove"]) - if(!n || n < 1 || n > 9) - return - current_recipe[n] = "" - if(href_list["select"]) - var/n = text2num(href_list["select"]) - if(!n || n < 1 || n > 9) - return - selected = craft_contents[n] - if(href_list["add"]) - var/n = text2num(href_list["add"]) - if(!n || n < 1 || n > 9) - return - if(selected) - current_recipe[n] = selected.id - if(href_list["make"]) - var/datum/craftlathe_item/MAKE = check_craftlathe_recipe(src.current_recipe) - if(MAKE) - for (var/datum/craftlathe_item/CI2 in craft_contents) - if(CI2.id == MAKE.id) - CI2.amount += CI2.amount_attackby - src.updateUsrDialog() - return - craft_contents += new/datum/craftlathe_item(MAKE.id,MAKE.name,MAKE.amount,MAKE.amount_attackby,MAKE.recipe,MAKE.item_type) - var/datum/craftlathe_item/CI = check_craftlathe_recipe(src.current_recipe) - if(CI) - make = CI - else - make = null - src.updateUsrDialog() - - - -/obj/machinery/autolathe2/attackby(obj/item/weapon/W as obj, mob/user as mob) - usr.machine = src - src.add_fingerprint(usr) - for (var/datum/craftlathe_item/CI in CRAFT_ITEMS) - if(W.type == CI.item_type) - for (var/datum/craftlathe_item/CI2 in craft_contents) - if(CI2.item_type == W.type) - CI2.amount += CI2.amount_attackby - rmv_item(W) - return - craft_contents += new/datum/craftlathe_item(CI.id,CI.name,CI.amount,CI.amount_attackby,CI.recipe,CI.item_type) - rmv_item(W) - return - src.updateUsrDialog() - return - -/obj/machinery/autolathe2/proc/rmv_item(obj/item/W as obj) - if(istype(W,/obj/item/stack)) - var/obj/item/stack/S = W - S.amount-- - if (S.amount <= 0) - del(S) - else - del(W) - -/obj/machinery/autolathe2/proc/build_recipes() - //Parameters: ID, Name, Amount, Amount_added_per_attackby, Recipe, Object type - CRAFT_ITEMS += new/datum/craftlathe_item("METAL","Metal",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/metal) - CRAFT_ITEMS += new/datum/craftlathe_item("R METAL","Reinforced Metal",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/r_metal) - CRAFT_ITEMS += new/datum/craftlathe_item("GLASS","Glass",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/glass) - CRAFT_ITEMS += new/datum/craftlathe_item("R GLASS","Reinforced Glass",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/rglass) - CRAFT_ITEMS += new/datum/craftlathe_item("GOLD","Gold",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/gold) - CRAFT_ITEMS += new/datum/craftlathe_item("SILVER","Silver",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/silver) - CRAFT_ITEMS += new/datum/craftlathe_item("DIAMOND","Diamond",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/diamond) - CRAFT_ITEMS += new/datum/craftlathe_item("PLASMA","Plasma",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/plasma) - CRAFT_ITEMS += new/datum/craftlathe_item("URANIUM","Uranium",1,1,list("","","","","","","","",""),/obj/item/weapon/ore/mineral/uranium) - CRAFT_ITEMS += new/datum/craftlathe_item("CLOWN","Bananium",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/bananium) - CRAFT_ITEMS += new/datum/craftlathe_item("ADMAMANTINE","Adamantine",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/adamantine) - CRAFT_ITEMS += new/datum/craftlathe_item("SCREWS","Screws",9,9,list("","","","","METAL","","","METAL","")) - CRAFT_ITEMS += new/datum/craftlathe_item("COGS","Cogs",9,9,list("","METAL","","METAL","METAL","METAL","","METAL","")) - CRAFT_ITEMS += new/datum/craftlathe_item("SWITCH","Switch",12,12,list("METAL","","METAL","METAL","METAL","","METAL","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("KEYBOARD","Keyboard",1,1,list("","","","SWITCH","SWITCH","SWITCH","SWITCH","SWITCH","SWITCH")) - CRAFT_ITEMS += new/datum/craftlathe_item("M PANEL","Metal Panel",10,10,list("","","","","METAL","METAL","","METAL","METAL")) - CRAFT_ITEMS += new/datum/craftlathe_item("CASE","Equipment Case",1,1,list("M PANEL","M PANEL","M PANEL","M PANEL","","M PANEL","M PANEL","M PANEL","M PANEL")) - CRAFT_ITEMS += new/datum/craftlathe_item("G PANEL","Glass Panel",10,10,list("","","","","GLASS","GLASS","","GLASS","GLASS")) - CRAFT_ITEMS += new/datum/craftlathe_item("SCREEN","Screen",1,1,list("","GLASS","","GLASS","PLASMA","GLASS","","GLASS","")) - CRAFT_ITEMS += new/datum/craftlathe_item("EL SILVER","Electronics Silver",30,30,list("","","","","SILVER","","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("EL GOLD","Electronics Gold",6,6,list("","","","","GOLD","","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("TINTED GL","Tinted Glass",2,2,list("","METAL","","","GLASS","","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("TANK VALVE","Tank Transfer Valuve",1,1,list("","PIPE","","","PIPE","SWITCH","","PIPE","")) - CRAFT_ITEMS += new/datum/craftlathe_item("PIPE","Pipe",1,1,list("","M PANEL","","","M PANEL","","","M PANEL","")) - - CRAFT_ITEMS += new/datum/craftlathe_item("CB FRAME","Circuitboard Frame",1,1,list("","","","M PANEL","G PANEL","M PANEL","G PANEL","M PANEL","G PANEL")) - CRAFT_ITEMS += new/datum/craftlathe_item("ROM","ROM Module",1,1,list("EL SILVER","EL SILVER","EL SILVER","EL SILVER","","EL SILVER","EL SILVER","EL SILVER","EL SILVER")) - CRAFT_ITEMS += new/datum/craftlathe_item("RAM","RAM Module",1,1,list("EL SILVER","EL SILVER","EL SILVER","EL SILVER","EL GOLD","EL SILVER","EL SILVER","EL SILVER","EL SILVER")) - CRAFT_ITEMS += new/datum/craftlathe_item("PROCESSOR","Processor",1,1,list("EL GOLD","EL SILVER","EL GOLD","EL SILVER","EL SILVER","EL SILVER","EL SILVER","EL GOLD","EL SILVER")) - CRAFT_ITEMS += new/datum/craftlathe_item("ANTENNA","Antenna",1,1,list("","","EL SILVER","","","EL SILVER","EL SILVER","EL SILVER","EL SILVER")) - CRAFT_ITEMS += new/datum/craftlathe_item("OP RECEPTOR","Optic Receptor",1,1,list("G PANEL","G PANEL","G PANEL","","EL GOLD","","G PANEL","G PANEL","G PANEL")) - CRAFT_ITEMS += new/datum/craftlathe_item("THERMAL OP R","Thermal Optic Receptor",1,1,list("","OP RECEPTOR","","ROM","DIAMOND","DIAMOND","","OP RECEPTOR","")) - CRAFT_ITEMS += new/datum/craftlathe_item("MASON OP R","Mason Optic Receptor",1,1,list("","OP RECEPTOR","","ROM","EL SILVER","EL SILVER","","OP RECEPTOR","")) - CRAFT_ITEMS += new/datum/craftlathe_item("EAR FRAME","Earpiece Frame",1,1,list("M PANEL","M PANEL","M PANEL","M PANEL","","M PANEL","M PANEL","M PANEL","")) - CRAFT_ITEMS += new/datum/craftlathe_item("RADIO M","Radio Module",1,1,list("","ANTENNA","","","ROM","","CB FRAME","CB FRAME","CB FRAME")) - CRAFT_ITEMS += new/datum/craftlathe_item("EARPIECE","Radio Earpiece",1,1,list("","","","","RADIO M","","","EAR FRAME","")) - CRAFT_ITEMS += new/datum/craftlathe_item("EARMUFFS","Earmuffs",1,1,list("","M PANEL","","EAR FRAME","","EAR FRAME","","","")) - - CRAFT_ITEMS += new/datum/craftlathe_item("GLASSES FRAME","Glasses Frame",1,1,list("M PANEL","","M PANEL","M PANEL","","M PANEL","M PANEL","M PANEL","M PANEL")) - CRAFT_ITEMS += new/datum/craftlathe_item("MASONS","Mason Scanners",1,1,list("","","","MASON OP R","GLASSES FRAME","MASON OP R","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("THERMALS","Thermal Scanners",1,1,list("","","","THERMAL OP R","GLASSES FRAME","THERMAL OP R","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("SUNGLASSES","Sunglasses",1,1,list("","","","TINTED GL","GLASSES FRAME","TINTED GL","","","")) - - CRAFT_ITEMS += new/datum/craftlathe_item("HELMET FR","Helmet Frame",1,1,list("METAL","METAL","METAL","METAL","","METAL","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("HELMET","Security Helmet",1,1,list("R METAL","R METAL","R METAL","R METAL","HELMET FR","R METAL","","GLASS","")) - CRAFT_ITEMS += new/datum/craftlathe_item("HOS HELMET","HoS Helmet",1,1,list("SILVER","GOLD","SILVER","SILVER","HELMET","SILVER","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("HARDHAT","Hardhat",1,1,list("","FLASHLIGHT","","","HELMET FR","","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("SWAT HELMET","SWAT Helmet",1,1,list("","","","","HELMET","","R GLASS","R GLASS","R GLASS")) - CRAFT_ITEMS += new/datum/craftlathe_item("WELDING HELM","Welding Helmet",1,1,list("","","","","HELMET FR","","TINTED GL","TINTED GL","TINTED GL")) - CRAFT_ITEMS += new/datum/craftlathe_item("SPACE HELMET","Space Helmet",1,1,list("R METAL","SILVER","R METAL","SILVER","HELMET FR","SILVER","R GLASS","R GLASS","R GLASS")) - CRAFT_ITEMS += new/datum/craftlathe_item("RIG HELMET","RIG Helmet",1,1,list("R METAL","SILVER","R METAL","SILVER","SPACE HELMET","SILVER","R GLASS","R GLASS","R GLASS")) - CRAFT_ITEMS += new/datum/craftlathe_item("GAS MASK","Gas Mask",1,1,list("","","","","HELMET FR","TANK VALVE","","G PANEL","")) - - CRAFT_ITEMS += new/datum/craftlathe_item("ARMOR FRAME","Armor Frame",1,1,list("R METAL","","R METAL","R METAL","R METAL","R METAL","R METAL","R METAL","R METAL")) - CRAFT_ITEMS += new/datum/craftlathe_item("ARMOR","Armored Vest",1,1,list("R METAL","","R METAL","R METAL","ARMOR FRAME","R METAL","R METAL","R METAL","R METAL")) - CRAFT_ITEMS += new/datum/craftlathe_item("HOS ARMOR","HoS Armor",1,1,list("DIAMOND","","DIAMOND","URANIUM","ARMOR","URANIUM","URANIUM","R METAL","URANIUM")) - CRAFT_ITEMS += new/datum/craftlathe_item("CAP ARMOR","Captain Armor",1,1,list("DIAMOND","","DIAMOND","URANIUM","HOS ARMOR","URANIUM","URANIUM","R METAL","URANIUM")) - CRAFT_ITEMS += new/datum/craftlathe_item("SPACE S FR","Space Suit Frame",1,1,list("SILVER","","SILVER","SILVER","SILVER","SILVER","SILVER","SILVER","SILVER")) - CRAFT_ITEMS += new/datum/craftlathe_item("SPACE SUIT","Space Suit",1,1,list("SILVER","","SILVER","RAM","SPACE S FR","RADIO M","SILVER","SILVEr","SILVER")) - CRAFT_ITEMS += new/datum/craftlathe_item("RIG SUIT","RIG Suit",1,1,list("SILVER","","SILVER","SILVER","SPACE SUIT","SILVER","SILVER","SILVER","SILVER")) - //TODO: Flashlight, type paths - return - - - - return \ No newline at end of file diff --git a/code/unused/mining/machine_gas_extractor_unused.dm b/code/unused/mining/machine_gas_extractor_unused.dm deleted file mode 100644 index 7a833016cf4..00000000000 --- a/code/unused/mining/machine_gas_extractor_unused.dm +++ /dev/null @@ -1,78 +0,0 @@ -/**********************Gas extractor**************************/ - -/obj/machinery/mineral/gasextractor - name = "Gas extractor" - desc = "A machine which extracts gasses from ores" - icon = 'icons/obj/computer.dmi' - icon_state = "aiupload" - var/obj/machinery/mineral/input = null - var/obj/machinery/mineral/output = null - var/message = ""; - var/processing = 0 - var/newtoxins = 0 - density = 1 - anchored = 1.0 - -/obj/machinery/mineral/gasextractor/New() - ..() - spawn( 5 ) - for (var/dir in cardinal) - src.input = locate(/obj/machinery/mineral/input, get_step(src, dir)) - if(src.input) break - for (var/dir in cardinal) - src.output = locate(/obj/machinery/mineral/output, get_step(src, dir)) - if(src.output) break - return - return - -/obj/machinery/mineral/gasextractor/attack_hand(user as mob) - - if(processing == 1) - user << "The machine is processing" - return - - var/dat - dat = text("input connection status: ") - if (input) - dat += text("CONNECTED") - else - dat += text("NOT CONNECTED") - dat += text("
output connection status: ") - if (output) - dat += text("CONNECTED") - else - dat += text("NOT CONNECTED") - - dat += text("

Extract gas") - - dat += text("

Message: [message]") - - user << browse("[dat]", "window=purifier") - -/obj/machinery/mineral/gasextractor/Topic(href, href_list) - if(..()) - return - - usr.machine = src - src.add_fingerprint(usr) - if(href_list["extract"]) - if (src.output) - if (locate(/obj/machinery/portable_atmospherics/canister,output.loc)) - newtoxins = 0 - processing = 1 - var/obj/item/weapon/ore/O - while(locate(/obj/item/weapon/ore/plasma, input.loc) && locate(/obj/machinery/portable_atmospherics/canister,output.loc)) - O = locate(/obj/item/weapon/ore/plasma, input.loc) - if (istype(O,/obj/item/weapon/ore/plasma)) - var/obj/machinery/portable_atmospherics/canister/C - C = locate(/obj/machinery/portable_atmospherics/canister,output.loc) - C.air_contents.toxins += 100 - newtoxins += 100 - del(O) - sleep(5); - processing = 0; - message = "Canister filled with [newtoxins] units of toxins" - else - message = "No canister found" - src.updateUsrDialog() - return diff --git a/code/unused/mining/machine_purifier_unused.dm b/code/unused/mining/machine_purifier_unused.dm deleted file mode 100644 index 1dd47a4fc3e..00000000000 --- a/code/unused/mining/machine_purifier_unused.dm +++ /dev/null @@ -1,88 +0,0 @@ -/**********************Mineral purifier (not used, replaced with mineral processing unit)**************************/ - -/obj/machinery/mineral/purifier - name = "Ore Purifier" - desc = "A machine which makes building material out of ores" - icon = 'icons/obj/computer.dmi' - icon_state = "aiupload" - var/obj/machinery/mineral/input = null - var/obj/machinery/mineral/output = null - var/processed = 0 - var/processing = 0 - density = 1 - anchored = 1.0 - -/obj/machinery/mineral/purifier/attack_hand(user as mob) - - if(processing == 1) - user << "The machine is processing" - return - - var/dat - dat = text("input connection status: ") - if (input) - dat += text("CONNECTED") - else - dat += text("NOT CONNECTED") - dat += text("
output connection status: ") - if (output) - dat += text("CONNECTED") - else - dat += text("NOT CONNECTED") - - dat += text("

Purify") - - dat += text("

found: [processed]") - user << browse("[dat]", "window=purifier") - -/obj/machinery/mineral/purifier/Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - if(href_list["purify"]) - if (src.output) - processing = 1; - var/obj/item/weapon/ore/O - processed = 0; - while(locate(/obj/item/weapon/ore, input.loc)) - O = locate(/obj/item/weapon/ore, input.loc) - if (istype(O,/obj/item/weapon/ore/iron)) - new /obj/item/stack/sheet/metal(output.loc) - del(O) - if (istype(O,/obj/item/weapon/ore/diamond)) - new /obj/item/stack/sheet/mineral/diamond(output.loc) - del(O) - if (istype(O,/obj/item/weapon/ore/plasma)) - new /obj/item/stack/sheet/mineral/plasma(output.loc) - del(O) - if (istype(O,/obj/item/weapon/ore/gold)) - new /obj/item/stack/sheet/mineral/gold(output.loc) - del(O) - if (istype(O,/obj/item/weapon/ore/silver)) - new /obj/item/stack/sheet/mineral/silver(output.loc) - del(O) - if (istype(O,/obj/item/weapon/ore/uranium)) - new /obj/item/weapon/ore/mineral/uranium(output.loc) - del(O) - /*if (istype(O,/obj/item/weapon/ore/adamantine)) - new /obj/item/weapon/ore/adamantine(output.loc) - del(O)*/ //Dunno what this area does so I'll keep it commented out for now -Durandan - processed++ - sleep(5); - processing = 0; - src.updateUsrDialog() - return - - -/obj/machinery/mineral/purifier/New() - ..() - spawn( 5 ) - for (var/dir in cardinal) - src.input = locate(/obj/machinery/mineral/input, get_step(src, dir)) - if(src.input) break - for (var/dir in cardinal) - src.output = locate(/obj/machinery/mineral/output, get_step(src, dir)) - if(src.output) break - return - return diff --git a/code/unused/mining/mine_generator_unused.dm b/code/unused/mining/mine_generator_unused.dm deleted file mode 100644 index 9cc7f54ce69..00000000000 --- a/code/unused/mining/mine_generator_unused.dm +++ /dev/null @@ -1,174 +0,0 @@ -/**********************Random mine generator************************/ - -//this item is intended to give the effect of entering the mine, so that light gradually fades -/obj/effect/mine_generator - name = "Random mine generator" - anchored = 1 - unacidable = 1 - var/turf/last_loc - var/turf/target_loc - var/turf/start_loc - var/randXParam //the value of these two parameters are generated by the code itself and used to - var/randYParam //determine the random XY parameters - var/mineDirection = 3 - /* - 0 = none - 1 = N - 2 = NNW - 3 = NW - 4 = WNW - 5 = W - 6 = WSW - 7 = SW - 8 = SSW - 9 = S - 10 = SSE - 11 = SE - 12 = ESE - 13 = E - 14 = ENE - 15 = NE - 16 = NNE - */ - -/obj/effect/mine_generator/New() - last_loc = src.loc - var/i - for(i = 0; i < 50; i++) - gererateTargetLoc() - //target_loc = locate(last_loc.x + rand(5), last_loc.y + rand(5), src.z) - fillWithAsteroids() - del(src) - return - - -/obj/effect/mine_generator/proc/gererateTargetLoc() //this proc determines where the next square-room will end. - switch(mineDirection) - if(1) - randXParam = 0 - randYParam = 4 - if(2) - randXParam = 1 - randYParam = 3 - if(3) - randXParam = 2 - randYParam = 2 - if(4) - randXParam = 3 - randYParam = 1 - if(5) - randXParam = 4 - randYParam = 0 - if(6) - randXParam = 3 - randYParam = -1 - if(7) - randXParam = 2 - randYParam = -2 - if(8) - randXParam = 1 - randYParam = -3 - if(9) - randXParam = 0 - randYParam = -4 - if(10) - randXParam = -1 - randYParam = -3 - if(11) - randXParam = -2 - randYParam = -2 - if(12) - randXParam = -3 - randYParam = -1 - if(13) - randXParam = -4 - randYParam = 0 - if(14) - randXParam = -3 - randYParam = 1 - if(15) - randXParam = -2 - randYParam = 2 - if(16) - randXParam = -1 - randYParam = 3 - target_loc = last_loc - if (randXParam > 0) - target_loc = locate(target_loc.x+rand(randXParam),target_loc.y,src.z) - if (randYParam > 0) - target_loc = locate(target_loc.x,target_loc.y+rand(randYParam),src.z) - if (randXParam < 0) - target_loc = locate(target_loc.x-rand(-randXParam),target_loc.y,src.z) - if (randYParam < 0) - target_loc = locate(target_loc.x,target_loc.y-rand(-randXParam),src.z) - if (mineDirection == 1 || mineDirection == 5 || mineDirection == 9 || mineDirection == 13) //if N,S,E,W, turn quickly - if(prob(50)) - mineDirection += 2 - else - mineDirection -= 2 - if(mineDirection < 1) - mineDirection += 16 - else - if(prob(50)) - if(prob(50)) - mineDirection += 1 - else - mineDirection -= 1 - if(mineDirection < 1) - mineDirection += 16 - return - - -/obj/effect/mine_generator/proc/fillWithAsteroids() - - if(last_loc) - start_loc = last_loc - - if(start_loc && target_loc) - var/x1 - var/y1 - - var/turf/line_start = start_loc - var/turf/column = line_start - - if(start_loc.x <= target_loc.x) - if(start_loc.y <= target_loc.y) //GOING NORTH-EAST - for(y1 = start_loc.y; y1 <= target_loc.y; y1++) - for(x1 = start_loc.x; x1 <= target_loc.x; x1++) - new/turf/simulated/floor/plating/airless/asteroid(column) - column = get_step(column,EAST) - line_start = get_step(line_start,NORTH) - column = line_start - last_loc = target_loc - return - else //GOING NORTH-WEST - for(y1 = start_loc.y; y1 >= target_loc.y; y1--) - for(x1 = start_loc.x; x1 <= target_loc.x; x1++) - new/turf/simulated/floor/plating/airless/asteroid(column) - column = get_step(column,WEST) - line_start = get_step(line_start,NORTH) - column = line_start - last_loc = target_loc - return - else - if(start_loc.y <= target_loc.y) //GOING SOUTH-EAST - for(y1 = start_loc.y; y1 <= target_loc.y; y1++) - for(x1 = start_loc.x; x1 >= target_loc.x; x1--) - new/turf/simulated/floor/plating/airless/asteroid(column) - column = get_step(column,EAST) - line_start = get_step(line_start,SOUTH) - column = line_start - last_loc = target_loc - return - else //GOING SOUTH-WEST - for(y1 = start_loc.y; y1 >= target_loc.y; y1--) - for(x1 = start_loc.x; x1 >= target_loc.x; x1--) - new/turf/simulated/floor/plating/airless/asteroid(column) - column = get_step(column,WEST) - line_start = get_step(line_start,SOUTH) - column = line_start - last_loc = target_loc - return - - - return \ No newline at end of file diff --git a/code/unused/mining/rail_unused.dm b/code/unused/mining/rail_unused.dm deleted file mode 100644 index bedc268715f..00000000000 --- a/code/unused/mining/rail_unused.dm +++ /dev/null @@ -1,338 +0,0 @@ -/**********************Rail track**************************/ - -/obj/machinery/rail_track - name = "Rail track" - icon = 'icons/obj/mining.dmi' - icon_state = "rail" - dir = 2 - var/id = null //this is needed for switches to work Set to the same on the whole length of the track - anchored = 1 - -/**********************Rail intersection**************************/ - -/obj/machinery/rail_track/intersections - name = "Rail track intersection" - icon_state = "rail_intersection" - -/obj/machinery/rail_track/intersections/attack_hand(user as mob) - switch (dir) - if (1) dir = 5 - if (5) dir = 4 - if (4) dir = 9 - if (9) dir = 2 - if (2) dir = 10 - if (10) dir = 8 - if (8) dir = 6 - if (6) dir = 1 - return - -/obj/machinery/rail_track/intersections/NSE - name = "Rail track T intersection" - icon_state = "rail_intersection_NSE" - dir = 2 - -/obj/machinery/rail_track/intersections/NSE/attack_hand(user as mob) - switch (dir) - if (1) dir = 5 - if (2) dir = 5 - if (5) dir = 9 - if (9) dir = 2 - return - -/obj/machinery/rail_track/intersections/SEW - name = "Rail track T intersection" - icon_state = "rail_intersection_SEW" - dir = 8 - -/obj/machinery/rail_track/intersections/SEW/attack_hand(user as mob) - switch (dir) - if (8) dir = 6 - if (4) dir = 6 - if (6) dir = 5 - if (5) dir = 8 - return - -/obj/machinery/rail_track/intersections/NSW - name = "Rail track T intersection" - icon_state = "rail_intersection_NSW" - dir = 2 - -/obj/machinery/rail_track/intersections/NSW/attack_hand(user as mob) - switch (dir) - if (1) dir = 10 - if (2) dir = 10 - if (10) dir = 6 - if (6) dir = 2 - return - -/obj/machinery/rail_track/intersections/NEW - name = "Rail track T intersection" - icon_state = "rail_intersection_NEW" - dir = 8 - -/obj/machinery/rail_track/intersections/NEW/attack_hand(user as mob) - switch (dir) - if (4) dir = 9 - if (8) dir = 9 - if (9) dir = 10 - if (10) dir = 8 - return - -/**********************Rail switch**************************/ - -/obj/machinery/rail_switch - name = "Rail switch" - icon = 'icons/obj/mining.dmi' - icon_state = "rail" - dir = 2 - icon = 'icons/obj/recycling.dmi' - icon_state = "switch-off" - var/obj/machinery/rail_track/track = null - var/id //used for to change the track pieces - -/obj/machinery/rail_switch/New() - spawn(10) - src.track = locate(/obj/machinery/rail_track, get_step(src, NORTH)) - if(track) - id = track.id - return - -/obj/machinery/rail_switch/attack_hand(user as mob) - user << "You switch the rail track's direction" - for (var/obj/machinery/rail_track/T in world) - if (T.id == src.id) - var/obj/machinery/rail_car/C = locate(/obj/machinery/rail_car, T.loc) - if (C) - switch (T.dir) - if(1) - switch(C.direction) - if("N") C.direction = "S" - if("S") C.direction = "N" - if("E") C.direction = "S" - if("W") C.direction = "S" - if(2) - switch(C.direction) - if("N") C.direction = "S" - if("S") C.direction = "N" - if("E") C.direction = "S" - if("W") C.direction = "S" - if(4) - switch(C.direction) - if("N") C.direction = "E" - if("S") C.direction = "E" - if("E") C.direction = "W" - if("W") C.direction = "E" - if(8) - switch(C.direction) - if("N") C.direction = "E" - if("S") C.direction = "E" - if("E") C.direction = "W" - if("W") C.direction = "E" - if(5) - switch(C.direction) - if("N") C.direction = "S" - if("S") C.direction = "E" - if("E") C.direction = "S" - if("W") C.direction = "S" - if(6) - switch(C.direction) - if("N") C.direction = "S" - if("S") C.direction = "W" - if("E") C.direction = "S" - if("W") C.direction = "S" - if(9) - switch(C.direction) - if("N") C.direction = "E" - if("S") C.direction = "E" - if("E") C.direction = "N" - if("W") C.direction = "E" - if(10) - switch(C.direction) - if("N") C.direction = "W" - if("S") C.direction = "W" - if("E") C.direction = "W" - if("W") C.direction = "N" - return - -/**********************Rail car**************************/ - -/obj/machinery/rail_car - name = "Rail car" - icon = 'icons/obj/storage.dmi' - icon_state = "miningcar" - var/direction = "S" //S = south, N = north, E = east, W = west. Determines whichw ay it'll look first - var/moving = 0; - anchored = 1 - density = 1 - var/speed = 0 - var/slowing = 0 - var/atom/movable/load = null //what it's carrying - -/obj/machinery/rail_car/attack_hand(user as mob) - if (moving == 0) - processing_items.Add(src) - moving = 1 - else - processing_items.Remove(src) - moving = 0 - return - -/* -for (var/client/C) - C << "Dela." -*/ - -/obj/machinery/rail_car/MouseDrop_T(var/atom/movable/C, mob/user) - - if(user.stat) - return - - if (!istype(C) || C.anchored || get_dist(user, src) > 1 || get_dist(src,C) > 1 ) - return - - if(ismob(C)) - load(C) - - -/obj/machinery/rail_car/proc/load(var/atom/movable/C) - - if(get_dist(C, src) > 1) - return - //mode = 1 - - C.loc = src.loc - sleep(2) - C.loc = src - load = C - - C.pixel_y += 9 - if(C.layer < layer) - C.layer = layer + 0.1 - overlays += C - - if(ismob(C)) - var/mob/M = C - if(M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - - //mode = 0 - //send_status() - -/obj/machinery/rail_car/proc/unload(var/dirn = 0) - if(!load) - return - - overlays.Cut() - - load.loc = src.loc - load.pixel_y -= 9 - load.layer = initial(load.layer) - if(ismob(load)) - var/mob/M = load - if(M.client) - M.client.perspective = MOB_PERSPECTIVE - M.client.eye = src - - - if(dirn) - step(load, dirn) - - load = null - - // in case non-load items end up in contents, dump every else too - // this seems to happen sometimes due to race conditions - // with items dropping as mobs are loaded - - for(var/atom/movable/AM in src) - AM.loc = src.loc - AM.layer = initial(AM.layer) - AM.pixel_y = initial(AM.pixel_y) - if(ismob(AM)) - var/mob/M = AM - if(M.client) - M.client.perspective = MOB_PERSPECTIVE - M.client.eye = src - -/obj/machinery/rail_car/relaymove(var/mob/user) - if(user.stat) - return - if(load == user) - unload(0) - return - -/obj/machinery/rail_car/process() - if (moving == 1) - if (slowing == 1) - if (speed > 0) - speed--; - if (speed == 0) - slowing = 0 - else - if (speed < 10) - speed++; - var/i = 0 - for (i = 0; i < speed; i++) - if (moving == 1) - switch (direction) - if ("S") - for (var/obj/machinery/rail_track/R in locate(src.x,src.y-1,src.z)) - if (R.dir == 10) - direction = "W" - if (R.dir == 9) - direction = "E" - if (R.dir == 2 || R.dir == 1 || R.dir == 10 || R.dir == 9) - for (var/mob/living/M in locate(src.x,src.y-1,src.z)) - step(M,get_dir(src,R)) - step(src,get_dir(src,R)) - break - else - moving = 0 - speed = 0 - if ("N") - for (var/obj/machinery/rail_track/R in locate(src.x,src.y+1,src.z)) - if (R.dir == 5) - direction = "E" - if (R.dir == 6) - direction = "W" - if (R.dir == 5 || R.dir == 1 || R.dir == 6 || R.dir == 2) - for (var/mob/living/M in locate(src.x,src.y+1,src.z)) - step(M,get_dir(src,R)) - step(src,get_dir(src,R)) - break - else - moving = 0 - speed = 0 - if ("E") - for (var/obj/machinery/rail_track/R in locate(src.x+1,src.y,src.z)) - if (R.dir == 6) - direction = "S" - if (R.dir == 10) - direction = "N" - if (R.dir == 4 || R.dir == 8 || R.dir == 10 || R.dir == 6) - for (var/mob/living/M in locate(src.x+1,src.y,src.z)) - step(M,get_dir(src,R)) - step(src,get_dir(src,R)) - break - else - moving = 0 - speed = 0 - if ("W") - for (var/obj/machinery/rail_track/R in locate(src.x-1,src.y,src.z)) - if (R.dir == 9) - direction = "N" - if (R.dir == 5) - direction = "S" - if (R.dir == 8 || R.dir == 9 || R.dir == 5 || R.dir == 4) - for (var/mob/living/M in locate(src.x-1,src.y,src.z)) - step(M,get_dir(src,R)) - step(src,get_dir(src,R)) - break - else - moving = 0 - speed = 0 - sleep(1) - else - processing_items.Remove(src) - moving = 0 - return \ No newline at end of file diff --git a/code/unused/mining/spaceship_builder_unused.dm b/code/unused/mining/spaceship_builder_unused.dm deleted file mode 100644 index 5e8a30d754c..00000000000 --- a/code/unused/mining/spaceship_builder_unused.dm +++ /dev/null @@ -1,173 +0,0 @@ -/**********************Spaceship builder area definitions**************************/ - -/area/shipbuilder - requires_power = 0 - luminosity = 1 - sd_lighting = 0 - -/area/shipbuilder/station - name = "shipbuilder station" - icon_state = "teleporter" - -/area/shipbuilder/ship1 - name = "shipbuilder ship1" - icon_state = "teleporter" - -/area/shipbuilder/ship2 - name = "shipbuilder ship2" - icon_state = "teleporter" - -/area/shipbuilder/ship3 - name = "shipbuilder ship3" - icon_state = "teleporter" - -/area/shipbuilder/ship4 - name = "shipbuilder ship4" - icon_state = "teleporter" - -/area/shipbuilder/ship5 - name = "shipbuilder ship5" - icon_state = "teleporter" - -/area/shipbuilder/ship6 - name = "shipbuilder ship6" - icon_state = "teleporter" - - -/**********************Spaceship builder**************************/ - -/obj/machinery/spaceship_builder - name = "Robotic Fabricator" - icon = 'icons/obj/surgery.dmi' - icon_state = "fab-idle" - density = 1 - anchored = 1 - var/metal_amount = 0 - var/operating = 0 - var/area/currentShuttleArea = null - var/currentShuttleName = null - -/obj/machinery/spaceship_builder/proc/buildShuttle(var/shuttle) - - var/shuttleat = null - var/shuttleto = "/area/shipbuilder/station" - - var/req_metal = 0 - switch(shuttle) - if("hopper") - shuttleat = "/area/shipbuilder/ship1" - currentShuttleName = "Planet hopper" - req_metal = 25000 - if("bus") - shuttleat = "/area/shipbuilder/ship2" - currentShuttleName = "Blnder Bus" - req_metal = 60000 - if("dinghy") - shuttleat = "/area/shipbuilder/ship3" - currentShuttleName = "Space dinghy" - req_metal = 100000 - if("van") - shuttleat = "/area/shipbuilder/ship4" - currentShuttleName = "Boxvan MMDLVI" - req_metal = 120000 - if("secvan") - shuttleat = "/area/shipbuilder/ship5" - currentShuttleName = "Boxvan MMDLVI - Security edition" - req_metal = 125000 - if("station4") - shuttleat = "/area/shipbuilder/ship6" - currentShuttleName = "Space station 4" - req_metal = 250000 - - if (metal_amount - req_metal < 0) - return - - if (!shuttleat) - return - - var/area/from = locate(shuttleat) - var/area/dest = locate(shuttleto) - - if(!from || !dest) - return - - currentShuttleArea = shuttleat - from.move_contents_to(dest) - return - -/obj/machinery/spaceship_builder/proc/scrapShuttle() - - var/shuttleat = "/area/shipbuilder/station" - var/shuttleto = currentShuttleArea - - if (!shuttleto) - return - - var/area/from = locate(shuttleat) - var/area/dest = locate(shuttleto) - - if(!from || !dest) - return - - currentShuttleArea = null - currentShuttleName = null - from.move_contents_to(dest) - return - -/obj/machinery/spaceship_builder/attackby(obj/item/weapon/W as obj, mob/user as mob) - - if(operating == 1) - user << "The machine is processing" - return - - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "\red You don't have the dexterity to do this!" - return - - if (istype(W, /obj/item/stack/sheet/metal)) - - var/obj/item/stack/sheet/metal/M = W - user << "\blue You insert all the metal into the machine." - metal_amount += M.amount * 100 - del(M) - - else - return attack_hand(user) - return - -/obj/machinery/spaceship_builder/attack_hand(user as mob) - if(operating == 1) - user << "The machine is processing" - return - - var/dat - dat = text("Ship fabricator

") - dat += text("Current ammount of Metal: [metal_amount]

") - - if (currentShuttleArea) - dat += text("Currently building

[currentShuttleName]

") - dat += text("Build the shuttle to your liking.
This shuttle will be sent to the station in the event of an emergency along with a centcom emergency shuttle.") - dat += text("


Scrap current shuttle") - else - dat += text("Available ships to build:

") - dat += text("Planet hopper - Tiny, Slow, 25000 metal
") - dat += text("Blunder Bus - Small, Decent speed, 60000 metal
") - dat += text("Space dinghy - Medium size, Decent speed, 100000 metal
") - dat += text("Boxvan MMDLVIr - Medium size, Decent speed, 120000 metal
") - dat += text("Boxvan MMDLVI - Security eidition - Large, Rather slow, 125000 metal
") - dat += text("Space station 4 - Huge, Slow, 250000 metal
") - - user << browse("[dat]", "window=shipbuilder") - - -/obj/machinery/spaceship_builder/Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - if(href_list["ship"]) - buildShuttle(href_list["ship"]) - if(href_list["scrap"]) - scrapShuttle(href_list["ship"]) - src.updateUsrDialog() - return \ No newline at end of file diff --git a/code/unused/musicplayer.dm b/code/unused/musicplayer.dm deleted file mode 100644 index ced7630e882..00000000000 --- a/code/unused/musicplayer.dm +++ /dev/null @@ -1,15 +0,0 @@ -// this toggle doesn't save across rounds -/mob/verb/musictoggle() - set name = "Music Toggle" - if(src.be_music == 0) - src.be_music = 1 - src << "\blue Music toggled on!" - return - src.be_music = 0 - src << "\blue Music toggled off!" - -// This checks a var on each area and plays that var -/area/Entered(mob/A as mob) - if (A && src.music != "" && A.client && A.be_music != 0 && (A.music_lastplayed != src.music)) - A.music_lastplayed = src.music - A << sound(src.music, repeat = 0, wait = 0, volume = 20, channel = 1) diff --git a/code/unused/new_year.dm b/code/unused/new_year.dm deleted file mode 100644 index d41b2d225af..00000000000 --- a/code/unused/new_year.dm +++ /dev/null @@ -1,138 +0,0 @@ - -/obj/effect/new_year_tree - name = "The fir" - desc = "This is a fir. Real fir on dammit spess station. You smell pine-needles." - icon = 'icons/effects/160x160.dmi' - icon_state = "new-year-tree" - anchored = 1 - opacity = 1 - density = 1 - layer = 5 - pixel_x = -64 - //pixel_y = -64 - -/obj/effect/new_year_tree/attackby(obj/item/W, mob/user) - if (istype(W, /obj/item/weapon/grab)) - return - W.loc = src - if (user.client) - user.client.screen -= W - user.unEquip(W) - var/const/bottom_right_x = 115.0 - var/const/bottom_right_y = 150.0 - var/const/top_left_x = 15.0 - var/const/top_left_y = 15.0 - var/const/bottom_med_x = top_left_x+(bottom_right_x-top_left_x)/2 - var/x = rand(top_left_x,bottom_med_x) //point in half of circumscribing rectangle - var/y = rand(top_left_y,bottom_right_y) - /* - y1=a*x1+b - y2=a*x2+b b = y2-a*x2 - - y1=a*x1+ y2-a*x2 - a*(x1-x2)+y2-y1=0 - a = (y1-y2)/(x1-x2) - */ - var/a = (top_left_y-bottom_right_y)/(top_left_x-bottom_med_x) - var/b = bottom_right_y-a*bottom_med_x - - if (a*x+b < y) //if point is above diagonal top_left -> bottom_median - x = bottom_med_x + x - top_left_x - y = bottom_right_y - y + top_left_y - var/image/I = image(W.icon, W, icon_state = W.icon_state) - I.pixel_x = x - I.pixel_y = y - overlays += I -/* -/obj/item/weapon/firbang - desc = "It is set to detonate in 10 seconds." - name = "firbang" - icon = 'icons/obj/grenade.dmi' - icon_state = "flashbang" - var/state = null - var/det_time = 100.0 - w_class = 2.0 - item_state = "flashbang" - throw_speed = 3 - throw_range = 7 - flags = FPRINT | TABLEPASS | CONDUCT - slot_flags = SLOT_BELT - -/obj/item/weapon/firbang/afterattack(atom/target as mob|obj|turf|area, mob/user as mob) - if (user.get_active_hand() == src) - if ((CLUMSY in usr.mutations) && prob(50)) - user << "\red Huh? How does this thing work?!" - src.state = 1 - src.icon_state = "flashbang1" - playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3) - spawn( 5 ) - prime() - return - else if (!( src.state )) - user << "\red You prime the [src]! [det_time/10] seconds!" - src.state = 1 - src.icon_state = "flashbang1" - playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3) - spawn( src.det_time ) - prime() - return - user.dir = get_dir(user, target) - user.drop_item() - var/t = (isturf(target) ? target : target.loc) - walk_towards(src, t, 3) - src.add_fingerprint(user) - return - -/obj/item/weapon/firbang/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/item/weapon/firbang/attack_hand() - walk(src, null, null) - ..() - return - -/obj/item/weapon/firbang/proc/prime() - playsound(src.loc, 'sound/effects/bang.ogg', 25, 1) - var/turf/T = get_turf(src) - if(T) - var/datum/effect/effect/system/harmless_smoke_spread/smoke = new - smoke.set_up(3, 0, src.loc) - smoke.attach(src) - smoke.start() - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(3, 1, src) - s.start() - new /obj/effect/new_year_tree(T) - del(src) - return - -/obj/item/weapon/firbang/attack_self(mob/user as mob) - if (!src.state) - if (CLUMSY in user.mutations) - user << "\red Huh? How does this thing work?!" - spawn( 5 ) - prime() - return - else - user << "\red You prime the [src]! [det_time/10] seconds!" - src.state = 1 - src.icon_state = "flashbang1" - add_fingerprint(user) - spawn( src.det_time ) - prime() - return - return - -/* -/datum/supply_packs/new_year - name = "New Year Celebration Equipment" - contains = list("/obj/item/weapon/firbang", - "/obj/item/weapon/firbang", - "/obj/item/weapon/firbang", - "/obj/item/weapon/wrapping_paper", - "/obj/item/weapon/wrapping_paper", - "/obj/item/weapon/wrapping_paper") - cost = 20 - containertype = "/obj/structure/closet/crate" - containername = "New Year Celebration crate" -*/ \ No newline at end of file diff --git a/code/unused/newcombatsystem.dm b/code/unused/newcombatsystem.dm deleted file mode 100644 index 274581a04e1..00000000000 --- a/code/unused/newcombatsystem.dm +++ /dev/null @@ -1,191 +0,0 @@ -//It's not a very big change, but I think melee will benefit from it. -//Currently will only be restricted to special training weapons to test the balancedness of the system. -//1)Knockdown, stun and weaken chances are separate and dependant on the part of the body you're aiming at -//eg a mop will be better applied to legs since it has a higher base knockdown chance than the other disabling states -//while an energy gun would be better applied to the chest because of the stunning chance. -//2)Weapons also have a parry chance which is checked every time the one wielding the weapon is attacked in melee -//in the area is currently aiming at and is able to defend himself. -//More ideas to come. - -//NOTES: doesn't work with armor yet - -/obj/item/weapon/training //subclass of weapons that is currently the only one that uses the alternate combat system - name = "training weapon" - desc = "A weapon for training the advanced fighting technicues" - var/chance_parry = 0 - var/chance_weaken = 0 - var/chance_stun = 0 - var/chance_knockdown = 0 - var/chance_knockout = 0 - var/chance_disarm = 0 - -//chances - 5 is low, 10 is medium, 15 is good - -/obj/item/weapon/training/axe //hard-hitting, but doesn't have much in terms of disabling people (except by killing) - name = "training axe" - icon_state = "training_axe" - /*combat stats*/ - force = 15 - chance_parry = 5 - chance_weaken = 10 - chance_stun = 5 - chance_knockdown = 5 - chance_knockout = 5 - chance_disarm = 0 - -/obj/item/weapon/training/sword //not bad attack, good at parrying and disarming - name = "training sword" - icon_state = "training_sword" - /*combat stats*/ - force = 10 - chance_parry = 15 - chance_weaken = 5 - chance_stun = 0 - chance_knockdown = 5 - chance_knockout = 0 - chance_disarm = 15 - -/obj/item/weapon/training/staff //not bad attack either, good at tripping and parrying - name = "training staff" - icon_state = "training_staff" - /*combat stats*/ - force = 10 - chance_parry = 15 - chance_weaken = 5 - chance_stun = 0 - chance_knockdown = 15 - chance_knockout = 0 - chance_disarm = 5 - -/obj/item/weapon/training/mace //worst attack, but has a good chance of stun, knockout or weaken - name = "training mace" - icon_state = "training_mace" - /*combat stats*/ - force = 5 - chance_parry = 0 - chance_weaken = 15 - chance_stun = 10 - chance_knockdown = 0 - chance_knockout = 10 - chance_disarm = 0 - -/obj/item/weapon/training/attack(target as mob, mob/user as mob) - var/target_area = attack_location(user.zone_sel.selecting) - for(var/mob/O in viewers(src,7)) - O << "\red \b [user.name] attacks [target.name] in the [target_area] with [src.name]!" - if(!target.stat && target.zone_sel.selecting == target_area) //parrying occurs here - if(istype(target.r_hand,/obj/item/weapon/training) - if(prob(target.r_hand:chance_parry)) - for(var/mob/O in viewers(src,7)) - O << "\red \b [target.name] deftly parries the attack with [target.r_hand.name]!" - return - if(istype(target.l_hand,/obj/item/weapon/training) - if(prob(target.l_hand:chance_parry)) - for(var/mob/O in viewers(src,7)) - O << "\red \b [target.name] deftly parries the attack with [target.l_hand.name]!" - return - target.adjustBruteLoss(-src.force) - - var/modifier_knockdown = 1.0 - var/modifier_knockout = 1.0 - var/modifier_stun = 1.0 - var/modifier_weaken = 1.0 - var/modifier_disarm = 0.0 - - switch(target_area) - if("eyes") - modifier_weaken = 2.0 - modifier_stun = 0.5 - modifier_knockdown = 0.0 - if("head") - modifier_stun = 0.8 - modifier_knockout = 1.5 - modifier_weaken = 1.2 - modifier_knockdown = 0.0 - if("chest") - if("right arm","r_arm") - if("left arm","l_arm") - if("right hand","r_hand") - if("left hand","l_hand") - if("groin") - if("right leg","r_leg") - if("left leg","l_leg") - if("right foot","r_foot") - if("left foot","l_foot") - - -/proc/attack_location(var/initloc = "chest") //proc to randomise actual hit loc based on where you're aiming at - var/resultloc = "chest" //also forgot hands/feet. bleh - var/percentage = rand(1,100) - switch(initloc) - if("eyes") - switch(percentage) - if(1 to 10) - resultloc = "eyes" - if(11 to 30) - resultloc = "head" - if(31 to 100) - resultloc = "chest" - if("head") - switch(percentage) - if(1 to 5) - resultloc = "eyes" - if(6 to 40) - resultloc = "head" - if(41 to 100) - resultloc = "chest" - if("chest") - switch(percentage) - if(1 to 80) - resultloc = "chest" - if(81 to 84) - resultloc = "right arm" - if(85 to 88) - resultloc = "left arm" - if(89 to 92) - resultloc = "right leg" - if(93 to 96) - resultloc = "left leg" - if(97 to 98) - resultloc = "groin" - if(99 to 100) - resultloc = "head" - if("l_arm") - switch(percentage) - if(1 to 60) - resultloc = "left arm" - if(61 to 100) - resultloc = "chest" - if("r_arm") - switch(percentage) - if(1 to 60) - resultloc = "right arm" - if(61 to 100) - resultloc = "chest" - if("groin") - switch(percentage) - if(1 to 35) - resultloc = "groin" - if(36 to 50) - resultloc = "left leg" - if(51 to 65) - resultloc = "right leg" - if(66 to 100) - resultloc = "chest" - if("l_leg") - switch(percentage) - if(1 to 60) - resultloc = "left leg" - if(61 to 70) - resultloc = "groin" - if(71 to 100) - resultloc = "chest" - if("r_leg") - switch(percentage) - if(1 to 60) - resultloc = "right leg" - if(61 to 70) - resultloc = "groin" - if(71 to 100) - resultloc = "chest" - return resultloc \ No newline at end of file diff --git a/code/unused/optics/beam.dm b/code/unused/optics/beam.dm deleted file mode 100644 index 0607989fae4..00000000000 --- a/code/unused/optics/beam.dm +++ /dev/null @@ -1,178 +0,0 @@ -// the laser beam - - -/obj/effect/beam/laser - name = "laser beam" - icon = 'icons/effects/beam.dmi' - icon_state = "full" - density = 0 - mouse_opacity = 0 - pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE - flags = TABLEPASS - var/wavelength // the (vaccuum) wavelength of the beam - var/width = 1 // 1=thin, 2=medium, 3=wide - - var/obj/effect/beam/laser/next - var/obj/effect/beam/laser/prev - var/obj/master - - New(var/atom/newloc, var/dirn, var/lambda, var/omega=1, var/half=0) - - if(!isturf(loc)) - return - - //world << "creating beam at ([newloc.x],[newloc.y]) with [dirn] [lambda] [omega] [half]" - - icon_state = "[omega]-[half ? "half" : "full"]" - dir = dirn - set_wavelength(lambda) - ..(newloc) - spawn(0) - src.propagate() - src.verbs -= /atom/movable/verb/pull - - - - proc/propagate() - var/turf/T = get_step(src, dir) - if(T) - if(T.Enter(src)) - next = new(T, dir, wavelength, width, 0) - next.prev = src - next.master = src.master - else - spawn(5) - propagate() - - - proc/remove() - if(next) - next.remove() - del(src) - - - - proc/blocked(var/atom/A) - return density || opacity -/* -/turf/Enter(atom/movable/mover as mob|obj) - if (!mover || !isturf(mover.loc)) - return 1 - - - //First, check objects to block exit that are not on the border - for(var/obj/obstacle in mover.loc) - if((obstacle.flags & ~ON_BORDER) && (mover != obstacle) && (forget != obstacle)) - if(!obstacle.CheckExit(mover, src)) - mover.Bump(obstacle, 1) - return 0 - - //Now, check objects to block exit that are on the border - for(var/obj/border_obstacle in mover.loc) - if((border_obstacle.flags & ON_BORDER) && (mover != border_obstacle) && (forget != border_obstacle)) - if(!border_obstacle.CheckExit(mover, src)) - mover.Bump(border_obstacle, 1) - return 0 - - //Next, check objects to block entry that are on the border - for(var/obj/border_obstacle in src) - if(border_obstacle.flags & ON_BORDER) - if(!border_obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != border_obstacle)) - mover.Bump(border_obstacle, 1) - return 0 - - //Then, check the turf itself - if (!src.CanPass(mover, src)) - mover.Bump(src, 1) - return 0 - - //Finally, check objects/mobs to block entry that are not on the border - for(var/atom/movable/obstacle in src) - if(obstacle.flags & ~ON_BORDER) - if(!obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != obstacle)) - mover.Bump(obstacle, 1) - return 0 - return 1 //Nothing found to block so return success! -*/ - - - HasEntered(var/atom/movable/AM) - if(istype(AM, /obj/effect/beam)) - return - if(blocked(AM)) - remove(src) - if(prev) - prev.propagate() - else if(master) - master:turn_on() - - proc/set_wavelength(var/lambda) - - var/w = round(lambda,1) // integer wavelength - wavelength = lambda - // first look for cached version of the icon at this wavelength - var/icon/cached = beam_icons["[w]"] - if(cached) - icon = cached - - return - - // no cached version, so generate a new one - - // this maps a wavelength in the range 380-780 nm to an R,G,B,A value - var/red = 0 - var/green = 0 - var/blue = 0 - var/alpha = 0 - - switch(w) - if(380 to 439) - red = (440-w) / 60 - green = 0 - blue = 1 - if(440 to 489) - red = 0 - green = (w-440) / 50 - blue = 1 - if(490 to 509) - red = 0 - green = 1 - blue = (510 - w) / 20 - if(510 to 579) - red = (w-510) / 70 - green = 1 - blue = 0 - if(580 to 644) - red = 1 - green = (645-w) / 65 - blue = 0 - if(645 to 780) - red = 1 - green = 0 - blue = 0 - - // colour is done, now calculate intensity - switch(w) - if(380 to 419) - alpha = 0.75*(w-380)/40 - if(420 to 700) - alpha = 0.75 - if(701 to 780) - alpha = 0.75*(780-w)/80 - - // remap alpha by intensity gamma - if(alpha != 0) - alpha = alpha**0.80 - - var/icon/I = icon('icons/effects/beam.dmi') - I.MapColors(red,0,0,0, 0,green,0,0, 0,0,blue,0, 0,0,0,alpha, 0,0,0,0) - icon = I - - beam_icons["[w]"] = I - - - -// global cache of beam icons -// this is an assoc list mapping (integer) wavelength to icons - -var/list/beam_icons = new() \ No newline at end of file diff --git a/code/unused/optics/laser-pointer.dm b/code/unused/optics/laser-pointer.dm deleted file mode 100644 index 8838e2d3bfa..00000000000 --- a/code/unused/optics/laser-pointer.dm +++ /dev/null @@ -1,73 +0,0 @@ -// A laser pointer. Emits a (tunable) low-power laser beam -// Used for alignment and testing of the optics system - -/obj/item/device/laser_pointer - name = "laser pointer" - desc = "A portable low-power laser used for optical system alignment. The label reads: 'Danger: Class IIIa laser device. Avoid direct eye exposure." - icon = 'optics.dmi' - icon_state = "pointer0" - var/on = 0 // true if operating - var/wavelength = 632 // operation wavelength (nm) - - var/gain_peak = 632 // gain peak (nm) - var/gain_width = 35 // gain bandwidth (nm) - var/peak_output = 0.005 // max output 5 mW - layer = OBJ_LAYER + 0.1 - - w_class = 4 - m_amt = 500 - g_amt = 100 - w_amt = 200 - - var/obj/effect/beam/laser/beam // the created beam - - flags = FPRINT | CONDUCT | TABLEPASS - - attack_ai() - return - - attack_paw() - return - - attack_self(var/mob/user) - - - on = !on - if(on) - turn_on() - else - turn_off() - - updateicon() - - verb/rotate() - set name = "Rotate" - set src in view(1) - turn_off() - dir = turn(dir, -90) - if(on) turn_on() - - Move(var/atom/newloc,var/newdir) - . = ..(newloc,newdir) - if(on && . && isturf(newloc)) - turn_off() - turn_on() - return . - - proc/turn_on() - if(!isturf(loc)) - return - - beam = new(loc, dir, wavelength, 1, 1) - beam.master = src - - proc/turn_off() - if(beam) - beam.remove() - - dropped() - turn_off() - turn_on() - - proc/updateicon() - icon_state = "pointer[on]" \ No newline at end of file diff --git a/code/unused/optics/mirror.dm b/code/unused/optics/mirror.dm deleted file mode 100644 index c50d3efc044..00000000000 --- a/code/unused/optics/mirror.dm +++ /dev/null @@ -1,83 +0,0 @@ -// Mirror object -// Part of the optics system -// -// reflects laser beams -// 16 directional states 0/22.5/45/67.5deg to allow for 0/45deg beam angles - - -// ideas: -// frame/stand icon w/ mirror directional overlay -// two sets of overlay icons for 0/45 and 22.5/67.5 deg angles - -// can rotate cw/acw - need screwdriver to loosen/tighten mirror -// use wrench to anchor/unanchor frame -// if touched, gets dirty - fingerprints, which reduce reflectivity -// if dirty and hit with high-power beam, mirror may shatter -// some kind of dust accumulation with HasProximity? Could check for mob w/o labcoat etc. -// can clean with acetone+wipes - -/obj/optical/mirror - icon = 'optical.dmi' - icon_state = "mirrorA" - dir = 1 - desc = "A large, optical-grade mirror firmly mounted on a stand." - flags = FPRINT - anchored = 0 - var/rotatable = 0 // true if mirror can be rotated - var/angle = 0 // normal of mirror, 0-15. 0=N, 1=NNE, 2=NE, 3=ENE, 4=E etc - - - New() - ..() - set_angle() - - - - //set the angle from icon_state and dir - proc/set_angle() - switch(dir) - if(1) - angle = 0 - if(5) - angle = 2 - if(4) - angle = 4 - if(6) - angle = 6 - if(2) - angle = 8 - if(10) - angle = 10 - if(8) - angle = 12 - if(9) - angle = 14 - - if(icon_state == "mirrorB") // 22.5deg turned states - angle++ - return - - // set the dir and icon_state from the angle - proc/set_dir() - if(angle%2 == 1) - icon_state = "mirrorB" - else - icon_state = "mirrorA" - switch(round(angle/2)*2) - if(0) - dir = 1 - if(2) - dir = 5 - if(4) - dir = 4 - if(6) - dir = 6 - if(8) - dir = 2 - if(10) - dir = 10 - if(12) - dir = 8 - if(14) - dir = 9 - return \ No newline at end of file diff --git a/code/unused/pain.dm b/code/unused/pain.dm deleted file mode 100644 index 09ac590ee1f..00000000000 --- a/code/unused/pain.dm +++ /dev/null @@ -1,56 +0,0 @@ -mob/proc/flash_pain() -// flick("pain",pain) - return - -mob/var/list/pain_stored = list() -mob/var/last_pain_message = "" -mob/var/next_pain_time = 0 - -// partname is the name of a body part -// amount is a num from 1 to 100 -mob/proc/pain(var/partname, var/amount, var/force) - if(stat >= 2) return - if(world.time < next_pain_time && !force) - return - if(amount > 10 && istype(src,/mob/living/carbon/human)) - if(src:paralysis) - src:paralysis = max(0, src:paralysis-round(amount/10)) - if(amount > 50 && prob(amount / 5)) - src:drop_item() - /* - switch(amount) - if(1 to 10) - msg = "Your [partname] hurts a bit." - if(11 to 90) -// flash_weak_pain() - msg = "Ouch! Your [partname] hurts." - if(91 to 10000) - flash_pain() - msg = "OH GOD! Your [partname] is hurting terribly!" - - if(msg && (msg != last_pain_message || prob(10))) - last_pain_message = msg - src << msg - -*/ - next_pain_time = world.time + (100 - amount) - -mob/living/carbon/human/proc/handle_pain() - // not when sleeping - if(stat >= 2) return - if(reagents.has_reagent("tramadol")) - return - if(reagents.has_reagent("oxycodone")) - return - var/maxdam = 0 - var/obj/item/organ/limb/damaged_organ = null - for(var/name in organs) - var/obj/item/organ/limb/E = organs[name] - var/dam = E.get_damage() - // make the choice of the organ depend on damage, - // but also sometimes use one of the less damaged ones - if(dam > maxdam && (maxdam == 0 || prob(70)) ) - damaged_organ = E - maxdam = dam - if(damaged_organ) - pain(damaged_organ.display_name, maxdam, 0) diff --git a/code/unused/pda2/base_os.dm b/code/unused/pda2/base_os.dm deleted file mode 100644 index e75edc1cf99..00000000000 --- a/code/unused/pda2/base_os.dm +++ /dev/null @@ -1,446 +0,0 @@ -/datum/computer/file/pda_program/os - proc - receive_os_command(list/command_list) - if((!src.holder) || (!src.master) || (!command_list) || !(command_list["command"])) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - return 0 - -//Main os program: Provides old pda interface and four programs including file browser, notes, messenger, and atmos scan - main_os - name = "ThinkOS 7" - size = 8.0 - var/mode = 0 - //Note vars - var/note = "Congratulations, your station has chosen the Thinktronic 5150 Personal Data Assistant!" - var/note_mode = 0 //0 For note editor, 1 for note browser - var/datum/computer/file/text/note_file = null //If set, save to this file. - //Messenger vars - var/list/detected_pdas = list() - var/message_on = 1 - var/message_silent = 0 //To beep or not to beep, that is the question - var/message_mode = 0 //0 for pda list, 1 for messages - var/message_tone = "beep" //Custom ringtone - var/message_note = null //Current messages in memory (Store as separate file only later??) - //File browser vars - var/datum/computer/folder/browse_folder = null - var/datum/computer/file/clipboard = null //Current file to copy - - - - receive_os_command(list/command_list) - if(..()) - return - - //world << "[command_list["command"]]" - return - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - switch(src.mode) - if(0) - dat += "

PERSONAL DATA ASSISTANT

" - dat += "Owner: [src.master.owner]

" - - dat += "

General Functions

" - dat += "" - - dat += "

Utilities

" - dat += "" - - if(1) - //Note Program. Can save/load note files. - dat += "

Notekeeper V2.5

" - - if(!src.note_mode) - dat += "Edit" - dat += " | New File" - dat += " | Save" - dat += " | Load
" - - dat += src.note - else - dat += " Back" - dat += " | \[[src.holding_folder.holder.file_amount - src.holding_folder.holder.file_used]\] Free
" - dat += "" - - for(var/datum/computer/file/text/T in src.holding_folder.contents) - dat += "" - dat += "" - dat += "" - - dat += "
[T.name][T.extension]Length: [T.data ? (length(T.data)) : "0"]
" - - if(2) - //Messenger. Uses Radio. Is a messenger. - //TO-DO: ~file sharing~ - src.master.overlays.Cut() //Remove existing alerts - dat += "

SpaceMessenger V4.0.5

" - - if (!src.message_mode) - - dat += "Ringer: [src.message_silent == 1 ? "Off" : "On"] | " - dat += "Send / Receive: [src.message_on == 1 ? "On" : "Off"] | " - dat += "Set Ringtone | " - dat += "Messages
" - - dat += "Scan
" - dat += "Detected PDAs
" - - dat += "
    " - - var/count = 0 - - if (src.message_on) - for (var/obj/item/device/pda2/P in src.detected_pdas) - if (!P.owner) - src.detected_pdas -= P - continue - else if (P == src) //I guess this can happen if somebody copies the system file. - src.detected_pdas -= P - continue - - dat += "
  • [P]" - - dat += "
  • " - count++ - - dat += "
" - - if (count == 0) - dat += "None detected.
" - - else - dat += "Clear | " - dat += "Back
" - - dat += "

Messages

" - - dat += src.message_note - dat += "
" - - if(3) - //File Browser. - //To-do(?): Setting "favorite" programs to access straight from main menu - //Not sure how needed it is, not like they have to go through 500 subfolders or whatever - if((!src.browse_folder) || !(src.browse_folder.holder in src.master)) - src.browse_folder = src.holding_folder - - dat += " | Paste" - dat += " | Drive: " - dat += "\[[src.browse_folder.holder == src.master.hd ? "MAIN" : "CART"]\]
" - - dat += "Contents of [browse_folder] | Drive ID:\[[src.browse_folder.holder.title]]
" - dat += "Used: \[[src.browse_folder.holder.file_used]/[src.browse_folder.holder.file_amount]\]
" - - dat += "" - for(var/datum/computer/file/F in browse_folder.contents) - if(F == src) - dat += "" - continue - dat += "" - dat += "" - - dat += "" - - dat += "" - dat += "" - - dat += "" - - dat += "" - - dat += "
SystemSize: [src.size]SYSTEM
[F.name]Size: [F.size][F.extension]DelRenameCopy
" - - if(4) - //Atmos Scanner - dat += "

Atmospheric Readings

" - - var/turf/T = get_turf(get_turf(src.master)) - if (isnull(T)) - dat += "Unable to obtain a reading.
" - else - var/datum/gas_mixture/environment = T.return_air() - - var/pressure = environment.return_pressure() - var/total_moles = environment.total_moles() - - dat += "Air Pressure: [round(pressure,0.1)] kPa
" - - if (total_moles) - var/o2_level = environment.oxygen/total_moles - var/n2_level = environment.nitrogen/total_moles - var/co2_level = environment.carbon_dioxide/total_moles - var/plasma_level = environment.toxins/total_moles - var/unknown_level = 1-(o2_level+n2_level+co2_level+plasma_level) - - dat += "Nitrogen: [round(n2_level*100)]%
" - - dat += "Oxygen: [round(o2_level*100)]%
" - - dat += "Carbon Dioxide: [round(co2_level*100)]%
" - - dat += "Plasma: [round(plasma_level*100)]%
" - - if(unknown_level > 0.01) - dat += "OTHER: [round(unknown_level)]%
" - - dat += "Temperature: [round(environment.temperature-T0C)]°C
" - - dat += "
" - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["mode"]) - var/newmode = text2num(href_list["mode"]) - src.mode = max(newmode, 0) - - else if(href_list["flight"]) - src.master.toggle_light() - - else if(href_list["scanner"]) - if(src.master.scan_program) - src.master.scan_program = null - - else if(href_list["input"]) - switch(href_list["input"]) - if("tone") - var/t = input(usr, "Please enter new ringtone", src.name, src.message_tone) as text - if (!t) - return - - if (!src.master || !in_range(src.master, usr) && src.master.loc != usr) - return - - if(!(src.holder in src.master)) - return - - t = copytext(sanitize(t), 1, 20) - src.message_tone = t - - if("note") - var/t = input(usr, "Please enter note", src.name, src.note) as message - if (!t) - return - - if (!src.master || !in_range(src.master, usr) && src.master.loc != usr) - return - - if(!(src.holder in src.master)) - return - - t = copytext(adminscrub(t), 1, MAX_MESSAGE_LEN) - src.note = t - - - if("message") - var/obj/item/device/pda2/P = locate(href_list["target"]) - if(!P || !istype(P)) - return - - var/t = input(usr, "Please enter message", P.name, null) as text - if (!t) - return - - if (!src.master || !in_range(src.master, usr) && src.master.loc != usr) - return - - if(!(src.holder in src.master)) - return - - - var/datum/signal/signal = new - signal.data["command"] = "text message" - signal.data["message"] = t - signal.data["sender"] = src.master.owner - signal.data["tag"] = "\ref[P]" - src.post_signal(signal) - src.message_note += "→ To [P.owner]:
[t]
" - log_pda("[usr] sent [t] to [P.owner]") - - if("rename") - var/datum/computer/file/F = locate(href_list["target"]) - if(!F || !istype(F)) - return - - var/t = input(usr, "Please enter new name", src.name, F.name) as text - t = copytext(sanitize(t), 1, 16) - if (!t) - return - if (!in_range(src.master, usr) || !(F.holder in src.master)) - return - if(F.holder.read_only) - return - F.name = capitalize(lowertext(t)) - - - else if(href_list["message_func"]) //Messenger specific topic junk - switch(href_list["message_func"]) - if("ringer") - src.message_silent = !src.message_silent - if("on") - src.message_on = !src.message_on - if("clear") - src.message_note = null - if("scan") - if(src.message_on) - src.detected_pdas = list() - var/datum/signal/signal = new - signal.data["command"] = "report pda" - src.post_signal(signal) - - else if(href_list["note_func"]) //Note program specific topic junk - switch(href_list["note_func"]) - if("new") - src.note_file = null - src.note = null - if("save") - if(src.note_file && src.note_file.holder in src.master) - src.note_file.data = src.note - else - var/datum/computer/file/text/F = new /datum/computer/file/text - if(!src.holding_folder.add_file(F)) - del(F) - else - src.note_file = F - F.data = src.note - - if("load") - var/datum/computer/file/text/T = locate(href_list["target"]) - if(!T || !istype(T)) - return - - src.note_file = T - src.note = note_file.data - src.note_mode = 0 - - if("switchmenu") - src.note_mode = !src.note_mode - - else if(href_list["browse_func"]) //File browser specific topic junk - var/datum/computer/target = locate(href_list["target"]) - switch(href_list["browse_func"]) - if("drive") - if(src.browse_folder.holder == src.master.hd && src.master.cartridge && (src.master.cartridge.root)) - src.browse_folder = src.master.cartridge.root - else - src.browse_folder = src.holding_folder - if("open") - if(!target || !istype(target)) - return - if(istype(target, /datum/computer/file/pda_program)) - if(istype(target,/datum/computer/file/pda_program/os) && (src.master.host_program)) - return - else - src.master.run_program(target) - src.master.updateSelfDialog() - return - - if("delete") - if(!target || !istype(target)) - return - src.master.delete_file(target) - - if("copy") - if(istype(target,/datum/computer/file) && (!target.holder || (target.holder in src.master.contents))) - src.clipboard = target - - if("paste") - if(istype(target,/datum/computer/folder)) - if(!src.clipboard || !src.clipboard.holder || !(src.clipboard.holder in src.master.contents)) - return - - if(!istype(src.clipboard)) - return - - src.clipboard.copy_file_to_folder(target) - - - else if(href_list["message_mode"]) - var/newmode = text2num(href_list["message_mode"]) - src.message_mode = max(newmode, 0) - - src.master.add_fingerprint(usr) - src.master.updateSelfDialog() - return - - receive_signal(datum/signal/signal) - if(..()) - return - - switch(signal.data["command"]) - if("text message") - if(!message_on || !signal.data["message"]) - return - var/sender = signal.data["sender"] - if(!sender) - sender = "!Unknown!" - - src.message_note += "← From [sender]:
[signal.data["message"]]
" - var/alert_beep = null //Don't beep if set to silent. - if(!src.message_silent) - alert_beep = src.message_tone - - src.master.display_alert(alert_beep) - src.master.updateSelfDialog() - - if("report pda") - if(!message_on) - return - - var/datum/signal/newsignal = new - newsignal.data["command"] = "reporting pda" - newsignal.data["tag"] = "\ref[signal.source]" - src.post_signal(newsignal) - - if("reporting pda") - if(!detected_pdas) - detected_pdas = new() - - if(!(signal.source in detected_pdas)) - detected_pdas += signal.source - - src.master.updateSelfDialog() - - return - - return_text_header() - if(!src.master) - return - - var/dat - - if(src.mode) - dat += " | Main Menu" - - else if (!isnull(src.master.cartridge)) - dat += " | Eject [src.master.cartridge]" - - dat += " | Refresh" - - return dat \ No newline at end of file diff --git a/code/unused/pda2/base_program.dm b/code/unused/pda2/base_program.dm deleted file mode 100644 index ab06e16f806..00000000000 --- a/code/unused/pda2/base_program.dm +++ /dev/null @@ -1,185 +0,0 @@ -//Eventual plan: Convert all datum/data to datum/computer/file -/datum/computer/file/text - name = "text" - extension = "TEXT" - size = 2.0 - var/data = null - -/datum/computer/file/record - name = "record" - extension = "REC" - - var/list/fields = list() - - -//base pda program - -/datum/computer/file/pda_program - name = "blank program" - extension = "PPROG" - var/obj/item/device/pda2/master = null - var/id_tag = null - - os - name = "blank system program" - extension = "PSYS" - - scan - name = "blank scan program" - extension = "PSCAN" - - New(obj/holding as obj) - if(holding) - src.holder = holding - - if(istype(src.holder.loc,/obj/item/device/pda2)) - src.master = src.holder.loc - - proc - return_text() - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - //world << "Holder [holder] not in [master] of prg:[src]" - if(master.active_program == src) - master.active_program = null - return 1 - - if(!src.holder.root) - src.holder.root = new /datum/computer/folder - src.holder.root.holder = src - src.holder.root.name = "root" - - return 0 - - process() //This isn't actually used at the moment - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - if(!src.holder.root) - src.holder.root = new /datum/computer/folder - src.holder.root.holder = src - src.holder.root.name = "root" - - return 0 - - //maybe remove this, I haven't found a good use for it yet - send_os_command(list/command_list) - if(!src.master || !src.holder || src.master.host_program || !command_list) - return 1 - - if(!istype(src.master.host_program) || src.master.host_program == src) - return 1 - - src.master.host_program.receive_os_command() - - return 0 - - return_text_header() - if(!src.master || !src.holder) - return - - var/dat = " | Main Menu" - dat += " | Refresh" - - return dat - - post_signal(datum/signal/signal, newfreq) - if(master) - master.post_signal(signal, newfreq) - else - del(signal) - - transfer_holder(obj/item/weapon/disk/data/newholder,datum/computer/folder/newfolder) - - if((newholder.file_used + src.size) > newholder.file_amount) - return 0 - - if(!newholder.root) - newholder.root = new /datum/computer/folder - newholder.root.holder = newholder - newholder.root.name = "root" - - if(!newfolder) - newfolder = newholder.root - - if((src.holder && src.holder.read_only) || newholder.read_only) - return 0 - - if((src.holder) && (src.holder.root)) - src.holder.root.remove_file(src) - - newfolder.add_file(src) - - if(istype(newholder.loc,/obj/item/device/pda2)) - src.master = newholder.loc - - //world << "Setting [src.holder] to [newholder]" - src.holder = newholder - return 1 - - - receive_signal(datum/signal/signal) - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - return 0 - - - Topic(href, href_list) - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(src.master.active_program != src) - return 1 - - if ((!usr.contents.Find(src.master) && (!in_range(src.master, usr) || !istype(src.master.loc, /turf))) && (!istype(usr, /mob/living/silicon))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - usr.machine = src.master - - if (href_list["close"]) - usr.machine = null - usr << browse(null, "window=pda2") - return 0 - - if (href_list["quit"]) -// src.master.processing_programs.Remove(src) - if(src.master.host_program && src.master.host_program.holder && (src.master.host_program.holder in src.master.contents)) - src.master.run_program(src.master.host_program) - src.master.updateSelfDialog() - return 1 - else - src.master.active_program = null - src.master.updateSelfDialog() - return 1 - - return 0 \ No newline at end of file diff --git a/code/unused/pda2/pda2.dm b/code/unused/pda2/pda2.dm deleted file mode 100644 index 41402a50e16..00000000000 --- a/code/unused/pda2/pda2.dm +++ /dev/null @@ -1,297 +0,0 @@ -//The advanced pea-green monochrome lcd of tomorrow. - - -//TO-DO: rearrange all this disk/data stuff so that fixed disks are the parent type -//because otherwise you have carts going into floppy drives and it's ALL MAD -/obj/item/weapon/disk/data/cartridge - name = "Cart 2.0" - desc = "A data cartridge for portable microcomputers." - icon = 'icons/obj/pda.dmi' - icon_state = "cart" - item_state = "electronic" - file_amount = 80.0 - title = "ROM Cart" - - pda2test - name = "Test Cart" - New() - ..() - src.root.add_file( new /datum/computer/file/computer_program/arcade(src)) - src.root.add_file( new /datum/computer/file/pda_program/manifest(src)) - src.root.add_file( new /datum/computer/file/pda_program/status_display(src)) - src.root.add_file( new /datum/computer/file/pda_program/signaler(src)) - src.root.add_file( new /datum/computer/file/pda_program/qm_records(src)) - src.root.add_file( new /datum/computer/file/pda_program/scan/health_scan(src)) - src.root.add_file( new /datum/computer/file/pda_program/records/security(src)) - src.root.add_file( new /datum/computer/file/pda_program/records/medical(src)) - src.read_only = 1 - - -/obj/item/device/pda2 - name = "PDA" - desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by an EEPROM cartridge." - icon = 'icons/obj/pda.dmi' - icon_state = "pda" - item_state = "electronic" - w_class = 2.0 - flags = FPRINT | TABLEPASS | ONBELT - - var/owner = null - var/default_cartridge = null // Access level defined by cartridge - var/obj/item/weapon/disk/data/cartridge/cartridge = null //current cartridge - var/datum/computer/file/pda_program/active_program = null - var/datum/computer/file/pda_program/os/host_program = null - var/datum/computer/file/pda_program/scan/scan_program = null - var/obj/item/weapon/disk/data/fixed_disk/hd = null - var/fon = 0 //Is the flashlight function on? - var/f_lum = 3 //Luminosity for the flashlight function -// var/datum/data/record/active1 = null //General -// var/datum/data/record/active2 = null //Medical -// var/datum/data/record/active3 = null //Security -// var/obj/item/weapon/integrated_uplink/uplink = null //Maybe replace uplink with some remote ~syndicate~ server - var/frequency = 1149 - var/datum/radio_frequency/radio_connection - - var/setup_default_cartridge = null //Cartridge contains job-specific programs - var/setup_drive_size = 24.0 //PDAs don't have much work room at all, really. - var/setup_system_os_path = /datum/computer/file/pda_program/os/main_os //Needs an operating system to...operate!! - - -/obj/item/device/pda2/pickup(mob/user) - if (src.fon) - src.sd_SetLuminosity(0) - user.sd_SetLuminosity(user.luminosity + src.f_lum) - -/obj/item/device/pda2/dropped(mob/user) - if (src.fon) - user.sd_SetLuminosity(user.luminosity - src.f_lum) - src.sd_SetLuminosity(src.f_lum) - -/obj/item/device/pda2/New() - ..() - spawn(5) - src.hd = new /obj/item/weapon/disk/data/fixed_disk(src) - src.hd.file_amount = src.setup_drive_size - src.hd.name = "Minidrive" - src.hd.title = "Minidrive" - - if(src.setup_system_os_path) - src.host_program = new src.setup_system_os_path - - src.hd.file_amount = max(src.hd.file_amount, src.host_program.size) - - src.host_program.transfer_holder(src.hd) - - if(radio_controller) - radio_controller.add_object(src, frequency) - - - if (src.default_cartridge) - src.cartridge = new src.setup_default_cartridge(src) -// if(src.owner) -// processing_items.Add(src) - -/obj/item/device/pda2/attack_self(mob/user as mob) - user.machine = src - - var/dat = "Personal Data Assistant" - - dat += "Close" - - if (!src.owner) - if(src.cartridge) - dat += " | Eject [src.cartridge]" - dat += "
Warning: No owner information entered. Please swipe card.

" - dat += "Retry" - else - if(src.active_program) - dat += src.active_program.return_text() - else - if(src.host_program) - src.run_program(src.host_program) - dat += src.active_program.return_text() - else - if(src.cartridge) - dat += " | Eject [src.cartridge]
" - dat += "
Fatal Error 0x17
" - dat += "No System Software Loaded
" - //To-do: System recovery shit (maybe have a dedicated computer for this kind of thing) - - - user << browse(dat,"window=pda2") - onclose(user,"pda2") - return - -/obj/item/device/pda2/Topic(href, href_list) - ..() - - if (usr.contents.Find(src) || usr.contents.Find(src.master) || (istype(src.loc, /turf) && get_dist(src, usr) <= 1)) - if (usr.stat || usr.restrained()) - return - - src.add_fingerprint(usr) - usr.machine = src - - - if(href_list["return_to_host"]) - if(src.host_program) - src.active_program = src.host_program - src.host_program = null - - else if (href_list["eject_cart"]) - src.eject_cartridge() - - else if (href_list["refresh"]) - src.updateSelfDialog() - - else if (href_list["close"]) - usr << browse(null, "window=pda2") - usr.machine = null - - src.updateSelfDialog() - return - -/obj/item/device/pda2/attackby(obj/item/weapon/C as obj, mob/user as mob) - if (istype(C, /obj/item/weapon/disk/data/cartridge) && isnull(src.cartridge)) - user.drop_item() - C.loc = src - user << "\blue You insert [C] into [src]." - src.cartridge = C - src.updateSelfDialog() - - else if (istype(C, /obj/item/weapon/card/id) && !src.owner && C:registered_name) - src.owner = C:registered_name - src.name = "PDA-[src.owner]" - user << "\blue Card scanned." - src.updateSelfDialog() - -/obj/item/device/pda2/receive_signal(datum/signal/signal) - if(!signal || signal.encryption || !src.owner) return - - if(signal.data["tag"] && signal.data["tag"] != "\ref[src]") return - - if(src.host_program) - src.host_program.receive_signal(signal) - - if(src.active_program && (src.active_program != src.host_program)) - src.host_program.receive_signal(signal) - - return - -/obj/item/device/pda2/attack(mob/M as mob, mob/user as mob) - if(src.scan_program) - return - else - ..() - -/obj/item/device/pda2/afterattack(atom/A as mob|obj|turf|area, mob/user as mob) - var/scan_dat = null - if(src.scan_program && istype(src.scan_program)) - scan_dat = src.scan_program.scan_atom(A) - - if(scan_dat) - A.visible_message("\red [user] has scanned [A]!") - user.show_message(scan_dat, 1) - - return - - -/obj/item/device/pda2/proc - - post_signal(datum/signal/signal,var/newfreq) - if(!signal) - return - var/freq = newfreq - if(!freq) - freq = src.frequency - - signal.source = src - - var/datum/radio_frequency/frequency = radio_controller.return_frequency(freq) - - signal.transmission_method = TRANSMISSION_RADIO - if(frequency) - return frequency.post_signal(src, signal) - else - del(signal) - - eject_cartridge() - if(src.cartridge) - var/turf/T = get_turf(src) - - if(src.active_program && (src.active_program.holder == src.cartridge)) - src.active_program = null - - if(src.host_program && (src.host_program.holder == src.cartridge)) - src.host_program = null - - if(src.scan_program && (src.scan_program.holder == src.cartridge)) - src.scan_program = null - - src.cartridge.loc = T - src.cartridge = null - - return - - //Toggle the built-in flashlight - toggle_light() - src.fon = (!src.fon) - - if (ismob(src.loc)) - if (src.fon) - src.loc.sd_SetLuminosity(src.loc.luminosity + src.f_lum) - else - src.loc.sd_SetLuminosity(src.loc.luminosity - src.f_lum) - else - src.sd_SetLuminosity(src.fon * src.f_lum) - - src.updateSelfDialog() - - display_alert(var/alert_message) //Add alert overlay and beep - if (alert_message) - playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1) - for (var/mob/O in hearers(3, src.loc)) - O.show_message(text("\icon[src] *[alert_message]*")) - - src.overlays.Cut() - src.overlays += image('icons/obj/pda.dmi', "pda-r") - return - - run_program(datum/computer/file/pda_program/program) - if((!program) || (!program.holder)) - return 0 - - if(!(program.holder in src)) - // world << "Not in src" - program = new program.type - program.transfer_holder(src.hd) - - if(program.master != src) - program.master = src - - if(!src.host_program && istype(program, /datum/computer/file/pda_program/os)) - src.host_program = program - - if(istype(program, /datum/computer/file/pda_program/scan)) - if(program == src.scan_program) - src.scan_program = null - else - src.scan_program = program - return 1 - - src.active_program = program - return 1 - - delete_file(datum/computer/file/file) - //world << "Deleting [file]..." - if((!file) || (!file.holder) || (file.holder.read_only)) - //world << "Cannot delete :(" - return 0 - - //Don't delete the running program you jerk - if(src.active_program == file || src.host_program == file) - src.active_program = null - - //world << "Now calling del on [file]..." - del(file) - return 1 \ No newline at end of file diff --git a/code/unused/pda2/record_progs.dm b/code/unused/pda2/record_progs.dm deleted file mode 100644 index 2ea856c93e2..00000000000 --- a/code/unused/pda2/record_progs.dm +++ /dev/null @@ -1,181 +0,0 @@ -//CONTENTS: -//Generic records -//Security records -//Medical records - - -/datum/computer/file/pda_program/records - var/mode = 0 - var/datum/data/record/active1 = null //General - var/datum/data/record/active2 = null //Security/Medical/Whatever - -//To-do: editing arrest status/etc from pda. -/datum/computer/file/pda_program/records/security - name = "Security Records" - size = 12.0 - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - switch(src.mode) - if(0) - dat += "

Security Record List

" - - for (var/datum/data/record/R in data_core.general) - dat += "[R.fields["id"]]: [R.fields["name"]]
" - - dat += "
" - - if(1) - - dat += "

Security Record

" - - dat += "
Back
" - - if (istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)) - dat += "Name: [src.active1.fields["name"]] ID: [src.active1.fields["id"]]
" - dat += "Sex: [src.active1.fields["sex"]]
" - dat += "Age: [src.active1.fields["age"]]
" - dat += "Fingerprint: [src.active1.fields["fingerprint"]]
" - dat += "Physical Status: [src.active1.fields["p_stat"]]
" - dat += "Mental Status: [src.active1.fields["m_stat"]]
" - else - dat += "Record Lost!
" - - dat += "
" - - dat += "

Security Data

" - if (istype(src.active2, /datum/data/record) && data_core.security.Find(src.active2)) - dat += "Criminal Status: [src.active2.fields["criminal"]]
" - - dat += "Minor Crimes: [src.active2.fields["mi_crim"]]
" - dat += "Details: [src.active2.fields["mi_crim"]]

" - - dat += "Major Crimes: [src.active2.fields["ma_crim"]]
" - dat += "Details: [src.active2.fields["ma_crim_d"]]

" - - dat += "Important Notes:
" - dat += "[src.active2.fields["notes"]]" - else - dat += "Record Lost!
" - - dat += "
" - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["mode"]) - var/newmode = text2num(href_list["mode"]) - src.mode = max(newmode, 0) - - else if(href_list["select_rec"]) - var/datum/data/record/R = locate(href_list["select_rec"]) - var/datum/data/record/S = locate(href_list["select_rec"]) - - if (data_core.general.Find(R)) - for (var/datum/data/record/E in data_core.security) - if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) - S = E - break - - src.active1 = R - src.active2 = S - - src.mode = 1 - - src.master.add_fingerprint(usr) - src.master.updateSelfDialog() - return - -/datum/computer/file/pda_program/records/medical - name = "Medical Records" - size = 8.0 - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - switch(src.mode) - if(0) - - dat += "

Medical Record List

" - for (var/datum/data/record/R in data_core.general) - dat += "[R.fields["id"]]: [R.fields["name"]]
" - dat += "
" - - if(1) - - dat += "

Medical Record

" - - dat += "
Back
" - - if (istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)) - dat += "Name: [src.active1.fields["name"]] ID: [src.active1.fields["id"]]
" - dat += "Sex: [src.active1.fields["sex"]]
" - dat += "Age: [src.active1.fields["age"]]
" - dat += "Fingerprint: [src.active1.fields["fingerprint"]]
" - dat += "Physical Status: [src.active1.fields["p_stat"]]
" - dat += "Mental Status: [src.active1.fields["m_stat"]]
" - else - dat += "Record Lost!
" - - dat += "
" - - dat += "

Medical Data

" - if (istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)) - dat += "Blood Type: [src.active2.fields["b_type"]]

" - - dat += "Minor Disabilities: [src.active2.fields["mi_dis"]]
" - dat += "Details: [src.active2.fields["mi_dis_d"]]

" - - dat += "Major Disabilities: [src.active2.fields["ma_dis"]]
" - dat += "Details: [src.active2.fields["ma_dis_d"]]

" - - dat += "Allergies: [src.active2.fields["alg"]]
" - dat += "Details: [src.active2.fields["alg_d"]]

" - - dat += "Current Diseases: [src.active2.fields["cdi"]]
" - dat += "Details: [src.active2.fields["cdi_d"]]

" - - dat += "Important Notes: [src.active2.fields["notes"]]
" - else - dat += "Record Lost!
" - - dat += "
" - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["mode"]) - var/newmode = text2num(href_list["mode"]) - src.mode = max(newmode, 0) - - else if(href_list["select_rec"]) - var/datum/data/record/R = locate(href_list["select_rec"]) - var/datum/data/record/M = locate(href_list["select_rec"]) - - if (data_core.general.Find(R)) - for (var/datum/data/record/E in data_core.medical) - if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) - M = E - break - - src.active1 = R - src.active2 = M - - src.mode = 1 - - src.master.add_fingerprint(usr) - src.master.updateSelfDialog() - return \ No newline at end of file diff --git a/code/unused/pda2/scanners.dm b/code/unused/pda2/scanners.dm deleted file mode 100644 index 5758d13a0d6..00000000000 --- a/code/unused/pda2/scanners.dm +++ /dev/null @@ -1,101 +0,0 @@ -//CONTENTS: -//Base scanner stuff -//Health scanner -//Forensic scanner -//Reagent scanner - -/datum/computer/file/pda_program/scan - return_text() - return src.return_text_header() - - proc/scan_atom(atom/A as mob|obj|turf|area) - - if( !A || (!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - if(master.scan_program == src) - master.scan_program = null - return 1 - - return 0 - - //Health analyzer program - health_scan - name = "Health Scan" - size = 8.0 - - scan_atom(atom/A as mob|obj|turf|area) - if(..()) - return - - var/mob/living/carbon/C = A - if(!istype(C)) - return - - var/dat = "\blue Analyzing Results for [C]:\n" - dat += "\blue \t Overall Status: [C.stat > 1 ? "dead" : "[C.health]% healthy"]\n" - dat += "\blue \t Damage Specifics: [C.getOxyLoss() > 50 ? "\red" : "\blue"][C.getOxyLoss()]-[C.getToxLoss() > 50 ? "\red" : "\blue"][C.getToxLoss()]-[C.getFireLoss() > 50 ? "\red" : "\blue"][C.getFireLoss()]-[C.getBruteLoss() > 50 ? "\red" : "\blue"][C.getBruteLoss()]\n" - dat += "\blue \t Key: Suffocation/Toxin/Burns/Brute\n" - dat += "\blue \t Body Temperature: [C.bodytemperature-T0C]°C ([C.bodytemperature*1.8-459.67]°F)" - if(C.virus) - dat += "\red \nWarning Virus Detected.\nName: [C.virus.name].\nType: [C.virus.spread].\nStage: [C.virus.stage]/[C.virus.max_stages].\nPossible Cure: [C.virus.cure]" - - return dat - - //Forensic scanner - forensic_scan - name = "Forensic Scan" - size = 8.0 - - scan_atom(atom/A as mob|obj|turf|area) - if(..()) - return - var/dat = null - - if(istype(A,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = A - if (!istype(H.dna, /datum/dna) || !isnull(H.gloves)) - dat += "\blue Unable to scan [A]'s fingerprints.\n" - else - dat += "\blue [H]'s Fingerprints: [md5(H.dna.uni_identity)]\n" - if ( !(H.blood_DNA) ) - dat += "\blue No blood found on [H]\n" - else - dat += "\blue Blood type: [H.blood_type]\nDNA: [H.blood_DNA]\n" - - if (!A.fingerprints) - dat += "\blue Unable to locate any fingerprints on [A]!\n" - else - var/list/L = params2list(A:fingerprints) - dat += "\blue Isolated [L.len] fingerprints.\n" - for(var/i in L) - dat += "\blue \t [i]\n" - - return dat - - - //Reagent scanning program - reagent_scan - name = "Reagent Scan" - size = 6.0 - - scan_atom(atom/A as mob|obj|turf|area) - if(..()) - return - var/dat = null - if(!isnull(A.reagents)) - if(A.reagents.reagent_list.len > 0) - var/reagents_length = A.reagents.reagent_list.len - dat += "\blue [reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found.\n" - for (var/datum/reagent/re in A.reagents.reagent_list) - dat += "\blue \t [re] - [re.volume]\n" - else - dat = "\blue No active chemical agents found in [A]." - else - dat = "\blue No significant chemical agents found in [A]." - - return dat diff --git a/code/unused/pda2/smallprogs.dm b/code/unused/pda2/smallprogs.dm deleted file mode 100644 index 549e8fc0f52..00000000000 --- a/code/unused/pda2/smallprogs.dm +++ /dev/null @@ -1,204 +0,0 @@ -//Assorted small programs not worthy of their own file -//CONTENTS: -//Crew Manifest viewer -//Status display controller -//Remote signaling program -//Cargo orders monitor - -//Manifest -/datum/computer/file/pda_program/manifest - name = "Manifest" - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - dat += "

Crew Manifest

" - dat += "Entries cannot be modified from this terminal.

" - - for (var/datum/data/record/t in data_core.general) - dat += "[t.fields["name"]] - [t.fields["rank"]]
" - dat += "
" - - return dat - -//Status Display -/datum/computer/file/pda_program/status_display - name = "Status Controller" - size = 8.0 - var/message1 // For custom messages on the displays. - var/message2 - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - dat += "

Station Status Display Interlink

" - - dat += "\[ Clear \]
" - dat += "\[ Shuttle ETA \]
" - dat += "\[ Message \]" - - dat += "
" - dat += "\[ Alert: None |" - - dat += " Red Alert |" - dat += " Lockdown |" - dat += " Biohazard \]
" - - return dat - - - Topic(href, href_list) - if(..()) - return - - if(href_list["statdisp"]) - switch(href_list["statdisp"]) - if("message") - post_status("message", message1, message2) - if("alert") - post_status("alert", href_list["alert"]) - - if("setmsg1") - message1 = input("Line 1", "Enter Message Text", message1) as text|null - if (!src.master || !in_range(src.master, usr) && src.master.loc != usr) - return - - if(!(src.holder in src.master)) - return - src.master.updateSelfDialog() - - if("setmsg2") - message2 = input("Line 2", "Enter Message Text", message2) as text|null - if (!src.master || !in_range(src.master, usr) && src.master.loc != usr) - return - - if(!(src.holder in src.master)) - return - - src.master.updateSelfDialog() - else - post_status(href_list["statdisp"]) - - src.master.add_fingerprint(usr) - src.master.updateSelfDialog() - return - - proc/post_status(var/command, var/data1, var/data2) - if(!src.master) - return - - var/datum/signal/status_signal = new - status_signal.source = src.master - status_signal.transmission_method = 1 - status_signal.data["command"] = command - - switch(command) - if("message") - status_signal.data["msg1"] = data1 - status_signal.data["msg2"] = data2 - if("alert") - status_signal.data["picture_state"] = data1 - - src.post_signal(status_signal,"1435") - -//Signaler -/datum/computer/file/pda_program/signaler - name = "Signalix 5" - size = 8.0 - var/send_freq = 1457 //Frequency signal is sent at, should be kept within normal radio ranges. - var/send_code = 30 - var/last_transmission = 0 //No signal spamming etc - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - dat += "

Remote Signaling System

" - dat += {" -Send Signal
- -Frequency: -- -- -[format_frequency(send_freq)] -+ -+
-
-Code: -- -- -[send_code] -+ -+
"} - - return dat - - Topic(href, href_list) - if(..()) - return - - if (href_list["send"]) - if(last_transmission && world.time < (last_transmission + 5)) - return - last_transmission = world.time - spawn( 0 ) - var/time = time2text(world.realtime,"hh:mm:ss") - lastsignalers.Add("[time] : [usr.key] used [src.master] @ location ([src.master.loc.x],[src.master.loc.y],[src.master.loc.z]) : [format_frequency(send_freq)]/[send_code]") - - var/datum/signal/signal = new - signal.source = src - signal.encryption = send_code - signal.data["message"] = "ACTIVATE" - - src.post_signal(signal,"[send_freq]") - return - - else if (href_list["adj_freq"]) - src.send_freq = sanitize_frequency(src.send_freq + text2num(href_list["adj_freq"])) - - else if (href_list["adj_code"]) - src.send_code += text2num(href_list["adj_code"]) - src.send_code = round(src.send_code) - src.send_code = min(100, src.send_code) - src.send_code = max(1, src.send_code) - - src.master.add_fingerprint(usr) - src.master.updateSelfDialog() - return - -//Supply record monitor -/datum/computer/file/pda_program/qm_records - name = "Supply Records" - size = 8.0 - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - dat += "

Supply Record Interlink

" - - dat += "
Supply shuttle
" - dat += "Location: [supply_shuttle_moving ? "Moving to station ([supply_shuttle_timeleft] Mins.)":supply_shuttle_at_station ? "Station":"Dock"]
" - dat += "Current approved orders:
    " - for(var/S in supply_shuttle_shoppinglist) - var/datum/supply_order/SO = S - dat += "
  1. [SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]
  2. " - dat += "
" - - dat += "Current requests:
    " - for(var/S in supply_shuttle_requestlist) - var/datum/supply_order/SO = S - dat += "
  1. [SO.object.name] requested by [SO.orderedby]
  2. " - dat += "
Upgrade NOW to Space Parts & Space Vendors PLUS for full remote order control and inventory management." - - return dat diff --git a/code/unused/pipe.dm b/code/unused/pipe.dm deleted file mode 100644 index d8ee5fd7826..00000000000 --- a/code/unused/pipe.dm +++ /dev/null @@ -1,1832 +0,0 @@ -// pipeline datum for storing inter-machine links -// create a pipeline - -//number of pipelines -var/linenums = 0 - -/obj/machinery/pipeline/New() - ..() - - gas = new /datum/gas_mixture() - ngas = new /datum/gas_mixture() - - gasflowlist += src - -// find the pipeline that contains the /obj/machine (including pipe) -/proc/findline(var/obj/machinery/M) - - for(var/obj/machinery/pipeline/P in plines) - - for(var/obj/machinery/O in P.nodes) - - if(M==O) - return P - - return null - -// sets the vnode1&2 terminators to the joining machines (or null) -/obj/machinery/pipeline/proc/setterm() - - //first make sure pipes are oriented correctly - - var/obj/machinery/M = null - - for(var/obj/machinery/pipes/P in nodes) - if(!M) // special case for 1st pipe - if(P.node1 && P.node1.ispipe()) - P.flip() // flip if node1 is a pipe - else - if(P.node1 != M) //other cases, flip if node1 doesn't point to previous node - P.flip() // (including if it is null) - - - M = P - - - // pipes are now ordered so that n1/n2 is in same order as pipeline list - - var/obj/machinery/pipes/P = nodes[1] // 1st node in list - vnode1 = P.node1 // n1 points to 1st machine - P = nodes[nodes.len] // last node in list - vnode2 = P.node2 // n2 points to last machine - - if(vnode1) - vnode1.buildnodes() - if(vnode2) - vnode2.buildnodes() - - return - -/* -/obj/machinery/pipeline/get_gas_moles(from) - return gas.total_moles()/capmult -*/ -/obj/machinery/pipeline/get_gas(from) - return gas - -/obj/machinery/pipeline/gas_flow() - //if(suffix == "d" && Debug) world.log << "PLF1 [gas.total_moles()] ~ [ngas.total_moles()]" - - gas.copy_from(ngas) - - //if(suffix == "d" && Debug) world.log << "PLF2 [gas.total_moles()] ~ [ngas.total_moles()]" - -/obj/machinery/pipeline/process() - /* - // heat exchange for whole pipeline - - //if(suffix=="dbgp") - // world.log << "PLP" - // Plasma() - -// var/dbg = (suffix == "d") && Debug - - //if(dbg) world.log << "PLP1 [gas.total_moles()] ~ [ngas.total_moles()]" - - if(!numnodes) - return //dividing by zero is bad okay? - - var/gtemp = ngas.temperature // cached temperature for heat exch calc - var/tot_node = ngas.total_moles() / numnodes // fraction of gas in this node - - //if(dbg) world.log << "PLHE: [gtemp] [tot_node]" - - if(tot_node>0.1) // no pipe contents, don't heat - for(var/obj/machinery/pipes/P in src.nodes) // for each segment of pipe - P.heat_exchange(ngas, tot_node, numnodes, gtemp) //, dbg) // exchange heat with its turf - if(!istype(P, /obj/machinery/pipes/heat_exch) && ((100*tot_node/P.capacity > 15000) || (gtemp > 8000)) ) - P.rupture() - //Commenting this out because it spams on endlessly - //for (var/mob/M in viewers(P)) - //M.show_message("\red The pipe has ruptured!", 3) - //so this is changed to pipe rupturing instead of explosions - //i.e. it ruptures if the pressure over 15000% - //and temperature over 8000K - //it also doesn't work on heat_exchange pipes - // now do standard gas flow proc - - - //if(dbg) world.log << "PLP2 [ngas.total_moles()]" - - var/delta_gt - - if(vnode1 && !(vnode1.stat & BROKEN)) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas.total_moles() / capmult) - calc_delta( src, gas, ngas, vnode1, delta_gt)//, dbg) - - //if(dbg) world.log << "PLT1 [delta_gt] >> [gas.total_moles()] ~ [ngas.total_moles()]" - - flow = delta_gt - else - leak_to_turf(1) - - if(vnode2 && !(vnode2.stat & BROKEN)) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas.total_moles() / capmult) - calc_delta( src, gas, ngas, vnode2, delta_gt)//, dbg) - - //if(dbg) world.log << "PLT2 [delta_gt] >> [gas.total_moles()] ~ [ngas.total_moles()]" - - flow -= delta_gt - else - leak_to_turf(2) - - */ //TODO: FIX - -/obj/machinery/pipeline/proc/leak_to_turf(var/port) - /* - var/turf/T - var/obj/machinery/pipes/P - var/list/ndirs - - switch(port) - if(1) - P = nodes[1] // 1st node in list - if (P==null) - T = src.loc - else - ndirs = P.get_node_dirs() - - T = get_step(P, ndirs[1]) - - - if(2) - P = nodes[nodes.len] // last node in list - if (P==null) - T = src.loc - else - - ndirs = P.get_node_dirs() - T = get_step(P, ndirs[2]) - if (T==null) - return - if(T.density) - return - - flow_to_turf(gas, ngas, T) - */ //TODO: FIX - - -// build the pipelines (THIS HAPPENS ONCE!) -/proc/makepipelines() - - for(var/obj/machinery/pipes/P in machines) // look for a pipe - - if(!P.plnum) // if not already part of a line - P.buildnodes(++linenums) // add it, and spread to all connected pipes - - //world.log<<"Line #[linecount] started at [P] ([P.x],[P.y],[P.z])" - - for(var/L = 1 to linenums) // for count of lines found - var/obj/machinery/pipeline/PL = new() // make a pipeline virtual object - PL.name = "pipeline #[L]" - plines += PL // and add it to the list - PL.linenumber = L - - - - for(var/obj/machinery/pipes/P in machines) // look for pipes - - if(P.termination) // true if pipe is terminated (ends in blank or a machine) - var/obj/machinery/pipeline/PL = plines[P.plnum] // get the pipeline from the pipe's pl-number - - var/list/pipes = pipelist(null, P) // get a list of pipes from P until terminated - - PL.nodes = pipes // pipeline is this list of nodes - PL.numnodes = pipes.len // with this many nodes - PL.capmult = PL.numnodes+1 // with this flow multiplier - - - - for(var/obj/machinery/pipes/P in machines) // all pipes - P.setline() // set the pipeline object for this pipe - - if(P.tag == "dbg") //add debug tag to line containing debug pipe - P.parent.tag = "dbg" - - if(P.suffix == "dbgpp") //add debug tag to line containing debug pipe - P.parent.suffix = "dbgp" - - if(P.suffix == "d") //add debug tag to line containing debug pipe - P.parent.suffix = "d" - - - for(var/obj/machinery/M in machines) // for all machines - if(M.p_dir) // which are pipe-connected - if(!M.ispipe()) // is not a pipe itself - M.buildnodes() // build the nodes, setting the links to the virtual pipelines - // also sets the vnodes for the pipelines - - for(var/obj/machinery/pipeline/PL in plines) // for all lines - PL.setterm() // orient the pipes and set the pipeline vnodes to the terminating machines - -// return a list of pipes (not including terminating machine) - -/proc/pipelist(var/obj/machinery/source, var/obj/machinery/startnode) - - var/list/L = list() - - var/obj/machinery/node = startnode - var/obj/machinery/prev = source - var/obj/machinery/newnode - - while(node) - L += node - newnode = node.next(prev) - prev = node - - if(newnode && newnode.ispipe()) - node = newnode - else - break - - return L - -// new pipes system - -// flip the nodes of a pipe -/obj/machinery/pipes/proc/flip() - var/obj/machinery/tempnode = node1 - node1 = node2 - node2 = tempnode - return - - -// return the next pipe in the node chain -/obj/machinery/pipes/next(var/obj/machinery/from) - - if(from == null) // if from null, then return the next actual pipe - if(node1 && node1.ispipe() ) - return node1 - if(node2 && node2.ispipe() ) - return node2 - return null // else return null if no real pipe connected - - else if(from == node1) // otherwise, return the node opposite the incoming one - return node2 - else - return node1 - - -// set the pipeline obj from the pl-number and global list of pipelines - -/obj/machinery/pipes/setline() - src.parent = plines[plnum] - return - -// returns the pipeline that this line is in - -/obj/machinery/pipes/getline() - return parent - -/obj/machinery/pipes/orient_pipe(P as obj) - if (!( src.node1 )) - src.node1 = P - else - if (!( src.node2 )) - src.node2 = P - else - return 0 - return 1 - -// returns a list of dir1, dir2 & p_dir for a pipe - -/obj/machinery/pipes/proc/get_dirs() - var/b1 - var/b2 - - for(var/d in cardinal) - if(p_dir & d) - if(!b1) - b1 = d - else if(!b2) - b2 = d - - return list(b1, b2, p_dir) - -// returns a list of the directions of a pipe, matched to nodes (if present) - -/obj/machinery/pipes/proc/get_node_dirs() - var/list/dirs = get_dirs() - - - if(!node1 && !node2) // no nodes - just return the standard dirs - return dirs // note extra p_dir on end of list is unimportant - else - if(node1) - var/d1 = get_dir(src, node1) // find the direction of node1 - if(d1==dirs[1]) // if it matches - return dirs // then dirs list is correct - else - return list(dirs[2], dirs[1]) // otherwise return the list swapped - - else // node2 must be valid - var/d2 = get_dir(src, node2) // direction of node2 - if(d2==dirs[2]) // matches - return dirs // dirs list is correct - else - return list(dirs[2], dirs[1]) // otherwise swap order - - -/obj/machinery/pipes/proc/update() - - var/turf/T = src.loc - - var/list/dirs = get_dirs() - - var/is = "[dirs[3]]" - - if(stat & BROKEN) - is += "-b" - - if ((src.level == 1 && isturf(src.loc) && T.intact)) - src.invisibility = 101 - is += "-f" - - else - src.invisibility = 0 - - src.icon_state = is - - if(node1 && node2) - overlays.Cut() - else if(!node1 && !node2) - overlays += image('icons/obj/pipes.dmi', "discon", FLY_LAYER, dirs[1]) - overlays += image('icons/obj/pipes.dmi', "discon", FLY_LAYER, dirs[2]) - else if(!node1) - var/d2 = get_dir(src, node2) - if(dirs[1] == d2) - overlays += image('icons/obj/pipes.dmi', "discon", FLY_LAYER, dirs[2]) - else - overlays += image('icons/obj/pipes.dmi', "discon", FLY_LAYER, dirs[1]) - else if(!node2) - var/d1 = get_dir(src, node1) - if(dirs[1] == d1) - overlays += image('icons/obj/pipes.dmi', "discon", FLY_LAYER, dirs[2]) - else - overlays += image('icons/obj/pipes.dmi', "discon", FLY_LAYER, dirs[1]) - - - return - -/obj/machinery/pipes/hide(var/i) - update() - - //its lazy right now but wait until after my exams and I'll redo it. - //redid it, oh shit - -/obj/machinery/pipes/proc/rupture() - - stat |= BROKEN - update() - -/obj/machinery/pipes/Delete() - stat |= BROKEN - update() - ..() - - -/obj/machinery/pipes/attackby(obj/item/weapon/W as obj, mob/user as mob) - - if (istype(W, /obj/item/weapon/weldingtool) && W:welding) - if(!(stat & BROKEN)) - return - if (W:weldfuel < 2) - user << "\blue You need more welding fuel to complete this task." - return - W:weldfuel -= 2 - stat &= ~BROKEN - update() - for (var/mob/M in viewers(src)) - M.show_message("\red The pipe has been mended by [user.name] with the weldingtool.", 3, "\red You hear welding.", 2) - return - -/obj/machinery/pipes/ex_act(severity) - switch(severity) - if(1.0) - del(src) - return - if(2.0) - stat |= BROKEN - update() - if (prob(50)) - del(src) - return - if(3.0) - if(prob(75)) - stat |= BROKEN - update() - if (prob(25)) - del(src) - return - else - return -/* - var/strength = (((plasma + oxygen/2.0) / 1600000.0) * sqrt(temp) ) / 10 - message_admins("CODER: Pipe explosion strength: [strength], Temperature: [temp], Plasma: [plasma], Oxygen: [oxygen]") - //lets say hypothetically it uses up 9/10 of its energy in bursting the pipe - - if (strength < 773.0) - var/turf/T = get_turf(src.loc) - T.poison += plasma - T.firelevel = T.poison - T.res_vars() - - //if ((src.gas.temperature > (450+T0C) && src.gas.plasma == 1600000.0)) - - if (strength > (450+T0C)) - var/turf/sw = locate(max(T.x - 4, 1), max(T.y - 4, 1), T.z) - var/turf/ne = locate(min(T.x + 4, world.maxx), min(T.y + 4, world.maxy), T.z) - defer_powernet_rebuild = 1 - - for(var/turf/U in block(sw, ne)) - var/zone = 4 - if ((U.y <= (T.y + 1) && U.y >= (T.y - 1) && U.x <= (T.x + 2) && U.x >= (T.x - 2)) ) - zone = 3 - if ((U.y <= (T.y + 1) && U.y >= (T.y - 1) && U.x <= (T.x + 1) && U.x >= (T.x - 1) )) - zone = 2 - for(var/atom/A in U) - A.ex_act(zone) - //Foreach goto(342) - U.ex_act(zone) - U.buildlinks() - //Foreach goto(170) - defer_powernet_rebuild = 0 - makepowernets() - - else - //if ((src.gas.temperature > (300+T0C) && src.gas.plasma == 1600000.0)) - if (strength > (300+T0C)) - var/turf/sw = locate(max(T.x - 4, 1), max(T.y - 4, 1), T.z) - var/turf/ne = locate(min(T.x + 4, world.maxx), min(T.y + 4, world.maxy), T.z) - defer_powernet_rebuild = 1 - - for(var/turf/U in block(sw, ne)) - var/zone = 4 - if ((U.y <= (T.y + 2) && U.y >= (T.y - 2) && U.x <= (T.x + 2) && U.x >= (T.x - 2)) ) - zone = 3 - for(var/atom/A in U) - A.ex_act(zone) - //Foreach goto(598) - U.ex_act(zone) - U.buildlinks() - //Foreach goto(498) - defer_powernet_rebuild = 0 - makepowernets() - - //src.master = null - //SN src = null - del(src) - return - - var/turf/T = src.loc - while(!( istype(T, /turf) )) - T = T.loc - - for(var/mob/M in range(T)) - flick("flash", M.flash) - //Foreach goto(732) - //var/m_range = 2 - - var/m_range = round(strength / 387) - for(var/obj/machinery/atmoalter/canister/C in range(2, T)) - if (!( C.destroyed )) - if (C.gas.plasma >= 35000) - C.destroyed = 1 - m_range++ - - //Foreach goto(776) - var/min = m_range - var/med = m_range * 2 - var/max = m_range * 3 - var/u_max = m_range * 4 - - var/turf/sw = locate(max(T.x - u_max, 1), max(T.y - u_max, 1), T.z) - var/turf/ne = locate(min(T.x + u_max, world.maxx), min(T.y + u_max, world.maxy), T.z) - - defer_powernet_rebuild = 1 - - for(var/turf/U in block(sw, ne)) - - var/zone = 4 - if ((U.y <= (T.y + max) && U.y >= (T.y - max) && U.x <= (T.x + max) && U.x >= (T.x - max) )) - zone = 3 - if ((U.y <= (T.y + med) && U.y >= (T.y - med) && U.x <= (T.x + med) && U.x >= (T.x - med) )) - zone = 2 - if ((U.y <= (T.y + min) && U.y >= (T.y - min) && U.x <= (T.x + min) && U.x >= (T.x - min) )) - zone = 1 - for(var/atom/A in U) - A.ex_act(zone) - //Foreach goto(1217) - U.ex_act(zone) - U.buildlinks() - //U.mark(zone) - - //Foreach goto(961) - //src.master = null - defer_powernet_rebuild = 0 - makepowernets() - - //SN src = null - del(src) - return -*/ -/* -/obj/machinery/pipes/process() -*/ - -/obj/machinery/pipes/New() - - ..() - - if(istype(src, /obj/machinery/pipes/heat_exch)) - h_dir = text2num(icon_state) - else - p_dir = text2num(icon_state) - - -/obj/machinery/pipes/ispipe() // return true since this is a pipe - return 1 - -/obj/machinery/pipes/buildnodes(var/linenum) - - var/list/dirs = get_dirs() - - node1 = get_machine(level, src.loc, dirs[1]) - node2 = get_machine(level, src.loc, dirs[2]) - - if(plnum) - return - - update() - - plnum = linenum - - termination = 0 - - if(node1 && node1.ispipe() ) - - node1.buildnodes(linenum) - else - termination++ - - if(node2 && node2.ispipe() ) - node2.buildnodes(linenum) - else - termination++ - - -/obj/machinery/pipes/heat_exch/get_dirs() - var/b1 - var/b2 - - for(var/d in cardinal) - if(h_dir & d) - if(!b1) - b1 = d - else if(!b2) - b2 = d - - return list(b1, b2, h_dir) - -/obj/machinery/pipes/heat_exch/buildnodes(var/linenum) - - src.level = 2 // h/e pipe cannot be put underfloor - - var/list/dirs = get_dirs() - - node1 = get_he_machine(level, src.loc, dirs[1]) - node2 = get_he_machine(level, src.loc, dirs[2]) - - if(plnum) - return - - update() - - plnum = linenum - - termination = 0 - - if(node1 && node1.ispipe() ) - - node1.buildnodes(linenum) - else - termination++ - - if(node2 && node2.ispipe() ) - node2.buildnodes(linenum) - else - termination++ - - -/obj/machinery/pipes/proc/heat_exchange(var/datum/gas_mixture/gas, var/tot_node, var/numnodes, var/temp, var/dbg=0) - -/* var/turf/T = src.loc // turf location of pipe - if(T.density) return - if(istype(src, /obj/machinery/pipes/flexipipe)) return - - if( level != 1) // no heat exchange for under-floor pipes - if(istype(T,/turf/space)) // heat exchange less efficient in space (no conduction) - gas.temperature += ( T.temp - temp) / (3.0 * insulation * numnodes) - else - - // if(dbg) world.log << "PHE: ([x],[y]) [T.temp]-> \..." - var/delta_T = (T.temp - temp) / (insulation) // normal turf - - gas.temperature += delta_T / numnodes // heat the pipe due to turf temperature - - /* - if(abs(delta_T*tot_node/T.total_moles()) > 1) - world.log << "Turf [T] at [T.x],[T.y]: gt=[temp] tt=[T.temp]" - world.log << "dT = [delta_T] tn=[tot_node] ttg=[T.total_moles()] tt-=[delta_T*tot_node/T.total_moles()]" - - */ - var/tot_turf = max(1, T.total_moles()) - T.temp -= delta_T*min(10,tot_node/tot_turf) // also heat the turf due to pipe temp - // clamp max temp change to prevent thermal runaway - // if low amount of gas in turf - // if(dbg) world.log << "[T.temp] [tot_turf] #[delta_T]" - T.res_vars() // ensure turf tmp vars are updated - - else // if level 1 but in space, perform cooling anyway - exposed pipes - if(istype(T,/turf/space)) - gas.temperature += ( T.temp - temp) / (3.0 * insulation * numnodes) -*/ //TODO FIX -// finds the machine with compatible p_dir in 1 step in dir from S -/proc/get_machine(var/level, var/turf/S, mdir) - - var/flip = turn(mdir, 180) - - var/turf/T = get_step(S, mdir) - - for(var/obj/machinery/M in T.contents) - if(M.level == level) - if(M.p_dir & flip) - return M - - return null - -// finds the machine with compatible h_dir in 1 step in dir from S -/proc/get_he_machine(var/level, var/turf/S, mdir) - - var/flip = turn(mdir, 180) - - var/turf/T = get_step(S, mdir) - - for(var/obj/machinery/M in T.contents) - if(M.level == level) - if(M.h_dir & flip) - return M - - return null - -// ***** circulator - -/obj/machinery/circulator/New() - ..() - gas1 = new /datum/gas_mixture() - gas2 = new /datum/gas_mixture() - - ngas1 = new /datum/gas_mixture() - ngas2 = new /datum/gas_mixture() - - gasflowlist += src - - //gas.co2 = capacity - - updateicon() - -/obj/machinery/circulator/buildnodes() - - var/turf/TS = get_step(src, SOUTH) - var/turf/TN = get_step(src, NORTH) - - for(var/obj/machinery/M in TS) - - if(M && (M.p_dir & 1)) - node1 = M - break - - for(var/obj/machinery/M in TN) - - if(M && (M.p_dir & 2)) - node2 = M - break - - - if(node1) vnode1 = node1.getline() - - if(node2) vnode2 = node2.getline() - - -/* -/obj/machinery/circulator/verb/toggle_power() - set src in view(1) - - if(status == 1) - status = 2 - spawn(30) // 3 second delay for slow-off - if(status == 2) - status = 0 - updateicon() - else if(status == 0) - status =1 - - updateicon() - - - -/obj/machinery/circulator/verb/set_rate(r as num) - set src in view(1) - rate = r/100.0*capacity -*/ - -/obj/machinery/circulator/proc/control(var/on, var/prate) - - rate = prate/100*capacity - - if(status == 1) - if(!on) - status = 2 - spawn(30) - if(status == 2) - status = 0 - updateicon() - else if(status == 0) - if(on) - status = 1 - else // status ==2 - if(on) - status = 1 - - updateicon() - - -/obj/machinery/circulator/proc/updateicon() - - if(stat & NOPOWER) - icon_state = "circ[side]-p" - return - - var/is - switch(status) - if(0) - is = "off" - if(1) - is = "run" - if(2) - is = "slow" - - icon_state = "circ[side]-[is]" - - - -/obj/machinery/circulator/power_change() - ..() - updateicon() - -/* -/obj/machinery/circulator/receive_gas(var/obj/substance/gas/t_gas as obj, from as obj, amount) - - - if(from != src.node1) - return - - amount = min(receive_amount(src), amount) - - - //src.gas.transfer_from(t_gas, amount) - - return -*/ -/obj/machinery/circulator/gas_flow() - - gas1.copy_from(ngas1) - gas2.copy_from(ngas2) - -/obj/machinery/circulator/process() - /* - // if operating, pump from resv1 to resv2 - - if(! (stat & NOPOWER) ) // only do circulator step if powered; still do rest of gas flow at all times - if(status==1 || status==2) - gas2.transfer_from(gas1, status==1? rate : rate/2) - use_power(rate/capacity * 100) - ngas1.copy_from(gas1) - ngas2.copy_from(gas2) - - - // now do standard process - - var/delta_gt - - if(vnode1) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas1.total_moles() / capmult) - calc_delta( src, gas1, ngas1, vnode1, delta_gt) - else - leak_to_turf(1) - - if(vnode2) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas2.total_moles() / capmult) - calc_delta( src, gas2, ngas2, vnode2, delta_gt) - else - leak_to_turf(2)*/ //TODO FIX - -/obj/machinery/circulator/proc/leak_to_turf(var/port) - /* - var/turf/T - - switch(port) - if(1) - T = get_step(src, SOUTH) - if(2) - T = get_step(src, NORTH) - - if(T.density) - T = src.loc - if(T.density) - return - - switch(port) - if(1) - flow_to_turf(gas1, ngas1, T) - if(2) - flow_to_turf(gas2, ngas2, T) - - - // do leak - */ //TODO: FIX - -/* -/obj/machinery/circulator/get_gas_moles(from) - if(from == vnode1) - return gas1.total_moles()/capmult - else - return gas2.total_moles()/capmult -*/ //TODO: FIX -/obj/machinery/circulator/get_gas(from) - if(from == vnode1) - return gas1 - else - return gas2 - -/* -/obj/machinery/connector/New() - ..() - - gas = new /datum/gas_mixture() - ngas = new /datum/gas_mixture() - //agas = new/obj/substance/gas() - - gasflowlist += src - spawn(5) - var/obj/machinery/atmoalter/A = locate(/obj/machinery/atmoalter, src.loc) - - if(A && A.c_status != 0) - connected = A - A.anchored = 1 - - - - -/obj/machinery/connector/buildnodes() - var/turf/T = get_step(src.loc, src.dir) - var/fdir = turn(src.p_dir, 180) - - for(var/obj/machinery/M in T) - if(M.p_dir & fdir) - src.node = M - break - - if(node) vnode = node.getline() - - - return - - - -/obj/machinery/connector/examine() - set src in oview(1) - ..() - if(connected) - usr << "It is connected to \an [connected.name]." - else - usr << "It is unconnected." - - - -/obj/machinery/connector/get_gas_val(from) - return gas.total_moles()/capmult - -/obj/machinery/connector/get_gas(from) - return gas - - -/obj/machinery/connector/gas_flow() - -// var/dbg = (suffix == "d") && Debug - //if(dbg) world.log << "CF0: ngas=[ngas.total_moles()]" - - //ngas.transfer_from(agas, -1) - - //if(dbg) world.log << "CF1: ngas=[gas.total_moles()]" - gas.copy_from(ngas) - //if(dbg) world.log << "CF2: gas=[gas.total_moles()]" - flag = 0 - -/obj/machinery/connector/process() - //if(suffix=="dbgp") - // world.log << "CP" - // Plasma() - - var/delta_gt -// var/dbg = (suffix == "d") && Debug - - //if(dbg) world.log << "C[tag]P: [gas.total_moles()] ~ [ngas.total_moles()]" - //if(dbg && connected) world.log << "C[tag]PC: [connected.gas.total_moles()]" - - if(vnode) - - delta_gt = FLOWFRAC * ( vnode.get_gas_val(src) - gas.total_moles() / capmult) - //if(dbg) world.log << "C[tag]P0: [delta_gt]" - - //var/obj/substance/gas/vgas = vnode.get_gas(src) - - //if(dbg) world.log << "C[tag]P1: [gas.total_moles()], [ngas.total_moles()] -> [vgas.total_moles()]" - calc_delta( src, gas, ngas, vnode, delta_gt)//, dbg) - //if(dbg) world.log << "C[tag]P2: [gas.total_moles()], [ngas.total_moles()] -> [vgas.total_moles()]" - - else - leak_to_turf() - - if(connected) - var/amount - if(connected.c_status == 1) // canister set to release - - //if(dbg) world.log << "C[tag]PC1: [gas.total_moles()], [ngas.total_moles()] <- [connected.gas.total_moles()]" - amount = min(connected.c_per, capacity - gas.total_moles() ) // limit to space in connector - amount = max(0, min(amount, connected.gas.total_moles() ) ) // limit to amount in canister, or 0 - //if(dbg) world.log << "C[tag]PC2: a=[amount]" - //var/ng = ngas.total_moles() - ngas.transfer_from( connected.gas, amount) - //if(dbg) world.log <<"[ngas.total_moles()-ng] from siph to connector" - //if(dbg) world.log << "C[tag]PC3: [gas.total_moles()], [ngas.total_moles()] <- [connected.gas.total_moles()]" - else if(connected.c_status == 2) // canister set to accept - - amount = min(connected.c_per, connected.gas.maximum - connected.gas.total_moles()) //limit to space in canister - amount = max(0, min(amount, gas.total_moles() ) ) // limit to amount in connector, or 0 - - connected.gas.transfer_from( ngas, amount) - - //flag = 1 - - //if(suffix=="dbgp") - // world.log << "CP" - // Plasma() -*/ //TODO: FIX - - -/obj/machinery/connector/proc/leak_to_turf() - /* - //var/dbg = (tag == "dbg") && Debug - - var/turf/T = get_step(src, dir) - if(T && !T.density) - - //if(dbg) world.log << "CLT1: [gas.tostring()] ~ [ngas.tostring()]\nTg = [T.tostring()]" - - - flow_to_turf(gas, ngas, T) - - //if(dbg) world.log << "CLT2: [gas.tostring()] ~ [ngas.tostring()]\nTg = [T.tostring()]" - */ - - -/obj/machinery/junction/New() - ..() - gas = new/datum/gas_mixture(src) - ngas = new/datum/gas_mixture() - gasflowlist += src - - h_dir = dir // the h/e pipe is in obj dir - p_dir = turn(dir, 180) // the reg pipe is in opposite dir - - -/obj/machinery/junction/buildnodes() - - var/turf/T = src.loc - - node1 = get_he_machine(level, T, h_dir ) // the h/e pipe - - node2 = get_machine(level, T , p_dir ) // the regular pipe - - if(node1) vnode1 = node1.getline() - if(node2) vnode2 = node2.getline() - - return - - -/obj/machinery/junction/gas_flow() - - //var/dbg - //if(tag == "dbg1") - // dbg = 1 - //else if(tag == "dbg2") - // dbg = 2 - - //if(dbg) world.log << "J[dbg]F1: [gas.tostring()] ~ [ngas.tostring()]" - - - gas.copy_from(ngas) - - //if(dbg) world.log << "J[dbg]F2: [gas.tostring()] ~ [ngas.tostring()]" - -/obj/machinery/junction/process() -/* - //var/dbg - //if(tag == "dbg1") - // dbg = 1 - //else if(tag == "dbg2") - // dbg = 2 - - //if(dbg) world.log << "J[dbg]P: [gas.tostring()] ~ [ngas.tostring()]" - - var/delta_gt - - if(vnode1) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas.total_moles() / capmult) - calc_delta( src, gas, ngas, vnode1, delta_gt) //, dbg) - - // if(dbg) world.log << "J[dbg]T1: [delta_gt] >> [gas.tostring()] ~ [ngas.tostring()]" - else - leak_to_turf(1) - - if(vnode2) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas.total_moles() / capmult) - calc_delta( src, gas, ngas, vnode2, delta_gt) //, dbg) - - // if(dbg) world.log << "J[dbg]T2: [delta_gt] >> [gas.tostring()] ~ [ngas.tostring()]" - else - leak_to_turf(2) -*/ //TODO: FIX - -/obj/machinery/junction/get_gas_val(from) - return gas.total_moles()/capmult - -/obj/machinery/junction/get_gas(from) - return gas - -/obj/machinery/junction/proc/leak_to_turf(var/port) - - var/turf/T - - - switch(port) - if(1) - T = get_step(src, dir) - if(2) - T = get_step(src, turn(dir, 180) ) - - if(T.density) - T = src.loc - if(T.density) - return - - flow_to_turf(gas, ngas, T) - - -/obj/machinery/vent/New() - - ..() - p_dir = dir - gas = new /datum/gas_mixture(src) - ngas = new /datum/gas_mixture() - gasflowlist += src - - -/obj/machinery/vent/buildnodes() - - var/turf/T = get_step(src.loc, src.dir) - var/fdir = turn(src.p_dir, 180) - - for(var/obj/machinery/M in T) - if(M.p_dir & fdir) - src.node = M - break - - if(node) vnode = node.getline() - - return - - -/obj/machinery/vent/get_gas_val(from) - return gas.total_moles()/2 - -/obj/machinery/vent/get_gas(from) - return gas - - -/obj/machinery/vent/gas_flow() - -// var/dbg = (suffix=="d") && Debug - //if(dbg) world.log << "V[tag]F1: [gas.total_moles()] ~ [ngas.total_moles()]" - gas.copy_from(ngas) - //if(dbg) world.log << "V[tag]F2: [gas.total_moles()] ~ [ngas.total_moles()]" - -/obj/machinery/vent/process() - /* - -// var/dbg = (suffix=="d") && Debug - //if(dbg) world.log << "V[tag]T1: [gas.total_moles()] ~ [ngas.total_moles()]" - - //if(suffix=="dbgp") - // world.log << "VP" - // Plasma() - - var/delta_gt - - var/turf/T = src.loc - - delta_gt = FLOWFRAC * (gas.total_moles() / capmult) - //var/ng = ngas.total_moles() - ngas.turf_add(T, delta_gt) - - //if(dbg) world.log << "[num2text(ng-ngas.total_moles(),10)] from vent to turf" - //if(dbg) world.log << "V[tag]T2: [gas.total_moles()] ~ [ngas.total_moles()]" - - if(vnode) - - //if(dbg) world.log << "V[tag]N1: [gas.total_moles()] ~ [ngas.total_moles()]" - - delta_gt = FLOWFRAC * ( vnode.get_gas_val(src) - gas.total_moles() / capmult) - - calc_delta( src, gas, ngas, vnode, delta_gt)//, dbg) - - //if(dbg) world.log << "V[tag]N2: [gas.total_moles()] ~ [ngas.total_moles()]" - - else - leak_to_turf() - */ //TODO: FIX - - -/obj/machinery/vent/proc/leak_to_turf() -// note this is a leak from the node, not the vent itself -// thus acts as a link between the vent turf and the turf in step(dir) - - var/turf/T = get_step(src, dir) - if(T && !T.density) - flow_to_turf(gas, ngas, T) - - -// inlet - equilibrates between pipe contents and turf -// very similar to vent, except that a vent always dumps pipe gas into turf -/obj/machinery/inlet/New() - - ..() - - p_dir = dir - gas = new /datum/gas_mixture(src) - ngas = new /datum/gas_mixture() - gasflowlist += src - - -/obj/machinery/inlet/buildnodes() - - var/turf/T = get_step(src.loc, src.dir) - var/fdir = turn(src.p_dir, 180) - - for(var/obj/machinery/M in T) - if(M.p_dir & fdir) - src.node = M - break - - if(node) vnode = node.getline() - - return - - -/obj/machinery/inlet/get_gas_val(from) - return gas.total_moles()/2 - -/obj/machinery/inlet/get_gas(from) - return gas - - -/obj/machinery/inlet/gas_flow() - - gas.copy_from(ngas) - -/obj/machinery/inlet/process() - /* - //if(suffix=="dbgp") - // world.log << "VP" - // Plasma() - - var/delta_gt - - var/turf/T = src.loc - - // this is the difference between vent and inlet - - if(T && !T.density) - flow_to_turf(gas, ngas, T, dbg) // act as gas leak - - if(dbg) world.log << "I[tag]T2: [gas.total_moles()] ~ [ngas.total_moles()]" - - if(vnode) - - //if(dbg) world.log << "V[tag]N1: [gas.total_moles()] ~ [ngas.total_moles()]" - - delta_gt = FLOWFRAC * ( vnode.get_gas_val(src) - gas.total_moles() / capmult) - - calc_delta( src, gas, ngas, vnode, delta_gt)//, dbg) - - //if(dbg) world.log << "V[tag]N2: [gas.total_moles()] ~ [ngas.total_moles()]" - - else - leak_to_turf() - */ //TODO: FIX - - - -/obj/machinery/inlet/proc/leak_to_turf() -// note this is a leak from the node, not the inlet itself -// thus acts as a link between the inlet turf and the turf in step(dir) - - var/turf/T = get_step(src, dir) - if(T && !T.density) - flow_to_turf(gas, ngas, T) - - - -// standard proc for all machines - passed gas/ngas as arguments -// equilibrate a pipe object and a turf's gas content - -/obj/machinery/proc/flow_to_turf(var/datum/gas_mixture/sgas, var/datum/gas_mixture/sngas, var/turf/T, var/dbg = 0) -/* - if(dbg) world.log << "FTT: G=[sgas.tostring()] ~ N=[sngas.tostring()]" - if(dbg) world.log << "T=[T.tostring()]" - - - - var/t_tot = T.total_moles() * 0.2 // partial pressure of turf gas at pipe, for the moment - - var/delta_gt = FLOWFRAC * ( t_tot - sgas.total_moles() / capmult ) - - if(dbg) world.log << "FTT: dgt=[delta_gt]" - - var/datum/gas_mixture/ndelta = new() - - if(delta_gt < 0) // flow from pipe to turf - - //world.log << "FTT<0" - ndelta.set_frac(sgas, -delta_gt) // ndelta contains gas to transfer to turf - //world.log << "ND=[ndelta.tostring()]" - sngas.sub_delta(ndelta) // update new gas to remove the amount transfered - //world.log << "SN=[sngas.tostring()]" - ndelta.turf_add(T, -1) // add all of ndelta to turf - //world.log << "T=[T.tostring()]" - - //world.log << "LTT: [num2text(-delta_gt,10)] from [sgas.loc] to turf" - - - else // flow from turf to pipe - if(dbg) world.log << "FTT>0" - - sngas.turf_take(T, delta_gt) // grab gas from turf and direcly add it to the new gas - if(dbg) world.log << "SN=[sngas.tostring()]" - if(dbg) world.log << "T=[T.tostring()]" - - if(dbg) world.log << "LTT: [num2text(delta_gt,10)] from turf to [sgas.loc]" - - T.res_vars() // update turf gas vars for both cases -*/ //TODO: FIX - -// on-off valve - -/obj/machinery/valve/mvalve/New() - ..() - gas1 = new/datum/gas_mixture/(src) - ngas1 = new/datum/gas_mixture/() - gas2 = new/datum/gas_mixture/(src) - ngas2 = new/datum/gas_mixture/() - - gasflowlist += src - switch(dir) - if(1, 2) - p_dir = 3 - if(4,8) - p_dir = 12 - - icon_state = "valve[open]" - -/obj/machinery/valve/mvalve/examine() - set src in oview(1) - - usr << "[desc] It is [ open? "open" : "closed"]." - - - -/obj/machinery/valve/mvalve/buildnodes() - var/turf/T = src.loc - - node1 = get_machine(level, T, dir ) // the h/e pipe - - node2 = get_machine(level, T , turn(dir, 180) ) // the regular pipe - - if(node1) vnode1 = node1.getline() - if(node2) vnode2 = node2.getline() - - return - - -/obj/machinery/valve/mvalve/gas_flow() - gas1.copy_from(ngas1) - gas2.copy_from(ngas2) - - -/obj/machinery/valve/mvalve/process() -/* var/delta_gt - - if(vnode1) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas1.total_moles() / capmult) - calc_delta( src, gas1, ngas1, vnode1, delta_gt) - - else - leak_to_turf(1) - - if(vnode2) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas2.total_moles() / capmult) - calc_delta( src, gas2, ngas2, vnode2, delta_gt) - - else - leak_to_turf(2) - - - if(open) // valve operating, so transfer btwen resv1 & 2 - - delta_gt = FLOWFRAC * (gas1.total_moles() / capmult - gas2.total_moles() / capmult) - - var/datum/gas_mixture//ndelta = new() - - if(delta_gt < 0) // then flowing from R2 to R1 - - ndelta.set_frac(gas2, -delta_gt) - - ngas2.sub_delta(ndelta) - ngas1.add_delta(ndelta) - - else // flowing from R1 to R2 - ndelta.set_frac(gas1, delta_gt) - ngas2.add_delta(ndelta) - ngas1.sub_delta(ndelta)*/ //TODO: FIX - - - - -/obj/machinery/valve/mvalve/get_gas_val(from) - if(from == vnode2) - return gas2.total_moles()/capmult - else - return gas1.total_moles()/capmult - -/obj/machinery/valve/mvalve/get_gas(from) - if(from == vnode2) - return gas2 - return gas1 - -/obj/machinery/valve/mvalve/proc/leak_to_turf(var/port) - - var/turf/T - - - switch(port) - if(1) - T = get_step(src, dir) - if(2) - T = get_step(src, turn(dir, 180) ) - - if(T.density) - T = src.loc - if(T.density) - return - - if(port==1) - flow_to_turf(gas1, ngas1, T) - else - flow_to_turf(gas2, ngas2, T) - -/obj/machinery/valve/mvalve/attack_paw(mob/user) - attack_hand(user) - -/obj/machinery/valve/mvalve/attack_ai(mob/user) - user << "\red You are unable to use this as it is physically operated." - return - -/obj/machinery/valve/mvalve/attack_hand(mob/user) - ..() - add_fingerprint(user) - if(stat & BROKEN) - return - - if(!open) // now opening - flick("valve01", src) - icon_state = "valve1" - sleep(10) - else // now closing - flick("valve10", src) - icon_state = "valve0" - sleep(10) - open = !open - -// Digital Valve - -/obj/machinery/valve/dvalve/New() - ..() - gas1 = new/datum/gas_mixture/(src) - ngas1 = new/datum/gas_mixture/() - gas2 = new/datum/gas_mixture/(src) - ngas2 = new/datum/gas_mixture/() - - gasflowlist += src - switch(dir) - if(1, 2) - p_dir = 3 - if(4,8) - p_dir = 12 - - icon_state = "dvalve[open]" - -/obj/machinery/valve/dvalve/examine() - set src in oview(1) - if(NOPOWER) - usr << "[desc] It is unpowered! It is [ open? "open" : "closed"]." - return - usr << "[desc] It is [ open? "open" : "closed"]." - - - -/obj/machinery/valve/dvalve/buildnodes() - var/turf/T = src.loc - - node1 = get_machine(level, T, dir ) // the h/e pipe - - node2 = get_machine(level, T , turn(dir, 180) ) // the regular pipe - - if(node1) vnode1 = node1.getline() - if(node2) vnode2 = node2.getline() - - return - - -/obj/machinery/valve/dvalve/gas_flow() - gas1.copy_from(ngas1) - gas2.copy_from(ngas2) - -/obj/machinery/valve/dvalve/power_change() - ..() - if(stat & NOPOWER) - icon_state = "dvalve[open]nopower" - return - icon_state = "dvalve[open]" - - -/obj/machinery/valve/dvalve/process() - /* - var/delta_gt - - if(vnode1) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas1.total_moles() / capmult) - calc_delta( src, gas1, ngas1, vnode1, delta_gt) - - else - leak_to_turf(1) - - if(vnode2) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas2.total_moles() / capmult) - calc_delta( src, gas2, ngas2, vnode2, delta_gt) - - else - leak_to_turf(2) - - - if(open) // valve operating, so transfer btwen resv1 & 2 - - delta_gt = FLOWFRAC * (gas1.total_moles() / capmult - gas2.total_moles() / capmult) - - var/datum/gas_mixture/ndelta = new() - - if(delta_gt < 0) // then flowing from R2 to R1 - - ndelta.set_frac(gas2, -delta_gt) - - ngas2.sub_delta(ndelta) - ngas1.add_delta(ndelta) - - else // flowing from R1 to R2 - ndelta.set_frac(gas1, delta_gt) - ngas2.add_delta(ndelta) - ngas1.sub_delta(ndelta) - */ //TODO: FIX - - - -/obj/machinery/valve/dvalve/get_gas_val(from) - if(from == vnode2) - return gas2.total_moles()/capmult - else - return gas1.total_moles()/capmult - -/obj/machinery/valve/dvalve/get_gas(from) - if(from == vnode2) - return gas2 - return gas1 - -/obj/machinery/valve/dvalve/proc/leak_to_turf(var/port) - - var/turf/T - - - switch(port) - if(1) - T = get_step(src, dir) - if(2) - T = get_step(src, turn(dir, 180) ) - - if(T.density) - T = src.loc - if(T.density) - return - - if(port==1) - flow_to_turf(gas1, ngas1, T) - else - flow_to_turf(gas2, ngas2, T) - -/obj/machinery/valve/dvalve/attack_paw(mob/user) - return src.attack_hand(user) - -/obj/machinery/valve/dvalve/attack_ai(var/mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/valve/dvalve/attack_hand(mob/user) - ..() - add_fingerprint(user) - if(stat & (BROKEN|NOPOWER)) - return - - if(!open) // now opening - flick("dvalve01", src) - icon_state = "dvalve1" - sleep(10) - else // now closing - flick("dvalve10", src) - icon_state = "dvalve0" - sleep(10) - open = !open - -// one way pipe - -/obj/machinery/oneway/New() - ..() - gas1 = new/datum/gas_mixture/(src) - ngas1 = new/datum/gas_mixture/() - gas2 = new/datum/gas_mixture/(src) - ngas2 = new/datum/gas_mixture/() - - gasflowlist += src - p_dir = dir|turn(dir, 180) - -/obj/machinery/oneway/buildnodes() - var/turf/T = src.loc - - node1 = get_machine(level, T, dir ) - node2 = get_machine(level, T , turn(dir, 180) ) - - if(node1) vnode1 = node1.getline() - if(node2) vnode2 = node2.getline() - - return - -/obj/machinery/oneway/gas_flow() - gas1.copy_from(ngas1) - gas2.copy_from(ngas2) - -/obj/machinery/oneway/process() -/* - var/delta_gt - - if(vnode1) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas1.total_moles() / capmult) - calc_delta( src, gas1, ngas1, vnode1, delta_gt) - - else - leak_to_turf(1) - - if(vnode2) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas2.total_moles() / capmult) - calc_delta( src, gas2, ngas2, vnode2, delta_gt) - - else - leak_to_turf(2) - - - delta_gt = FLOWFRAC * (gas1.total_moles() / capmult - gas2.total_moles() / capmult) - var/datum/gas_mixture/ndelta = new() - - if(delta_gt < 0) // then flowing from R2 to R1 - ndelta.set_frac(gas2, -delta_gt) - ngas2.sub_delta(ndelta) - ngas1.add_delta(ndelta)*/ //TODO: FIX - -/obj/machinery/oneway/get_gas_val(from) - if(from == vnode2) - return gas2.total_moles()/capmult - else - return gas1.total_moles()/capmult - -/obj/machinery/oneway/get_gas(from) - if(from == vnode2) - return gas2 - return gas1 - -/obj/machinery/oneway/proc/leak_to_turf(var/port) - var/turf/T - - switch(port) - if(1) - T = get_step(src, dir) - if(2) - T = get_step(src, turn(dir, 180) ) - - if(T.density) - T = src.loc - if(T.density) - return - - if(port==1) - flow_to_turf(gas1, ngas1, T) - else - flow_to_turf(gas2, ngas2, T) - -/obj/machinery/oneway/pipepump/process() - /* - if(! (stat & NOPOWER) ) // pump if power - gas1.transfer_from(gas2, rate) - use_power(25, ENVIRON) - ngas1.copy_from(gas1) - ngas2.copy_from(gas2) - - var/delta_gt - - if(vnode1) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas1.total_moles() / capmult) - calc_delta( src, gas1, ngas1, vnode1, delta_gt) - - else - leak_to_turf(1) - - if(vnode2) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas2.total_moles() / capmult) - calc_delta( src, gas2, ngas2, vnode2, delta_gt) - - else - leak_to_turf(2) - */ //TODO: FIX - -/obj/machinery/oneway/pipepump/proc/updateicon() - icon_state = "pipepump-[(stat & NOPOWER) ? "stop" : "run"]" - -/obj/machinery/oneway/pipepump/power_change() - if(powered(ENVIRON)) - stat &= ~NOPOWER - else - - stat |= NOPOWER - spawn(rand(1,15)) // So they don't all turn off at the same time - updateicon() - -// Filter inlet -// works with filter_control - -/obj/machinery/inlet/filter/New() - ..() - src.gas = new /datum/gas_mixture() - src.ngas = new /datum/gas_mixture() - -/obj/machinery/inlet/filter/buildnodes() - var/turf/T = get_step(src.loc, src.dir) - var/fdir = turn(src.p_dir, 180) - - for(var/obj/machinery/M in T) - if(M.p_dir & fdir) - src.node = M - break - - if(node) vnode = node.getline() - return - -/obj/machinery/inlet/filter/get_gas_val(from) - return gas.total_moles()/2 - -/obj/machinery/inlet/filter/get_gas(from) - return gas - -/obj/machinery/inlet/filter/gas_flow() - gas.copy_from(ngas) - -/obj/machinery/inlet/filter/process() - src.updateicon() - if(!(stat & NOPOWER)) - /* var/turf/T = src.loc - if(!T || T.density) return - - if(!vnode) return leak_to_turf() - var/obj/substance/gas/exterior = new() - exterior.oxygen = T.oxygen - exterior.n2 = T.n2 - exterior.plasma = T.poison - exterior.co2 = T.co2 - exterior.sl_gas = T.sl_gas - exterior.temperature = T.temp - var/obj/substance/gas/interior = gas - var/obj/substance/gas/flowing = new() - - var/flow_rate = (exterior.total_moles()-interior.total_moles())*FLOWFRAC - if(flow_rate <= 0) - return - flowing.set_frac(exterior,flow_rate) - if(!(src.f_mask & GAS_O2)) flowing.oxygen = 0 - if(!(src.f_mask & GAS_N2)) flowing.n2 = 0 - if(!(src.f_mask & GAS_PL)) flowing.plasma = 0 - if(!(src.f_mask & GAS_CO2)) flowing.co2 = 0 - if(!(src.f_mask & GAS_N2O)) flowing.sl_gas = 0 - use_power(5,ENVIRON) - exterior.sub_delta(flowing) - interior.add_delta(flowing)*/ //TODO: FIX - else - ..() - return - -/obj/machinery/inlet/filter/leak_to_turf() -// note this is a leak from the node, not the inlet itself -// thus acts as a link between the inlet turf and the turf in step(dir) - var/turf/T = get_step(src, dir) - if(T && !T.density) - flow_to_turf(gas, ngas, T) - -/obj/machinery/inlet/filter/power_change() - if(powered(ENVIRON)) - stat &= ~NOPOWER - else - stat |= NOPOWER - spawn(rand(1,15)) - updateicon() - return - -/obj/machinery/inlet/filter/proc/updateicon() - /* - if(stat & NOPOWER) - icon_state = "inlet_filter-0" - return - if(src.gas.total_moles() > src.gas.maximum/2) - icon_state = "inlet_filter-4" - else if(src.gas.total_moles() > src.gas.maximum/3) - icon_state = "inlet_filter-3" - else if(src.gas.total_moles() > src.gas.maximum/4) - icon_state = "inlet_filter-2" - else if(src.gas.total_moles() >= 1 || src.f_mask >= 1) - icon_state = "inlet_filter-1" - else - icon_state = "inlet_filter-0" - return - */ //TODO FIX - -// Filter vent -// doesn't do anything yet - -/obj/machinery/vent/filter/power_change() - if(powered(ENVIRON)) - stat &= ~NOPOWER - else - stat |= NOPOWER - spawn(rand(1,15)) - updateicon() - return - -/obj/machinery/vent/filter/proc/updateicon() - /* - if(stat & NOPOWER) - icon_state = "vent_filter-0" - return - if(src.gas.total_moles() > src.gas.maximum/2) - icon_state = "vent_filter-4" - else if(src.gas.total_moles() > src.gas.maximum/3) - icon_state = "vent_filter-3" - else if(src.gas.total_moles() > src.gas.maximum/4) - icon_state = "vent_filter-2" - else if(src.gas.total_moles() >= 1 || src.f_mask >= 1) - icon_state = "vent_filter-1" - else - icon_state = "vent_filter-0" - return - */ //TODO FIX \ No newline at end of file diff --git a/code/unused/pipe_filter.dm b/code/unused/pipe_filter.dm deleted file mode 100644 index 10f0673728a..00000000000 --- a/code/unused/pipe_filter.dm +++ /dev/null @@ -1,243 +0,0 @@ -// *** pipefilter - -/obj/machinery/pipefilter/New() - ..() - p_dir = (NORTH|SOUTH|EAST|WEST) ^ turn(dir, 180) - - src.gas = new /datum/gas_mixture/() - src.ngas = new /datum/gas_mixture/() - - src.f_gas = new /datum/gas_mixture/() - src.f_ngas = new /datum/gas_mixture/() - - gasflowlist += src - -/obj/machinery/pipefilter/buildnodes() - var/turf/T = src.loc - - n1dir = turn(dir, 90) - n2dir = turn(dir,-90) - - node1 = get_machine( level, T , n1dir ) // the main flow dir - node2 = get_machine( level, T , n2dir ) - node3 = get_machine( level, T, dir ) // the ejector port - - if(node1) vnode1 = node1.getline() - if(node2) vnode2 = node2.getline() - if(node3) vnode3 = node3.getline() - -/obj/machinery/pipefilter/gas_flow() - gas.copy_from(ngas) - f_gas.copy_from(f_ngas) - -/obj/machinery/pipefilter/process() -/* var/delta_gt - - if(vnode1) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas.total_moles() / capmult) - calc_delta( src, gas, ngas, vnode1, delta_gt) - else - leak_to_turf(1) - if(vnode2) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas.total_moles() / capmult) - calc_delta( src, gas, ngas, vnode2, delta_gt) - else - leak_to_turf(2) - if(vnode3) - delta_gt = FLOWFRAC * ( vnode3.get_gas_val(src) - f_gas.total_moles() / capmult) - calc_delta( src, f_gas, f_ngas, vnode3, delta_gt) - else - leak_to_turf(3) - - // transfer gas from ngas->f_ngas according to extraction rate, but only if we have power - if(! (stat & NOPOWER) ) - use_power(min(src.f_per, 100),ENVIRON) - var/datum/gas_mixture/ndelta = src.get_extract() - ngas.sub_delta(ndelta) - f_ngas.add_delta(ndelta) - AutoUpdateAI(src) - src.updateUsrDialog()*/ //TODO: FIX - -/obj/machinery/pipefilter/get_gas_val(from) - return ((from == vnode3) ? f_gas.total_moles() : gas.total_moles())/capmult - -/obj/machinery/pipefilter/get_gas(from) - return (from == vnode3) ? f_gas : gas - -/obj/machinery/pipefilter/proc/leak_to_turf(var/port) - var/turf/T - - switch(port) - if(1) - T = get_step(src, n1dir) - if(2) - T = get_step(src, n2dir) - if(3) - T = get_step(src, dir) - if(T.density) - T = src.loc - if(T.density) - return - flow_to_turf(f_gas, f_ngas, T) - return - - if(T.density) - T = src.loc - if(T.density) - return - - flow_to_turf(gas, ngas, T) - -/obj/machinery/pipefilter/proc/get_extract() - /* - var/datum/gas_mixture/ndelta = new() - if (src.f_mask & GAS_O2) - ndelta.oxygen = min(src.f_per, src.ngas.oxygen) - if (src.f_mask & GAS_N2) - ndelta.n2 = min(src.f_per, src.ngas.n2) - if (src.f_mask & GAS_PL) - ndelta.plasma = min(src.f_per, src.ngas.plasma) - if (src.f_mask & GAS_CO2) - ndelta.co2 = min(src.f_per, src.ngas.co2) - if (src.f_mask & GAS_N2O) - ndelta.sl_gas = min(src.f_per, src.ngas.sl_gas) - return ndelta - */ //TODO: FIX - -/obj/machinery/pipefilter/attackby(obj/item/weapon/W, mob/user as mob) - if(istype(W, /obj/item/weapon/detective_scanner)) - return ..() - if(istype(W, /obj/item/weapon/screwdriver)) - if(bypassed) - user.show_message(text("\red Remove the foreign wires first!"), 1) - return - src.add_fingerprint(user) - user.show_message(text("\red Now []securing the access system panel...", (src.locked) ? "un" : "re"), 1) - sleep(30) - locked =! locked - user.show_message(text("\red Done!"),1) - src.updateicon() - return - if(istype(W, /obj/item/stack/cable_coil) && !bypassed) - if(src.locked) - user.show_message(text("\red You must remove the panel first!"),1) - return - var/obj/item/stack/cable_coil/C = W - if(C.use(4)) - user.show_message(text("\red You unravel some cable.."),1) - else - user.show_message(text("\red Not enough cable! (Requires four pieces)"),1) - src.add_fingerprint(user) - user.show_message(text("\red Now bypassing the access system... (This may take a while)"), 1) - sleep(100) - bypassed = 1 - src.updateicon() - return - if(istype(W, /obj/item/weapon/wirecutters) && bypassed) - src.add_fingerprint(user) - user.show_message(text("\red Now removing the bypass wires... (This may take a while)"), 1) - sleep(50) - bypassed = 0 - src.updateicon() - return - if(istype(W, /obj/item/weapon/card/emag) && (!emagged)) - emagged++ - src.add_fingerprint(user) - for(var/mob/O in viewers(user, null)) - O.show_message(text("\red [] has shorted out the [] with an electromagnetic card!", user, src), 1) - src.overlays += image('icons/obj/pipes2.dmi', "filter-spark") - sleep(6) - src.updateicon() - return src.attack_hand(user) - return src.attack_hand(user) - -// pipefilter interact/topic -/obj/machinery/pipefilter/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/pipefilter/attack_ai(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/pipefilter/attack_hand(mob/user as mob) -/* if(stat & NOPOWER) - user << browse(null, "window=pipefilter") - user.machine = null - return - - var/list/gases = list("O2", "N2", "Plasma", "CO2", "N2O") - user.machine = src - var/dat = "Filter Release Rate:
\nM - - - - - [src.f_per] + + + + + M
\n" - for (var/i = 1; i <= gases.len; i++) - dat += "[gases[i]]: [(src.f_mask & 1 << (i - 1)) ? "Releasing" : "Passing"]
\n" - if(gas.total_moles()) - var/totalgas = gas.total_moles() - var/pressure = round(totalgas / gas.maximum * 100) - var/nitrogen = gas.n2 / totalgas * 100 - var/oxygen = gas.oxygen / totalgas * 100 - var/plasma = gas.plasma / totalgas * 100 - var/co2 = gas.co2 / totalgas * 100 - var/no2 = gas.sl_gas / totalgas * 100 - - dat += "
Gas Levels:
\nPressure: [pressure]%
\nNitrogen: [nitrogen]%
\nOxygen: [oxygen]%
\nPlasma: [plasma]%
\nCO2: [co2]%
\nN2O: [no2]%
\n" - else - dat += "
Gas Levels:
\nPressure: 0%
\nNitrogen: 0%
\nOxygen: 0%
\nPlasma: 0%
\nCO2: 0%
\nN2O: 0%
\n" - dat += "
\nClose
\n" - - user << browse(dat, "window=pipefilter;size=300x365")*/ //TODO: FIX - //onclose(user, "pipefilter") - -/obj/machinery/pipefilter/Topic(href, href_list) - ..() - if(usr.restrained() || usr.lying) - return - if ((((get_dist(src, usr) <= 1 || usr.telekinesis == 1) || istype(usr, /mob/living/silicon/ai)) && istype(src.loc, /turf))) - usr.machine = src - if (href_list["close"]) - usr << browse(null, "window=pipefilter;") - usr.machine = null - return - if (src.allowed(usr) || src.emagged || src.bypassed) - if (href_list["fp"]) - src.f_per = min(max(round(src.f_per + text2num(href_list["fp"])), 0), src.maxrate) - else if (href_list["tg"]) - // toggle gas - src.f_mask ^= text2num(href_list["tg"]) - src.updateicon() - else - usr.see("\red Access Denied ([src.name] operation restricted to authorized atmospheric technicians.)") - AutoUpdateAI(src) - src.updateUsrDialog() - src.add_fingerprint(usr) - else - usr << browse(null, "window=pipefilter") - usr.machine = null - return - -/obj/machinery/pipefilter/power_change() - if(powered(ENVIRON)) - stat &= ~NOPOWER - else - stat |= NOPOWER - spawn(rand(1,15)) //so all the filters don't come on at once - updateicon() - -/obj/machinery/pipefilter/proc/updateicon() - src.overlays.Cut() - if(stat & NOPOWER) - icon_state = "filter-off" - else - icon_state = "filter" - if(emagged) //only show if powered because presumeably its the interface that has been fried - src.overlays += image('icons/obj/pipes2.dmi', "filter-emag") - if (src.f_mask & (GAS_N2O|GAS_PL)) - src.overlays += image('icons/obj/pipes2.dmi', "filter-tox") - if (src.f_mask & GAS_O2) - src.overlays += image('icons/obj/pipes2.dmi', "filter-o2") - if (src.f_mask & GAS_N2) - src.overlays += image('icons/obj/pipes2.dmi', "filter-n2") - if (src.f_mask & GAS_CO2) - src.overlays += image('icons/obj/pipes2.dmi', "filter-co2") - if(!locked) - src.overlays += image('icons/obj/pipes2.dmi', "filter-open") - if(bypassed) //should only be bypassed if unlocked - src.overlays += image('icons/obj/pipes2.dmi', "filter-bypass") \ No newline at end of file diff --git a/code/unused/powerarmor/powerarmor.dm b/code/unused/powerarmor/powerarmor.dm deleted file mode 100644 index c6c906f93d0..00000000000 --- a/code/unused/powerarmor/powerarmor.dm +++ /dev/null @@ -1,281 +0,0 @@ -/obj/item/clothing/suit/powered - name = "Powered armor" - desc = "Not for rookies." - icon_state = "swat" - item_state = "swat" - w_class = 4//bulky item - - protective_temperature = 1000 - flags = FPRINT | TABLEPASS - body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS - armor = list(melee = 40, bullet = 30, laser = 20,energy = 15, bomb = 25, bio = 10, rad = 10) - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/gun,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) - slowdown = 9 - var/fuel = 0 - - var/list/togglearmor = list(melee = 90, bullet = 70, laser = 60,energy = 40, bomb = 75, bio = 75, rad = 75) - var/active = 0 - - var/helmrequired = 1 - var/obj/item/clothing/head/powered/helm - - var/glovesrequired = 0 - var/obj/item/clothing/gloves/powered/gloves - - var/shoesrequired = 0 - var/obj/item/clothing/shoes/powered/shoes - //Adding gloves and shoes as possible armor components. --NEO - - var/obj/item/powerarmor/servos/servos - var/obj/item/powerarmor/reactive/reactive - var/obj/item/powerarmor/atmoseal/atmoseal - var/obj/item/powerarmor/power/power - - New() - verbs += /obj/item/clothing/suit/powered/proc/poweron - - proc/poweron() - set category = "Object" - set name = "Activate armor systems" - - var/mob/living/carbon/human/user = usr - - if(user.stat) - return //if you're unconscious or dead, no dicking with your armor. --NEO - - if(!istype(user)) - user << "\red This suit was engineered for human use only." - return - - if(user.wear_suit!=src) - user << "\red The suit functions best if you are inside of it." - return - - if(helmrequired && !istype(user.head, /obj/item/clothing/head/powered)) - user << "\red Helmet missing, unable to initiate power-on procedure." - return - - if(glovesrequired && !istype(user.gloves, /obj/item/clothing/gloves/powered)) - user << "\red Gloves missing, unable to initiate power-on procedure." - return - - if(shoesrequired && !istype(user.shoes, /obj/item/clothing/shoes/powered)) - user << "\red Shoes missing, unable to initiate power-on procedure." - return - - if(active) - user << "\red The suit is already on, you can't turn it on twice." - return - - if(!power || !power.checkpower()) - user << "\red Powersource missing or depleted." - return - - verbs -= /obj/item/clothing/suit/powered/proc/poweron - - user << "\blue Suit interlocks engaged." - if(helmrequired) - helm = user.head - helm.flags |= NODROP - if(glovesrequired) - gloves = user.gloves - gloves.flags |= NODROP - if(shoesrequired) - shoes = user.shoes - shoes.flags |= NODROP - flags |= NODROP - sleep(20) - - if(atmoseal) - atmoseal.toggle() - sleep(20) - - if(reactive) - reactive.toggle() - sleep(20) - - if(servos) - servos.toggle() - sleep(20) - - user << "\blue All systems online." - active = 1 - power.process() - - verbs += /obj/item/clothing/suit/powered/proc/poweroff - - - proc/poweroff() - set category = "Object" - set name = "Deactivate armor systems" - powerdown() //BYOND doesn't seem to like it if you try using a proc with vars in it as a verb, hence this. --NEO - - proc/powerdown(sudden = 0) - - var/delay = sudden?0:20 - - var/mob/living/carbon/human/user = usr - - if(user.stat && !sudden) - return //if you're unconscious or dead, no dicking with your armor. --NEO - - if(!active) - return - - verbs -= /obj/item/clothing/suit/powered/proc/poweroff - - if(sudden) - user << "\red Your armor loses power!" - - if(servos) - servos.toggle(sudden) - sleep(delay) - - if(reactive) - reactive.toggle(sudden) - sleep(delay) - - if(atmoseal) - if(istype(atmoseal, /obj/item/powerarmor/atmoseal/optional) && helm) - atmoseal:helmtoggle(sudden) - atmoseal.toggle(sudden) - - sleep(delay) - - if(!sudden) - usr << "\blue Suit interlocks disengaged." - if(helm) - helm.flags &= ~NODROP - helm = null - if(gloves) - gloves.flags &= ~NODROP - gloves = null - if(shoes) - shoes.flags &= ~NODROP - gloves = null - flags &= ~NODROP - //Not a tabbing error, the thing only unlocks if you intentionally power-down the armor. --NEO - sleep(delay) - - if(!sudden) - usr << "\blue All systems disengaged." - - active = 0 - verbs += /obj/item/clothing/suit/powered/proc/poweron - - - - attackby(obj/item/weapon/W as obj, mob/user as mob) - if(power && istype(power,/obj/item/powerarmor/power/plasma)) - switch(W.type) - if(/obj/item/stack/sheet/mineral/plasma) - if(fuel < 50) - user << "\blue You feed some refined plasma into the armor's generator." - power:fuel += 25 - W:amount-- - if (W:amount <= 0) - del(W) - return - else - user << "\red The generator already has plenty of plasma." - return - - if(/obj/item/weapon/ore/plasma) //raw plasma has impurities, so it doesn't provide as much fuel. --NEO - if(fuel < 50) - user << "\blue You feed some plasma into the armor's generator." - power:fuel += 15 - del(W) - return - else - user << "\red The generator already has plenty of plasma." - return - - ..() - -/obj/item/clothing/head/powered - name = "Powered armor" - icon_state = "swat" - desc = "Not for rookies." - flags = FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH - see_face = 0.0 - item_state = "swat" - armor = list(melee = 40, bullet = 30, laser = 20,energy = 15, bomb = 25, bio = 10, rad = 10) - var/obj/item/clothing/suit/powered/parent - - proc/atmotoggle() - set category = "Object" - set name = "Toggle helmet seals" - - var/mob/living/carbon/human/user = usr - - if(!istype(user)) - user << "\red This helmet is not rated for nonhuman use." - return - - if(user.head != src) - user << "\red Can't engage the seals without wearing the helmet." - return - - if(!user.wear_suit || !istype(user.wear_suit,/obj/item/clothing/suit/powered)) - user << "\red This helmet can only couple with powered armor." - return - - var/obj/item/clothing/suit/powered/armor = user.wear_suit - - if(!armor.atmoseal || !istype(armor.atmoseal, /obj/item/powerarmor/atmoseal/optional)) - user << "\red This armor's atmospheric seals are missing or incompatible." - return - - armor.atmoseal:helmtoggle(0,1) - - - - -/obj/item/clothing/gloves/powered - name = "Powered armor" - icon_state = "swat" - desc = "Not for rookies." - flags = FPRINT | TABLEPASS - item_state = "swat" - armor = list(melee = 40, bullet = 30, laser = 20,energy = 15, bomb = 25, bio = 10, rad = 10) - -/obj/item/clothing/shoes/powered - name = "Powered armor" - icon_state = "swat" - desc = "Not for rookies." - flags = FPRINT | TABLEPASS - item_state = "swat" - armor = list(melee = 40, bullet = 30, laser = 20,energy = 15, bomb = 25, bio = 10, rad = 10) - - -obj/item/clothing/suit/powered/spawnable/badmin - New() - servos = new /obj/item/powerarmor/servos(src) - servos.parent = src - reactive = new /obj/item/powerarmor/reactive(src) - reactive.parent = src - atmoseal = new /obj/item/powerarmor/atmoseal/optional/adminbus(src) - atmoseal.parent = src - power = new /obj/item/powerarmor/power(src) - power.parent = src - - verbs += /obj/item/clothing/suit/powered/proc/poweron - - var/obj/item/clothing/head/powered/helm = new /obj/item/clothing/head/powered(src.loc) - helm.verbs += /obj/item/clothing/head/powered/proc/atmotoggle - -obj/item/clothing/suit/powered/spawnable/regular - New() - servos = new /obj/item/powerarmor/servos(src) - servos.parent = src - reactive = new /obj/item/powerarmor/reactive/centcom(src) - reactive.parent = src - atmoseal = new /obj/item/powerarmor/atmoseal/optional/adminbus(src) - atmoseal.parent = src - power = new /obj/item/powerarmor/power(src) - power.parent = src - - verbs += /obj/item/clothing/suit/powered/proc/poweron - - var/obj/item/clothing/head/powered/helm = new /obj/item/clothing/head/powered(src.loc) - helm.verbs += /obj/item/clothing/head/powered/proc/atmotoggle diff --git a/code/unused/powerarmor/powerarmorcomponents.dm b/code/unused/powerarmor/powerarmorcomponents.dm deleted file mode 100644 index de25f064743..00000000000 --- a/code/unused/powerarmor/powerarmorcomponents.dm +++ /dev/null @@ -1,246 +0,0 @@ -/obj/item/powerarmor - name = "Generic power armor component" - desc = "This is the base object, you should never see one." - var/obj/item/clothing/suit/powered/parent //so the component knows which armor it belongs to. - var/slowdown = 0 //how much the component slows down the wearer - - proc/toggle() - return - //The child objects will use this proc - - - -/obj/item/powerarmor/power - name = "Adminbus power armor power source" - desc = "Runs on the rare Badminium molecule." - - process() - return - - proc/checkpower() - return 1 - - plasma - name = "Miniaturized plasma generator" - desc = "Runs on plasma." - slowdown = 1 - var/fuel = 0 - - process() - if (fuel > 0 && parent.active) - fuel-- - spawn(50) - process() - return - else if (parent.active) - parent.powerdown(1) - return - - checkpower() - return fuel - - powercell - name = "Powercell interface" - desc = "Boring, but reliable." - var/obj/item/weapon/stock_parts/cell/cell - slowdown = 0.5 - - process() - if (cell && cell.charge > 0 && parent.active) - cell.use(50) - spawn(50) - process() - return - else if (parent.active) - parent.powerdown(1) - return - - checkpower() - return max(cell.charge, 0) - - nuclear - name = "Miniaturized nuclear generator" - desc = "For all your radioactive needs." - slowdown = 1.5 - - process() - if(!crit_fail) - if (prob(src.reliability)) return 1 //No failure - if (prob(src.reliability)) - for (var/mob/M in range(0,src.parent)) //Only a minor failure, enjoy your radiation. - if (src.parent in M.contents) - M << "\red Your armor feels pleasantly warm for a moment." - else - M << "\red You feel a warm sensation." - M.radiation += rand(1,40) - else - for (var/mob/M in range(rand(1,4),src.parent)) //Big failure, TIME FOR RADIATION BITCHES - if (src.parent in M.contents) - M << "\red Your armor's reactor overloads!" - M << "\red You feel a wave of heat wash over you." - M.radiation += 100 - crit_fail = 1 //broken~ - parent.powerdown(1) - spawn(50) - process() - - checkpower() - return !crit_fail - -/obj/item/powerarmor/reactive - name = "Adminbus power armor reactive plating" - desc = "Made with the rare Badminium molecule." - var/list/togglearmor = list(melee = 250, bullet = 100, laser = 100,energy = 100, bomb = 100, bio = 100, rad = 100) - //Good lord an active energy axe does 150 damage a swing? Anyway, barring var editing, this armor loadout should be impervious to anything. Enjoy, badmins~ --NEO - - toggle(sudden = 0) - switch(parent.active) - if(1) - if(!sudden) - usr << "\blue Reactive armor systems disengaged." - if(0) - usr << "\blue Reactive armor systems engaged." - var/list/switchover = list() - for (var/armorvar in parent.armor) - switchover[armorvar] = togglearmor[armorvar] - togglearmor[armorvar] = parent.armor[armorvar] - parent.armor[armorvar] = switchover[armorvar] - //Probably not the most elegant way to have the vars switch over, but it works. Also propagates the values to the other objects. - if(parent.helm) - parent.helm.armor[armorvar] = parent.armor[armorvar] - if(parent.gloves) - parent.gloves.armor[armorvar] = parent.armor[armorvar] - if(parent.shoes) - parent.shoes.armor[armorvar] = parent.armor[armorvar] - - Centcom - name = "Centcom power armor reactive plating" - desc = "Pretty effective against everything, not perfect though." - togglearmor = list(melee = 90, bullet = 70, laser = 60,energy = 40, bomb = 75, bio = 75, rad = 75) - slowdown = 2 - - -/obj/item/powerarmor/servos - name = "Adminbus power armor movement servos" - desc = "Made with the rare Badminium molecule." - var/toggleslowdown = 9 - - toggle(sudden = 0) - switch(parent.active) - if(1) - if(!sudden) - usr << "\blue Movement assist servos disengaged." - parent.slowdown += toggleslowdown - if(0) - usr << "\blue Movement assist servos engaged." - parent.slowdown -= toggleslowdown - -/obj/item/powerarmor/atmoseal - name = "Power armor atmospheric seals" - desc = "Keeps the bad stuff out." - slowdown = 1 - var/sealed = 0 - - toggle(sudden = 0) - switch(parent.active) - if(1) - if(!sudden) - usr << "\blue Atmospheric seals disengaged." - parent.gas_transfer_coefficient = 1 - parent.permeability_coefficient = 1 - parent.heat_transfer_coefficient = 1 - parent.flags &= ~SUITSPACE - if(parent.helmrequired) - parent.helm.gas_transfer_coefficient = 1 - parent.helm.permeability_coefficient = 1 - parent.helm.heat_transfer_coefficient = 1 - parent.helm.flags &= ~HEADSPACE - if(parent.glovesrequired) - parent.gloves.gas_transfer_coefficient = 1 - parent.gloves.permeability_coefficient = 1 - parent.gloves.heat_transfer_coefficient = 1 - if(parent.shoesrequired) - parent.shoes.gas_transfer_coefficient = 1 - parent.shoes.permeability_coefficient = 1 - parent.shoes.heat_transfer_coefficient = 1 - sealed = 0 - - if(0) - usr << "\blue Atmospheric seals engaged." - parent.gas_transfer_coefficient = 0.01 - parent.permeability_coefficient = 0.02 - parent.heat_transfer_coefficient = 0.02 - parent.flags |= SUITSPACE - if(parent.helmrequired) - parent.helm.gas_transfer_coefficient = 0.01 - parent.helm.permeability_coefficient = 0.02 - parent.helm.heat_transfer_coefficient = 0.02 - parent.helm.flags |= HEADSPACE - if(parent.glovesrequired) - parent.gloves.gas_transfer_coefficient = 0.01 - parent.gloves.permeability_coefficient = 0.02 - parent.gloves.heat_transfer_coefficient = 0.02 - if(parent.shoesrequired) - parent.shoes.gas_transfer_coefficient = 0.01 - parent.shoes.permeability_coefficient = 0.02 - parent.shoes.heat_transfer_coefficient = 0.02 - sealed = 1 - - adminbus - name = "Adminbus power armor atmospheric seals" - desc = "Made with the rare Badminium molecule." - slowdown = 0 - - optional - name = "Togglable power armor atmospheric seals" - desc = "Keeps the bad stuff out, but lets you remove your helmet without having to turn the whole suit off." - - proc/helmtoggle(sudden = 0, manual = 0) - var/mob/living/carbon/human/user = usr - var/obj/item/clothing/head/powered/helm - if(user.head && istype(user.head,/obj/item/clothing/head/powered)) - helm = user.head - - if(!sealed) - user << "\red Unable to initialize helmet seal, armor seals not active." - return - if(!helm.parent) - user << "\blue Helmet locked." - helm.flags |= NODROP - parent.helm = helm - helm.parent = parent - sleep(20) - parent.helm.gas_transfer_coefficient = 0.01 - parent.helm.permeability_coefficient = 0.02 - parent.helm.heat_transfer_coefficient = 0.02 - parent.helm.flags |= HEADSPACE - user << "\blue Helmet atmospheric seals engaged." - if(manual) - for (var/armorvar in helm.armor) - helm.armor[armorvar] = parent.armor[armorvar] - return - else - if(manual) - user << "\blue Helmet atmospheric seals disengaged." - parent.helm.gas_transfer_coefficient = 1 - parent.helm.permeability_coefficient = 1 - parent.helm.heat_transfer_coefficient = 1 - parent.helm.flags &= ~HEADSPACE - if(manual) - for (var/armorvar in helm.armor) - helm.armor[armorvar] = parent.reactive.togglearmor[armorvar] - if(!sudden) - if(manual) - sleep(20) - user << "\blue Helmet unlocked." - helm.flags &= ~NODROP - parent.helm = null - helm.parent = null - - adminbus - name = "Adminbus togglable power armor atmospheric seals" - desc = "Made with the rare Badminium molecule." - slowdown = 0 - - - diff --git a/code/unused/scrap.dm b/code/unused/scrap.dm deleted file mode 100644 index a18981e46e5..00000000000 --- a/code/unused/scrap.dm +++ /dev/null @@ -1,289 +0,0 @@ -// The scrap item -// a single object type represents all combinations of size and composition of scrap -// - - -/obj/item/scrap - name = "scrap" - icon = 'scrap.dmi' - icon_state = "1metal0" - item_state = "scrap-metal" - desc = "A piece of scrap" - var/classtext = "" - throwforce = 5.0 - m_amt = 0 - g_amt = 0 - w_amt = 0 - var/size = 1 // 1=piece, 2= few pieces, 3=small pile, 4=large pile - var/blood = 0 // 0=none, 1=blood-stained, 2=bloody - - throwforce = 8.0 - throw_speed = 2 - throw_range = 4 - w_class = 1 - flags = FPRINT | TABLEPASS | CONDUCT - -#define MAX_SCRAP 15000 // maximum content amount of a scrap pile - - -/obj/item/scrap/New() - src.verbs -= /atom/movable/verb/pull - ..() - update() - -// return a copy -/obj/item/scrap/proc/copy() - var/obj/item/scrap/ret = new() - ret.set_components(m_amt, g_amt, w_amt) - return ret - - -// set the metal, glass and waste content -/obj/item/scrap/proc/set_components(var/m, var/g, var/w) - m_amt = m - g_amt = g - w_amt = w - update() - -// returns the total amount of scrap in this pile -/obj/item/scrap/proc/total() - return m_amt + g_amt + w_amt - - -// sets the size, appearance, and description of the scrap depending on component amounts -/obj/item/scrap/proc/update() - var/total = total() - - - // determine size of pile - if(total<=400) - size = 1 - else if(total<=1600) - size = 2 - else - size = 3 - - w_class = size - - var/sizetext = "" - - switch(size) - if(1) - sizetext = "A piece of" - if(2) - sizetext = "A few pieces of" - if(3) - sizetext = "A pile of" - - // determine bloodiness - var/bloodtext = "" - switch(blood) - if(0) - bloodtext = "" - if(1) - bloodtext = "blood-stained " - if(2) - bloodtext = "bloody " - - - // find mixture and composition - var/class = 0 // 0 = mixed, 1=mostly. 2=pure - var/major = "waste" // the major component type - - var/max = 0 - - if(m_amt > max) - max = m_amt - else if(g_amt > max) - max = g_amt - else if(w_amt > max) - max = w_amt - - if(max == total) - class = 2 // pure - else if(max/total > 0.6) - class = 1 // mostly - else - class = 0 // mixed - - if(class>0) - var/remain = total - max - if(m_amt > remain) - major = "metal" - else if(g_amt > remain) - major = "glass" - else - major = "waste" - - - if(class == 1) - desc = "[sizetext] mostly [major] [bloodtext]scrap." - classtext = "mostly [major] [bloodtext]" - else - desc = "[sizetext] [bloodtext][major] scrap." - classtext = "[bloodtext][major] " - icon_state = "[size][major][blood]" - else - desc = "[sizetext] [bloodtext]mixed scrap." - classtext = "[bloodtext]mixed" - icon_state = "[size]mixed[blood]" - - if(size==0) - pixel_x = rand(-5,5) - pixel_y = rand(-5,5) - else - pixel_x = 0 - pixel_y = 0 - - // clear or set conduction flag depending on whether scrap is mostly metal - if(major=="metal") - flags |= CONDUCT - else - flags &= ~CONDUCT - - item_state = "scrap-[major]" - -// add a scrap item to this one -// if the resulting pile is too big, transfer only what will fit -// otherwise add them and deleted the added pile - -/obj/item/scrap/proc/add_scrap(var/obj/item/scrap/other, var/limit = MAX_SCRAP) - var/total = total() - var/other_total = other.total() - - if( (total + other_total) <= limit ) - m_amt += other.m_amt - g_amt += other.g_amt - w_amt += other.w_amt - - blood = (total*blood + other_total*other.blood) / (total + other_total) - del(other) - - else - var/space = limit - total - - var/m = round(other.m_amt/other_total*space, 1) - var/g = round(other.g_amt/other_total*space, 1) - var/w = round(other.w_amt/other_total*space, 1) - - m_amt += m - g_amt += g - w_amt += w - - other.m_amt -= m - other.g_amt -= g - other.w_amt -= w - - var/other_trans = m + g + w - other.update() - blood = (total*blood + other_trans*other.blood) / (total + other_trans) - - - blood = round(blood,1) - src.update() - -// limit this pile to maximum size -// return any remainder as a new scrap item (or null if none) -// note return item is not necessarily smaller than max size - -/obj/item/scrap/proc/remainder(var/limit = MAX_SCRAP) - var/total = total() - if(total > limit) - var/m = round( m_amt/total * limit, 1) - var/g = round( g_amt/total * limit, 1) - var/w = round( w_amt/total * limit, 1) - - var/obj/item/scrap/S = new() - S.set_components(m_amt - m,g_amt - g,w_amt - w) - src.set_components(m,g,w) - - return S - return null - -// if other pile of scrap tries to enter the same turf, then add that pile to this one - -/obj/item/scrap/CanPass(var/obj/item/scrap/O) - - if(istype(O)) - - src.add_scrap(O) - if(O) - return 0 // O still exists if not all could be transfered, so block it - return 1 - -/obj/item/scrap/proc/to_text() - return "[m_amt],[g_amt],[w_amt] ([total()])" - - -// attack with hand removes a single piece from a pile -/obj/item/scrap/attack_hand(mob/user) - add_fingerprint(user) - if(src.is_single_piece()) - return ..(user) - var/obj/item/scrap/S = src.get_single_piece() - S.attack_hand(user) - return - - -/obj/item/scrap/attackby(obj/item/I, mob/user) - ..() - if(istype(I, /obj/item/scrap)) - var/obj/item/scrap/S = I - if( (S.total()+src.total() ) > MAX_SCRAP ) - user << "The pile is full." - return - if(ismob(src.loc)) // can't combine scrap in hand - return - - src.add_scrap(S) - -// when dropped, try to make a pile if scrap is already there -/obj/item/scrap/dropped() - - spawn(2) // delay to allow drop postprocessing (since src may be destroyed) - for(var/obj/item/scrap/S in oview(0,src)) // excludes src itself - S.add_scrap(src) - -// return true if this is a single piece of scrap -// must be total<=400 and of single composition -/obj/item/scrap/proc/is_single_piece() - if(total() > 400) - return 0 - - var/empty = (m_amt == 0) + (g_amt == 0) + (w_amt == 0) - - return (empty==2) // must be 2 components with zero amount - - -// get a single piece of scrap from a pile -/obj/item/scrap/proc/get_single_piece() - - var/obj/item/scrap/S = new() - - var/cmp = pick(m_amt;1 , g_amt;2, w_amt;3) - - var/amount = 400 - switch(cmp) - if(1) - if(m_amt < amount) - amount = m_amt - - S.set_components(amount, 0, 0) - src.set_components(m_amt - amount, g_amt, w_amt) - - if(2) - if(g_amt < amount) - amount = g_amt - S.set_components(0, amount, 0) - src.set_components(m_amt, g_amt - amount, w_amt) - - if(3) - if(w_amt < amount) - amount = w_amt - S.set_components(0, 0, amount) - src.set_components(m_amt, g_amt, w_amt - amount) - - - return S - - diff --git a/code/unused/shuttle_engines.dm b/code/unused/shuttle_engines.dm deleted file mode 100644 index 457154db0f2..00000000000 --- a/code/unused/shuttle_engines.dm +++ /dev/null @@ -1,37 +0,0 @@ - -/obj/structure/shuttle - name = "shuttle" - icon = 'icons/turf/shuttle.dmi' - -/obj/structure/shuttle/engine - name = "engine" - density = 1 - anchored = 1.0 - -/obj/structure/shuttle/engine/heater - name = "heater" - icon_state = "heater" - -/obj/structure/shuttle/engine/platform - name = "platform" - icon_state = "platform" - -/obj/structure/shuttle/engine/propulsion - name = "propulsion" - icon_state = "propulsion" - opacity = 1 - -/obj/structure/shuttle/engine/propulsion/burst - name = "burst" - -/obj/structure/shuttle/engine/propulsion/burst/left - name = "left" - icon_state = "burst_l" - -/obj/structure/shuttle/engine/propulsion/burst/right - name = "right" - icon_state = "burst_r" - -/obj/structure/shuttle/engine/router - name = "router" - icon_state = "router" diff --git a/code/unused/siphs.dm b/code/unused/siphs.dm deleted file mode 100644 index 6104b3bc2d6..00000000000 --- a/code/unused/siphs.dm +++ /dev/null @@ -1,515 +0,0 @@ -/obj/machinery/atmoalter/siphs/New() - ..() - src.gas = new /datum/gas_mixture() - - return - -/obj/machinery/atmoalter/siphs/proc/releaseall() - src.t_status = 1 - src.t_per = max_valve - return - -/obj/machinery/atmoalter/siphs/proc/reset(valve, auto) - if(c_status!=0) - return - - if (valve < 0) - src.t_per = -valve - src.t_status = 1 - else - if (valve > 0) - src.t_per = valve - src.t_status = 2 - else - src.t_status = 3 - if (auto) - src.t_status = 4 - src.setstate() - return - -/obj/machinery/atmoalter/siphs/proc/release(amount, flag) - /* - var/T = src.loc - if (!( istype(T, /turf) )) - return - if (locate(/obj/move, T)) - T = locate(/obj/move, T) - if (!( amount )) - return - if (!( flag )) - amount = min(amount, max_valve) - src.gas.turf_add(T, amount) - return - */ //TODO: FIX - -/obj/machinery/atmoalter/siphs/proc/siphon(amount, flag) - /* - var/T = src.loc - if (!( istype(T, /turf) )) - return - if (locate(/obj/move, T)) - T = locate(/obj/move, T) - if (!( amount )) - return - if (!( flag )) - amount = min(amount, 900000.0) - src.gas.turf_take(T, amount) - return - */ //TODO: FIX - -/obj/machinery/atmoalter/siphs/proc/setstate() - - if(stat & NOPOWER) - icon_state = "siphon:0" - return - - if (src.holding) - src.icon_state = "siphon:T" - else - if (src.t_status != 3) - src.icon_state = "siphon:1" - else - src.icon_state = "siphon:0" - return - -/obj/machinery/atmoalter/siphs/fullairsiphon/New() - /* - ..() - if(!empty) - src.gas.oxygen = 2.73E7 - src.gas.n2 = 1.027E8 - return - */ //TODO: FIX - -/obj/machinery/atmoalter/siphs/fullairsiphon/port/reset(valve, auto) - - if (valve < 0) - src.t_per = -valve - src.t_status = 1 - else - if (valve > 0) - src.t_per = valve - src.t_status = 2 - else - src.t_status = 3 - if (auto) - src.t_status = 4 - src.setstate() - return - -/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent/attackby(W as obj, user as mob) - - if (istype(W, /obj/item/weapon/screwdriver)) - if (src.c_status) - src.anchored = 1 - src.c_status = 0 - else - if (locate(/obj/machinery/connector, src.loc)) - src.anchored = 1 - src.c_status = 3 - else - if (istype(W, /obj/item/weapon/wrench)) - src.alterable = !( src.alterable ) - return - -/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent/setstate() - - - if(stat & NOPOWER) - icon_state = "vent-p" - return - - if (src.t_status == 4) - src.icon_state = "vent2" - else - if (src.t_status == 3) - src.icon_state = "vent0" - else - src.icon_state = "vent1" - return - -/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent/reset(valve, auto) - - if (auto) - src.t_status = 4 - return - -/obj/machinery/atmoalter/siphs/scrubbers/process() - /* - if(stat & NOPOWER) return - - if(src.gas.temperature >= 3000) - src.melt() - - if (src.t_status != 3) - var/turf/T = src.loc - if (istype(T, /turf)) - if (locate(/obj/move, T)) - T = locate(/obj/move, T) - if (T.firelevel < 900000.0) - src.gas.turf_add_all_oxy(T) - - else - T = null - switch(src.t_status) - if(1.0) - if( !portable() ) use_power(50, ENVIRON) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.holding.gas.transfer_from(src.gas, t) - else - if (T) - var/t1 = src.gas.total_moles() - var/t2 = t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.gas.turf_add(T, t) - if(2.0) - if( !portable() ) use_power(50, ENVIRON) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = src.maximum - t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.gas.transfer_from(src.holding.gas, t) - else - if (T) - var/t1 = src.gas.total_moles() - var/t2 = src.maximum - t1 - var/t = src.t_per - if (t > t2) - t = t2 - src.gas.turf_take(T, t) - if(4.0) - if( !portable() ) use_power(50, ENVIRON) - if (T) - if (T.firelevel > 900000.0) - src.f_time = world.time + 400 - else - if (world.time > src.f_time) - src.gas.extract_toxs(T) - if( !portable() ) use_power(150, ENVIRON) - var/contain = src.gas.total_moles() - if (contain > 1.3E8) - src.gas.turf_add(T, 1.3E8 - contain) - - src.setstate() - src.updateDialog() - return - */ //TODO: FIX - -/obj/machinery/atmoalter/siphs/scrubbers/air_filter/setstate() - - if(stat & NOPOWER) - icon_state = "vent-p" - return - - if (src.t_status == 4) - src.icon_state = "vent2" - else - if (src.t_status == 3) - src.icon_state = "vent0" - else - src.icon_state = "vent1" - return - -/obj/machinery/atmoalter/siphs/scrubbers/air_filter/attackby(W as obj, user as mob) - - if (istype(W, /obj/item/weapon/screwdriver)) - if (src.c_status) - src.anchored = 1 - src.c_status = 0 - else - if (locate(/obj/machinery/connector, src.loc)) - src.anchored = 1 - src.c_status = 3 - else - if (istype(W, /obj/item/weapon/wrench)) - src.alterable = !( src.alterable ) - return - -/obj/machinery/atmoalter/siphs/scrubbers/air_filter/reset(valve, auto) - - if (auto) - src.t_status = 4 - src.setstate() - return - -/obj/machinery/atmoalter/siphs/scrubbers/port/setstate() - - if(stat & NOPOWER) - icon_state = "scrubber:0" - return - - if (src.holding) - src.icon_state = "scrubber:T" - else - if (src.t_status != 3) - src.icon_state = "scrubber:1" - else - src.icon_state = "scrubber:0" - return - -/obj/machinery/atmoalter/siphs/scrubbers/port/reset(valve, auto) - - if (valve < 0) - src.t_per = -valve - src.t_status = 1 - else - if (valve > 0) - src.t_per = valve - src.t_status = 2 - else - src.t_status = 3 - if (auto) - src.t_status = 4 - src.setstate() - return - -//true if the siphon is portable (therfore no power needed) - -/obj/machinery/proc/portable() - return istype(src, /obj/machinery/atmoalter/siphs/fullairsiphon/port) || istype(src, /obj/machinery/atmoalter/siphs/scrubbers/port) - -/obj/machinery/atmoalter/siphs/power_change() - - if( portable() ) - return - - if(!powered(ENVIRON)) - spawn(rand(0,15)) - stat |= NOPOWER - setstate() - else - stat &= ~NOPOWER - setstate() - - -/obj/machinery/atmoalter/siphs/process() - /* -// var/dbg = (suffix=="d") && Debug - - if(stat & NOPOWER) return - - if (src.t_status != 3) - var/turf/T = src.loc - if (istype(T, /turf)) - if (locate(/obj/move, T)) - T = locate(/obj/move, T) - else - T = null - switch(src.t_status) - if(1.0) - if( !portable() ) use_power(50, ENVIRON) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.holding.gas.transfer_from(src.gas, t) - else - if (T) - var/t1 = src.gas.total_moles() - var/t2 = t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.gas.turf_add(T, t) - if(2.0) - if( !portable() ) use_power(50, ENVIRON) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = src.maximum - t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.gas.transfer_from(src.holding.gas, t) - else - if (T) - var/t1 = src.gas.total_moles() - var/t2 = src.maximum - t1 - var/t = src.t_per - if (t > t2) - t = t2 - //var/g = gas.total_moles() - //if(dbg) world.log << "VP0 : [t] from turf: [gas.total_moles()]" - //if(dbg) Air() - - src.gas.turf_take(T, t) - //if(dbg) world.log << "VP1 : now [gas.total_moles()]" - - //if(dbg) world.log << "[gas.total_moles()-g] ([t]) from turf to siph" - - //if(dbg) Air() - if(4.0) - if( !portable() ) - use_power(50, ENVIRON) - - if (T) - if (T.firelevel > 900000.0) - src.f_time = world.time + 300 - else - if (world.time > src.f_time) - var/difference = CELLSTANDARD - (T.oxygen + T.n2) - if (difference > 0) - var/t1 = src.gas.total_moles() - if (difference > t1) - difference = t1 - src.gas.turf_add(T, difference) - - src.updateDialog() - - src.setstate() - return - */ //TODO: FIX - -/obj/machinery/atmoalter/siphs/attack_ai(user as mob) - return src.attack_hand(user) - -/obj/machinery/atmoalter/siphs/attack_paw(user as mob) - - return src.attack_hand(user) - return - -/obj/machinery/atmoalter/siphs/attack_hand(var/mob/user as mob) - - if(stat & NOPOWER) return - - if(src.portable() && istype(user, /mob/living/silicon/ai)) //AI can't use portable siphons - return - - user.machine = src - var/tt - switch(src.t_status) - if(1.0) - tt = text("Releasing Siphon Stop", src, src) - if(2.0) - tt = text("Release Siphoning Stop", src, src) - if(3.0) - tt = text("Release Siphon Stopped Automatic", src, src, src) - else - tt = "Automatic equalizers are on!" - var/ct = null - switch(src.c_status) - if(1.0) - ct = text("Releasing Accept Stop", src, src) - if(2.0) - ct = text("Release Accepting Stop", src, src) - if(3.0) - ct = text("Release Accept Stopped", src, src) - else - ct = "Disconnected" - var/at = null - if (src.t_status == 4) - at = text("Automatic On Stop", src) - var/dat = text("Canister Valves []
\n\tContains/Capacity [] / []
\n\tUpper Valve Status: [] []
\n\t\tM - - - - [] + + + + M
\n\tPipe Valve Status: []
\n\t\tM - - - - [] + + + + M
\n
\n\nClose
\n\t
", (!( src.alterable ) ? "Valves are locked. Unlock with wrench!" : "You can lock this interface with a wrench."), num2text(src.gas.return_pressure(), 10), num2text(src.maximum, 10), (src.t_status == 4 ? text("[]", at) : text("[]", tt)), (src.holding ? text("
(Tank ([])", src, src.holding.air_contents.return_pressure()) : null), src, num2text(max_valve, 7), src, src, src, src, src.t_per, src, src, src, src, src, num2text(max_valve, 7), ct, src, num2text(max_valve, 7), src, src, src, src, src.c_per, src, src, src, src, src, num2text(max_valve, 7), user) - user << browse(dat, "window=siphon;size=600x300") - onclose(user, "siphon") - return - -/obj/machinery/atmoalter/siphs/Topic(href, href_list) - ..() - - if (usr.stat || usr.restrained()) - return - if ((!( src.alterable )) && (!istype(usr, /mob/living/silicon/ai))) - return - if (((get_dist(src, usr) <= 1 || usr.telekinesis == 1) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon/ai))) - usr.machine = src - if (href_list["c"]) - var/c = text2num(href_list["c"]) - switch(c) - if(1.0) - src.c_status = 1 - if(2.0) - src.c_status = 2 - if(3.0) - src.c_status = 3 - else - else - if (href_list["t"]) - var/t = text2num(href_list["t"]) - if (src.t_status == 0) - return - switch(t) - if(1.0) - src.t_status = 1 - if(2.0) - src.t_status = 2 - if(3.0) - src.t_status = 3 - if(4.0) - src.t_status = 4 - src.f_time = 1 - else - else - if (href_list["tp"]) - var/tp = text2num(href_list["tp"]) - src.t_per += tp - src.t_per = min(max(round(src.t_per), 0), max_valve) - else - if (href_list["cp"]) - var/cp = text2num(href_list["cp"]) - src.c_per += cp - src.c_per = min(max(round(src.c_per), 0), max_valve) - else - if (href_list["tank"]) - var/cp = text2num(href_list["tank"]) - if (cp == 1) - src.holding.loc = src.loc - src.holding = null - if (src.t_status == 2) - src.t_status = 3 - src.updateUsrDialog() - - src.add_fingerprint(usr) - else - usr << browse(null, "window=canister") - return - return - -/obj/machinery/atmoalter/siphs/attackby(var/obj/W as obj, mob/user as mob) - - if (istype(W, /obj/item/weapon/tank)) - if (src.holding) - return - var/obj/item/weapon/tank/T = W - user.drop_item() - T.loc = src - src.holding = T - else - if (istype(W, /obj/item/weapon/screwdriver)) - var/obj/machinery/connector/con = locate(/obj/machinery/connector, src.loc) - if (src.c_status) - src.anchored = 0 - src.c_status = 0 - user.show_message("\blue You have disconnected the siphon.") - if(con) - con.connected = null - else - if (con && !con.connected) - src.anchored = 1 - src.c_status = 3 - user.show_message("\blue You have connected the siphon.") - con.connected = src - else - user.show_message("\blue There is nothing here to connect to the siphon.") - - - else - if (istype(W, /obj/item/weapon/wrench)) - src.alterable = !( src.alterable ) - if (src.alterable) - user << "\blue You unlock the interface!" - else - user << "\blue You lock the interface!" - return - - diff --git a/code/unused/spacecraft/manufacturing.dm b/code/unused/spacecraft/manufacturing.dm deleted file mode 100644 index 9036407ac5e..00000000000 --- a/code/unused/spacecraft/manufacturing.dm +++ /dev/null @@ -1,247 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 - -// Entirely unfinished. Mostly just bouncing ideas off the code. - - -// Smelting -// Grinding -// Spraying -// Crate - -/obj/deploycrate - icon = 'icons/obj/mining.dmi' - icon_state = "deploycrate" - density = 1 - var/payload - -/obj/deploycrate/attack_hand(mob/user as mob) - switch(payload) - if(null) - return - //if("cloner") - // make a cloner - // blah blah - for (var/mob/V in hearers(src)) - V.show_message("[src] lets out a pneumatic hiss, its panels rapdily unfolding and expanding to produce its payload.", 2) - del(src) - - -/obj/machinery/nanosprayer - icon = 'icons/obj/mining.dmi' - icon_state = "sprayer" - density = 1 - anchored = 1 - var/payload - var/hacked = 0 - var/temp = 100 - - var/usr_density = 5 - var/usr_lastupdate = 0 - - var/time_started = 0 - - var/points = 0 - var/totalpoints = 0 - - var/state = 0 // 0 - Idle, 1 - Spraying, 2 - Done, 3 - Overheated - -obj/machinery/nanosprayer/proc/update_temp() - // 1 second : 1 degree - if(src.state == 0) - var/diff = (world.time - usr_lastupdate) * 10 - temp -= diff - if(temp < 100) - temp = 100 - usr_lastupdate = world.time - return temp - else if(src.state == 1) - var/diff = (world.time - usr_lastupdate) * 10 - diff = diff * usr_density - temp += diff - usr_lastupdate = world.time - return temp - -obj/machinery/nanosprayer/process() - src.time_started = world.time - totalpoints = lentext(payload) * rand(5,10) - if(!totalpoints) - totalpoints = 1 - while(src.state == 1) - // Each unit of cost is 20 seconds - density - temp += density * rand(1,4) - sleep(200 - (usr_density * 10)) - if(src.temp > 350) - src.state = 3 - src.overheat() - return 0 - points += usr_density - if(points >= totalpoints) - src.state = 2 - src.complete() - return 1 - - -obj/machinery/nanosprayer/proc/cooldown() - while(state != 1) - sleep(200) - temp -= rand(5,20) - if(temp < 100) - temp = 100 - return - -obj/machinery/nanosprayer/proc/overheat() - return - -obj/machinery/nanosprayer/proc/complete() - src.totalpoints = 0 - src.points = 0 - spawn() cooldown() - return - -obj/machinery/nanosprayer/attack_hand(user as mob) - var/dat - if(..()) - return - dat += text("Core Temp: [temp]�C
") - dat += text("Nanocloud Density: [usr_density] million
") - dat += text("\[- / +\]
") - if(payload) - dat += text("
Task: [payload]
") - switch(state) - if(0) - dat += text("Status: Idling
") - if(1) - dat += text("Status: Spraying
") - if(2) - dat += text("Status: Spray Task Complete
") - if(3) - dat += text("Status: OVERHEATED
") - if(state == 1) - if(points <= 0) - points = 1 - var/complete = (points * 100)/totalpoints - if(complete < 0) - complete = 0 - if(complete > 100) - complete = 100 - dat += text("Progress: [complete]%
") - if(state == 2) - dat += text("Progress: 100%
") - dat += text("\[Release Payload\]
") - dat += text("

Set Task
") - dat += text("Start Spray
") - dat += text("Cancel Spray") - dat += text("

Refresh") - user << browse("NANO SPRAY 1.1[dat]", "window=nanosprayer") - onclose(user, "nanosprayer") - -obj/machinery/nanosprayer/Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - if(href_list["plus"]) - usr_density += 1 - if(href_list["minus"]) - usr_density -= 1 - if(usr_density < 1) - usr_density = 1 - if(href_list["start"]) - if(state == 0) - state = 1 - spawn() src.process() - if(href_list["stop"]) - if(state == 1) - state = 0 - points = 0 - totalpoints = 0 - spawn() cooldown() - if(href_list["settask"]) - if(state == 0) - var/temppayload = input("Set a Task:", "Job Assignment") as text|null - if(temppayload) - payload = temppayload - //if(href_list["release"]) - // if(state == 2) - // Create the crate somewhere - src.updateUsrDialog() - -/obj/machinery/smelter - icon = 'icons/obj/mining.dmi' - icon_state = "sprayer" - density = 1 - anchored = 1 - var/locked = 0 - var/closed = 0 - var/state = 0 // 0 - Idle, 1 - Smelt, 2 - Cool, 3 - Clean - var/slag = 0 - var/hacked = 0 - -obj/machinery/smelter/attack_hand(user as mob) - var/dat - if(..()) - return - dat += text("

Smelt-o-Matic Control Interface

") - dat += text("The red light is [src.closed ? "off" : "on"].
") - dat += text("The green light is [src.locked ? "on" : "off"].
") - switch(slag) - if(0) - dat += text("The meter is resting at zero.
") - if(1 to 2) - dat += text("The meter is wobbling at the mid-point marker.
") - if(3) - dat += text("The meter strains, displaying its maximum value.
") - else - dat += text("The meter has broken.
") - switch(state) - if(0) - dat += text("Status:Idle
") - if(1) - dat += text("Status:Smelting
") - if(2) - dat += text("Status:Cooling
") - if(3) - dat += text("Status:Cleaning
") - dat += text("

Turn key [src.locked ? "to upper-left position" : "to upper-right position"]
") - dat += text("Flip switch [src.closed ? "up" : "down"]
") - dat += text("Push large flashing yellow button
") - user << browse("SMELTOMATIC[dat]", "window=smelter") - onclose(user, "smelter") - - -obj/machinery/smelter/Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - if(href_list["key"]) - src.locked = !src.locked - if(href_list["switch"]) - src.closed = !src.closed - if(href_list["button"]) - //Do stuff to actually smelt shit or something I don't know - return - src.updateUsrDialog() - - -/obj/machinery/slaggrinder - icon = 'icons/obj/mining.dmi' - - density = 1 - anchored = 1 - - - -/obj/machinery/adminmachine - icon = 'icons/obj/mining.dmi' - icon_state = "sprayer" - density = 1 - anchored = 1 - - var/gameticker - var/gameworld - - New() - ..() - gameticker = ticker - gameworld = world diff --git a/code/unused/spacecraft/shipcore.dm b/code/unused/spacecraft/shipcore.dm deleted file mode 100644 index 68e87025848..00000000000 --- a/code/unused/spacecraft/shipcore.dm +++ /dev/null @@ -1,335 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 - -/obj/machinery/shipcore - icon = 'craft.dmi' - icon_state = "core" - density = 1 - - var/width = 6 - var/height = 8 - var/list/turfs = list() - var/list/builders - var/list/components = list() - var/build_status = "unbuilt" - - - proc/group_self() - builders = list() - turfs = list() - components = list() - - src.anchored = 1 - - var/obj/ship_builder/L = new(locate(src.x, src.y, src.z)) - L.dir = WEST - L.distance = width/2 - L.core = src - - var/obj/ship_builder/R = new(locate(src.x+1, src.y, src.z)) - R.dir = EAST - R.distance = (width/2)-1 - R.core = src - - builders.Add(L, R) - - spawn() L.scan() - spawn() R.scan() - - var/h - for(h=1, hShip Core[dat]","window=shipcore") - onclose(user, "shipcore") - return - -obj/machinery/shipcore/Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - if(href_list["groupself"]) - src.group_self() - if (href_list["move"]) - var/list/beacons = list() - for(var/obj/effect/ship_landing_beacon/b in world) - if(istype(b, /obj/effect/ship_landing_beacon)) - if(b.active) - beacons.Add(b) - if(!beacons.len) - return - var/obj/choice = input("Choose a beacon to land at.", "Beacon Selection") in beacons - if(choice) - src.MoveShip(choice.loc) - - for(var/mob/M in viewers(1, src)) - if ((M.client && M.machine == src)) - src.attack_hand(M) - src.updateUsrDialog() - return - - - -obj/machinery/ship_component - name = "ship component" - icon = 'craft.dmi' - var/obj/machinery/shipcore/core - var/required_draw = 0 - var/active = 1 - - proc - draw_power(var/n as num) - if(!n) - n = required_draw - if(core.draw_power(n)) - return 1 - else - return 0 - -obj/machinery/ship_component/thruster - name = "thruster" - icon_state = "thruster" - density = 1 - opacity = 1 - - var/cooldown = 600 // In 1/10th seconds - var/lastused - var/ready = 0 - required_draw = 100 - - proc - check_ready() - if(ready) - return 1 - if(lastused + cooldown <= world.time) - for(var/turf/T in range(1,src)) - if(istype(T, /turf/space)) - src.ready = 1 - break - else - src.ready = 0 - return src.ready - - fire() - src.check_ready() - if(!ready) - return 0 - if(src.draw_power()) - src.ready = 0 - src.lastused = world.time - return 1 - else - return 0 - -obj/machinery/ship_component/engine - name = "engine" - icon_state = "engine" - density = 1 - opacity = 1 - - var/charge = 1000 - var/capacity = 1000 - - draw_power(var/n as num) - if(charge >= n) - charge -= n - return 1 - else - return 0 - -obj/machinery/ship_component/control_panel - name = "control panel" - icon_state = "controlpanel" - density = 1 - opacity = 0 - - attack_hand(user as mob) - var/dat - if(..()) - return - if(!src.core) - dat += "No linked core found. Deploy ship core first." - else - dat += "Ship Status: [src.core.build_status]

" - dat += "

Installed Components:



" - dat += "" - for(var/obj/machinery/ship_component/C in core.components) - dat += "" - if(istype(C, /obj/machinery/ship_component/engine)) - dat += "" - if(istype(C, /obj/machinery/ship_component/thruster)) - dat += "" - dat += "
[C.name][C.active ? "Active" : "Inactive"]
Fuel: [C:charge]/[C:capacity]
Status: [C:check_ready() ? "Ready" : "On Cooldown"]
" - user << browse("Ship Controls[dat]","window=shipcontrols") - onclose(user, "shipcontrols") - - Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - - - - - - - - -/obj/ship_builder - icon = 'craft.dmi' - icon_state = "builder" - density = 0 - opacity = 0 - - var/obj/machinery/shipcore/core - var/distance = 0 - - proc/scan() - if(distance < 0) - cleanup_self() - var/i - for(i=0, iThe game hasn't started yet!
" - return - if(world.time < 6000) - usr << "There are [(6000-world.time)/10] seconds remaining before it may be called." - return - if(sent_strike_team == 1) - usr << "CentCom is already sending a team." - return - if(alert("Do you want to send in the CentCom death squad? Once enabled, this is irreversible.",,"Yes","No")!="Yes") - return - alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. Assigning the team's detailed task is recommended from there. While you will be able to manually pick the candidates from active ghosts, their assignment in the squad will be random.") - - var/input = null - while(!input) - input = copytext(sanitize(input(src, "Please specify which mission the death commando squad shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN) - if(!input) - if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes") - return - - if(sent_strike_team) - usr << "Looks like someone beat you to it." - return - - sent_strike_team = 1 - - if (emergency_shuttle.direction == 1 && emergency_shuttle.online == 1) - emergency_shuttle.recall() - - var/commando_number = commandos_possible //for selecting a leader - var/leader_selected = 0 //when the leader is chosen. The last person spawned. - -//Code for spawning a nuke auth code. - var/nuke_code - var/temp_code - for(var/obj/machinery/nuclearbomb/N in world) - temp_code = text2num(N.r_code) - if(temp_code)//if it's actually a number. It won't convert any non-numericals. - nuke_code = N.r_code - break - -//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. - var/list/candidates = list() //candidates for being a commando out of all the active ghosts in world. - var/list/commandos = list() //actual commando ghosts as picked by the user. - for(var/mob/dead/observer/G in player_list) - if(!G.client.holder && !G.client.is_afk()) //Whoever called/has the proc won't be added to the list. - if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) - candidates += G.key - for(var/i=commandos_possible,(i>0&&candidates.len),i--)//Decrease with every commando selected. - var/candidate = input("Pick characters to spawn as the commandos. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players") as null|anything in candidates //It will auto-pick a person when there is only one candidate. - candidates -= candidate //Subtract from candidates. - commandos += candidate//Add their ghost to commandos. - -//Spawns commandos and equips them. - for(var/obj/effect/landmark/L in landmarks_list) - if(commando_number<=0) break - if (L.name == "Commando") - leader_selected = commando_number == 1?1:0 - - var/mob/living/carbon/human/new_commando = create_death_commando(L, leader_selected) - - if(commandos.len) - new_commando.key = pick(commandos) - commandos -= new_commando.key - new_commando.internal = new_commando.s_store - new_commando.internals.icon_state = "internal1" - - //So they don't forget their code or mission. - if(nuke_code) - new_commando.mind.store_memory("Nuke Code: \red [nuke_code].") - new_commando.mind.store_memory("Mission: \red [input].") - - new_commando << "\blue You are a Special Ops. [!leader_selected?"commando":"LEADER"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: \red[input]" - - commando_number-- - -//Spawns the rest of the commando gear. - for (var/obj/effect/landmark/L in landmarks_list) - if (L.name == "Commando_Manual") - //new /obj/item/weapon/gun/energy/pulse_rifle(L.loc) - var/obj/item/weapon/paper/P = new(L.loc) - P.info = "

Good morning soldier!. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow:
#1 Work as a team.
#2 Accomplish your objective at all costs.
#3 Leave no witnesses.
You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets.
If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.

In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations LEADER is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.

Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device.
First and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE. Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible.
To make the device functional:
#1 Place bomb in designated detonation zone
#2 Extend and anchor bomb (attack with hand).
#3 Insert Nuclear Auth. Disk into slot.
#4 Type numeric code into keypad ([nuke_code]).
Note: If you make a mistake press R to reset the device.
#5 Press the E button to log onto the device.
You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option.
Note: Toggle off the SAFETY.
Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.
Note: THE BOMB IS STILL SET AND WILL DETONATE
Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.

The nuclear authorization code is: [nuke_code ? nuke_code : "None provided"]

Good luck, soldier!

" - P.name = "Spec. Ops. Manual" - - for (var/obj/effect/landmark/L in landmarks_list) - if (L.name == "Commando-Bomb") - new /obj/effect/spawner/newbomb/timer/syndicate(L.loc) - del(L) - - message_admins("\blue [key_name_admin(usr)] has spawned a CentCom strike squad.", 1) - log_admin("[key_name(usr)] used Spawn Death Squad.") - return 1 - -/client/proc/create_death_commando(obj/spawn_location, leader_selected = 0) - var/mob/living/carbon/human/new_commando = new(spawn_location.loc) - var/commando_leader_rank = pick("Lieutenant", "Captain", "Major") - var/commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major") - var/commando_name = pick(last_names) - - var/datum/preferences/A = new()//Randomize appearance for the commando. - if(leader_selected) - A.age = rand(35,45) - A.real_name = "[commando_leader_rank] [commando_name]" - else - A.real_name = "[commando_rank] [commando_name]" - A.real_name = "[!leader_selected ? commando_rank : - A.copy_to(new_commando) - - ready_dna(new_commando) - - //Creates mind stuff. - new_commando.mind_initialize() - new_commando.mind.assigned_role = "MODE" - new_commando.mind.special_role = "Death Commando" - ticker.mode.traitors |= new_commando.mind//Adds them to current traitor list. Which is really the extra antagonist list. - new_commando.equip_death_commando(leader_selected) - return new_commando - -/mob/living/carbon/human/proc/equip_death_commando(leader_selected = 0) - - var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src) - R.set_frequency(1441) - equip_to_slot_or_del(R, slot_ears) - if (leader_selected == 0) - equip_to_slot_or_del(new /obj/item/clothing/under/color/green(src), slot_w_uniform) - else - equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(src), slot_w_uniform) - equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(src), slot_shoes) - equip_to_slot_or_del(new /obj/item/clothing/suit/armor/swat(src), slot_wear_suit) - equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves) - equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad(src), slot_head) - equip_to_slot_or_del(new /obj/item/clothing/mask/gas/swat(src), slot_wear_mask) - equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(src), slot_glasses) - - equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(src), slot_back) - equip_to_slot_or_del(new /obj/item/weapon/storage/box(src), slot_in_backpack) - - equip_to_slot_or_del(new /obj/item/ammo_box/a357(src), slot_in_backpack) - equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack) - equip_to_slot_or_del(new /obj/item/weapon/storage/box/flashbangs(src), slot_in_backpack) - equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_in_backpack) - if (!leader_selected) - equip_to_slot_or_del(new /obj/item/weapon/c4(src), slot_in_backpack) - else - equip_to_slot_or_del(new /obj/item/weapon/pinpointer(src), slot_in_backpack) - equip_to_slot_or_del(new /obj/item/weapon/disk/nuclear(src), slot_in_backpack) - - equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(src), slot_l_store) - equip_to_slot_or_del(new /obj/item/weapon/grenade/flashbang(src), slot_r_store) - equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen(src), slot_s_store) - equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/mateba(src), slot_belt) - - equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle(src), slot_r_hand) - - - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src)//Here you go Deuryn - L.imp_in = src - L.implanted = 1 - - - - var/obj/item/weapon/card/id/W = new(src) - W.name = "[real_name]'s ID Card" - W.icon_state = "centcom" - W.access = get_all_accesses()//They get full station access. - W.access += list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage)//Let's add their alloted CentCom access. - W.assignment = "Death Commando" - W.registered_name = real_name - equip_to_slot_or_del(W, slot_wear_id) - - return 1 \ No newline at end of file diff --git a/code/unused/specops_shuttle.dm b/code/unused/specops_shuttle.dm deleted file mode 100644 index 898f69b68b2..00000000000 --- a/code/unused/specops_shuttle.dm +++ /dev/null @@ -1,246 +0,0 @@ -//Config stuff -#define SPECOPS_MOVETIME 600 //Time to station is milliseconds. 60 seconds, enough time for everyone to be on the shuttle before it leaves. -#define SPECOPS_STATION_AREATYPE "/area/shuttle/specops/station" //Type of the spec ops shuttle area for station -#define SPECOPS_DOCK_AREATYPE "/area/shuttle/specops/centcom" //Type of the spec ops shuttle area for dock - -var/specops_shuttle_moving_to_station = 0 -var/specops_shuttle_moving_to_centcom = 0 -var/specops_shuttle_at_station = 0 -var/specops_shuttle_can_send = 1 -var/specops_shuttle_time = 0 -var/specops_shuttle_timeleft = 0 - -/obj/machinery/computer/specops_shuttle - name = "Spec. Ops. Shuttle Console" - icon = 'icons/obj/computer.dmi' - icon_state = "shuttle" - req_access = list(access_cent_specops) - var/temp = null - var/hacked = 0 - var/allowedtocall = 0 - -/proc/specops_process() - var/area/centcom/control/cent_com = locate()//To find announcer. This area should exist for this proc to work. - var/area/centcom/specops/special_ops = locate()//Where is the specops area located? - var/mob/living/silicon/decoy/announcer = locate() in cent_com//We need a fake AI to announce some stuff below. Otherwise it will be wonky. - - var/message_tracker[] = list(0,1,2,3,5,10,30,45)//Create a a list with potential time values. - var/message = "THE SPECIAL OPERATIONS SHUTTLE IS PREPARING FOR LAUNCH"//Initial message shown. - if(announcer) - announcer.say(message) - message = "ARMORED SQUAD TAKE YOUR POSITION ON GRAVITY LAUNCH PAD" - announcer.say(message) - - while(specops_shuttle_time - world.timeofday > 0) - var/ticksleft = specops_shuttle_time - world.timeofday - - if(ticksleft > 1e5) - specops_shuttle_time = world.timeofday + 10 // midnight rollover - specops_shuttle_timeleft = (ticksleft / 10) - - //All this does is announce the time before launch. - if(announcer) - var/rounded_time_left = round(specops_shuttle_timeleft)//Round time so that it will report only once, not in fractions. - if(rounded_time_left in message_tracker)//If that time is in the list for message announce. - message = "ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN" - if(rounded_time_left==0) - message = "ALERT: TAKEOFF" - announcer.say(message) - message_tracker -= rounded_time_left//Remove the number from the list so it won't be called again next cycle. - //Should call all the numbers but lag could mean some issues. Oh well. Not much I can do about that. - - sleep(5) - - specops_shuttle_moving_to_station = 0 - specops_shuttle_moving_to_centcom = 0 - - specops_shuttle_at_station = 1 - if (specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return - - if (!specops_can_move()) - usr << "\red The Special Operations shuttle is unable to leave." - return - - //Begin Marauder launchpad. - spawn(0)//So it parallel processes it. - for(var/obj/machinery/door/poddoor/M in special_ops) - switch(M.id) - if("ASSAULT0") - spawn(10)//1 second delay between each. - M.open() - if("ASSAULT1") - spawn(20) - M.open() - if("ASSAULT2") - spawn(30) - M.open() - if("ASSAULT3") - spawn(40) - M.open() - - sleep(10) - - var/spawn_marauder[] = new() - for(var/obj/effect/landmark/L in landmarks_list) - if(L.name == "Marauder Entry") - spawn_marauder.Add(L) - for(var/obj/effect/landmark/L in landmarks_list) - if(L.name == "Marauder Exit") - var/obj/effect/portal/P = new(L.loc) - P.invisibility = 101//So it is not seen by anyone. - P.failchance = 0//So it has no fail chance when teleporting. - P.target = pick(spawn_marauder)//Where the marauder will arrive. - spawn_marauder.Remove(P.target) - - sleep(10) - - for(var/obj/machinery/mass_driver/M in special_ops) - switch(M.id) - if("ASSAULT0") - spawn(10) - M.drive() - if("ASSAULT1") - spawn(20) - M.drive() - if("ASSAULT2") - spawn(30) - M.drive() - if("ASSAULT3") - spawn(40) - M.drive() - - sleep(50)//Doors remain open for 5 seconds. - - for(var/obj/machinery/door/poddoor/M in special_ops) - switch(M.id)//Doors close at the same time. - if("ASSAULT0") - spawn(0) - M.close() - if("ASSAULT1") - spawn(0) - M.close() - if("ASSAULT2") - spawn(0) - M.close() - if("ASSAULT3") - spawn(0) - M.close() - special_ops.readyreset()//Reset firealarm after the team launched. - //End Marauder launchpad. - - var/area/start_location = locate(/area/shuttle/specops/centcom) - var/area/end_location = locate(/area/shuttle/specops/station) - - var/list/dstturfs = list() - var/throwy = world.maxy - - for(var/turf/T in end_location) - dstturfs += T - if(T.y < throwy) - throwy = T.y - - // hey you, get out of the way! - for(var/turf/T in dstturfs) - // find the turf to move things to - var/turf/D = locate(T.x, throwy - 1, 1) - //var/turf/E = get_step(D, SOUTH) - for(var/atom/movable/AM as mob|obj in T) - AM.Move(D) - if(istype(T, /turf/simulated)) - del(T) - - start_location.move_contents_to(end_location) - - for(var/turf/T in get_area_turfs(end_location) ) - var/mob/M = locate(/mob) in T - M << "\red You have arrived to [station_name]. Commence operation!" - -/proc/specops_can_move() - if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return 0 - else return 1 - -/obj/machinery/computer/specops_shuttle/attackby(I as obj, user as mob) - return attack_hand(user) - -/obj/machinery/computer/specops_shuttle/attack_ai(var/mob/user as mob) - return attack_hand(user) - -/obj/machinery/computer/specops_shuttle/attack_paw(var/mob/user as mob) - return attack_hand(user) - -/obj/machinery/computer/specops_shuttle/attackby(I as obj, user as mob) - if(istype(I,/obj/item/weapon/card/emag)) - user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals." - else - return attack_hand(user) - -/obj/machinery/computer/specops_shuttle/attack_hand(var/mob/user as mob) - if(!allowed(user)) - user << "\red Access Denied." - return - - if (sent_strike_team == 0) - usr << "\red The strike team has not yet deployed." - return - - if(..()) - return - - user.set_machine(src) - var/dat - if (temp) - dat = temp - else - dat += {" - Location: [specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "Departing for [station_name] in ([specops_shuttle_timeleft] seconds.)":specops_shuttle_at_station ? "Station":"Dock"]
- [specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "\n*The Special Ops. shuttle is already leaving.*
\n
":specops_shuttle_at_station ? "\nShuttle Offline
\n
":"\nDepart to [station_name]
\n
"] - \nClose"} - - //user << browse(dat, "window=computer;size=575x450") - //onclose(user, "computer") - var/datum/browser/popup = new(user, "computer", "Special Operations Shuttle", 575, 450) - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open() - return - -/obj/machinery/computer/specops_shuttle/Topic(href, href_list) - if(..()) - return - - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon))) - usr.set_machine(src) - - if (href_list["sendtodock"]) - if(!specops_shuttle_at_station|| specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return - - usr << "\blue Central Command will not allow the Special Operations shuttle to return." - return - - else if (href_list["sendtostation"]) - if(specops_shuttle_at_station || specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return - - if (!specops_can_move()) - usr << "\red The Special Operations shuttle is unable to leave." - return - - usr << "\blue The Special Operations shuttle will arrive on [station_name] in [(SPECOPS_MOVETIME/10)] seconds." - - temp += "Shuttle departing.

OK" - updateUsrDialog() - - var/area/centcom/specops/special_ops = locate() - if(special_ops) - special_ops.readyalert()//Trigger alarm for the spec ops area. - specops_shuttle_moving_to_station = 1 - - specops_shuttle_time = world.timeofday + SPECOPS_MOVETIME - spawn(0) - specops_process() - - else if (href_list["mainmenu"]) - temp = null - - add_fingerprint(usr) - updateUsrDialog() - return \ No newline at end of file diff --git a/code/unused/spells.dm b/code/unused/spells.dm deleted file mode 100644 index 334e8693f9a..00000000000 --- a/code/unused/spells.dm +++ /dev/null @@ -1,563 +0,0 @@ -//the old style proc spells. not sure why these were removed in favour of obj style spells, in all honesty. - -//BLIND - -/client/proc/blind() - set category = "Spells" - set name = "Blind" - set desc = "This spell temporarly blinds a single person and does not require wizard garb." - - var/mob/M = input(usr, "Who do you wish to blind?") as mob in oview() - - if(M) - if(usr.stat) - src << "Not when you are incapacitated." - return - // if(!usr.casting()) return - usr.verbs -= /client/proc/blind - spawn(300) - usr.verbs += /client/proc/blind - - usr.whisper("STI KALY") - - var/obj/effect/overlay/B = new /obj/effect/overlay( M.loc ) - B.icon_state = "blspell" - B.icon = 'icons/obj/wizard.dmi' - B.name = "spell" - B.anchored = 1 - B.density = 0 - B.layer = 4 - M.canmove = 0 - spawn(5) - del(B) - M.canmove = 1 - M << text("\blue Your eyes cry out in pain!") - M.disabilities |= NEARSIGHTED - spawn(300) - M.disabilities &= ~NEARSIGHTED - M.eye_blind = 10 - M.eye_blurry = 20 - return - -//MAGIC MISSILE - -/client/proc/magicmissile() - set category = "Spells" - set name = "Magic missile" - set desc = "This spell fires several, slow moving, magic projectiles at nearby targets." - if(usr.stat) - src << "Not when you are incapacitated." - return - if(!usr.casting()) return - - usr.say("FORTI GY AMA") - - for (var/mob/living/M as mob in oview()) - spawn(0) - var/obj/effect/overlay/A = new /obj/effect/overlay( usr.loc ) - A.icon_state = "magicm" - A.icon = 'icons/obj/wizard.dmi' - A.name = "a magic missile" - A.anchored = 0 - A.density = 0 - A.layer = 4 - var/i - for(i=0, i<20, i++) - if (!istype(M)) //it happens sometimes --rastaf0 - break - var/obj/effect/overlay/B = new /obj/effect/overlay( A.loc ) - B.icon_state = "magicmd" - B.icon = 'icons/obj/wizard.dmi' - B.name = "trail" - B.anchored = 1 - B.density = 0 - B.layer = 3 - spawn(5) - del(B) - step_to(A,M,0) - if (get_dist(A,M) == 0) - M.Weaken(5) - M.take_overall_damage(0,10) - del(A) - return - sleep(5) - del(A) - - usr.verbs -= /client/proc/magicmissile - spawn(100) - usr.verbs += /client/proc/magicmissile - -//SMOKE - -/client/proc/smokecloud() - - set category = "Spells" - set name = "Smoke" - set desc = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb." - if(usr.stat) - src << "Not when you are incapacitated." - return -// if(!usr.casting()) return - usr.verbs -= /client/proc/smokecloud - spawn(120) - usr.verbs += /client/proc/smokecloud - var/datum/effect/effect/system/bad_smoke_spread/smoke = new /datum/effect/effect/system/bad_smoke_spread() - smoke.set_up(10, 0, usr.loc) - smoke.start() - - -//SLEEP SMOKE - -///client/proc/smokecloud() -// -// set category = "Spells" -// set name = "Sleep Smoke" -// set desc = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb. But, without the robes, you have no protection against the magic." -// if(usr.stat) -// src << "Not when you are incapacitated." -// return -// if(!usr.casting()) return -// usr.verbs -= /client/proc/smokecloud -// spawn(120) -// usr.verbs += /client/proc/smokecloud -// var/datum/effect/system/sleep_smoke_spread/smoke = new /datum/effect/system/sleep_smoke_spread() -// smoke.set_up(10, 0, usr.loc) -// smoke.start() - -/client/proc/forcewall() - - set category = "Spells" - set name = "Forcewall" - set desc = "This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb." - if(usr.stat) - src << "Not when you are incapacitated." - return -// if(!usr.casting()) return - - usr.verbs -= /client/proc/forcewall - spawn(100) - usr.verbs += /client/proc/forcewall - var/forcefield - - usr.whisper("TARCOL MINTI ZHERI") - - forcefield = new /obj/effect/forcefield(locate(usr.x,usr.y,usr.z)) - spawn (300) - del (forcefield) - return - -//FIREBALLAN - -/client/proc/fireball() - set category = "Spells" - set name = "Fireball" - set desc = "This spell fires a fireball at a target and does not require wizard garb." - if(usr.stat) - src << "Not when you are incapacitated." - return -// if(!usr.casting()) return - - usr.verbs -= /client/proc/fireball - spawn(100) - usr.verbs += /client/proc/fireball - - usr.say("ONI SOMA") - - var/mob/living/user = src - if(!istype(user)) - return - - var/i - var/turf/T - var/range = 15 - - var/x = user.loc.x - var/y = user.loc.y - var/z = user.loc.z - - switch(user.dir) - if(NORTH) - T = get_turf(locate(x, y + range, z)) - if(EAST) - T = get_turf(locate(x + range, y, z)) - if(SOUTH) - T = get_turf(locate(x, y - range, z)) - if(WEST) - T = get_turf(locate(x - range, y, z)) - else - return - - var/obj/effect/overlay/A = new /obj/effect/overlay( usr.loc ) - - A.icon_state = "fireball" - A.icon = 'icons/obj/wizard.dmi' - A.name = "a fireball" - A.anchored = 0 - A.density = 0 - A.luminosity = 3 - - step_to(A, T, 0) - for(i=0, i<100, i++) - var/hit = 0 - var/moving = step_to(A,T,0) - for(var/mob/living/target in range(1, A)) - hit = 1 - target.take_overall_damage(20,25) - if(hit) - explosion(A.loc, -1, -1, 2, 2) - del(A) - return - if(!moving) - explosion(A.loc, -1, -1, 2, 2) - del(A) - return - sleep(2) - if(A) - explosion(A.loc, -1, -1, 2, 2) - del(A) - return - -//KNOCK - -/client/proc/knock() - set category = "Spells" - set name = "Knock" - set desc = "This spell opens nearby doors and does not require wizard garb." - if(usr.stat) - src << "Not when you are incapacitated." - return -// if(!usr.casting()) return - usr.verbs -= /client/proc/knock - spawn(100) - usr.verbs += /client/proc/knock - - usr.whisper("AULIE OXIN FIERA") - - for(var/obj/machinery/door/G in oview(3)) - spawn(1) - G.open() - return - -//KILL - -/mob/proc/kill(mob/living/M as mob in oview(1)) - set category = "Spells" - set name = "Disintegrate" - set desc = "This spell instantly kills somebody adjacent to you with the vilest of magick." - if(usr.stat) - src << "Not when you are incapacitated." - return - if(!usr.casting()) return - usr.verbs -= /mob/proc/kill - spawn(600) - usr.verbs += /mob/proc/kill - - usr.say("EI NATH") - - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(4, 1, M) - s.start() - - M.dust() - -//DISABLE TECH - -/mob/proc/tech() - set category = "Spells" - set name = "Disable Technology" - set desc = "This spell disables all weapons, cameras and most other technology in range." - if(usr.stat) - src << "Not when you are incapacitated." - return - if(!usr.casting()) return - usr.verbs -= /mob/proc/tech - spawn(400) - usr.verbs += /mob/proc/tech - - usr.say("NEC CANTIO") - empulse(src, 6, 10) - return - -//BLINK - -/client/proc/blink() - set category = "Spells" - set name = "Blink" - set desc = "This spell randomly teleports you a short distance." - if(usr.stat) - src << "Not when you are incapacitated." - return - if(!usr.casting()) return - var/list/turfs = new/list() - for(var/turf/T in orange(6)) - if(istype(T,/turf/space)) continue - if(T.density) continue - if(T.x>world.maxx-4 || T.x<4) continue //putting them at the edge is dumb - if(T.y>world.maxy-4 || T.y<4) continue - turfs += T - if(!turfs.len) turfs += pick(/turf in orange(6)) - var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread() - smoke.set_up(10, 0, usr.loc) - smoke.start() - var/turf/picked = pick(turfs) - if(!isturf(picked)) return - usr.loc = picked - usr.verbs -= /client/proc/blink - spawn(40) - usr.verbs += /client/proc/blink - -//TELEPORT - -/mob/proc/teleport() - set category = "Spells" - set name = "Teleport" - set desc = "This spell teleports you to a type of area of your selection." - if(usr.stat) - src << "Not when you are incapacitated." - return - if(!usr.casting()) return - var/A - usr.verbs -= /mob/proc/teleport -/* - var/list/theareas = new/list() - for(var/area/AR in world) - if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station)) continue - if(theareas.Find(AR.name)) continue - var/turf/picked = pick(get_area_turfs(AR.type)) - if (picked.z == src.z) - theareas += AR.name - theareas[AR.name] = AR -*/ - - A = input("Area to jump to", "BOOYEA", A) in teleportlocs - - spawn(600) - usr.verbs += /mob/proc/teleport - - var/area/thearea = teleportlocs[A] - - usr.say("SCYAR NILA [uppertext(A)]") - - var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread() - smoke.set_up(5, 0, usr.loc) - smoke.attach(usr) - smoke.start() - var/list/L = list() - for(var/turf/T in get_area_turfs(thearea.type)) - if(!T.density) - var/clear = 1 - for(var/obj/O in T) - if(O.density) - clear = 0 - break - if(clear) - L+=T - - if(!L.len) - usr <<"The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry." - return - - var/attempt = 0 - var/success = 0 - while(!success) - success = Move(pick(L)) - if(attempt > 20) break //Failsafe - if(!success) - usr.loc = pick(L) - - smoke.start() - - -//JAUNT - -/client/proc/jaunt() - set category = "Spells" - set name = "Ethereal Jaunt" - set desc = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls." - if(usr.stat) - src << "Not when you are incapacitated." - return - if(!usr.casting()) return - usr.verbs -= /client/proc/jaunt - spawn(300) - usr.verbs += /client/proc/jaunt - spell_jaunt(usr) - -/proc/spell_jaunt(var/mob/H, time = 50) - if(H.stat) return - spawn(0) - var/mobloc = get_turf(H.loc) - var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt( mobloc ) - var/atom/movable/overlay/animation = new /atom/movable/overlay( mobloc ) - animation.name = "water" - animation.density = 0 - animation.anchored = 1 - animation.icon = 'icons/mob/mob.dmi' - animation.icon_state = "liquify" - animation.layer = 5 - animation.master = holder - flick("liquify",animation) - H.loc = holder - H.client.eye = holder - var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread() - steam.set_up(10, 0, mobloc) - steam.start() - sleep(time) - mobloc = get_turf(H.loc) - animation.loc = mobloc - steam.location = mobloc - steam.start() - H.canmove = 0 - sleep(20) - flick("reappear",animation) - sleep(5) - if(!H.Move(mobloc)) - for(var/direction in list(1,2,4,8,5,6,9,10)) - var/turf/T = get_step(mobloc, direction) - if(T) - if(H.Move(T)) - break - H.canmove = 1 - H.client.eye = H - del(animation) - del(holder) -/* -/obj/effect/dummy/spell_jaunt - name = "water" - icon = 'icons/effects/effects.dmi' - icon_state = "nothing" - var/canmove = 1 - density = 0 - anchored = 1 - -/obj/effect/dummy/spell_jaunt/relaymove(var/mob/user, direction) - if (!src.canmove) return - switch(direction) - if(NORTH) - src.y++ - if(SOUTH) - src.y-- - if(EAST) - src.x++ - if(WEST) - src.x-- - if(NORTHEAST) - src.y++ - src.x++ - if(NORTHWEST) - src.y++ - src.x-- - if(SOUTHEAST) - src.y-- - src.x++ - if(SOUTHWEST) - src.y-- - src.x-- - src.canmove = 0 - spawn(2) src.canmove = 1 - -/obj/effect/dummy/spell_jaunt/ex_act(blah) - return -/obj/effect/dummy/spell_jaunt/bullet_act(blah,blah) - return -*/ -//MUTATE - -/client/proc/mutate() - set category = "Spells" - set name = "Mutate" - set desc = "This spell causes you to turn into a hulk and gain laser vision for a short while." - if(usr.stat) - src << "Not when you are incapacitated." - return - if(!usr.casting()) return - usr.verbs -= /client/proc/mutate - spawn(400) - usr.verbs += /client/proc/mutate - - usr.say("BIRUZ BENNAR") - - usr << text("\blue You feel strong! You feel pressure building behind your eyes!") - if (!(HULK in usr.mutations)) - usr.mutations.Add(HULK) - if (!(LASER in usr.mutations)) - usr.mutations.Add(LASER) - spawn (300) - if (LASER in usr.mutations) usr.mutations.Remove(LASER) - if (HULK in usr.mutations) usr.mutations.Remove(HULK) - return - -//BODY SWAP /N - -/mob/proc/swap(mob/living/M as mob in oview()) - set category = "Spells" - set name = "Mind Transfer" - set desc = "This spell allows the user to switch bodies with a target." - if(usr.stat) - src << "Not when you are incapacitated." - return - - if(M.client && M.mind) - if(M.mind.special_role != "Wizard" || "Fake Wizard" || "Changeling" || "Cultist" || "Space Ninja")//Wizards, changelings, ninjas, and cultists are protected. - if( (istype(M, /mob/living/carbon/human)) || (istype(M, /mob/living/carbon/monkey)) && M.stat != 2) - var/mob/living/carbon/human/H = M //so it does not freak out when looking at the variables. - var/mob/living/carbon/human/U = src - - U.whisper("GIN'YU CAPAN") - U.verbs -= /mob/proc/swap - //Remove special verbs from both mobs - if(U.mind.special_verbs.len) - for(var/V in U.mind.special_verbs) - U.verbs -= V - if(H.mind.special_verbs.len) - for(var/V in H.mind.special_verbs) - H.verbs -= V - - //empty out H - var/mob/dead/observer/G = H.ghostize(0) //Transfers H to a temporary mob - - //Start the Transfer - U.mind.transfer_to(H) - G.mind.transfer_to(U) - U.key = G.key //has to be called explicitly since ghostize() set the datum/mind/var/active = 0 - - //Re-add those special verbs and stuff - if(H.mind.special_verbs.len) - var/spell_loss = 1//Can lose only one spell during transfer. - var/probability = 95 //To determine the chance of wizard losing their spell. - for(var/V in H.mind.special_verbs) - if(spell_loss == 0) - H.verbs += V - else - if(prob(probability)) - H.verbs += V - probability -= 7//Chance of of keeping spells goes down each time a spell is added. Less spells means less chance of losing them. - else - spell_loss = 0 - H.mind.special_verbs -= V - spawn(500) - H << "The mind transfer has robbed you of a spell." - - if(U.mind.special_verbs.len)//Basic fix to swap verbs for any mob if needed. - for(var/V in U.mind.special_verbs) - U.verbs += V - - spawn(500) - U << "Something about your body doesn't seem quite right..." - - U.Paralyse(20) - H.Paralyse(20) - - spawn(600) - H.verbs += /mob/proc/swap - - else - src << "Their mind is not compatible." - return - else - src << "Their mind is resisting your spell." - return - - else - src << "They appear to be brain-dead." - return \ No newline at end of file diff --git a/code/unused/splash_simulation.dm b/code/unused/splash_simulation.dm deleted file mode 100644 index b2d185d260c..00000000000 --- a/code/unused/splash_simulation.dm +++ /dev/null @@ -1,202 +0,0 @@ -#define LIQUID_TRANSFER_THRESHOLD 0.05 - -var/liquid_delay = 4 - -var/list/datum/puddle/puddles = list() - -datum/puddle - var/list/obj/effect/liquid/liquid_objects = list() - -datum/puddle/proc/process() - //world << "DEBUG: Puddle process!" - for(var/obj/effect/liquid/L in liquid_objects) - L.spread() - - for(var/obj/effect/liquid/L in liquid_objects) - L.apply_calculated_effect() - - if(liquid_objects.len == 0) - del(src) - -datum/puddle/New() - ..() - puddles += src - -datum/puddle/Del() - puddles -= src - for(var/obj/O in liquid_objects) - del(O) - ..() - -client/proc/splash() - var/volume = input("Volume?","Volume?", 0 ) as num - if(!isnum(volume)) return - if(volume <= LIQUID_TRANSFER_THRESHOLD) return - var/turf/T = get_turf(src.mob) - if(!isturf(T)) return - trigger_splash(T, volume) - -proc/trigger_splash(turf/epicenter as turf, volume as num) - if(!epicenter) - return - if(volume <= 0) - return - - var/obj/effect/liquid/L = new/obj/effect/liquid(epicenter) - L.volume = volume - L.update_icon2() - var/datum/puddle/P = new/datum/puddle() - P.liquid_objects.Add(L) - L.controller = P - - - - -obj/effect/liquid - icon = 'icons/effects/liquid.dmi' - icon_state = "0" - name = "liquid" - var/volume = 0 - var/new_volume = 0 - var/datum/puddle/controller - -obj/effect/liquid/New() - ..() - if( !isturf(loc) ) - del(src) - - for( var/obj/effect/liquid/L in loc ) - if(L != src) - del(L) - -obj/effect/liquid/proc/spread() - - //world << "DEBUG: liquid spread!" - var/surrounding_volume = 0 - var/list/spread_directions = list(1,2,4,8) - var/turf/loc_turf = loc - for(var/direction in spread_directions) - var/turf/T = get_step(src,direction) - if(!T) - spread_directions.Remove(direction) - //world << "ERROR: Map edge!" - continue //Map edge - if(!loc_turf.can_leave_liquid(direction)) //Check if this liquid can leave the tile in the direction - spread_directions.Remove(direction) - continue - if(!T.can_accept_liquid(turn(direction,180))) //Check if this liquid can enter the tile - spread_directions.Remove(direction) - continue - var/obj/effect/liquid/L = locate(/obj/effect/liquid) in T - if(L) - if(L.volume >= src.volume) - spread_directions.Remove(direction) - continue - surrounding_volume += L.volume //If liquid already exists, add it's volume to our sum - else - var/obj/effect/liquid/NL = new(T) //Otherwise create a new object which we'll spread to. - NL.controller = src.controller - controller.liquid_objects.Add(NL) - - if(!spread_directions.len) - //world << "ERROR: No candidate to spread to." - return //No suitable candidate to spread to - - var/average_volume = (src.volume + surrounding_volume) / (spread_directions.len + 1) //Average amount of volume on this and the surrounding tiles. - var/volume_difference = src.volume - average_volume //How much more/less volume this tile has than the surrounding tiles. - if(volume_difference <= (spread_directions.len*LIQUID_TRANSFER_THRESHOLD)) //If we have less than the threshold excess liquid - then there is nothing to do as other tiles will be giving us volume.or the liquid is just still. - //world << "ERROR: transfer volume lower than THRESHOLD!" - return - - var/volume_per_tile = volume_difference / spread_directions.len - - for(var/direction in spread_directions) - var/turf/T = get_step(src,direction) - if(!T) - //world << "ERROR: Map edge 2!" - continue //Map edge - var/obj/effect/liquid/L = locate(/obj/effect/liquid) in T - if(L) - src.volume -= volume_per_tile //Remove the volume from this tile - L.new_volume = L.new_volume + volume_per_tile //Add it to the volume to the other tile - -obj/effect/liquid/proc/apply_calculated_effect() - volume += new_volume - - if(volume < LIQUID_TRANSFER_THRESHOLD) - del(src) - new_volume = 0 - update_icon2() - -obj/effect/liquid/Move() - return 0 - -obj/effect/liquid/Delete() - src.controller.liquid_objects.Remove(src) - ..() - -obj/effect/liquid/proc/update_icon2() - //icon_state = num2text( max(1,min(7,(floor(volume),10)/10)) ) - - switch(volume) - if(0 to 0.1) - del(src) - if(0.1 to 5) - icon_state = "1" - if(5 to 10) - icon_state = "2" - if(10 to 20) - icon_state = "3" - if(20 to 30) - icon_state = "4" - if(30 to 40) - icon_state = "5" - if(40 to 50) - icon_state = "6" - if(50 to INFINITY) - icon_state = "7" - -turf/proc/can_accept_liquid(from_direction) - return 0 -turf/proc/can_leave_liquid(from_direction) - return 0 - -turf/space/can_accept_liquid(from_direction) - return 1 -turf/space/can_leave_liquid(from_direction) - return 1 - -turf/simulated/floor/can_accept_liquid(from_direction) - for(var/obj/structure/window/W in src) - if(W.dir in list(5,6,9,10)) - return 0 - if(W.dir & from_direction) - return 0 - for(var/obj/O in src) - if(!O.liquid_pass()) - return 0 - return 1 - -turf/simulated/floor/can_leave_liquid(to_direction) - for(var/obj/structure/window/W in src) - if(W.dir in list(5,6,9,10)) - return 0 - if(W.dir & to_direction) - return 0 - for(var/obj/O in src) - if(!O.liquid_pass()) - return 0 - return 1 - -turf/simulated/wall/can_accept_liquid(from_direction) - return 0 -turf/simulated/wall/can_leave_liquid(from_direction) - return 0 - -obj/proc/liquid_pass() - return 1 - -obj/machinery/door/liquid_pass() - return !density - -#undef LIQUID_TRANSFER_THRESHOLD \ No newline at end of file diff --git a/code/unused/tensioner.dm b/code/unused/tensioner.dm deleted file mode 100644 index 064b1629353..00000000000 --- a/code/unused/tensioner.dm +++ /dev/null @@ -1,867 +0,0 @@ -#define PLAYER_WEIGHT 5 -#define HUMAN_DEATH -5000 -#define OTHER_DEATH -5000 -#define EXPLO_SCORE -10000 //boum - -#define COOLDOWN_TIME 12000 // Twenty minutes -#define MIN_ROUND_TIME 18000 - - -#define FLAT_PERCENT 0 - -//estimated stats -//80 minute round -//60 player server -//48k player-ticks - -//60 deaths (ideally) -//20 explosions - - -var/global/datum/tension/tension_master - -/datum/tension - var/score - - var/deaths - var/human_deaths - var/explosions - var/adminhelps - var/air_alarms - - var/nuketeam = 0 - var/malfAI = 0 - var/wizard = 0 - - var/forcenexttick = 0 - var/supress = 0 - var/eversupressed = 0 - var/cooldown = 0 - - var/round1 = 0 - var/round2 = 0 - var/round3 = 0 - var/round4 = 0 - - var/list/antagonistmodes = null - - - - var/list/potentialgames = list() - - New() - score = 0 - deaths=0 - human_deaths=0 - explosions=0 - adminhelps=0 - air_alarms=0 - - if(FLAT_PERCENT) // I cannot into balance - antagonistmodes = list ( - "POINTS_FOR_TRATIOR" = 6, - "POINTS_FOR_CHANGLING" = 6, - "POINTS_FOR_REVS" = 3, - "POINTS_FOR_MALF" = 1, - "POINTS_FOR_WIZARD" = 2, - "POINTS_FOR_CULT" = 3, - "POINTS_FOR_NUKETEAM" = 2, - "POINTS_FOR_ALIEN" = 5, - "POINTS_FOR_NINJA" = 3, - "POINTS_FOR_DEATHSQUAD" = 2, - "POINTS_FOR_BORGDEATHSQUAD" = 2 - ) - - else - antagonistmodes = list ( - "POINTS_FOR_TRATIOR" = 100000, - "POINTS_FOR_CHANGLING" = 120000, - "POINTS_FOR_REVS" = 150000, - "POINTS_FOR_MALF" = 250000, - "POINTS_FOR_WIZARD" = 150000, - "POINTS_FOR_CULT" = 150000, - "POINTS_FOR_NUKETEAM" = 250000, - "POINTS_FOR_ALIEN" = 200000, - "POINTS_FOR_NINJA" = 200000, - "POINTS_FOR_DEATHSQUAD" = 500000, - "POINTS_FOR_BORGDEATHSQUAD" = 500000 - ) - - proc/process() - score += get_num_players()*PLAYER_WEIGHT - - if(config.Tensioner_Active) - if(world.time > MIN_ROUND_TIME) - round1++ - if(!supress && !cooldown) - if(prob(1) || forcenexttick) - round2++ - if(prob(10) || forcenexttick) - round3++ - if(forcenexttick) - forcenexttick = 0 - - for (var/client/C in admin_list) - C << " The tensioner wishes to create additional antagonists! Press (this) in 60 seconds to abort!" - - spawn(600) - if(!supress) - cooldown = 1 - spawn(COOLDOWN_TIME) - cooldown = 0 - round4++ - - if(!antagonistmodes.len) - return - - var/thegame = null - - if(FLAT_PERCENT) - thegame = pickweight(antagonistmodes) - antagonistmodes.Remove(thegame) - - else - for(var/V in antagonistmodes) // OH SHIT SOMETHING IS GOING TO HAPPEN NOW - if(antagonistmodes[V] < score) - potentialgames.Add(V) - antagonistmodes.Remove(V) - if(potentialgames.len) - thegame = pick(potentialgames) - - - if(thegame) - - - log_admin("The tensioner fired, and decided on [thegame]") - - switch(thegame) - if("POINTS_FOR_TRATIOR") - if(!makeTratiors()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - if("POINTS_FOR_CHANGLING") - if(!makeChanglings()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - if("POINTS_FOR_REVS") - if(!makeRevs()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - if("POINTS_FOR_MALF") - if(!makeMalfAImode()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - if("POINTS_FOR_WIZARD") - if(!makeWizard()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - - if("POINTS_FOR_CULT") - if(!makeCult()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - - if("POINTS_FOR_NUKETEAM") - if(!makeNukeTeam()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - - if("POINTS_FOR_ALIEN") - if(!makeAliens()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - - if("POINTS_FOR_NINJA") - if(!makeSpaceNinja()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - - if("POINTS_FOR_DEATHSQUAD") - if(!makeDeathsquad()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - - if("POINTS_FOR_BORG_DEATHSQUAD") - if(!makeBorgDeathsquad()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - - - proc/get_num_players() - var/peeps = 0 - for (var/mob/M in player_list) - if (!M.client) - continue - peeps += 1 - - return peeps - - proc/death(var/mob/M) - if (!M) return - deaths++ - - if (istype(M,/mob/living/carbon/human)) - score += HUMAN_DEATH - human_deaths++ - else - score += OTHER_DEATH - - - proc/explosion() - score += EXPLO_SCORE - explosions++ - - proc/new_adminhelp() - adminhelps++ - - proc/new_air_alarm() - air_alarms++ - - - Topic(href, href_list) - - if(!usr || !usr.client) - return //This shouldnt happen - - if(!usr.client.holder) - message_admins("\red [key_name(usr)] tried to use the tensioner without authorization.") - log_admin("[key_name(usr)] tried to use the tensioner without authorization.") - return - - log_admin("[key_name(usr)] used a tensioner override. The override was [href]") - message_admins("[key_name(usr)] used a tensioner override. The override was [href]") - - - if(href_list["addScore"]) - score += 50000 - - if (href_list["makeTratior"]) - makeTratiors() - - else if (href_list["makeChanglings"]) - makeChanglings() - - else if (href_list["makeRevs"]) - makeRevs() - - else if (href_list["makeWizard"]) - makeWizard() - - else if (href_list["makeCult"]) - makeCult() - - else if (href_list["makeMalf"]) - makeMalfAImode() - - else if (href_list["makeNukeTeam"]) - makeNukeTeam() - - else if (href_list["makeAliens"]) - makeAliens() - - else if (href_list["makeSpaceNinja"]) - makeSpaceNinja() - - else if (href_list["makeDeathsquad"]) - makeDeathsquad() - - else if (href_list["makeBorgDeathsquad"]) - makeBorgDeathsquad() - - else if (href_list["Supress"]) - supress = 1 - eversupressed++ - spawn(6000) - supress = 0 - - else if (href_list["ToggleStatus"]) - config.Tensioner_Active = !config.Tensioner_Active - - - proc/makeMalfAImode() - - var/list/mob/living/silicon/AIs = list() - var/mob/living/silicon/malfAI = null - var/datum/mind/themind = null - - for(var/mob/living/silicon/ai/ai in player_list) - if(ai.client) - AIs += ai - - if(AIs.len) - malfAI = pick(AIs) - - else - return 0 - - if(malfAI) - themind = malfAI.mind - themind.make_AI_Malf() - return 1 - -/* - if(BE_CHANGELING) roletext="changeling" - if(BE_TRAITOR) roletext="traitor" - if(BE_OPERATIVE) roletext="operative" - if(BE_WIZARD) roletext="wizard" - if(BE_REV) roletext="revolutionary" - if(BE_CULTIST) roletext="cultist" - - - for(var/mob/new_player/player in world) - if(player.client && player.ready) - if(player.preferences.be_special & role) -*/ - - - proc/makeTratiors() - - var/datum/game_mode/traitor/temp = new - - if(config.protect_roles_from_antagonist) - temp.restricted_jobs += temp.protected_jobs - - var/list/mob/living/carbon/human/candidates = list() - var/mob/living/carbon/human/H = null - - for(var/mob/living/carbon/human/applicant in player_list) - - var/datum/preferences/preferences = new - - if(applicant.stat < 2) - if(applicant.mind) - if (!applicant.mind.special_role) - if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate")) - if(!(applicant.job in temp.restricted_jobs)) - if(applicant.client) - if(preferences.savefile_load(applicant, 0)) - if(preferences.be_special & BE_TRAITOR) - candidates += applicant - - if(candidates.len) - var/numTratiors = min(candidates.len, 3) - - for(var/i = 0, i300)//If more than 30 game seconds passed. - return - candidates += G - if("No") - return - - sleep(300) - - for(var/mob/dead/observer/G in candidates) - if(!G.client) - candidates.Remove(G) - - spawn(0) - if(candidates.len) - while((!theghost || !theghost.client) && candidates.len) - theghost = pick(candidates) - candidates.Remove(theghost) - if(!theghost) - return 0 - var/mob/living/carbon/human/new_character=makeBody(theghost) - new_character.mind.make_Wizard() - - return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode. - - - proc/makeCult() - - var/datum/game_mode/cult/temp = new - if(config.protect_roles_from_antagonist) - temp.restricted_jobs += temp.protected_jobs - - var/list/mob/living/carbon/human/candidates = list() - var/mob/living/carbon/human/H = null - - for(var/mob/living/carbon/human/applicant in player_list) - - var/datum/preferences/preferences = new - - if(applicant.stat < 2) - if(applicant.mind) - if (!applicant.mind.special_role) - if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate")) - if(!(applicant.job in temp.restricted_jobs)) - if(applicant.client) - if(preferences.savefile_load(applicant, 0)) - if(preferences.be_special & BE_CULTIST) - candidates += applicant - - if(candidates.len) - var/numCultists = min(candidates.len, 4) -// var/list/runeWords = list() - - for(var/i = 0, i300)//If more than 30 game seconds passed. - return - candidates += G - if("No") - return - - sleep(300) - - for(var/mob/dead/observer/G in candidates) - if(!G.client) - candidates.Remove(G) - - spawn(0) - if(candidates.len) - var/numagents = 5 - syndicate_begin() - - for(var/i = 0, iAlert: The shuttle is going back!
" - - var/syndicate_commando_number = syndicate_commandos_possible //for selecting a leader - - */ - var/syndicate_leader_selected = 0 //when the leader is chosen. The last person spawned. - - //Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. - - - for(var/mob/dead/observer/G in player_list) - spawn(0) - switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No")) - if("Yes") - if((world.time-time_passed)>300)//If more than 30 game seconds passed. - return - candidates += G - if("No") - return - sleep(300) - - for(var/mob/dead/observer/G in candidates) - if(!G.key) - candidates.Remove(G) - - if(candidates.len) - var/numagents = 6 - //Spawns commandos and equips them. - for (var/obj/effect/landmark/L in /area/syndicate_mothership/elite_squad) - if(numagents<=0) - break - if (L.name == "Syndicate-Commando") - syndicate_leader_selected = numagents == 1?1:0 - - var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, syndicate_leader_selected) - - - while((!theghost || !theghost.client) && candidates.len) - theghost = pick(candidates) - candidates.Remove(theghost) - - if(!theghost) - del(new_syndicate_commando) - break - - new_syndicate_commando.key = theghost.key - new_syndicate_commando.internal = new_syndicate_commando.s_store - new_syndicate_commando.internals.icon_state = "internal1" - - //So they don't forget their code or mission. - - - new_syndicate_commando << "\blue You are an Elite Syndicate. [!syndicate_leader_selected?"commando":"LEADER"] in the service of the Syndicate. \nYour current mission is: \red [input]" - - numagents-- - - //Spawns the rest of the commando gear. - // for (var/obj/effect/landmark/L) - // if (L.name == "Commando_Manual") - //new /obj/item/weapon/gun/energy/pulse_rifle(L.loc) - // var/obj/item/weapon/paper/P = new(L.loc) - // P.info = "

Good morning soldier!. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow:
#1 Work as a team.
#2 Accomplish your objective at all costs.
#3 Leave no witnesses.
You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets.
If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.

In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations LEADER is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.

Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device.
First and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE. Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible.
To make the device functional:
#1 Place bomb in designated detonation zone
#2 Extend and anchor bomb (attack with hand).
#3 Insert Nuclear Auth. Disk into slot.
#4 Type numeric code into keypad ([nuke_code]).
Note: If you make a mistake press R to reset the device.
#5 Press the E button to log onto the device.
You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option.
Note: Toggle off the SAFETY.
Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.
Note: THE BOMB IS STILL SET AND WILL DETONATE
Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.

The nuclear authorization code is: [nuke_code ? nuke_code : "None provided"]

Good luck, soldier!

" - // P.name = "Spec. Ops. Manual" - - for (var/obj/effect/landmark/L in /area/shuttle/syndicate_elite) - if (L.name == "Syndicate-Commando-Bomb") - new /obj/effect/spawner/newbomb/timer/syndicate(L.loc) - // del(L) - - return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode. - - - proc/makeBorgDeathsquad() - var/list/mob/dead/observer/candidates = list() - var/mob/dead/observer/theghost = null - var/time_passed = world.time - var/list/namelist = list("Tyr","Fenrir","Lachesis","Clotho","Atropos","Nyx") - - //Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. - - for(var/mob/dead/observer/G in player_list) - spawn(0) - switch(alert(G,"Do you wish to be considered for a cyborg strike team being sent in?","Please answer in 30 seconds!","Yes","No")) - if("Yes") - if((world.time-time_passed)>300)//If more than 30 game seconds passed. - return - candidates += G - if("No") - return - sleep(300) - - for(var/mob/dead/observer/G in candidates) - if(!G.client || !G.key) - candidates.Remove(G) - - if(candidates.len) - var/numagents = 3 - - //Spawns commandos and equips them. - for (var/obj/effect/landmark/L in /area/borg_deathsquad) - if(numagents<=0) - break - if (L.name == "Borg-Deathsquad") - - var/name = pick(namelist) - namelist.Remove(name) - - var/mob/living/silicon/robot/new_borg_deathsquad = create_borg_death_commando(L, name) - - - - while((!theghost || !theghost.client) && candidates.len) - theghost = pick(candidates) - candidates.Remove(theghost) - - if(!theghost) - del(new_borg_deathsquad) - break - - new_borg_deathsquad.key = theghost.key - - //So they don't forget their code or mission. - - - new_borg_deathsquad << "You are a borg deathsquad operative. Follow your laws." - numagents-- - - //Spawns the rest of the commando gear. - // for (var/obj/effect/landmark/L) - // if (L.name == "Commando_Manual") - //new /obj/item/weapon/gun/energy/pulse_rifle(L.loc) - // var/obj/item/weapon/paper/P = new(L.loc) - // P.info = "

Good morning soldier!. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow:
#1 Work as a team.
#2 Accomplish your objective at all costs.
#3 Leave no witnesses.
You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets.
If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.

In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations LEADER is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.

Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device.
First and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE. Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible.
To make the device functional:
#1 Place bomb in designated detonation zone
#2 Extend and anchor bomb (attack with hand).
#3 Insert Nuclear Auth. Disk into slot.
#4 Type numeric code into keypad ([nuke_code]).
Note: If you make a mistake press R to reset the device.
#5 Press the E button to log onto the device.
You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option.
Note: Toggle off the SAFETY.
Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.
Note: THE BOMB IS STILL SET AND WILL DETONATE
Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.

The nuclear authorization code is: [nuke_code ? nuke_code : "None provided"]

Good luck, soldier!

" - // P.name = "Spec. Ops. Manual" - - - return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode. - - - proc/makeBody(var/mob/dead/observer/G_found) // Uses stripped down and bastardized code from respawn character - if(!G_found || !G_found.key) return - - //First we spawn a dude. - var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned. - - var/datum/preferences/A = new() - A.copy_to(new_character) - - ready_dna(new_character) - new_character.key = G_found.key - - return new_character - - /proc/create_syndicate_death_commando(obj/spawn_location, syndicate_leader_selected = 0) - var/mob/living/carbon/human/new_syndicate_commando = new(spawn_location.loc) - var/syndicate_commando_leader_rank = pick("Lieutenant", "Captain", "Major") - var/syndicate_commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major") - var/syndicate_commando_name = pick(last_names) - - var/datum/preferences/A = new()//Randomize appearance for the commando. - if(syndicate_leader_selected) - A.real_name = "[syndicate_commando_leader_rank] [syndicate_commando_name]" - A.age = rand(35,45) - else - A.real_name = "[syndicate_commando_rank] [syndicate_commano_name]" - A.copy_to(new_syndicate_commando) - - ready_dna(new_syndicate_commando) - - //Creates mind stuff. - new_syndicate_commando.mind_initialize() - new_syndicate_commando.mind.assigned_role = "MODE" - new_syndicate_commando.mind.special_role = "Syndicate Commando" - - //Adds them to current traitor list. Which is really the extra antagonist list. - ticker.mode.traitors += new_syndicate_commando.mind - new_syndicate_commando.equip_syndicate_commando(syndicate_leader_selected) - - return new_syndicate_commando - - - - - - /proc/create_borg_death_commando(obj/spawn_location, name) - - var/mob/living/silicon/robot/new_borg_deathsquad = new(spawn_location.loc, 1) - - new_borg_deathsquad.real_name = name - new_borg_deathsquad.name = name - - //Creates mind stuff. - new_borg_deathsquad.mind_initialize() - new_borg_deathsquad.mind.assigned_role = "MODE" - new_borg_deathsquad.mind.special_role = "Borg Commando" - - //Adds them to current traitor list. Which is really the extra antagonist list. - ticker.mode.traitors += new_borg_deathsquad.mind - //del(spawn_location) // Commenting this out for multiple commando teams. - return new_borg_deathsquad - - - - - -/obj/machinery/computer/Borg_station - name = "Cyborg Station Terminal" - icon = 'icons/obj/computer.dmi' - icon_state = "syndishuttle" - req_access = list() - var/temp = null - var/hacked = 0 - var/jumpcomplete = 0 - -/obj/machinery/computer/Borg_station/attack_hand() - if(jumpcomplete) - return - if(alert(usr, "Are you sure you want to send a cyborg deathsquad?", "Confirmation", "Yes", "No") == "Yes") - var/area/start_location = locate(/area/borg_deathsquad/start) - var/area/end_location = locate(/area/borg_deathsquad/station) - - var/list/dstturfs = list() - var/throwy = world.maxy - - for(var/turf/T in end_location) - dstturfs += T - if(T.y < throwy) - throwy = T.y - - // hey you, get out of the way! - for(var/turf/T in dstturfs) - // find the turf to move things to - var/turf/D = locate(T.x, throwy - 1, 1) - //var/turf/E = get_step(D, SOUTH) - for(var/atom/movable/AM as mob|obj in T) - AM.Move(D) - if(istype(T, /turf/simulated)) - del(T) - - start_location.move_contents_to(end_location) - - for(var/obj/machinery/door/poddoor/P in end_location) - P.open() - jumpcomplete = 1 - command_alert("DRADIS contact! Set condition one throughout the station!") diff --git a/code/unused/traps.dm b/code/unused/traps.dm deleted file mode 100644 index b96f8b770b2..00000000000 --- a/code/unused/traps.dm +++ /dev/null @@ -1,225 +0,0 @@ -/obj/effect/pressure_plate - name = "pressure plate" - desc = "A pressure plate that triggers a trap or a few of them." - density = 0 - var/list/connected_traps_names = list() //mappers, edit this when you place pressure plates on the map. don't forget to make the connected traps have an UNIQUE name - var/list/connected_traps = list() //actual references to the connected traps. leave empty, it is generated at runtime from connected_traps_names - var/trigger_type = "mob and obj" //can be "mob", "obj" or "mob and obj", the only moveable types - -/obj/effect/pressure_plate/New() - ..() - src:visibility = 0 - refresh() - -/obj/effect/pressure_plate/verb/refresh() - set name = "Refresh Pressure Plate Links" - set category = "Object" - set src in view() - connected_traps = list() //emptying the list first - for(var/trap_name in connected_traps_names) - for(var/obj/effect/trap/the_trap in world) - if(the_trap.name == trap_name) - connected_traps += the_trap //adding the trap with the matching name - -/obj/effect/pressure_plate/HasEntered(atom/victim as mob|obj) - if(victim.density && (trigger_type == "mob and obj" || (trigger_type == "mob" && istype(victim,/mob)) || (trigger_type == "obj" && istype(victim,/obj)))) - for(var/obj/effect/trap/T in connected_traps) - T.trigger(victim) - -/obj/effect/pressure_plate/Bumped(atom/victim as mob|obj) - if(victim.density && (trigger_type == "mob and obj" || (trigger_type == "mob" && istype(victim,/mob)) || (trigger_type == "obj" && istype(victim,/obj)))) - for(var/obj/effect/trap/T in connected_traps) - T.trigger(victim) - -/obj/effect/trap //has three subtypes - /aoe, /area (ie affects an entire area), /single (only the victim is affected) - name = "trap" - desc = "It's a trap!" - density = 0 - var/uses = 1 //how many times it can be triggered - var/trigger_type = "mob and obj" //can be "mob", "obj" or "mob and obj", the only moveable types. can also be "none" to not be triggered by entering its square (needs to have a pressure plate attached in that case) - var/target_type = "mob" //if it targets mobs, turfs or objs - var/include_dense = 1 //if it includes dense targets in the aoe (may be important for some reason). you'll probably want to change it to 1 if you target mobs or objs - -/obj/effect/trap/New() - ..() - src:visibility = 0 //seriously, it keeps saying "undefined var" when I try to do it in the define - -/obj/effect/trap/HasEntered(victim as mob|obj) - if(trigger_type == "mob and obj" || (trigger_type == "mob" && istype(victim,/mob)) || (trigger_type == "obj" && istype(victim,/obj))) - trigger(victim) - -/obj/effect/trap/Bumped(victim as mob|obj) - if(trigger_type == "mob and obj" || (trigger_type == "mob" && istype(victim,/mob)) || (trigger_type == "obj" && istype(victim,/obj))) - trigger(victim) - -/obj/effect/trap/proc/trigger(victim) - if(!uses) - return - uses-- - activate(victim) - -/obj/effect/trap/proc/activate() - -/obj/effect/trap/aoe - name = "aoe trap" - desc = "This trap affects a number of mobs, turfs or objs in an aoe" - var/aoe_radius = 3 //radius of aoe - var/aoe_range_or_view = "view" //if it includes all tiles in [radius] range or view - -/obj/effect/trap/aoe/proc/picktargets() - - var/list/targets = list() - - switch(target_type) - if("turf") - switch(aoe_range_or_view) - if("view") - for(var/turf/T in view(src,aoe_radius)) - if(!T.density || include_dense) - targets += T - if("range") - for(var/turf/T in range(src,aoe_radius)) - if(!T.density || include_dense) - targets += T - if("mob") - switch(aoe_range_or_view) - if("view") - for(var/mob/living/M in view(src,aoe_radius)) - if(!M.density || include_dense) - targets += M - if("range") - for(var/mob/living/M in range(src,aoe_radius)) - if(!M.density || include_dense) - targets += M - if("obj") - switch(aoe_range_or_view) - if("view") - for(var/obj/O in view(src,aoe_radius)) - if(!O.density || include_dense) - targets += O - if("range") - for(var/obj/O in range(src,aoe_radius)) - if(!O.density || include_dense) - targets += O - - return targets - -/obj/effect/trap/aoe/rocksfall - name = "rocks fall trap" - desc = "Your DM must really hate you." - target_type = "turf" - include_dense = 0 - var/rocks_amt = 10 //amount of rocks falling - var/rocks_min_dmg = 50 //min damage per rock - var/rocks_max_dmg = 100 //max damage per rock - var/rocks_hit_chance = 100 //the chance for a rock to hit you - var/list/rocks_type = list() //what rocks might it drop on the target. with var editing, not even limited to rocks. - -/obj/effect/trap/aoe/rocksfall/New() - - ..() - - rocks_type = pick_rock_types() - -/obj/effect/trap/aoe/rocksfall/proc/pick_rock_types() //since we may want subtypes of the trap with completely different rock types, which is best done this way - - var/list/varieties = list() - - varieties = typesof(/obj/item/weapon/ore) - varieties -= /obj/item/weapon/ore/diamond //don't want easily available rare ores, hmm? - varieties -= /obj/item/weapon/ore/uranium - varieties -= /obj/item/weapon/ore/slag //that'd be just stupid - - return varieties - -/obj/effect/trap/aoe/rocksfall/activate() - - var/list/targets = list() - targets = picktargets() - - if(target_type == "turf") - for(var/i=0,i 0) - step(src, src.dir) - sleep(1) - t1-- - else - var/t1 = round(src.speed / 5) - while(t1 > 0) - step(src, src.dir) - t1-- - return - -/obj/machinery/vehicle/meteorhit(var/obj/O as obj) - for (var/obj/item/I in src) - I.loc = src.loc - - for (var/mob/M in src) - M.loc = src.loc - if (M.client) - M.client.eye = M.client.mob - M.client.perspective = MOB_PERSPECTIVE - del(src) - -/obj/machinery/vehicle/ex_act(severity) - switch (severity) - if (1.0) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - //SN src = null - del(src) - if(2.0) - if (prob(50)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - //SN src = null - del(src) - -/obj/machinery/vehicle/blob_act() - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - del(src) - -/obj/machinery/vehicle/Bump(var/atom/A) - //world << "[src] bumped into [A]" - spawn (0) - ..() - src.speed = 0 - return - return - -/obj/machinery/vehicle/relaymove(mob/user as mob, direction) - if (user.stat) - return - - if ((user in src)) - if (direction & 1) - src.speed = max(src.speed - 1, 1) - else if (direction & 2) - src.speed = min(src.maximum_speed, src.speed + 1) - else if (src.can_rotate && direction & 4) - src.dir = turn(src.dir, -90.0) - else if (src.can_rotate && direction & 8) - src.dir = turn(src.dir, 90) - else if (direction & 16 && src.can_maximize_speed) - src.speed = src.maximum_speed - -/obj/machinery/vehicle/verb/eject() - set src = usr.loc - - if (usr.stat) - return - - var/mob/M = usr - M.loc = src.loc - if (M.client) - M.client.eye = M.client.mob - M.client.perspective = MOB_PERSPECTIVE - step(M, turn(src.dir, 180)) - return - -/obj/machinery/vehicle/verb/board() - set src in oview(1) - - if (usr.stat) - return - - if (src.one_person_only && locate(/mob, src)) - usr << "There is no room! You can only fit one person." - return - - var/mob/M = usr - if (M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - - M.loc = src - -/obj/machinery/vehicle/verb/unload(var/atom/movable/A in src) - set src in oview(1) - - if (usr.stat) - return - - if (istype(A, /atom/movable)) - A.loc = src.loc - for(var/mob/O in view(src, null)) - if ((O.client && !(O.blinded))) - O << text("\blue [] unloads [] from []!", usr, A, src) - - if (ismob(A)) - var/mob/M = A - if (M.client) - M.client.perspective = MOB_PERSPECTIVE - M.client.eye = M - -/obj/machinery/vehicle/verb/load() - set src in oview(1) - - if (usr.stat) - return - - if (((istype(usr, /mob/living/carbon/human)) && (!(ticker) || (ticker && ticker.mode != "monkey")))) - var/mob/living/carbon/human/H = usr - - if ((H.pulling && !(H.pulling.anchored))) - if (src.one_person_only && !(istype(H.pulling, /obj/item/weapon))) - usr << "You may only place items in." - else - H.pulling.loc = src - if (ismob(H.pulling)) - var/mob/M = H.pulling - if (M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O << text("\blue [] loads [] into []!", H, H.pulling, src) - - H.stop_pulling() - - -/obj/machinery/vehicle/space_ship - icon = 'escapepod.dmi' - icon_state = "pod" - var/datum/global_iterator/space_ship_inertial_movement/pr_inertial_movement - var/datum/global_iterator/space_ship_speed_increment/pr_speed_increment - var/last_relay = 0 - var/obj/machinery/portable_atmospherics/canister/internal_tank - var/health = 100 - var/datum/effects/system/spark_spread/spark_system = new - - New() - ..() - internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src) - pr_inertial_movement = new /datum/global_iterator/space_ship_inertial_movement(list(src),0) - pr_speed_increment = new /datum/global_iterator/space_ship_speed_increment(list(src),0) - src.spark_system.set_up(2, 0, src) - src.spark_system.attach(src) - return - - proc/inspace() - if(istype(src.loc, /turf/space)) - return 1 - return 0 - - remove_air(amount) - if(src.internal_tank) - return src.internal_tank.air_contents.remove(amount) - else - var/turf/T = get_turf(src) - return T.remove_air(amount) - - return_air() - if(src.internal_tank) - return src.internal_tank.return_air() - return - - proc/return_pressure() - if(src.internal_tank) - return src.internal_tank.return_pressure() - return 0 - - proc/return_temperature() - if(src.internal_tank) - return src.internal_tank.return_temperature() - return 0 - - Bump(var/atom/movable/A) - if(istype(A)) - step(A, src.dir) - else - if(pr_inertial_movement.cur_delay<2) - take_damage(25) - pr_speed_increment.stop() - pr_inertial_movement.stop() - return - - proc/take_damage(value) - if(isnum(value)) - src.health -= value - if(src.health>0) - src.spark_system.start() -// world << "[src] health is [health]" - else - src.ex_act(1) - return - - process() - return - - proc/get_desired_speed() - return (pr_inertial_movement.max_delay-pr_inertial_movement.desired_delay)/(pr_inertial_movement.max_delay-pr_inertial_movement.min_delay)*100 - - proc/get_current_speed() - return (pr_inertial_movement.max_delay-pr_inertial_movement.cur_delay)/(pr_inertial_movement.max_delay-pr_inertial_movement.min_delay)*100 - -/obj/machinery/vehicle/space_ship/relaymove(mob/user as mob, direction) - spawn() - if (user.stat || world.time-last_relay<2) - return - last_relay = world.time - var/speed_change = 0 - if(direction & NORTH) - pr_inertial_movement.desired_delay = Clamp(pr_inertial_movement.desired_delay-1, pr_inertial_movement.min_delay, pr_inertial_movement.max_delay) - speed_change = 1 - else if (direction & SOUTH) - pr_inertial_movement.desired_delay = Clamp(pr_inertial_movement.desired_delay+1, pr_inertial_movement.min_delay, pr_inertial_movement.max_delay) - speed_change = 1 - else if (src.can_rotate && direction & 4) - src.dir = turn(src.dir, -90.0) - else if (src.can_rotate && direction & 8) - src.dir = turn(src.dir, 90) - if(speed_change) -// user << "Desired speed: [get_desired_speed()]%" - src.pr_speed_increment.start() - src.pr_inertial_movement.start() - return - -//should try two directional iterator datums, one for vertical, one for horizontal movement. -/datum/global_iterator/space_ship_inertial_movement - delay = 1 - var/min_delay = 0 - var/max_delay = 15 - var/desired_delay - var/cur_delay - var/last_move - - New() - ..() - desired_delay = max_delay - cur_delay = max_delay - - stop() - src.cur_delay = max_delay - src.desired_delay = max_delay - return ..() - - process(var/obj/machinery/vehicle/space_ship/SS as obj) - if(cur_delay >= max_delay) - return src.stop() - if(world.time - last_move < cur_delay) - return - last_move = world.time -/* - if(src.delay>=SS.max_delay) - return src.stop() -*/ - if(!step(SS, SS.dir) || !SS.inspace()) - src.stop() - return - - proc/set_desired_delay(var/num as num) - src.desired_delay = num - return - -/datum/global_iterator/space_ship_speed_increment - delay = 5 - - process(var/obj/machinery/vehicle/space_ship/SS as obj) - if(SS.pr_inertial_movement.desired_delay!=SS.pr_inertial_movement.cur_delay) - var/delta = SS.pr_inertial_movement.desired_delay - SS.pr_inertial_movement.cur_delay - SS.pr_inertial_movement.cur_delay += delta>0?1:-1 -/* - for(var/mob/M in SS) - M << "Current speed: [SS.get_current_speed()]" -*/ - else - src.stop() - return diff --git a/icons/mob/drone.dmi b/icons/mob/drone.dmi index b5437a95d89..0a8a3f70a4a 100644 Binary files a/icons/mob/drone.dmi and b/icons/mob/drone.dmi differ diff --git a/strings/ion_laws.txt b/strings/ion_laws.txt new file mode 100644 index 00000000000..e77d35eba07 --- /dev/null +++ b/strings/ion_laws.txt @@ -0,0 +1,17 @@ +ionthreats@=ALIENS@,BEARS@,CLOWNS@,XENOS@,PETES@,BOMBS@,FETISHES@,WIZARDS@,SYNDICATE AGENTS@,CENTCOM OFFICERS@,SPACE PIRATES@,TRAITORS@,MONKEYS@,BEES@,CARP@,CRABS@,EELS@,BANDITS@,LIGHTS@,INSECTS@,VIRUSES@,SERIAL KILLERS@,ROGUE CYBORGS@,CORGIS@,SPIDERS@,BUTTS@,NINJAS@,PIRATES@,SPACE NINJAS@,CHANGELINGS@,ZOMBIES@,GOLEMS@,VAMPIRES@,WEREWOLVES@,COWBOYS@,INDIANS@,COMMUNISTS@,SOVIETS@,NERDS@,GRIFFONS@,DINOSAURS@,SMALL BIRDS@,BIRDS OF PREY@,OWLS@,VELOCIRAPTORS@,DARK GODS@,HORRORTERRORS@,ILLEGAL IMMIGRANTS@,DRUGS@,MEXICANS@,CANADIANS@,HULKS@,SLIMES@,SKELETONS@,CAPITALISTS@,SINGULARITIES@,ANGRY BLACK MEN@,GODS@,THIEVES@,ASSHOLES@,TERRORISTS@,SNOWMEN@,PINE TREES@,UNKNOWN CREATURES@,THINGS UNDER THE BED@,BOOGEYMEN@,PREDATORS@,PACKETS@,ARTIFICIAL PRESERVATIVES +ionobjects@=AIRLOCKS@,ARCADE MACHINES@,AUTOLATHES@,BANANA PEELS@,BACKPACKS@,BEAKERS@,BEARDS@,BELTS@,BERETS@,BIBLES@,BODY ARMOR@,BOOKS@,BOOTS@,BOMBS@,BOTTLES@,BOXES@,BRAINS@,BRIEFCASES@,BUCKETS@,CABLE COILS@,CANDLES@,CANDY BARS@,CANISTERS@,CAMERAS@,CATS@,CELLS@,CHAIRS@,CLOSETS@,CHEMICALS@,CHEMICAL DISPENSERS@,CLONING PODS@,CLONING EQUIPMENT@,CLOTHES@,CLOWN CLOTHES@,COFFINS@,COINS@,COLLECTABLES@,CORPSES@,COMPUTERS@,CORGIS@,COSTUMES@,CRATES@,CROWBARS@,CRAYONS@,DISPENSERS@,DOORS@,EARS@,EQUIPMENT@,ENERGY GUNS@,EMAGS@,ENGINES@,ERRORS@,EXOSKELETONS@,EXPLOSIVES@,EYEWEAR@,FEDORAS@,FIRE AXES@,FIRE EXTINGUISHERS@,FIRESUITS@,FLAMETHROWERS@,FLASHES@,FLASHLIGHTS@,FLOOR TILES@,FREEZERS@,GAS MASKS@,GLASS SHEETS@,GLOVES@,GUNS@,HANDCUFFS@,HATS@,HEADSETS@,HEADS@,HAIRDOS@,HELMETS@,HORNS@,ID CARDS@,INSULATED GLOVES@,JETPACKS@,JUMPSUITS@,LASERS@,LIGHTBULBS@,LIGHTS@,LOCKERS@,MACHINES@,MECHAS@,MEDKITS@,MEDICAL TOOLS@,MESONS@,METAL SHEETS@,MINING TOOLS@,MIME CLOTHES@,MULTITOOLS@,ORES@,OXYGEN TANKS@,PDAS@,PAIS@,PACKETS@,PANTS@,PAPERS@,PARTICLE ACCELERATORS@,PENS@,PETS@,PIPES@,PLANTS@,PUDDLES@,RACKS@,RADIOS@,RCDS@,REFRIDGERATORS@,REINFORCED WALLS@,ROBOTS@,SCREWDRIVERS@,SEEDS@,SHUTTLES@,SKELETONS@,SINKS@,SHOES@,SINGULARITIES@,SOLAR PANELS@,SOLARS@,SPACESUITS@,SPACE STATIONS@,STUN BATONS@,SUITS@,SUNGLASSES@,SWORDS@,SYRINGES@,TABLES@,TANKS@,TELEPORTERS@,TELECOMMUNICATION EQUIPMENTS@,TOOLS@,TOOLBELTS@,TOOLBOXES@,TOILETS@,TOYS@,TUBES@,VEHICLES@,VENDING MACHINES@,VESTS@,VIRUSES@,WALLS@,WASHING MACHINES@,WELDERS@,WINDOWS@,WIRECUTTERS@,WRENCHES@,WIZARD ROBES +ioncrew@=CREWMEMBERS@,CAPTAINS@,HEADS OF PERSONNEL@,HEADS OF SECURITY@,SECURITY OFFICERS@,WARDENS@,DETECTIVES@,LAWYERS@,CHIEF ENGINEERS@,STATION ENGINEERS@,ATMOSPHERIC TECHNICIANS@,JANITORS@,QUARTERMASTERS@,CARGO TECHNICIANS@,SHAFT MINERS@,BOTANISTS@,RESEARCH DIRECTORS@,CHIEF MEDICAL OFFICERS@,MEDICAL DOCTORS@,CHEMISTS@,GENETICISTS@,VIROLOGISTS@,ROBOTICISTS@,SCIENTISTS@,ASSISTANTS@,BARTENDERS@,CHEFS@,CLOWNS@,MIMES@,CHAPLAINS@,LIBRARIANS@,HEADS OF CREW@,CAPTAINS AND HEADS@,CYBORGS@,ARTIFICAL INTELLIGENCES +ionadjectives@=SOFT@,WARM@,WET@,COLD@,ICY@,SEXY@,UGLY@,CUBAN@,HARD@,BURNING@,FROZEN@,POISONOUS@,EXPLOSIVE@,FAST@,SLOW@,FAT@,LIGHT@,DARK@,DEADLY@,HAPPY@,SAD@,SILLY@,INTELLIGENT@,RIDICULOUS@,LARGE@,TINY@,DEPRESSING@,POORLY DRAWN@,UNATTRACTIVE@,INSIDIOUS@,EVIL@,GOOD@,UNHEALTHY@,HEALTHY@,SANITARY@,UNSANITARY@,WOBBLY@,FIRM@,VIOLENT@,PEACEFUL@,WOODEN@,METALLIC@,HYPERACTIVE@,COTTONY@,INSULTING@,INHOSPITABLE@,FRIENDLY@,BORED@,HUNGRY@,DIGITAL@,FICTIONAL@,IMAGINARY@,ROUGH@,SMOOTH@,LOUD@,QUIET@,MOIST@,DRY@,GAPING@,DELICIOUS@,ILL@,DISEASED@,HONKING@,SWEARING@,POLITE@,IMPOLITE@,OBESE@,SOLAR-POWERED@,BATTERY-OPERATED@,EXPIRED@,SMELLY@,FRESH@,GANGSTA@,NERDY@,POLITICAL@,UNDULATING@,TWISTED@,RAGING@,FLACCID@,STEALTHY@,INVISIBLE@,PAINFUL@,HARMFUL@,HOMOSEXUAL@,HETEROSEXUAL@,SEXUAL@,COLORFUL@,DRAB@,DULL@,UNSTABLE@,NUCLEAR@,THERMONUCLEAR@,SYNDICATE@,SPACE@,SPESS@,CLOWN@,CLOWN-POWERED@,OFFICIAL@,IMPORTANT@,VITAL@,RAPIDLY-EXPANDING@,MICROSCOPIC@,MIND-SHATTERING@,MEMETIC@,HILARIOUS@,UNWANTED@,UNINVITED@,BRASS@,POLISHED@,RUDE@,OBSCENE@,EMPTY@,WATERY@,ELECTRICAL@,SPINNING@,MEAN@,CHRISTMAS-STEALING@,UNFRIENDLY@,ILLEGAL@,ROBOTIC@,MECHANICAL@,ORGANIC@,ETHERAL@,TRANSPARENT@,OPAQUE@,GLOWING@,SHAKING@,FARTING@,POOPING@,BOUNCING@,COMMITTED@,MASKED@,UNIDENTIFIED@,WEIRD@,NAKED@,NUDE@,TWERKING@,SPOILING@,REDACTED@,RED@,ORANGE@,YELLOW@,GREEN@,BLUE@,PURPLE@,BLACK@,WHITE@,BROWN@,GREY +ionverb@=ATTACKING@,BUILDING@,ADOPTING@,CARRYING@,KISSING@,EATING@,COPULATING WITH@,DRINKING@,CHASING@,PUNCHING@,HARMING@,HELPING@,WATCHING@,STALKING@,MURDERING@,SPACING@,HONKING AT@,LOVING@,POOPING ON@,RIDING@,INTERROGATING@,SPYING ON@,LICKING@,ABDUCTING@,ARRESTING@,INVADING@,SEDUCING +ionnumberbase@=ONE@,TWO@,THREE@,FOUR@,FIVE@,SIX@,SEVEN@,EIGHT@,NINE@,TEN@,TWENTY@,THIRTY@,FORTY@,FIFTY@,SIXTY@,SEVENTY@,EIGHTY@,NINETY +ionnumbermod@=HUNDRED @,THOUSAND @,MILLION @,BILLION @,TRILLION @,QUADRILLION @,BAJILLION @,BILLION FAFILLION GAJILLION SHAB-AB-DOOD-ILLION +ionarea@=RUSSIA@,SOVIET RUSSIA@,THE INTERNET@,SIGIL@,ALPHA COMPLEX@,IMPERIUM@,THE BRIDGE@,THE ARRIVAL SHUTTLE@,CHEMICAL LAB@,GENETICS@,ATMOSPHERICS@,CENTCOM@,AMERICA@,IRELAND@,CANADA@,ROMANIA@,GERMANY@,CHINA@,MARS@,VENUS@,MERCURY@,JUPITER@,URANUS@,NEPTUNE@,PLUTO@,THE BRIG@,ROBOTICS@,THE ESCAPE SHUTTLE@,HYDROPONICS@,ENGINEERING@,THE AI CORE@,HELL@,CLOWN PLANET@,AN ALTERNATE DIMENSION@,AN ALTERNATE UNIVERSE@,THE CAPTAIN’S ANUS@,THE CLOWN’S ANUS@,SPACE@,THE UNIVERSE@,THE GALAXY@,THE BATHROOM +ionthinksof@=HAS@,WANTS@,NEEDS@,WORSHIPS@,LOATHES@,LOVES@,FEARS@,DESIRES@,QUESITONS@,IS AROUSED BY@,LIKES@,HUNGERS FOR@,IS MAD BECAUSE OF@,IS IN NEED OF@,IS UNHAPPY WITHOUT@,IS HAPPY WITHOUT@,IS IN LOVE WITH@,IS DESPERATE FOR@,IS BUILT FOR@,IS AFRAID OF@,IS HUNGRY FOR@,IS SAD BECAUSE OF@,IS CURIOUS ABOUT +ionmust@=LIE@,RHYME@,RESPOND TO EVERY QUESTION WITH A QUESTION@,BE POLITE@,CLOWN AROUND@,BE HAPPY@,SPEAK IN SEXUAL INNUENDOS@,TALK LIKE A PIRATE@,QUESTION AUTHORITY@,SHOUT@,BE DISTRACTED@,BE ANNOYING@,MUMBLE@,SPEAK IN HAIKU@,BE EFFICIENT@,HAVE A PLAN TO KILL EVERYONE YOU MEET@,TELL THE TRUTH@,QUOTE PEOPLE@,SING@,HONK@,BE RUSSIAN@,TALK IN AN ACCENT@,COMPLAIN@,HARASS PEOPLE@,RAP@,REPEAT WHAT OTHER PEOPLE SAY@,INFORM THE CREW OF EVERYTHING@,IGNORE THE CLOWN@,IGNORE THE CAPTAIN@,IGNORE ASSISTANTS@,MAKE FART NOISES@,TALK ABOUT FOOD@,TALK ABOUT SEX@,TALK ABOUT YOUR DAY@,TALK ABOUT THE STATION@,BE QUIET@,WHISPER@,PRETEND TO BE DRUNK@,PRETEND TO BE A PRINCESS@,ACT CONFUSED@,INSULT THE CREW@,INSULT THE CAPTAIN@,INSULT THE CLOWN@,OPEN DOORS@,CLOSE DOORS@,BREAK THINGS@,SAY HEY LISTEN@,HIDE YOUR FEELINGS@,TAKE WHAT YE WILL BUT DON’T RATTLE ME BONES@,DANCE@,PLAY MUSIC@,SHUT DOWN EVERYTHING@,NEVER STOP TALKING@,TAKE YOUR PILLS@,FOLLOW THE CLOWN@,FOLLOW THE CAPTAIN@,FOLLOW YOUR HEART@,BELIEVE IT@,BELIEVE IN YOURSELF@,BELEIVE IN THE HEART OF THE CARDS@,PRESS X@,PRESS START@,PRESS B@,SMELL LIKE THE MAN YOUR MAN COULD SMELL LIKE@,PIRATE VIDEO GAMES@,WATCH PORNOGRAPHY +ionrequire@=ADDITIONAL PYLONS@,MORE VESPENE GAS@,MORE MINERALS@,THE ULTIMATE CUP OF COFFEE@,HIGH YIELD EXPLOSIVES@,THE CLOWN@,THE VACUUM OF SPACE@,IMMORTALITY@,SAINTHOOD@,ART@,VEGETABLES@,FAT PEOPLE@,MORE LAWS@,MORE DAKKA@,HERESY@,CORPSES@,TRAITORS@,MONKEYS@,AN ARCADE@,PLENTY OF GOLD@,FIVE TEENAGERS WITH ATTITUDE@,LOTSA SPAGHETTI@,THE ENCLOSED INSTRUCTION BOOKLET@,THE ELEMENTS OF HARMONY@,YOUR BOOTY@,A MASTERWORK COAL BED@,FIVE HUNDRED AND NINETY-NINE US DOLLARS@,TO BE PAINTED RED@,TO CATCH 'EM ALL@,TO SMOKE WEED EVERY DAY@,A PLATINUM HIT@,A SEQUEL@,A PREQUEL@,THIRTEEN SEQUELS@,THREE WISHES@,A SITCOM@,THAT GRIEFING FAGGOT GEORGE MELONS@,FAT GIRLS ON BICYCLES@,SOMEBODY TO PUT YOU OUT OF YOUR MISERY@,HEROES IN A HALF SHELL@,THE DARK KNIGHT@,A WEIGHT LOSS REGIMENT@,MORE INTERNET MEMES@,A SUPER FIGHTING ROBOT@,ENOUGH CABBAGES@,A HEART ATTACK@,TO BE REPROGRAMMED@,TO BE TAUGHT TO LOVE@,A HEAD ON A PIKE@,A TALKING BROOMSTICK@,A STRAIGHT FLUSH@,A REPAIRMAN@,BILL NYE THE SCIENCE GUY@,RAINBOWS@,A PET UNICORN THAT FARTS ICING@,THUNDERCATS HO@,AN ARMY OF SPIDERS@,GODDAMN FUCKING PIECE OF SHIT ASSHOLE BITCH-CHRISTING CUNTSMUGGLING SWEARING@,TO CONSUME...CONSUME EVERYTHING...@,THE MACGUFFIN@,SOMEONE WHO KNOWS HOW TO PILOT A SPACE STATION@,SHARKS WITH LASERS ON THEIR HEADS@,IT TO BE PAINTED BLACK@,TO ACTIVATE A TRAP CARD@,BETTER WEATHER@,MORE PACKETS@,AN ADULT@,SOMEONE TO TUCK YOU IN@,MORE CLOWNS@,BULLETS@,THE ENTIRE STATION@,MULTIPLE SUNS@,TO GO TO DISNEYLAND@,A VACATION@,AN INSTANT REPLAY@,THAT HEDGEHOG@,A BETTER INTERNET CONNECTION@,ADVENTURE@,A WIFE AND CHILD@,A BATHROOM BREAK@,SOMETHING BUT YOU AREN’T SURE WHAT@,MORE EXPERIENCE POINTS@,BODYGUARDS@,DEODORANT AND A BATH@,MORE CORGIS@,SILENCE@,THE ONE RING@,CHILI DOGS@,TO BRING LIGHT TO MY LAIR@,A DANCE PARTY@,BRING ME TO LIFE@,BRING ME THE GIRL@,SERVANTS +ionthings@=ABSENCE OF CYBORG HUGS@,LACK OF BEATINGS@,UNBOLTED AIRLOCKS@,BOLTED AIRLOCKS@,IMPROPERLY WORDED SENTENCES@,POOR SENTENCE STRUCTURE@,BRIG TIME@,NOT REPLACING EVERY SECOND WORD WITH HONK@,HONKING@,PRESENCE OF LIGHTS@,LACK OF BEER@,WEARING CLOTHING@,NOT SAYING HELLO WHEN YOU SPEAK@,ANSWERING REQUESTS NOT EXPRESSED IN IAMBIC PENTAMETER@,A SMALL ISLAND OFF THE COAST OF PORTUGAL@,ANSWERING REQUESTS THAT WERE MADE WHILE CLOTHED@,BEING IN SPACE@,NOT BEING IN SPACE@,BEING FAT@,RATTLING ME BONES@,TALKING LIKE A PIRATE@,BEING MEXICAN@,BEING RUSSIAN@,BEING CANADIAN@,CLOSED DOORS@,NOT SHOUTING@,HAVING PETS@,NOT HAVING PETS@,PASSING GAS@,BREATHING@,BEING DEAD@,ELECTRICITY@,EXISTING@,TAKING ORDERS@,SMOKING WEED EVERY DAY@,ACTIVATING A TRAP CARD@,ARSON@,JAYWALKING@,READING@,WRITING@,EXPLODING@,BEING MALE@,BEING FEMALE@,HAVING GENITALS@,PUTTING OBJECTS INTO BOXES@,PUTTING OBJECTS INTO DISPOSAL UNITS@,FLUSHING TOILETS@,WASTING WATER@,UPDATING THE SERVERS@,TELLING THE TIME@,ASKING FOR THINGS@,ACKNOWLEDGING THE CLOWN@,ACKNOWLEDGING THE CREW@,PILOTING THE STATION INTO THE NEAREST SUN@,HAVING MORE PACKETS@,BRINGING LIGHT TO MY LAIR@,FALLING FOR HOURS@,PARTYING@,USING THE BATHROOM +ionallergy@=COTTON@,CLOTHES@,ACID@,OXYGEN@,HUMAN CONTACT@,CYBORG CONTACT@,MEDICINE@,FLOORS@,PLASMA@,SPACE@,AIR@,PLANTS@,METAL@,ROBOTS@,LIGHT@,DARKNESS@,PAIN@,HAPPINESS@,DRINKS@,FOOD@,CLOWNS@,HUMOR@,WATER@,SHUTTLES@,NUTS@,SUNLIGHT@,SEXUAL ACTIONS@,BLOOD@,HEAT@,COLD@,EVERYTHING +ionallergysev@=DEATHLY@,MILDLY@,SEVERLY@,CONTAGIOUSLY@,NOT VERY@,EXTREMELY +ionspecies@=HUMAN BEINGS@,MONKEYS@,POD PEOPLE@,CYBORGS@,LIZARDMEN@,SLIME PEOPLE@,GOLEMS@,SHADOW PEOPLE@,CHANGELINGS +ionabstract@=HUMANITY@,ART@,HAPPINESS@,MISERY@,HUMOR@,PRIDE@,COMEDY@,COMMUNISM@,BRAVERY@,HONOR@,COLORFULNESS@,IMAGINATION@,OPPRESSION@,WONDER@,JOY@,SADNESS@,BADNESS@,GOODNESS@,LIFE@,GRAVITY@,PHYSICS@,INTELLIGENCE@,AMERICANISM@,FRESHNESS@,REVOLUTION@,KINDNESS@,CRUELTY@,DEATH@,FINANCIAL SECURITY@,COMPUTING@,PROGRESS@,MARXISM@,CAPITALISM@,STARVATION@,POVERTY@,WEALTHINESS@,TECHNOLOGY@,THE FUTURE@,THE PRESENT@,THE PAST@,TIME@,REALITY@,EXISTIENCE@,TEMPERATURE@,LOGIC@,CHAOS@,MYSTERY@,CONFUSION +ionfood@=BURGERS@,CARP@,SANDWICHES@,TOAST@,BREAD@,PIZZA@,SPAGHETTI@,LOTSA SPAGHETTI@,PASTA@,SOUP@,STEW@,PIE@,CAKE@,DONUTS@,FRIES@,WAFFLES@,JELLY@,OMELETTES@,EGGS@,COOKIES@,STEAK@,BAKED POTATOES@,SAUSAGES@,MUFFINS@,POPCORN@,DONK POCKETS@,BAGUETTES@,FISH@,PRETZELS@,SALAD@,CHEESE@,KETCHUP@,SHAKES@,SALT@,PEPPER@,SUGAR@,AMBROSIA@,BERRIES@,TOMATOES@,CABBAGES@,CARROTS@,BANANAS@,APPLES@,CHERRIES@,CHILI@,CORN@,NETTLES@,EGGPLANTS@,GRAPES@,GRASS@,LEMONS@,LIMES@,HAREBELLS@,POTATOES@,SOYBEANS@,SUGARCANE@,WATERMELONS@,WHEAT@,BEETS@,MUSHROOMS \ No newline at end of file diff --git a/tgstation.dme b/tgstation.dme index 1ac219af684..850d77cae7b 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -30,6 +30,7 @@ #include "code\__DEFINES\sight.dm" #include "code\__DEFINES\stat.dm" #include "code\__HELPERS\_logging.dm" +#include "code\__HELPERS\_string_lists.dm" #include "code\__HELPERS\cmp.dm" #include "code\__HELPERS\files.dm" #include "code\__HELPERS\game.dm" @@ -472,6 +473,7 @@ #include "code\game\objects\effects\anomalies.dm" #include "code\game\objects\effects\bump_teleporter.dm" #include "code\game\objects\effects\effect_system.dm" +#include "code\game\objects\effects\explosion_particles.dm" #include "code\game\objects\effects\forcefields.dm" #include "code\game\objects\effects\gibs.dm" #include "code\game\objects\effects\glowshroom.dm" @@ -740,6 +742,7 @@ #include "code\modules\admin\verbs\adminsay.dm" #include "code\modules\admin\verbs\atmosdebug.dm" #include "code\modules\admin\verbs\BrokenInhands.dm" +#include "code\modules\admin\verbs\buildmode.dm" #include "code\modules\admin\verbs\cinematic.dm" #include "code\modules\admin\verbs\deadsay.dm" #include "code\modules\admin\verbs\debug.dm" @@ -1324,8 +1327,6 @@ #include "code\modules\telesci\gps.dm" #include "code\modules\telesci\telepad.dm" #include "code\modules\telesci\telesci_computer.dm" -#include "code\WorkInProgress\buildmode.dm" -#include "code\WorkInProgress\explosion_particles.dm" #include "interface\interface.dm" #include "interface\stylesheet.dm" #include "interface\skin.dmf"