mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 11:07:12 +01:00
Merge remote-tracking branch 'upstream/master' into html5_stuff
This commit is contained in:
@@ -70,6 +70,7 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/secrets,
|
||||
/client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */
|
||||
/client/proc/change_human_appearance_self, /* Allows the human-based mob itself change its basic appearance */
|
||||
/client/proc/virus_2_creator,
|
||||
/client/proc/debug_variables
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
@@ -234,7 +235,7 @@ var/list/admin_verbs_proccall = list (
|
||||
/client/proc/hide_verbs()
|
||||
set name = "Adminverbs - Hide All"
|
||||
set category = "Admin"
|
||||
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
@@ -248,7 +249,7 @@ var/list/admin_verbs_proccall = list (
|
||||
/client/proc/show_verbs()
|
||||
set name = "Adminverbs - Show"
|
||||
set category = "Admin"
|
||||
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
@@ -263,8 +264,8 @@ var/list/admin_verbs_proccall = list (
|
||||
set name = "Aghost"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD))
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
if(istype(mob,/mob/dead/observer))
|
||||
//re-enter
|
||||
var/mob/dead/observer/ghost = mob
|
||||
@@ -287,7 +288,7 @@ var/list/admin_verbs_proccall = list (
|
||||
set name = "Invisimin"
|
||||
set category = "Admin"
|
||||
set desc = "Toggles ghost-like invisibility (Don't abuse this)"
|
||||
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
@@ -305,8 +306,8 @@ var/list/admin_verbs_proccall = list (
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
holder.player_panel_old()
|
||||
feedback_add_details("admin_verb","PP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
@@ -316,8 +317,8 @@ var/list/admin_verbs_proccall = list (
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD))
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
holder.player_panel_new()
|
||||
feedback_add_details("admin_verb","PPN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
@@ -325,10 +326,10 @@ var/list/admin_verbs_proccall = list (
|
||||
/client/proc/check_antagonists()
|
||||
set name = "Check Antagonists"
|
||||
set category = "Admin"
|
||||
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
holder.check_antagonists()
|
||||
log_admin("[key_name(usr)] checked antagonists")
|
||||
feedback_add_details("admin_verb","CHA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -337,10 +338,10 @@ var/list/admin_verbs_proccall = list (
|
||||
/client/proc/jobbans()
|
||||
set name = "Display Job bans"
|
||||
set category = "Admin"
|
||||
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD))
|
||||
return
|
||||
|
||||
|
||||
if(config.ban_legacy_system)
|
||||
holder.Jobbans()
|
||||
else
|
||||
@@ -351,10 +352,10 @@ var/list/admin_verbs_proccall = list (
|
||||
/client/proc/unban_panel()
|
||||
set name = "Unban Panel"
|
||||
set category = "Admin"
|
||||
|
||||
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
|
||||
|
||||
if(config.ban_legacy_system)
|
||||
holder.unbanpanel()
|
||||
else
|
||||
@@ -365,10 +366,10 @@ var/list/admin_verbs_proccall = list (
|
||||
/client/proc/game_panel()
|
||||
set name = "Game Panel"
|
||||
set category = "Admin"
|
||||
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
|
||||
holder.Game()
|
||||
feedback_add_details("admin_verb","GP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
@@ -376,14 +377,14 @@ var/list/admin_verbs_proccall = list (
|
||||
/client/proc/secrets()
|
||||
set name = "Secrets"
|
||||
set category = "Admin"
|
||||
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
holder.Secrets()
|
||||
feedback_add_details("admin_verb","S") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
|
||||
/client/proc/findStealthKey(txt)
|
||||
if(txt)
|
||||
for(var/P in stealthminID)
|
||||
@@ -401,15 +402,15 @@ var/list/admin_verbs_proccall = list (
|
||||
if(num == stealthminID[P])
|
||||
num++
|
||||
i = 0
|
||||
stealthminID["[ckey]"] = "@[num2text(num)]"
|
||||
stealthminID["[ckey]"] = "@[num2text(num)]"
|
||||
|
||||
/client/proc/stealth()
|
||||
set category = "Admin"
|
||||
set name = "Stealth Mode"
|
||||
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
if(holder)
|
||||
if(holder.fakekey)
|
||||
holder.fakekey = null
|
||||
@@ -428,7 +429,7 @@ var/list/admin_verbs_proccall = list (
|
||||
#define AUTOBANTIME 10
|
||||
|
||||
/client/proc/warn(warned_ckey)
|
||||
if(!check_rights(R_ADMIN))
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(!warned_ckey || !istext(warned_ckey)) return
|
||||
@@ -475,7 +476,7 @@ var/list/admin_verbs_proccall = list (
|
||||
set category = "Special Verbs"
|
||||
set name = "Drop Bomb"
|
||||
set desc = "Cause an explosion of varying strength at your location."
|
||||
|
||||
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
|
||||
@@ -513,10 +514,10 @@ var/list/admin_verbs_proccall = list (
|
||||
set category = "Event"
|
||||
set name = "Give Spell"
|
||||
set desc = "Gives a spell to a mob."
|
||||
|
||||
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
var/list/spell_list = list()
|
||||
var/type_length = length("/obj/effect/proc_holder/spell") + 2
|
||||
for(var/A in spells)
|
||||
@@ -529,7 +530,7 @@ var/list/admin_verbs_proccall = list (
|
||||
T.mind.AddSpell(new S)
|
||||
else
|
||||
T.AddSpell(new S)
|
||||
|
||||
|
||||
feedback_add_details("admin_verb","GS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] gave [key_name(T)] the spell [S].")
|
||||
message_admins("[key_name_admin(usr)] gave [key_name(T)] the spell [S].", 1)
|
||||
@@ -539,7 +540,7 @@ var/list/admin_verbs_proccall = list (
|
||||
set category = "Event"
|
||||
set name = "Give Disease"
|
||||
set desc = "Gives a Disease to a mob."
|
||||
|
||||
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
|
||||
@@ -576,10 +577,10 @@ var/list/admin_verbs_proccall = list (
|
||||
set category = "Event"
|
||||
set name = "Make Sound"
|
||||
set desc = "Display a message to everyone who can hear the target"
|
||||
|
||||
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
if(O)
|
||||
var/message = input("What do you want the message to be?", "Make Sound") as text|null
|
||||
if(!message)
|
||||
@@ -593,10 +594,10 @@ var/list/admin_verbs_proccall = list (
|
||||
/client/proc/togglebuildmodeself()
|
||||
set name = "Toggle Build Mode Self"
|
||||
set category = "Event"
|
||||
|
||||
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
if(src.mob)
|
||||
togglebuildmode(src.mob)
|
||||
feedback_add_details("admin_verb","TBMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -605,10 +606,10 @@ var/list/admin_verbs_proccall = list (
|
||||
set category = "Event"
|
||||
set name = "oSay"
|
||||
set desc = "Display a message to everyone who can hear the target"
|
||||
|
||||
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
if(mob.control_object)
|
||||
if(!msg)
|
||||
return
|
||||
@@ -616,17 +617,17 @@ var/list/admin_verbs_proccall = list (
|
||||
V.show_message("<b>[mob.control_object.name]</b> says: \"" + msg + "\"", 2)
|
||||
log_admin("[key_name(usr)] used oSay on [mob.control_object]: [msg]")
|
||||
message_admins("[key_name_admin(usr)] used oSay on [mob.control_object]: [msg]")
|
||||
|
||||
|
||||
feedback_add_details("admin_verb","OT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/kill_air() // -- TLE
|
||||
set category = "Debug"
|
||||
set name = "Kill Air"
|
||||
set desc = "Toggle Air Processing"
|
||||
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
if(air_processing_killed)
|
||||
air_processing_killed = 0
|
||||
usr << "<b>Enabled air processing.</b>"
|
||||
@@ -643,7 +644,7 @@ var/list/admin_verbs_proccall = list (
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_MENTOR))
|
||||
return
|
||||
|
||||
|
||||
log_admin("[key_name(usr)] deadmined themself.")
|
||||
message_admins("[key_name_admin(usr)] deadmined themself.")
|
||||
deadmin()
|
||||
@@ -656,7 +657,7 @@ var/list/admin_verbs_proccall = list (
|
||||
set name = "Re-admin self"
|
||||
set category = "Admin"
|
||||
set desc = "Regain your admin powers."
|
||||
|
||||
|
||||
var/datum/admins/D = admin_datums[ckey]
|
||||
var/rank = null
|
||||
if(config.admin_legacy_system)
|
||||
@@ -722,10 +723,10 @@ var/list/admin_verbs_proccall = list (
|
||||
/client/proc/toggle_log_hrefs()
|
||||
set name = "Toggle href logging"
|
||||
set category = "Server"
|
||||
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
|
||||
if(config)
|
||||
if(config.log_hrefs)
|
||||
config.log_hrefs = 0
|
||||
@@ -738,7 +739,7 @@ var/list/admin_verbs_proccall = list (
|
||||
set name = "Check AI Laws"
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
holder.output_ai_laws()
|
||||
@@ -747,7 +748,7 @@ var/list/admin_verbs_proccall = list (
|
||||
set name = "Manage Silicon Laws"
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/S = input("Select silicon.", "Manage Silicon Laws") as null|anything in silicon_mob_list
|
||||
@@ -762,7 +763,7 @@ var/list/admin_verbs_proccall = list (
|
||||
set name = "C.M.A. - Admin"
|
||||
set desc = "Allows you to change the mob appearance"
|
||||
set category = "Admin"
|
||||
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
@@ -778,7 +779,7 @@ var/list/admin_verbs_proccall = list (
|
||||
set name = "C.M.A. - Self"
|
||||
set desc = "Allows the mob to change its appearance"
|
||||
set category = "Admin"
|
||||
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
@@ -798,13 +799,26 @@ var/list/admin_verbs_proccall = list (
|
||||
H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 1)
|
||||
feedback_add_details("admin_verb","CMAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/virus_2_creator()
|
||||
set name = "Virus2 Creator"
|
||||
set desc = "Allows you to create and spread custom viruses."
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/datum/nano_module/virus2/virus2 = new()
|
||||
virus2.ui_interact(usr, state = admin_state)
|
||||
log_and_message_admins("has opened the virus2 creator.")
|
||||
feedback_add_details("admin_verb","VS2C")
|
||||
|
||||
/client/proc/free_slot()
|
||||
set name = "Free Job Slot"
|
||||
set category = "Admin"
|
||||
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
|
||||
var/list/jobs = list()
|
||||
for (var/datum/job/J in job_master.occupations)
|
||||
if (J.current_positions >= J.total_positions && J.total_positions != -1)
|
||||
@@ -821,7 +835,7 @@ var/list/admin_verbs_proccall = list (
|
||||
/client/proc/toggleattacklogs()
|
||||
set name = "Toggle Attack Log Messages"
|
||||
set category = "Preferences"
|
||||
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
@@ -835,10 +849,10 @@ var/list/admin_verbs_proccall = list (
|
||||
/client/proc/toggledrones()
|
||||
set name = "Toggle Maintenance Drones"
|
||||
set category = "Server"
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
|
||||
config.allow_drone_spawn = !(config.allow_drone_spawn)
|
||||
log_admin("[key_name(usr)] has [config.allow_drone_spawn ? "enabled" : "disabled"] maintenance drones.")
|
||||
message_admins("[key_name_admin(usr)] has [config.allow_drone_spawn ? "enabled" : "disabled"] maintenance drones.")
|
||||
@@ -846,7 +860,7 @@ var/list/admin_verbs_proccall = list (
|
||||
/client/proc/toggledebuglogs()
|
||||
set name = "Toggle Debug Log Messages"
|
||||
set category = "Preferences"
|
||||
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
@@ -860,7 +874,7 @@ var/list/admin_verbs_proccall = list (
|
||||
set category = "Admin"
|
||||
set name = "Man Up"
|
||||
set desc = "Tells mob to man up and deal with it."
|
||||
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
@@ -874,7 +888,7 @@ var/list/admin_verbs_proccall = list (
|
||||
set category = "Admin"
|
||||
set name = "Man Up Global"
|
||||
set desc = "Tells everyone to man up and deal with it."
|
||||
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_screen = "area_atmos"
|
||||
icon_keyboard = "atmos_key"
|
||||
circuit = "/obj/item/weapon/circuitboard/atmos_automation"
|
||||
circuit = /obj/item/weapon/circuitboard/atmos_automation
|
||||
req_one_access_txt = "24;10"
|
||||
Mtoollink = 1
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
name = "AI Upload"
|
||||
desc = "Used to upload laws to the AI."
|
||||
icon_state = "frame-rnd"
|
||||
circuit = "/obj/item/part/board/circuit/aiupload"
|
||||
var/mob/living/silicon/ai/current = null
|
||||
var/opened = 0
|
||||
|
||||
@@ -56,7 +55,6 @@
|
||||
name = "Cyborg Upload"
|
||||
desc = "Used to upload laws to Cyborgs."
|
||||
icon_state = "frame-rnd"
|
||||
circuit = "/obj/item/part/board/circuit/borgupload"
|
||||
var/mob/living/silicon/robot/current = null
|
||||
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ proc/move_labor_shuttle() //TODO: Security Access only; add moving the shuttle t
|
||||
name = "Labor Shuttle Console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "shuttle"
|
||||
circuit = "/obj/item/weapon/circuitboard/labor_shuttle"
|
||||
circuit = /obj/item/weapon/circuitboard/labor_shuttle
|
||||
var/location = 0 //0 = station, 1 = labor camp
|
||||
req_access = list(access_brig)
|
||||
var/hacked = 0
|
||||
@@ -114,7 +114,7 @@ proc/move_labor_shuttle() //TODO: Security Access only; add moving the shuttle t
|
||||
/obj/machinery/computer/labor_shuttle/one_way
|
||||
name = "Prisoner Shuttle Console"
|
||||
desc = "A one-way shuttle console, used to summon the shuttle to the labor camp."
|
||||
circuit = "/obj/item/weapon/circuitboard/one_way_shuttle"
|
||||
circuit = /obj/item/weapon/circuitboard/labor_shuttle/one_way
|
||||
req_access = list( )
|
||||
|
||||
/obj/machinery/computer/labor_shuttle/one_way/attack_hand(user as mob)
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/L = A
|
||||
L.visible_message("<span class ='danger'>[src] pounces on [L]!</span>", "<span class ='userdanger'>[src] pounces on you!</span>")
|
||||
L.Weaken(5)
|
||||
apply_effect(5, WEAKEN, run_armor_check("chest", "melee"))
|
||||
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
|
||||
step_towards(src,L)
|
||||
|
||||
|
||||
@@ -34,8 +34,9 @@
|
||||
M.do_attack_animation(src)
|
||||
var/randn = rand(1, 100)
|
||||
if (randn <= 80)
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
Weaken(5)
|
||||
apply_effect(5, WEAKEN, run_armor_check(affecting, "melee"))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1)
|
||||
|
||||
@@ -77,7 +77,7 @@ emp_act
|
||||
/mob/living/carbon/human/proc/getarmor_organ(var/obj/item/organ/external/def_zone, var/type)
|
||||
if(!type || !def_zone) return 0
|
||||
var/protection = 0
|
||||
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform)
|
||||
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform, back, gloves, shoes, belt, s_store, glasses, l_ear, r_ear, wear_id) //Everything but pockets. Pockets are l_store and r_store. (if pockets were allowed, putting something armored, gloves or hats for example, would double up on the armor)
|
||||
for(var/bp in body_parts)
|
||||
if(!bp) continue
|
||||
if(bp && istype(bp ,/obj/item/clothing))
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
spawn(1)
|
||||
name = "Pun Pun"
|
||||
real_name = name
|
||||
w_uniform = new /obj/item/clothing/under/punpun(src)
|
||||
equip_to_slot(new /obj/item/clothing/under/punpun(src), slot_w_uniform)
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_screen = "power"
|
||||
icon_keyboard = "power_key"
|
||||
req_access = list(access_engine_equip)
|
||||
circuit = "/obj/item/weapon/circuitboard/drone_control"
|
||||
circuit = /obj/item/weapon/circuitboard/drone_control
|
||||
|
||||
//Used when pinging drones.
|
||||
var/drone_call_area = "Engineering"
|
||||
|
||||
@@ -471,6 +471,7 @@
|
||||
src.modules += new /obj/item/weapon/matter_decompiler(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/spray/cleaner/drone(src)
|
||||
src.modules += new /obj/item/weapon/soap(src)
|
||||
src.modules += new /obj/item/device/t_scanner(src)
|
||||
|
||||
src.emag = new /obj/item/weapon/pickaxe/drill/cyborg/diamond(src)
|
||||
|
||||
@@ -499,4 +500,4 @@
|
||||
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
|
||||
return (src in R.module.modules)
|
||||
return (src in R.module.modules)
|
||||
@@ -227,6 +227,9 @@
|
||||
/obj/item/stack/cable_coil/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)//Wiring would be too effective as a resource
|
||||
S << "<span class='warning'>This object does not contain enough materials to work with.</span>"
|
||||
|
||||
/obj/item/weapon/circuitboard/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
|
||||
S << "<span class='warning'>This object does not contain enough materials to work with.</span>"
|
||||
|
||||
/obj/machinery/porta_turret/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
|
||||
S << "<span class='warning'>Attempting to dismantle this machine would result in an immediate counterattack. Aborting.</span>"
|
||||
|
||||
@@ -323,8 +326,7 @@
|
||||
if(istype(target, /obj/machinery/computer))
|
||||
var/obj/machinery/computer/C = target
|
||||
if(C.circuit)
|
||||
var/obj/item/weapon/circuitboard/circuit = text2path(C.circuit)
|
||||
new circuit(get_turf(M))
|
||||
new C.circuit(get_turf(M))
|
||||
qdel(target)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
/datum/nano_module/virus2
|
||||
name = "Virus Creator"
|
||||
|
||||
var/mob/virus_target = null
|
||||
var/datum/disease2/disease/curr_virus = null
|
||||
|
||||
/datum/nano_module/virus2/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
data["virus_target"] = virus_target
|
||||
data["curr_virus"] = curr_virus ? curr_virus.uniqueID : null
|
||||
if(curr_virus)
|
||||
var/effects[0]
|
||||
for(var/datum/disease2/effectholder/E in curr_virus.effects)
|
||||
var/subeffect[0]
|
||||
subeffect["name"] = E.effect.name
|
||||
subeffect["stage"] = E.stage
|
||||
subeffect["chance"] = E.chance
|
||||
subeffect["multiplier"] = E.multiplier
|
||||
subeffect["badness"] = E.effect.badness
|
||||
|
||||
effects.Add(list(subeffect))
|
||||
data["virus_effects"] = effects
|
||||
|
||||
var/virusstats[0]
|
||||
virusstats["antigen"] = antigens2string(curr_virus.antigen)
|
||||
virusstats["spreadType"] = curr_virus.spreadtype
|
||||
virusstats["affectedSpecies"] = list2text(curr_virus.affected_species, ", ")
|
||||
virusstats["speed"] = curr_virus.speed
|
||||
data["virusStats"] = virusstats
|
||||
|
||||
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "virus2_creator.tmpl", "[src]", 800, 450, state = state)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/datum/nano_module/virus2/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["setTarget"])
|
||||
var/list/mob_list_l = list()
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
mob_list_l += H
|
||||
mob_list_l = sortList(mob_list_l)
|
||||
mob_list_l += "Random"
|
||||
|
||||
var/newTarget = input(usr, "Who do you want to infect?", "Infection", "Random") as null|anything in mob_list_l
|
||||
if(newTarget)
|
||||
if(newTarget == "Random")
|
||||
virus_target = null
|
||||
else
|
||||
if(ismob(newTarget))
|
||||
virus_target = newTarget
|
||||
return 1
|
||||
|
||||
if(href_list["createVirus"])
|
||||
if(curr_virus)
|
||||
if(alert(usr, "Would you like to delete the current virus and generate a new one?", "Regenerate Virus", "Yes", "No") == "Yes")
|
||||
qdel(curr_virus)
|
||||
curr_virus = null
|
||||
else
|
||||
return 0
|
||||
|
||||
var/datum/disease2/disease/new_virus = new()
|
||||
new_virus.makerandom()
|
||||
curr_virus = new_virus
|
||||
new_virus.affected_species = list("Human","Unathi","Skrell","Tajaran","Vox","Kidan","Slime People","Grey","Diona", "Vulpkanin") //restore to default
|
||||
usr << "New virus generated: [new_virus.uniqueID]."
|
||||
return 1
|
||||
|
||||
if(href_list["deleteCurrVirus"])
|
||||
if(curr_virus)
|
||||
qdel(curr_virus)
|
||||
curr_virus = null
|
||||
return 1
|
||||
|
||||
if(href_list["changeEffect"])
|
||||
if(curr_virus)
|
||||
var/stage = text2num(href_list["changeEffect"])
|
||||
if(stage)
|
||||
var/list/L = list()
|
||||
|
||||
for(var/effect in (subtypesof(/datum/disease2/effect)))
|
||||
var/datum/disease2/effect/E = new effect
|
||||
if(initial(E.stage) == stage)
|
||||
L[initial(E.name)] = E
|
||||
|
||||
var/datum/disease2/effectholder/holder = curr_virus.effects[stage]
|
||||
if(holder)
|
||||
var/datum/disease2/effect/current_effect = holder.effect
|
||||
|
||||
var/C = input("Select effect for stage [stage]:", "Stage [stage]", current_effect.name) as null|anything in L
|
||||
if(!C)
|
||||
return 0
|
||||
|
||||
var/datum/disease2/effect/applied_effect = L[C]
|
||||
if(istype(applied_effect))
|
||||
holder.effect = applied_effect
|
||||
qdel(current_effect)
|
||||
else
|
||||
|
||||
return 1
|
||||
|
||||
if(href_list["changeStat"])
|
||||
if(curr_virus)
|
||||
var/stat = href_list["changeStat"]
|
||||
var/stage = text2num(href_list["cSEffect"])
|
||||
if(stat && stage)
|
||||
switch(stat)
|
||||
if("C")
|
||||
var/C = input(usr, "What would you like to change the chance to? ", "Edit Chance", null) as null|num
|
||||
if(C)
|
||||
var/datum/disease2/effectholder/holder = curr_virus.effects[stage]
|
||||
if(holder)
|
||||
holder.chance = Clamp(C, 0, holder.effect.chance_maxm)
|
||||
|
||||
if("M")
|
||||
var/C = input(usr, "What would you like to change the multiplier to?", "Edit Multiplier", null) as null|num
|
||||
if(C)
|
||||
var/datum/disease2/effectholder/holder = curr_virus.effects[stage]
|
||||
if(holder)
|
||||
holder.multiplier = Clamp(C, 1, holder.effect.maxm)
|
||||
return 1
|
||||
|
||||
if(href_list["spreadToTarget"])
|
||||
if(curr_virus)
|
||||
if(virus_target)
|
||||
infect_virus2(virus_target, curr_virus, 1) //no protection from gods
|
||||
else //random
|
||||
var/list/mob_list_l = list()
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
if(H.client)
|
||||
mob_list_l += H
|
||||
|
||||
var/mob/living/carbon/human/H = pick(mob_list_l)
|
||||
if(H && H.client)
|
||||
infect_virus2(H, curr_virus, 1) //no protection from gods
|
||||
@@ -15,7 +15,7 @@ datum/genesequence
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_keyboard = "med_key"
|
||||
icon_screen = "dna"
|
||||
circuit = "/obj/item/weapon/circuitboard/reconstitutor"
|
||||
circuit = /obj/item/weapon/circuitboard/reconstitutor
|
||||
req_access = list(access_heads) //Only used for record deletion right now.
|
||||
var/obj/machinery/clonepod/pod1 = 1 //Linked cloning pod.
|
||||
var/temp = ""
|
||||
@@ -42,7 +42,7 @@ datum/genesequence
|
||||
name = "Fauna reconstitution console"
|
||||
accepted_fossil_types = list(/obj/item/weapon/fossil/bone,/obj/item/weapon/fossil/shell,/obj/item/weapon/fossil/skull)
|
||||
pod1 = null
|
||||
circuit = "/obj/item/weapon/circuitboard/reconstitutor/animal"
|
||||
circuit = /obj/item/weapon/circuitboard/reconstitutor/animal
|
||||
|
||||
/obj/machinery/computer/reconstitutor/animal/initialize()
|
||||
undiscovered_genesequences = master_controller.all_animal_genesequences.Copy()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "medical ship control console"
|
||||
req_access = list()
|
||||
shuttle_tag = "White Ship"
|
||||
circuit = "/obj/item/weapon/circuitboard/white_ship"
|
||||
circuit = /obj/item/weapon/circuitboard/white_ship
|
||||
light_color = LIGHT_COLOR_DARKRED
|
||||
|
||||
/obj/machinery/computer/shuttle_control/multi/whiteship/attack_ai(user as mob)
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
var/list/datum/disease2/effectholder/effects = list()
|
||||
var/antigen = 0 // 16 bits describing the antigens, when one bit is set, a cure with that bit can dock here
|
||||
var/max_stage = 4
|
||||
var/list/affected_species = list("Human","Unathi","Skrell","Tajaran","Vox","Kidan","Slime People","Grey","Diona", "Vulpkanin")
|
||||
|
||||
var/list/affected_species = list("Human","Unathi","Skrell","Tajaran","Vox","Kidan","Slime People","Grey","Diona", "Vulpkanin") //if this is changed, also change modules/nano/modules/virus2_creator.dm
|
||||
//as you cannot use initial() with lists
|
||||
/datum/disease2/disease/New()
|
||||
uniqueID = rand(0,10000)
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user