mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Merged in Erthilo's stuff.
This commit is contained in:
@@ -6,14 +6,14 @@
|
||||
name = "changeling"
|
||||
config_tag = "changeling"
|
||||
restricted_jobs = list("AI", "Cyborg")
|
||||
required_players = 1
|
||||
required_players = 15
|
||||
required_enemies = 1
|
||||
recommended_enemies = 4
|
||||
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
var
|
||||
changeling_amount
|
||||
const
|
||||
prob_int_murder_target = 50 // intercept names the assassination target half the time
|
||||
prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target
|
||||
@@ -35,16 +35,18 @@
|
||||
waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
|
||||
var/const/scaling_coeff = 10.0 //how many players per changeling
|
||||
const/changeling_amount = 4
|
||||
|
||||
/datum/game_mode/changeling/announce()
|
||||
world << "<B>The current game mode is - Changeling!</B>"
|
||||
world << "<B>There are alien changelings on the station. Do not let the changelings succeed!</B>"
|
||||
|
||||
/datum/game_mode/changeling/pre_setup()
|
||||
var/list/datum/mind/possible_changelings = get_players_for_role(BE_CHANGELING)
|
||||
|
||||
changeling_amount = max(1, round( num_players() / scaling_coeff) + 1)
|
||||
if(config.protect_roles_from_antagonist)
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
var/list/datum/mind/possible_changelings = get_players_for_role(BE_CHANGELING)
|
||||
|
||||
for(var/datum/mind/player in possible_changelings)
|
||||
for(var/job in restricted_jobs)//Removing robots from the list
|
||||
@@ -184,8 +186,10 @@
|
||||
for(var/datum/objective/objective in changeling.objectives)
|
||||
if(objective.check_completion())
|
||||
world << "<B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>"
|
||||
feedback_add_details("changeling_objective","[objective.type]|SUCCESS")
|
||||
else
|
||||
world << "<B>Objective #[count]</B>: [objective.explanation_text] \red Failed"
|
||||
feedback_add_details("changeling_objective","[objective.type]|FAIL")
|
||||
changelingwin = 0
|
||||
count++
|
||||
|
||||
@@ -195,8 +199,10 @@
|
||||
|
||||
if(changelingwin)
|
||||
world << "<B>The changeling was successful!<B>"
|
||||
feedback_add_details("changeling_success","SUCCESS")
|
||||
else
|
||||
world << "<B>The changeling has failed!<B>"
|
||||
feedback_add_details("changeling_success","FAIL")
|
||||
return 1
|
||||
|
||||
/datum/changeling //stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind)
|
||||
@@ -204,11 +210,17 @@
|
||||
var/list/absorbed_dna = list()
|
||||
var/changeling_fakedeath = 0
|
||||
var/chem_charges = 20.00
|
||||
var/chem_recharge_multiplier = 1
|
||||
var/chem_storage = 50
|
||||
var/sting_range = 1
|
||||
var/changelingID = "none"
|
||||
var/mob/living/host = null
|
||||
var/geneticdamage = 0.0
|
||||
var/isabsorbing = 0
|
||||
var/geneticpoints = 5
|
||||
var/purchasedpowers = list()
|
||||
|
||||
|
||||
|
||||
/datum/changeling/New()
|
||||
..()
|
||||
|
||||
@@ -2,14 +2,21 @@
|
||||
if(!changeling) changeling = new
|
||||
changeling.host = src
|
||||
|
||||
src.verbs += /client/proc/changeling_lesser_transform
|
||||
src.verbs += /client/proc/changeling_fakedeath
|
||||
src.verbs += /datum/changeling/proc/EvolutionMenu
|
||||
|
||||
for(var/obj/effect/proc_holder/power/P in changeling.purchasedpowers)
|
||||
if(P.isVerb)
|
||||
if(P.allowduringlesserform)
|
||||
if(!(P in src.verbs))
|
||||
src.verbs += P.verbpath
|
||||
|
||||
/* src.verbs += /client/proc/changeling_fakedeath
|
||||
src.verbs += /client/proc/changeling_lesser_transform
|
||||
src.verbs += /client/proc/changeling_blind_sting
|
||||
src.verbs += /client/proc/changeling_deaf_sting
|
||||
src.verbs += /client/proc/changeling_silence_sting
|
||||
src.verbs += /client/proc/changeling_unfat_sting
|
||||
|
||||
*/
|
||||
changeling.changeling_level = 1
|
||||
return
|
||||
|
||||
@@ -17,6 +24,14 @@
|
||||
if(!changeling) changeling = new
|
||||
changeling.host = src
|
||||
|
||||
src.verbs += /datum/changeling/proc/EvolutionMenu
|
||||
|
||||
for(var/obj/effect/proc_holder/power/P in changeling.purchasedpowers)
|
||||
if(P.isVerb)
|
||||
if(!(P in src.verbs))
|
||||
src.verbs += P.verbpath
|
||||
|
||||
/*
|
||||
src.verbs += /client/proc/changeling_absorb_dna
|
||||
src.verbs += /client/proc/changeling_transform
|
||||
src.verbs += /client/proc/changeling_lesser_form
|
||||
@@ -30,6 +45,7 @@
|
||||
src.verbs += /client/proc/changeling_unfat_sting
|
||||
src.verbs += /client/proc/changeling_boost_range
|
||||
|
||||
*/
|
||||
changeling.changeling_level = 2
|
||||
if (!changeling.absorbed_dna)
|
||||
changeling.absorbed_dna = list()
|
||||
@@ -43,6 +59,11 @@
|
||||
return
|
||||
|
||||
/mob/proc/remove_changeling_powers()
|
||||
|
||||
for(var/obj/effect/proc_holder/power/P in changeling.purchasedpowers)
|
||||
if(P.isVerb)
|
||||
src.verbs -= P.verbpath
|
||||
/*
|
||||
src.verbs -= /client/proc/changeling_absorb_dna
|
||||
src.verbs -= /client/proc/changeling_transform
|
||||
src.verbs -= /client/proc/changeling_lesser_form
|
||||
@@ -55,7 +76,7 @@
|
||||
src.verbs -= /client/proc/changeling_boost_range
|
||||
src.verbs -= /client/proc/changeling_transformation_sting
|
||||
src.verbs -= /client/proc/changeling_unfat_sting
|
||||
|
||||
*/
|
||||
/client/proc/changeling_absorb_dna()
|
||||
set category = "Changeling"
|
||||
set name = "Absorb DNA"
|
||||
@@ -79,8 +100,8 @@
|
||||
usr << "\red This creature is not compatible with our biology."
|
||||
return
|
||||
|
||||
if (M.mutations & HUSK)
|
||||
usr << "\red This creature has already been drained!"
|
||||
if (M.mutations2 & NOCLONE)
|
||||
usr << "\red This creature's DNA is ruined beyond useability!"
|
||||
return
|
||||
|
||||
if (!G.killing)
|
||||
@@ -127,20 +148,40 @@
|
||||
usr.changeling.absorbed_dna[T.real_name] = T.dna
|
||||
if(usr.nutrition < 400) usr.nutrition = min((usr.nutrition + T.nutrition), 400)
|
||||
usr.changeling.chem_charges += 10
|
||||
usr.changeling.geneticpoints += 2
|
||||
if(T.changeling)
|
||||
if(T.changeling.absorbed_dna)
|
||||
usr.changeling.absorbed_dna |= T.changeling.absorbed_dna //steal all their loot
|
||||
|
||||
T.changeling.absorbed_dna = list()
|
||||
T.changeling.absorbed_dna[T.real_name] = T.dna
|
||||
|
||||
if(T.changeling.purchasedpowers)
|
||||
for(var/obj/effect/proc_holder/power/Tp in T.changeling.purchasedpowers)
|
||||
if(Tp in usr.changeling.purchasedpowers)
|
||||
continue
|
||||
else
|
||||
usr.changeling.purchasedpowers += Tp
|
||||
|
||||
if(!Tp.isVerb)
|
||||
call(Tp.verbpath)()
|
||||
|
||||
else
|
||||
if(usr.changeling.changeling_level == 1)
|
||||
usr.make_lesser_changeling()
|
||||
else
|
||||
usr.make_changeling()
|
||||
|
||||
|
||||
|
||||
|
||||
usr.changeling.chem_charges += T.changeling.chem_charges
|
||||
usr.changeling.geneticpoints += T.changeling.geneticpoints
|
||||
T.changeling.chem_charges = 0
|
||||
usr.changeling.isabsorbing = 0
|
||||
|
||||
T.death(0)
|
||||
T.real_name = "Unknown"
|
||||
M.warn_flavor_changed()
|
||||
T.mutations |= HUSK
|
||||
T.update_body()
|
||||
T.Drain()
|
||||
|
||||
return
|
||||
|
||||
@@ -164,7 +205,7 @@
|
||||
usr << "\red We don't have enough stored chemicals to do that!"
|
||||
return
|
||||
|
||||
var/S = input("Select the target DNA: ", "Target DNA", null) in usr.changeling.absorbed_dna
|
||||
var/S = input("Select the target DNA: ", "Target DNA", null) as null|anything in usr.changeling.absorbed_dna
|
||||
|
||||
if (S == null)
|
||||
return
|
||||
@@ -219,9 +260,6 @@
|
||||
if (istype(W, /obj/item/weapon/implant))
|
||||
implants += W
|
||||
|
||||
for(var/obj/item/W in usr)
|
||||
usr.drop_from_slot(W)
|
||||
|
||||
usr.update_clothing()
|
||||
usr.monkeyizing = 1
|
||||
usr.canmove = 0
|
||||
@@ -240,6 +278,10 @@
|
||||
usr.dna = null
|
||||
O.changeling = usr.changeling
|
||||
|
||||
for(var/obj/item/W in usr)
|
||||
usr.drop_from_slot(W)
|
||||
|
||||
|
||||
for(var/obj/T in usr)
|
||||
del(T)
|
||||
//for(var/R in usr.organs) //redundant, let's give garbage collector work to do --rastaf0
|
||||
@@ -263,7 +305,7 @@
|
||||
usr.mind.transfer_to(O)
|
||||
|
||||
O.make_lesser_changeling()
|
||||
|
||||
O.verbs += /client/proc/changeling_lesser_transform
|
||||
del(usr)
|
||||
return
|
||||
|
||||
@@ -304,15 +346,6 @@
|
||||
for (var/obj/item/weapon/implant/I in usr) //Still preserving implants
|
||||
implants += I
|
||||
|
||||
for(var/obj/item/W in usr)
|
||||
usr.u_equip(W)
|
||||
if (usr.client)
|
||||
usr.client.screen -= W
|
||||
if (W)
|
||||
W.loc = usr.loc
|
||||
W.dropped(usr)
|
||||
W.layer = initial(W.layer)
|
||||
|
||||
usr.update_clothing()
|
||||
usr.monkeyizing = 1
|
||||
usr.canmove = 0
|
||||
@@ -326,6 +359,15 @@
|
||||
sleep(48)
|
||||
del(animation)
|
||||
|
||||
for(var/obj/item/W in usr)
|
||||
usr.u_equip(W)
|
||||
if (usr.client)
|
||||
usr.client.screen -= W
|
||||
if (W)
|
||||
W.loc = usr.loc
|
||||
W.dropped(usr)
|
||||
W.layer = initial(W.layer)
|
||||
|
||||
var/mob/living/carbon/human/O = new /mob/living/carbon/human( src )
|
||||
if (isblockon(getblock(usr.dna.uni_identity, 11,3),11))
|
||||
O.gender = FEMALE
|
||||
@@ -471,10 +513,10 @@
|
||||
usr << "\blue We stealthily sting [T]."
|
||||
|
||||
if(!T.changeling)
|
||||
T << "You feel a small prick and a burning sensation in your throat."
|
||||
// T << "You feel a small prick and a burning sensation in your throat."
|
||||
T.silent += 30
|
||||
else
|
||||
T << "You feel a small prick."
|
||||
//else
|
||||
// T << "You feel a small prick."
|
||||
|
||||
usr.verbs -= /client/proc/changeling_silence_sting
|
||||
|
||||
@@ -713,4 +755,210 @@
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_unfat_sting
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
/client/proc/changeling_unstun()
|
||||
set category = "Changeling"
|
||||
set name = "Epinephrine Sacs (25)"
|
||||
set desc = "Removes all stuns"
|
||||
|
||||
if(!usr.changeling)
|
||||
usr << "\red You're not a changeling, something's wrong!"
|
||||
return
|
||||
|
||||
if(usr.changeling.chem_charges < 25)
|
||||
usr << "\red We don't have enough stored chemicals to do that!"
|
||||
return
|
||||
|
||||
usr.changeling.chem_charges -= 25
|
||||
|
||||
var/mob/living/carbon/human/C = usr
|
||||
|
||||
if(C)
|
||||
C.stat = 0
|
||||
C.SetParalysis(0)
|
||||
C.SetStunned(0)
|
||||
C.SetWeakened(0)
|
||||
C.lying = 0
|
||||
C.canmove = 1
|
||||
|
||||
usr.verbs -= /client/proc/changeling_unstun
|
||||
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_unstun
|
||||
|
||||
|
||||
|
||||
/client/proc/changeling_fastchemical()
|
||||
|
||||
usr.changeling.chem_recharge_multiplier = usr.changeling.chem_recharge_multiplier*2
|
||||
|
||||
/client/proc/changeling_engorgedglands()
|
||||
|
||||
usr.changeling.chem_storage = usr.changeling.chem_storage+25
|
||||
|
||||
/client/proc/changeling_digitalcamo()
|
||||
set category = "Changeling"
|
||||
set name = "Toggle Digital Camoflague (10)"
|
||||
set desc = "The AI can no longer track us, but we will look different if examined. Has a constant cost while active."
|
||||
|
||||
if(!usr.changeling)
|
||||
usr << "\red You're not a changeling, something's wrong!"
|
||||
return
|
||||
|
||||
if(usr.changeling.chem_charges < 10)
|
||||
usr << "\red We don't have enough stored chemicals to do that!"
|
||||
return
|
||||
|
||||
usr.changeling.chem_charges -= 10
|
||||
|
||||
var/mob/living/carbon/human/C = usr
|
||||
|
||||
if(C)
|
||||
C << "[C.digitalcamo ? "We return to normal." : "We distort our form."]"
|
||||
C.digitalcamo = !C.digitalcamo
|
||||
spawn(0)
|
||||
while(C && C.digitalcamo)
|
||||
C.changeling.chem_charges -= 1/4
|
||||
sleep(10)
|
||||
|
||||
|
||||
usr.verbs -= /client/proc/changeling_digitalcamo
|
||||
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_digitalcamo
|
||||
|
||||
|
||||
/client/proc/changeling_DEATHsting()
|
||||
set category = "Changeling"
|
||||
set name = "Death Sting (40)"
|
||||
set desc = "Causes spasms onto death."
|
||||
|
||||
if(!usr.changeling)
|
||||
usr << "\red You're not a changeling, something's wrong!"
|
||||
return
|
||||
|
||||
var/list/victims = list()
|
||||
for(var/mob/living/carbon/C in oview(usr.changeling.sting_range))
|
||||
victims += C
|
||||
var/mob/T = input(usr, "Who do you wish to sting?") as null | anything in victims
|
||||
|
||||
if(T && T in view(usr.changeling.sting_range))
|
||||
|
||||
if(usr.stat)
|
||||
usr << "\red Not when we are incapacitated."
|
||||
return
|
||||
|
||||
if(usr.changeling.chem_charges < 40)
|
||||
usr << "\red We don't have enough stored chemicals to do that!"
|
||||
return
|
||||
|
||||
usr.changeling.chem_charges -= 40
|
||||
usr.changeling.sting_range = 1
|
||||
|
||||
usr << "\blue We stealthily sting [T]."
|
||||
|
||||
if(!T.changeling)
|
||||
T << "You feel a small prick and your chest becomes tight."
|
||||
|
||||
T.silent = (10)
|
||||
T.Paralyse(10)
|
||||
T.make_jittery(1000)
|
||||
|
||||
if (T.reagents)
|
||||
T.reagents.add_reagent("lexorin", 40)
|
||||
|
||||
else
|
||||
T << "You feel a small prick."
|
||||
|
||||
usr.verbs -= /client/proc/changeling_DEATHsting
|
||||
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_DEATHsting
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
/client/proc/changeling_rapidregen()
|
||||
set category = "Changeling"
|
||||
set name = "Rapid Regeneration (30)"
|
||||
set desc = "Begins rapidly regenerating. Does not effect stuns or chemicals."
|
||||
|
||||
if(!usr.changeling)
|
||||
usr << "\red You're not a changeling, something's wrong!"
|
||||
return
|
||||
|
||||
if(usr.changeling.chem_charges < 30)
|
||||
usr << "\red We don't have enough stored chemicals to do that!"
|
||||
return
|
||||
|
||||
usr.changeling.chem_charges -= 30
|
||||
|
||||
var/mob/living/carbon/human/C = usr
|
||||
|
||||
spawn(0)
|
||||
for(var/i = 0, i<10,i++)
|
||||
if(C)
|
||||
C.adjustBruteLoss(-10)
|
||||
C.adjustToxLoss(-10)
|
||||
C.adjustOxyLoss(-10)
|
||||
C.adjustFireLoss(-10)
|
||||
sleep(10)
|
||||
|
||||
|
||||
usr.verbs -= /client/proc/changeling_rapidregen
|
||||
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_rapidregen
|
||||
|
||||
|
||||
|
||||
|
||||
/client/proc/changeling_lsdsting()
|
||||
set category = "Changeling"
|
||||
set name = "Hallucination Sting (15)"
|
||||
set desc = "Causes terror in the target."
|
||||
|
||||
if(!usr.changeling)
|
||||
usr << "\red You're not a changeling, something's wrong!"
|
||||
return
|
||||
|
||||
var/list/victims = list()
|
||||
for(var/mob/living/carbon/C in oview(usr.changeling.sting_range))
|
||||
victims += C
|
||||
var/mob/T = input(usr, "Who do you wish to sting?") as null | anything in victims
|
||||
|
||||
if(T && T in view(usr.changeling.sting_range))
|
||||
|
||||
if(usr.stat)
|
||||
usr << "\red Not when we are incapacitated."
|
||||
return
|
||||
|
||||
if(usr.changeling.chem_charges < 15)
|
||||
usr << "\red We don't have enough stored chemicals to do that!"
|
||||
return
|
||||
|
||||
usr.changeling.chem_charges -= 15
|
||||
usr.changeling.sting_range = 1
|
||||
|
||||
usr << "\blue We stealthily sting [T]."
|
||||
|
||||
if(!T.changeling)
|
||||
// T << "You feel a small prick." // No warning.
|
||||
|
||||
var/timer = rand(300,600)
|
||||
|
||||
spawn(timer)
|
||||
if(T)
|
||||
if(T.reagents)
|
||||
// T.reagents.add_reagent("LSD", 50) // Slight overkill, it seems.
|
||||
T.hallucination = 400
|
||||
|
||||
|
||||
usr.verbs -= /client/proc/changeling_lsdsting
|
||||
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_lsdsting
|
||||
|
||||
return
|
||||
@@ -0,0 +1,520 @@
|
||||
|
||||
var/list/powers = typesof(/obj/effect/proc_holder/power) //needed for the badmin verb for now
|
||||
var/list/obj/effect/proc_holder/power/powerinstances = list()
|
||||
|
||||
/obj/effect/proc_holder/power
|
||||
name = "Power"
|
||||
desc = "Placeholder"
|
||||
density = 0
|
||||
opacity = 0
|
||||
|
||||
var/helptext = ""
|
||||
|
||||
var/allowduringlesserform = 0
|
||||
var/isVerb = 1 // Is it an active power, or passive?
|
||||
var/verbpath = null // Path to a verb that contains the effects.
|
||||
var/genomecost = 500000 // Cost for the changling to evolve this power.
|
||||
|
||||
/obj/effect/proc_holder/power/absorb_dna
|
||||
name = "Absorb DNA"
|
||||
desc = "Permits us to syphon the DNA from a human. They become one with us, and we become stronger."
|
||||
genomecost = 0
|
||||
|
||||
verbpath = /client/proc/changeling_absorb_dna
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/transform
|
||||
name = "Transform"
|
||||
desc = "We take on the apperance and voice of one we have absorbed."
|
||||
genomecost = 0
|
||||
|
||||
verbpath = /client/proc/changeling_transform
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/lesser_form
|
||||
name = "Lesser Form"
|
||||
desc = "We debase ourselves and become lesser. We become a monkey."
|
||||
genomecost = 1
|
||||
|
||||
verbpath = /client/proc/changeling_lesser_form
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/changeling_greater_form
|
||||
name = "Greater Form"
|
||||
desc = "We become the pinnicle of evolution. We will show the humans what happens when they leave their isle of ignorance."
|
||||
genomecost = 250
|
||||
|
||||
// doesn't happen lol. Yet!
|
||||
|
||||
/obj/effect/proc_holder/power/fakedeath
|
||||
name = "Fake Death"
|
||||
desc = "We fake our death while we heal."
|
||||
genomecost = 0
|
||||
allowduringlesserform = 1
|
||||
|
||||
verbpath = /client/proc/changeling_fakedeath
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/deaf_sting
|
||||
name = "Deaf Sting"
|
||||
desc = "We silently sting a human, completely silencing them for a short time."
|
||||
genomecost = 1
|
||||
allowduringlesserform = 1
|
||||
|
||||
verbpath = /client/proc/changeling_deaf_sting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/blind_sting
|
||||
name = "Blind Sting"
|
||||
desc = "We silently sting a human, completely deafening them for a short time."
|
||||
genomecost = 2
|
||||
allowduringlesserform = 1
|
||||
|
||||
verbpath = /client/proc/changeling_blind_sting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/paralysis_sting
|
||||
name = "Paralysis Sting"
|
||||
desc = "We silently sting a human, paralyzing them for a short time. We must be wary, they can still whisper."
|
||||
genomecost = 5
|
||||
|
||||
|
||||
verbpath = /client/proc/changeling_paralysis_sting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/silence_sting
|
||||
name = "Silence Sting"
|
||||
desc = "We silently sting a human, completely silencing them for a short time."
|
||||
helptext = "Does not provide a warning to a victim that they've been stung, until they try to speak and can't." // Man, fuck javascript. ' == '
|
||||
genomecost = 2
|
||||
allowduringlesserform = 1
|
||||
|
||||
verbpath = /client/proc/changeling_silence_sting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/transformation_sting
|
||||
name = "Transformation Sting"
|
||||
desc = "We silently sting a human, injecting a retrovirus that forces them to transform into another."
|
||||
genomecost = 2
|
||||
|
||||
verbpath = /client/proc/changeling_transformation_sting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/unfat_sting
|
||||
name = "Unfat Sting"
|
||||
desc = "We silently sting a human, forcing them to rapidly metobolize their fat."
|
||||
genomecost = 1
|
||||
|
||||
|
||||
verbpath = /client/proc/changeling_unfat_sting
|
||||
|
||||
/obj/effect/proc_holder/power/boost_range
|
||||
name = "Boost Range"
|
||||
desc = "We evolve the ability to shoot our stingers at humans, with some preperation."
|
||||
genomecost = 2
|
||||
allowduringlesserform = 1
|
||||
|
||||
verbpath = /client/proc/changeling_boost_range
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/Epinephrine
|
||||
name = "Epinephrine sacs"
|
||||
desc = "We evolve additional sacs of adrenaline throughout our body."
|
||||
helptext = "Gives the ability to instantly recover from stuns. High chemical cost."
|
||||
genomecost = 4
|
||||
|
||||
verbpath = /client/proc/changeling_unstun
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/ChemicalSynth
|
||||
name = "Rapid Chemical Synthesis"
|
||||
desc = "We evolve new pathways for producing our necessary chemicals, permitting us to naturally create them faster."
|
||||
helptext = "Doubles the rate at which we naturally recharge chemicals."
|
||||
genomecost = 4
|
||||
isVerb = 0
|
||||
|
||||
verbpath = /client/proc/changeling_fastchemical
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/EngorgedGlands
|
||||
name = "Engorged Chemical Glands"
|
||||
desc = "Our chemical glands swell, permitting us to store more chemicals inside of them."
|
||||
helptext = "Allows us to store an extra 25 units of chemicals."
|
||||
genomecost = 4
|
||||
isVerb = 0
|
||||
|
||||
|
||||
verbpath = /client/proc/changeling_engorgedglands
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/DigitalCamoflague
|
||||
name = "Digital Camoflauge"
|
||||
desc = "We evolve the ability to distort our form and proprtions, defeating common altgorthms used to detect lifeforms on cameras."
|
||||
helptext = "We cannot be tracked by camera while using this skill. However, humans looking at us will find us.. uncanny. We must constantly expend chemicals to maintain our form like this."
|
||||
genomecost = 4
|
||||
allowduringlesserform = 1
|
||||
|
||||
verbpath = /client/proc/changeling_digitalcamo
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/DeathSting
|
||||
name = "Death Sting"
|
||||
desc = "We silently sting a human, filling him with potent chemicals. His rapid death is all but assured."
|
||||
genomecost = 10
|
||||
|
||||
verbpath = /client/proc/changeling_DEATHsting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/rapidregeneration
|
||||
name = "Rapid Regeneration"
|
||||
desc = "We evolve the ability to rapidly regenerate, negating the need for stasis."
|
||||
helptext = "Heals a moderate amount of damage every tick."
|
||||
genomecost = 8
|
||||
|
||||
verbpath = /client/proc/changeling_rapidregen
|
||||
|
||||
/obj/effect/proc_holder/power/LSDSting
|
||||
name = "Hallucination Sting"
|
||||
desc = "We evolve the ability to sting a target with a powerful hallunicationary chemical."
|
||||
helptext = "The target does not notice they've been stung. The effect occurs after 30 to 60 seconds."
|
||||
genomecost = 3
|
||||
|
||||
verbpath = /client/proc/changeling_lsdsting
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Modularchangling, totally stolen from the new player panel. YAYY
|
||||
/datum/changeling/proc/EvolutionMenu()//The new one
|
||||
set category = "Changeling"
|
||||
set desc = "Level up!"
|
||||
if (!usr.changeling)
|
||||
return
|
||||
|
||||
src = usr.changeling
|
||||
|
||||
if(!powerinstances.len)
|
||||
for(var/P in powers)
|
||||
var/obj/effect/proc_holder/power/nP = new P
|
||||
if (nP.desc == "Placeholder")
|
||||
del(nP)
|
||||
continue
|
||||
powerinstances += nP
|
||||
|
||||
var/dat = "<html><head><title>Changling Evolution Menu</title></head>"
|
||||
|
||||
//javascript, the part that does most of the work~
|
||||
dat += {"
|
||||
|
||||
<head>
|
||||
<script type='text/javascript'>
|
||||
|
||||
var locked_tabs = new Array();
|
||||
|
||||
function updateSearch(){
|
||||
|
||||
|
||||
var filter_text = document.getElementById('filter');
|
||||
var filter = filter_text.value.toLowerCase();
|
||||
|
||||
if(complete_list != null && complete_list != ""){
|
||||
var mtbl = document.getElementById("maintable_data_archive");
|
||||
mtbl.innerHTML = complete_list;
|
||||
}
|
||||
|
||||
if(filter.value == ""){
|
||||
return;
|
||||
}else{
|
||||
|
||||
var maintable_data = document.getElementById('maintable_data');
|
||||
var ltr = maintable_data.getElementsByTagName("tr");
|
||||
for ( var i = 0; i < ltr.length; ++i )
|
||||
{
|
||||
try{
|
||||
var tr = ltr\[i\];
|
||||
if(tr.getAttribute("id").indexOf("data") != 0){
|
||||
continue;
|
||||
}
|
||||
var ltd = tr.getElementsByTagName("td");
|
||||
var td = ltd\[0\];
|
||||
var lsearch = td.getElementsByTagName("b");
|
||||
var search = lsearch\[0\];
|
||||
//var inner_span = li.getElementsByTagName("span")\[1\] //Should only ever contain one element.
|
||||
//document.write("<p>"+search.innerText+"<br>"+filter+"<br>"+search.innerText.indexOf(filter))
|
||||
if ( search.innerText.toLowerCase().indexOf(filter) == -1 )
|
||||
{
|
||||
//document.write("a");
|
||||
//ltr.removeChild(tr);
|
||||
td.innerHTML = "";
|
||||
i--;
|
||||
}
|
||||
}catch(err) { }
|
||||
}
|
||||
}
|
||||
|
||||
var count = 0;
|
||||
var index = -1;
|
||||
var debug = document.getElementById("debug");
|
||||
|
||||
locked_tabs = new Array();
|
||||
|
||||
}
|
||||
|
||||
function expand(id,name,desc,helptext,power,ownsthis){
|
||||
|
||||
clearAll();
|
||||
|
||||
var span = document.getElementById(id);
|
||||
|
||||
body = "<table><tr><td>";
|
||||
|
||||
body += "</td><td align='center'>";
|
||||
|
||||
body += "<font size='2'><b>"+desc+"</b></font> <BR>"
|
||||
|
||||
body += "<font size='2'><font color = 'red'><b>"+helptext+"</b></font> <BR>"
|
||||
|
||||
if(!ownsthis)
|
||||
{
|
||||
body += "<a href='?src=\ref[src];P="+power+"'>Evolve</a>"
|
||||
}
|
||||
|
||||
body += "</td><td align='center'>";
|
||||
|
||||
body += "</td></tr></table>";
|
||||
|
||||
|
||||
span.innerHTML = body
|
||||
}
|
||||
|
||||
function clearAll(){
|
||||
var spans = document.getElementsByTagName('span');
|
||||
for(var i = 0; i < spans.length; i++){
|
||||
var span = spans\[i\];
|
||||
|
||||
var id = span.getAttribute("id");
|
||||
|
||||
if(!(id.indexOf("item")==0))
|
||||
continue;
|
||||
|
||||
var pass = 1;
|
||||
|
||||
for(var j = 0; j < locked_tabs.length; j++){
|
||||
if(locked_tabs\[j\]==id){
|
||||
pass = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(pass != 1)
|
||||
continue;
|
||||
|
||||
|
||||
|
||||
|
||||
span.innerHTML = "";
|
||||
}
|
||||
}
|
||||
|
||||
function addToLocked(id,link_id,notice_span_id){
|
||||
var link = document.getElementById(link_id);
|
||||
var decision = link.getAttribute("name");
|
||||
if(decision == "1"){
|
||||
link.setAttribute("name","2");
|
||||
}else{
|
||||
link.setAttribute("name","1");
|
||||
removeFromLocked(id,link_id,notice_span_id);
|
||||
return;
|
||||
}
|
||||
|
||||
var pass = 1;
|
||||
for(var j = 0; j < locked_tabs.length; j++){
|
||||
if(locked_tabs\[j\]==id){
|
||||
pass = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!pass)
|
||||
return;
|
||||
locked_tabs.push(id);
|
||||
var notice_span = document.getElementById(notice_span_id);
|
||||
notice_span.innerHTML = "<font color='red'>Locked</font> ";
|
||||
//link.setAttribute("onClick","attempt('"+id+"','"+link_id+"','"+notice_span_id+"');");
|
||||
//document.write("removeFromLocked('"+id+"','"+link_id+"','"+notice_span_id+"')");
|
||||
//document.write("aa - "+link.getAttribute("onClick"));
|
||||
}
|
||||
|
||||
function attempt(ab){
|
||||
return ab;
|
||||
}
|
||||
|
||||
function removeFromLocked(id,link_id,notice_span_id){
|
||||
//document.write("a");
|
||||
var index = 0;
|
||||
var pass = 0;
|
||||
for(var j = 0; j < locked_tabs.length; j++){
|
||||
if(locked_tabs\[j\]==id){
|
||||
pass = 1;
|
||||
index = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!pass)
|
||||
return;
|
||||
locked_tabs\[index\] = "";
|
||||
var notice_span = document.getElementById(notice_span_id);
|
||||
notice_span.innerHTML = "";
|
||||
//var link = document.getElementById(link_id);
|
||||
//link.setAttribute("onClick","addToLocked('"+id+"','"+link_id+"','"+notice_span_id+"')");
|
||||
}
|
||||
|
||||
function selectTextField(){
|
||||
var filter_text = document.getElementById('filter');
|
||||
filter_text.focus();
|
||||
filter_text.select();
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
"}
|
||||
|
||||
//body tag start + onload and onkeypress (onkeyup) javascript event calls
|
||||
dat += "<body onload='selectTextField(); updateSearch();' onkeyup='updateSearch();'>"
|
||||
|
||||
//title + search bar
|
||||
dat += {"
|
||||
|
||||
<table width='560' align='center' cellspacing='0' cellpadding='5' id='maintable'>
|
||||
<tr id='title_tr'>
|
||||
<td align='center'>
|
||||
<font size='5'><b>Changling Evolution Menu</b></font><br>
|
||||
Hover over a power to see more information<br>
|
||||
Current genomes left to evolve with: [usr.changeling.geneticpoints]
|
||||
<p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='search_tr'>
|
||||
<td align='center'>
|
||||
<b>Search:</b> <input type='text' id='filter' value='' style='width:300px;'>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
"}
|
||||
|
||||
//player table header
|
||||
dat += {"
|
||||
<span id='maintable_data_archive'>
|
||||
<table width='560' align='center' cellspacing='0' cellpadding='5' id='maintable_data'>"}
|
||||
|
||||
var/i = 1
|
||||
for(var/obj/effect/proc_holder/power/P in powerinstances)
|
||||
var/ownsthis = 0
|
||||
|
||||
if(P in usr.changeling.purchasedpowers)
|
||||
ownsthis = 1
|
||||
|
||||
|
||||
var/color = "#e6e6e6"
|
||||
if(i%2 == 0)
|
||||
color = "#f2f2f2"
|
||||
|
||||
|
||||
dat += {"
|
||||
|
||||
<tr id='data[i]' name='[i]' onClick="addToLocked('item[i]','data[i]','notice_span[i]')">
|
||||
<td align='center' bgcolor='[color]'>
|
||||
<span id='notice_span[i]'></span>
|
||||
<a id='link[i]'
|
||||
onmouseover='expand("item[i]","[P.name]","[P.desc]","[P.helptext]","[P]",[ownsthis])'
|
||||
>
|
||||
<b id='search[i]'>Evolve [P] - Cost: [ownsthis ? "Purchased" : P.genomecost]</b>
|
||||
</a>
|
||||
<br><span id='item[i]'></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
"}
|
||||
|
||||
i++
|
||||
|
||||
|
||||
//player table ending
|
||||
dat += {"
|
||||
</table>
|
||||
</span>
|
||||
|
||||
<script type='text/javascript'>
|
||||
var maintable = document.getElementById("maintable_data_archive");
|
||||
var complete_list = maintable.innerHTML;
|
||||
</script>
|
||||
</body></html>
|
||||
"}
|
||||
|
||||
usr << browse(dat, "window=powers;size=900x480")
|
||||
|
||||
|
||||
/datum/changeling/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
if(href_list["P"])
|
||||
usr.changeling.purchasePower(href_list["P"])
|
||||
call(/datum/changeling/proc/EvolutionMenu)()
|
||||
|
||||
|
||||
|
||||
/datum/changeling/proc/purchasePower(var/obj/effect/proc_holder/power/Pname)
|
||||
if (!usr.changeling)
|
||||
return
|
||||
|
||||
var/obj/effect/proc_holder/power/Thepower = null
|
||||
|
||||
for (var/obj/effect/proc_holder/power/P in powerinstances)
|
||||
if(P.name == Pname)
|
||||
Thepower = P
|
||||
break
|
||||
|
||||
if(Thepower == null)
|
||||
usr << "This is awkward. Changeling power purchase failed, please report this bug to a coder!"
|
||||
return
|
||||
|
||||
if(Thepower in usr.changeling.purchasedpowers)
|
||||
usr << "We have already evolved this ability!"
|
||||
return
|
||||
|
||||
|
||||
if(usr.changeling.geneticpoints < Thepower.genomecost)
|
||||
usr << "We cannot evolve this... yet. We must acquire more DNA."
|
||||
return
|
||||
|
||||
usr.changeling.geneticpoints -= Thepower.genomecost
|
||||
|
||||
usr.changeling.purchasedpowers += Thepower
|
||||
|
||||
if(!Thepower.isVerb)
|
||||
call(Thepower.verbpath)()
|
||||
|
||||
else
|
||||
if(usr.changeling.changeling_level == 1)
|
||||
usr.make_lesser_changeling()
|
||||
else
|
||||
usr.make_changeling()
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
restricted_jobs = list("AI", "Cyborg")
|
||||
required_players = 3
|
||||
required_enemies = 3
|
||||
recommended_enemies = 4
|
||||
|
||||
var/datum/mind/sacrifice_target = null
|
||||
var/finished = 0
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
// Enable this and the below to have command reports in extended
|
||||
// var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
// var/const/waittime_h = 1800
|
||||
|
||||
/datum/game_mode/announce()
|
||||
world << "<B>The current game mode is - Extended Role-Playing!</B>"
|
||||
world << "<B>Just have fun and role-play!</B>"
|
||||
@@ -14,3 +18,9 @@
|
||||
// setup_sectors()
|
||||
// spawn_exporation_packs()
|
||||
return 1
|
||||
|
||||
// Enable this and the above to have command reports in extended
|
||||
///datum/game_mode/extended/post_setup()
|
||||
// send_intercept()
|
||||
//
|
||||
// ..()
|
||||
@@ -20,9 +20,11 @@
|
||||
station_was_nuked = 0 //see nuclearbomb.dm and malfunction.dm
|
||||
explosion_in_progress = 0 //sit back and relax
|
||||
list/datum/mind/modePlayer = new
|
||||
list/restricted_jobs = list()
|
||||
list/restricted_jobs = list() // Jobs it doesn't make sense to be. I.E chaplain or AI cultist
|
||||
list/protected_jobs = list() // Jobs that can't be tratiors because
|
||||
required_players = 0
|
||||
required_enemies = 0
|
||||
recommended_enemies = 0
|
||||
uplink_welcome
|
||||
uplink_uses
|
||||
uplink_items = {"Highly Visible and Dangerous Weapons;
|
||||
@@ -71,7 +73,11 @@ Badassery;
|
||||
/obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon);
|
||||
Whitespace:Seperator;"}
|
||||
|
||||
//obj/item/weapon/syndie/c4explosive/heavy:7:High (!) Power Explosive Charge, with Detonator;
|
||||
// Items removed from above:
|
||||
/*
|
||||
/obj/item/weapon/syndie/c4explosive/heavy:7:High (!) Power Explosive Charge, with Detonator;
|
||||
/obj/item/weapon/cloaking_device:4:Cloaking Device; //Replacing cloakers with thermals. -Pete
|
||||
*/
|
||||
|
||||
/datum/game_mode/proc/announce() //to be calles when round starts
|
||||
world << "<B>Notice</B>: [src] did not define announce()"
|
||||
@@ -120,6 +126,72 @@ Whitespace:Seperator;"}
|
||||
|
||||
|
||||
/datum/game_mode/proc/declare_completion()
|
||||
var/clients = 0
|
||||
var/surviving_humans = 0
|
||||
var/surviving_total = 0
|
||||
var/ghosts = 0
|
||||
var/escaped_humans = 0
|
||||
var/escaped_total = 0
|
||||
var/escaped_on_pod_1 = 0
|
||||
var/escaped_on_pod_2 = 0
|
||||
var/escaped_on_pod_3 = 0
|
||||
var/escaped_on_pod_5 = 0
|
||||
var/escaped_on_shuttle = 0
|
||||
|
||||
var/list/area/escape_locations = list(/area/shuttle/escape/centcom, /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom)
|
||||
|
||||
for(var/mob/M in world)
|
||||
if(M.client)
|
||||
clients++
|
||||
if(ishuman(M))
|
||||
if(!M.stat)
|
||||
surviving_humans++
|
||||
if(M.loc && M.loc.loc && M.loc.loc.type in escape_locations)
|
||||
escaped_humans++
|
||||
if(!M.stat)
|
||||
surviving_total++
|
||||
if(M.loc && M.loc.loc && M.loc.loc.type in escape_locations)
|
||||
escaped_total++
|
||||
|
||||
if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape/centcom)
|
||||
escaped_on_shuttle++
|
||||
|
||||
if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape_pod1/centcom)
|
||||
escaped_on_pod_1++
|
||||
if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape_pod2/centcom)
|
||||
escaped_on_pod_2++
|
||||
if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape_pod3/centcom)
|
||||
escaped_on_pod_3++
|
||||
if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape_pod5/centcom)
|
||||
escaped_on_pod_5++
|
||||
|
||||
if(isobserver(M))
|
||||
ghosts++
|
||||
|
||||
if(clients > 0)
|
||||
feedback_set("round_end_clients",clients)
|
||||
if(ghosts > 0)
|
||||
feedback_set("round_end_ghosts",ghosts)
|
||||
if(surviving_humans > 0)
|
||||
feedback_set("survived_human",surviving_humans)
|
||||
if(surviving_total > 0)
|
||||
feedback_set("survived_total",surviving_total)
|
||||
if(escaped_humans > 0)
|
||||
feedback_set("escaped_human",escaped_humans)
|
||||
if(escaped_total > 0)
|
||||
feedback_set("escaped_total",escaped_total)
|
||||
if(escaped_on_shuttle > 0)
|
||||
feedback_set("escaped_on_shuttle",escaped_on_shuttle)
|
||||
if(escaped_on_pod_1 > 0)
|
||||
feedback_set("escaped_on_pod_1",escaped_on_pod_1)
|
||||
if(escaped_on_pod_2 > 0)
|
||||
feedback_set("escaped_on_pod_2",escaped_on_pod_2)
|
||||
if(escaped_on_pod_3 > 0)
|
||||
feedback_set("escaped_on_pod_3",escaped_on_pod_3)
|
||||
if(escaped_on_pod_5 > 0)
|
||||
feedback_set("escaped_on_pod_5",escaped_on_pod_5)
|
||||
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
@@ -169,23 +241,79 @@ Whitespace:Seperator;"}
|
||||
|
||||
/datum/game_mode/proc/get_players_for_role(var/role, override_jobbans=1)
|
||||
var/list/candidates = list()
|
||||
var/list/drafted = list()
|
||||
var/datum/mind/applicant = null
|
||||
|
||||
var/roletext
|
||||
switch(role)
|
||||
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)
|
||||
if(!jobban_isbanned(player, "Syndicate"))
|
||||
candidates += player.mind
|
||||
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans
|
||||
candidates += player.mind // Get a list of all the people who want to be the antagonist for this round
|
||||
|
||||
if(candidates.len < required_enemies)
|
||||
if(restricted_jobs)
|
||||
for(var/datum/mind/player in candidates)
|
||||
for(var/job in restricted_jobs) // Remove people who want to be antagonist but have a job already that precludes it
|
||||
if(player.assigned_role == job)
|
||||
candidates -= player
|
||||
|
||||
if(candidates.len < recommended_enemies)
|
||||
for(var/mob/new_player/player in world)
|
||||
if (player.client && player.ready)
|
||||
if(!jobban_isbanned(player, "Syndicate"))
|
||||
candidates += player.mind
|
||||
if(!(player.preferences.be_special & role)) // We don't have enough people who want to be antagonist, make a seperate list of people who don't want to be one
|
||||
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans
|
||||
drafted += player.mind
|
||||
|
||||
if(candidates.len < required_enemies && override_jobbans) //just to be safe. Ignored jobbans are better than broken round. Shouldn't happen usually. --rastaf0
|
||||
if(restricted_jobs)
|
||||
for(var/datum/mind/player in drafted) // Remove people who can't be an antagonist
|
||||
for(var/job in restricted_jobs)
|
||||
if(player.assigned_role == job)
|
||||
drafted -= player
|
||||
|
||||
while(candidates.len < recommended_enemies) // Pick randomlly just the number of people we need and add them to our list of candidates
|
||||
if(drafted.len > 0)
|
||||
applicant = pick(drafted)
|
||||
if(applicant)
|
||||
candidates += applicant
|
||||
drafted.Remove(applicant)
|
||||
|
||||
else // Not enough scrubs, ABORT ABORT ABORT
|
||||
break
|
||||
|
||||
if(candidates.len < recommended_enemies && override_jobbans) //If we still don't have enough people, we're going to start drafting banned people.
|
||||
for(var/mob/new_player/player in world)
|
||||
if (player.client && player.ready)
|
||||
candidates += player.mind
|
||||
return candidates
|
||||
if(jobban_isbanned(player, "Syndicate") || jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans
|
||||
drafted += player.mind
|
||||
|
||||
if(restricted_jobs)
|
||||
for(var/datum/mind/player in drafted) // Remove people who can't be an antagonist
|
||||
for(var/job in restricted_jobs)
|
||||
if(player.assigned_role == job)
|
||||
drafted -= player
|
||||
|
||||
while(candidates.len < recommended_enemies) // Pick randomlly just the number of people we need and add them to our list of candidates
|
||||
if(drafted.len > 0)
|
||||
applicant = pick(drafted)
|
||||
if(applicant)
|
||||
candidates += applicant
|
||||
drafted.Remove(applicant)
|
||||
|
||||
else // Not enough scrubs, ABORT ABORT ABORT
|
||||
break
|
||||
|
||||
return candidates // Returns: The number of people who had the antagonist role set to yes, regardless of recomended_enemies, if that number is greater than recommended_enemies
|
||||
// recommended_enemies if the number of people with that role set to yes is less than recomended_enemies,
|
||||
// Less if there are not enough valid players in the game entirely to make recommended_enemies.
|
||||
|
||||
|
||||
/datum/game_mode/proc/check_player_role_pref(var/role, var/mob/new_player/player)
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
config_tag = "malfunction"
|
||||
required_players = 1
|
||||
required_enemies = 1
|
||||
recommended_enemies = 1
|
||||
|
||||
uplink_welcome = "Crazy AI Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
var/const/waittime_l = 600
|
||||
var/const/waittime_h = 1800 // started at 1800
|
||||
|
||||
@@ -15,9 +20,6 @@
|
||||
var/to_nuke_or_not_to_nuke = 0
|
||||
var/apcs = 0 //Adding dis to track how many APCs the AI hacks. --NeoFite
|
||||
|
||||
uplink_welcome = "Crazy AI Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
|
||||
/datum/game_mode/malfunction/announce()
|
||||
world << "<B>The current game mode is - AI Malfunction!</B>"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
uplink_welcome = "EVIL METEOR Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
|
||||
/datum/game_mode/meteor/announce()
|
||||
world << "<B>The current game mode is - Meteor!</B>"
|
||||
world << "<B>The space station has been stuck in a major meteor shower. You must escape from the station or at least live.</B>"
|
||||
@@ -38,6 +39,7 @@
|
||||
/datum/game_mode/meteor/declare_completion()
|
||||
var/list/survivors = list()
|
||||
var/area/escape_zone = locate(/area/shuttle/escape/centcom)
|
||||
var/area/pod_zone = list( /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom )
|
||||
|
||||
for(var/mob/living/player in world)
|
||||
if (player.client)
|
||||
@@ -45,6 +47,8 @@
|
||||
var/turf/location = get_turf(player.loc)
|
||||
if (location in escape_zone)
|
||||
survivors[player.real_name] = "shuttle"
|
||||
else if (location.loc.type in pod_zone)
|
||||
survivors[player.real_name] = "pod"
|
||||
else
|
||||
survivors[player.real_name] = "alive"
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
config_tag = "nuclear"
|
||||
required_players = 3
|
||||
required_enemies = 2
|
||||
recommended_enemies = 5
|
||||
|
||||
uplink_welcome = "Corporate Backed Uplink Console:"
|
||||
uplink_uses = 40
|
||||
@@ -29,6 +30,7 @@
|
||||
/datum/game_mode/nuclear/can_start()//This could be better, will likely have to recode it later
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/list/possible_syndicates = get_players_for_role(BE_OPERATIVE)
|
||||
var/agent_number = 0
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
|
||||
required_players = 3
|
||||
required_enemies = 3
|
||||
recommended_enemies = 3
|
||||
|
||||
|
||||
uplink_welcome = "Revolutionary Uplink Console:"
|
||||
uplink_uses = 10
|
||||
@@ -133,7 +135,7 @@
|
||||
if (!where)
|
||||
mob << "The Syndicate were unfortunately unable to get you a flash."
|
||||
else
|
||||
mob << "The flash in your [where] would help you to use your extreme persuasion skills."
|
||||
mob << "The flash in your [where] will implant a memory engram to convert others to our cause."
|
||||
return 1
|
||||
|
||||
//////////////////////////////////////
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
restricted_jobs = list("Cyborg", "AI")//Approved by headmins for a week test, if you see this it would be nice if you didn't spread it everywhere
|
||||
required_players = 0
|
||||
required_enemies = 1
|
||||
recommended_enemies = 4
|
||||
|
||||
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
config_tag = "wizard"
|
||||
required_players = 0
|
||||
required_enemies = 1
|
||||
recommended_enemies = 1
|
||||
|
||||
uplink_welcome = "Wizardly Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#define ui_belt "SOUTH-1,3"
|
||||
#define ui_throw "SOUTH-1,8"
|
||||
#define ui_oxygen "EAST+1, NORTH-4"
|
||||
#define ui_pressure "EAST+1, NORTH-5"
|
||||
#define ui_toxin "EAST+1, NORTH-6"
|
||||
#define ui_internal "EAST+1, NORTH-2"
|
||||
#define ui_fire "EAST+1, NORTH-8"
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
dat += text("[]\t-Burn Severity %: []</FONT><BR>", (occupant.getFireLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getFireLoss())
|
||||
dat += text("<HR>Paralysis Summary %: [] ([] seconds left!)<BR>", occupant.paralysis, round(occupant.paralysis / 4))
|
||||
dat += text("Inaprovaline units: [] units<BR>", occupant.reagents.get_reagent_amount("inaprovaline"))
|
||||
dat += text("Soporific: [] units<BR>", occupant.reagents.get_reagent_amount("stoxin"))
|
||||
dat += text("Soporific (Sleep Toxin): [] units<BR>", occupant.reagents.get_reagent_amount("stoxin"))
|
||||
dat += text("[]\tDermaline: [] units</FONT><BR>", (occupant.reagents.get_reagent_amount("dermaline") < 30 ? "<font color='black'>" : "<font color='red'>"), occupant.reagents.get_reagent_amount("dermaline"))
|
||||
dat += text("[]\tBicaridine: [] units<BR>", (occupant.reagents.get_reagent_amount("bicaridine") < 30 ? "<font color='black'>" : "<font color='red'>"), occupant.reagents.get_reagent_amount("bicaridine"))
|
||||
dat += text("[]\tDexalin: [] units<BR>", (occupant.reagents.get_reagent_amount("dexalin") < 30 ? "<font color='black'>" : "<font color='red'>"), occupant.reagents.get_reagent_amount("dexalin"))
|
||||
|
||||
+293
-16
@@ -1,3 +1,26 @@
|
||||
|
||||
/proc/RandomAAlarmWires()
|
||||
//to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else).
|
||||
var/list/AAlarmwires = list(0, 0, 0, 0, 0)
|
||||
AAlarmIndexToFlag = list(0, 0, 0, 0, 0)
|
||||
AAlarmIndexToWireColor = list(0, 0, 0, 0, 0)
|
||||
AAlarmWireColorToIndex = list(0, 0, 0, 0, 0)
|
||||
var/flagIndex = 1
|
||||
for (var/flag=1, flag<32, flag+=flag)
|
||||
var/valid = 0
|
||||
while (!valid)
|
||||
var/colorIndex = rand(1, 5)
|
||||
if (AAlarmwires[colorIndex]==0)
|
||||
valid = 1
|
||||
AAlarmwires[colorIndex] = flag
|
||||
AAlarmIndexToFlag[flagIndex] = flag
|
||||
AAlarmIndexToWireColor[flagIndex] = colorIndex
|
||||
AAlarmWireColorToIndex[colorIndex] = flagIndex
|
||||
flagIndex+=1
|
||||
return AAlarmwires
|
||||
|
||||
|
||||
|
||||
// A datum for dealing with threshold limit values
|
||||
// used in /obj/machinery/alarm
|
||||
/datum/tlv
|
||||
@@ -49,6 +72,19 @@
|
||||
#define AALARM_REPORT_TIMEOUT 100
|
||||
var/datum/radio_frequency/radio_connection
|
||||
var/locked = 1
|
||||
var/wiresexposed = 0 // If it's been screwdrivered open.
|
||||
var/aidisabled = 0
|
||||
var/AAlarmwires = 31
|
||||
var/shorted = 0
|
||||
|
||||
// Uses code from apc.dm
|
||||
|
||||
#define AALARM_WIRE_IDSCAN 1 //Added wires
|
||||
#define AALARM_WIRE_POWER 2
|
||||
#define AALARM_WIRE_SYPHON 3
|
||||
#define AALARM_WIRE_AI_CONTROL 4
|
||||
#define AALARM_WIRE_AALARM 5
|
||||
|
||||
|
||||
#define AALARM_MODE_SCRUBBING 1
|
||||
#define AALARM_MODE_VENTING 2 //makes draught
|
||||
@@ -89,8 +125,18 @@
|
||||
"carbon dioxide" = new/datum/tlv(-1.0, -1.0, 5, 10), // Partial pressure, kpa
|
||||
"plasma" = new/datum/tlv(-1.0, -1.0, 0.2, 0.5), // Partial pressure, kpa
|
||||
"other" = new/datum/tlv(-1.0, -1.0, 0.5, 1.0), // Partial pressure, kpa
|
||||
"pressure" = new/datum/tlv(ONE_ATMOSPHERE*0.20,ONE_ATMOSPHERE*0.35,ONE_ATMOSPHERE*0.8,ONE_ATMOSPHERE*0.9), /* kpa */
|
||||
"temperature" = new/datum/tlv(40, 60, 150, 160), // K
|
||||
"pressure" = new/datum/tlv(ONE_ATMOSPHERE*0.80,ONE_ATMOSPHERE*0.90,ONE_ATMOSPHERE*1.40,ONE_ATMOSPHERE*1.60), /* kpa */
|
||||
"temperature" = new/datum/tlv(40, 60, 100, 120), // K
|
||||
)
|
||||
|
||||
/obj/machinery/alarm/kitchen_cold_room
|
||||
TLV = list(
|
||||
"oxygen" = new/datum/tlv( 16, 19, 135, 140), // Partial pressure, kpa
|
||||
"carbon dioxide" = new/datum/tlv(-1.0, -1.0, 5, 10), // Partial pressure, kpa
|
||||
"plasma" = new/datum/tlv(-1.0, -1.0, 0.2, 0.5), // Partial pressure, kpa
|
||||
"other" = new/datum/tlv(-1.0, -1.0, 0.5, 1.0), // Partial pressure, kpa
|
||||
"pressure" = new/datum/tlv(ONE_ATMOSPHERE*0.80,ONE_ATMOSPHERE*0.90,ONE_ATMOSPHERE*1.50,ONE_ATMOSPHERE*1.60), /* kpa */
|
||||
"temperature" = new/datum/tlv(200, 210, 273.15, 283.15), // K
|
||||
)
|
||||
|
||||
//all air alarms in area are connected via magic
|
||||
@@ -136,11 +182,222 @@
|
||||
if (.)
|
||||
return
|
||||
user.machine = src
|
||||
user << browse(return_text(user),"window=air_alarm")
|
||||
onclose(user, "air_alarm")
|
||||
refresh_all()
|
||||
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=air_alarm")
|
||||
user << browse(null, "window=AAlarmwires")
|
||||
return
|
||||
|
||||
|
||||
else if (istype(user, /mob/living/silicon) && src.aidisabled)
|
||||
user << "AI control for this Air Alarm interface has been disabled."
|
||||
user << browse(null, "window=air_alarm")
|
||||
return
|
||||
|
||||
if(wiresexposed && (!istype(user, /mob/living/silicon)))
|
||||
var/t1 = text("<html><head><title>[alarm_area.name] Air Alarm Wires</title></head><body><B>Access Panel</B><br>\n")
|
||||
var/list/AAlarmwires = list(
|
||||
"Orange" = 1,
|
||||
"Dark red" = 2,
|
||||
"White" = 3,
|
||||
"Yellow" = 4,
|
||||
"Black" = 5,
|
||||
)
|
||||
for(var/wiredesc in AAlarmwires)
|
||||
var/is_uncut = src.AAlarmwires & AAlarmWireColorToFlag[AAlarmwires[wiredesc]]
|
||||
t1 += "[wiredesc] wire: "
|
||||
if(!is_uncut)
|
||||
t1 += "<a href='?src=\ref[src];AAlarmwires=[AAlarmwires[wiredesc]]'>Mend</a>"
|
||||
|
||||
else
|
||||
t1 += "<a href='?src=\ref[src];AAlarmwires=[AAlarmwires[wiredesc]]'>Cut</a> "
|
||||
t1 += "<a href='?src=\ref[src];pulse=[AAlarmwires[wiredesc]]'>Pulse</a> "
|
||||
|
||||
t1 += "<br>"
|
||||
t1 += text("<br>\n[(src.locked ? "The Air Alarm is locked." : "The Air Alarm is unlocked.")]<br>\n[((src.shorted || (stat & (NOPOWER|BROKEN))) ? "The Air Alarm is offline." : "The Air Alarm is working properly!")]<br>\n[(src.aidisabled ? "The 'AI control allowed' light is off." : "The 'AI control allowed' light is on.")]")
|
||||
t1 += text("<p><a href='?src=\ref[src];close2=1'>Close</a></p></body></html>")
|
||||
user << browse(t1, "window=AAlarmwires")
|
||||
onclose(user, "AAlarmwires")
|
||||
|
||||
if(!shorted)
|
||||
user << browse(return_text(),"window=air_alarm")
|
||||
onclose(user, "air_alarm")
|
||||
refresh_all()
|
||||
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/alarm/proc/isWireColorCut(var/wireColor)
|
||||
var/wireFlag = AAlarmWireColorToFlag[wireColor]
|
||||
return ((src.AAlarmwires & wireFlag) == 0)
|
||||
|
||||
/obj/machinery/alarm/proc/isWireCut(var/wireIndex)
|
||||
var/wireFlag = AAlarmIndexToFlag[wireIndex]
|
||||
return ((src.AAlarmwires & wireFlag) == 0)
|
||||
|
||||
/obj/machinery/alarm/proc/cut(var/wireColor)
|
||||
var/wireFlag = AAlarmWireColorToFlag[wireColor]
|
||||
var/wireIndex = AAlarmWireColorToIndex[wireColor]
|
||||
AAlarmwires &= ~wireFlag
|
||||
switch(wireIndex)
|
||||
if(AALARM_WIRE_IDSCAN)
|
||||
src.locked = 1
|
||||
//world << "Idscan wire cut"
|
||||
|
||||
if(AALARM_WIRE_POWER)
|
||||
src.shock(usr, 50)
|
||||
src.shorted = 1
|
||||
update_icon()
|
||||
//world << "Power wire cut"
|
||||
|
||||
if (AALARM_WIRE_AI_CONTROL)
|
||||
if (src.aidisabled == 0)
|
||||
src.aidisabled = 1
|
||||
//world << "AI Control Wire Cut"
|
||||
|
||||
if(AALARM_WIRE_SYPHON)
|
||||
mode = AALARM_MODE_PANIC
|
||||
apply_mode()
|
||||
//world << "Syphon Wire Cut"
|
||||
|
||||
if(AALARM_WIRE_AALARM)
|
||||
|
||||
if (alarm_area.atmosalert(2))
|
||||
post_alert(2)
|
||||
spawn(1)
|
||||
src.updateUsrDialog()
|
||||
update_icon()
|
||||
|
||||
//world << "AAlarm Wire Cut"
|
||||
|
||||
src.updateDialog()
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/alarm/proc/mend(var/wireColor)
|
||||
var/wireFlag = AAlarmWireColorToFlag[wireColor]
|
||||
var/wireIndex = AAlarmWireColorToIndex[wireColor] //not used in this function
|
||||
AAlarmwires |= wireFlag
|
||||
switch(wireIndex)
|
||||
if(AALARM_WIRE_IDSCAN)
|
||||
//world << "Idscan wire mended"
|
||||
|
||||
if(AALARM_WIRE_POWER)
|
||||
src.shorted = 0
|
||||
src.shock(usr, 50)
|
||||
update_icon()
|
||||
//world << "Power wire mended"
|
||||
|
||||
if(AALARM_WIRE_AI_CONTROL)
|
||||
if (src.aidisabled == 1)
|
||||
src.aidisabled = 0
|
||||
//world << "AI Cont. wire mended"
|
||||
|
||||
|
||||
// if(AALARM_WIRE_SYPHON)
|
||||
// world << "Syphon Wire mended"
|
||||
|
||||
|
||||
// if(AALARM_WIRE_AALARM)
|
||||
//world << "AAlarm Wire mended"
|
||||
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/alarm/proc/pulse(var/wireColor)
|
||||
//var/wireFlag = AAlarmWireColorToFlag[wireColor] //not used in this function
|
||||
var/wireIndex = AAlarmWireColorToIndex[wireColor]
|
||||
switch(wireIndex)
|
||||
if(AALARM_WIRE_IDSCAN) //unlocks for 30 seconds, if you have a better way to hack I'm all ears
|
||||
src.locked = 0
|
||||
spawn(300)
|
||||
src.locked = 1
|
||||
//world << "Idscan wire pulsed"
|
||||
|
||||
if (AALARM_WIRE_POWER)
|
||||
// world << "Power wire pulsed"
|
||||
if(shorted == 0)
|
||||
shorted = 1
|
||||
update_icon()
|
||||
|
||||
spawn(1200)
|
||||
if(shorted == 1)
|
||||
shorted = 0
|
||||
update_icon()
|
||||
|
||||
|
||||
if (AALARM_WIRE_AI_CONTROL)
|
||||
// world << "AI Control wire pulsed"
|
||||
if (src.aidisabled == 0)
|
||||
src.aidisabled = 1
|
||||
src.updateDialog()
|
||||
spawn(10)
|
||||
if (src.aidisabled == 1)
|
||||
src.aidisabled = 0
|
||||
src.updateDialog()
|
||||
|
||||
if(AALARM_WIRE_SYPHON)
|
||||
// world << "Syphon wire pulsed"
|
||||
mode = AALARM_MODE_REPLACEMENT
|
||||
apply_mode()
|
||||
|
||||
if(AALARM_WIRE_AALARM)
|
||||
// world << "Aalarm wire pulsed"
|
||||
if (alarm_area.atmosalert(0))
|
||||
post_alert(0)
|
||||
spawn(1)
|
||||
src.updateUsrDialog()
|
||||
update_icon()
|
||||
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/alarm/proc/shock(mob/user, prb)
|
||||
if((stat & (NOPOWER))) // unpowered, no shock
|
||||
return 0
|
||||
if(!prob(prb))
|
||||
return 0 //you lucked out, no shock for you
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start() //sparks always.
|
||||
if (electrocute_mob(user, get_area(src), src))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/alarm/Topic(href, href_list)
|
||||
src.add_fingerprint(usr)
|
||||
usr.machine = src
|
||||
|
||||
if ( (get_dist(src, usr) > 1 ))
|
||||
if (!istype(usr, /mob/living/silicon))
|
||||
usr.machine = null
|
||||
usr << browse(null, "window=air_alarm")
|
||||
usr << browse(null, "window=AAlarmwires")
|
||||
return
|
||||
|
||||
if (href_list["AAlarmwires"])
|
||||
var/t1 = text2num(href_list["AAlarmwires"])
|
||||
if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
|
||||
usr << "You need wirecutters!"
|
||||
return
|
||||
if (src.isWireColorCut(t1))
|
||||
src.mend(t1)
|
||||
else
|
||||
src.cut(t1)
|
||||
else if (href_list["pulse"])
|
||||
var/t1 = text2num(href_list["pulse"])
|
||||
if (!istype(usr.equipped(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
return
|
||||
if (src.isWireColorCut(t1))
|
||||
usr << "You can't pulse a cut wire."
|
||||
return
|
||||
else
|
||||
src.pulse(t1)
|
||||
|
||||
/obj/machinery/alarm/receive_signal(datum/signal/signal)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
@@ -215,11 +472,11 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/alarm/proc/return_text(mob/user)
|
||||
if(!(istype(user, /mob/living/silicon)) && locked)
|
||||
return "<html><head><title>[src]</title></head><body>[return_status()]<hr>[rcon_text()]<hr><i>(Swipe ID card to unlock interface)</i></body></html>"
|
||||
/obj/machinery/alarm/proc/return_text()
|
||||
if(!(istype(usr, /mob/living/silicon)) && locked)
|
||||
return "<html><head><title>[src]</title></head><body>[return_status()]<hr><i>(Swipe ID card to unlock interface)</i></body></html>"
|
||||
else
|
||||
return "<html><head><title>[src]</title></head><body>[return_status()]<hr>[rcon_text()]<hr>[return_controls()]</body></html>"
|
||||
return "<html><head><title>[src]</title></head><body>[return_status()]<hr>[return_controls()]</body></html>"
|
||||
|
||||
/obj/machinery/alarm/proc/return_status()
|
||||
var/turf/location = src.loc
|
||||
@@ -518,6 +775,12 @@ table tr:first-child th:first-child { border: none;}
|
||||
if(href_list["rcon"])
|
||||
rcon_setting = text2num(href_list["rcon"])
|
||||
src.updateUsrDialog()
|
||||
|
||||
if ( (get_dist(src, usr) > 1 ))
|
||||
if (!istype(usr, /mob/living/silicon))
|
||||
usr.machine = null
|
||||
usr << browse(null, "window=air_alarm")
|
||||
|
||||
if(href_list["command"])
|
||||
var/device_id = href_list["id_tag"]
|
||||
switch(href_list["command"])
|
||||
@@ -636,7 +899,10 @@ table tr:first-child th:first-child { border: none;}
|
||||
))
|
||||
|
||||
/obj/machinery/alarm/update_icon()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(wiresexposed)
|
||||
icon_state = "alarmx"
|
||||
return
|
||||
if((stat & (NOPOWER|BROKEN)) || shorted)
|
||||
icon_state = "alarmp"
|
||||
return
|
||||
switch(max(danger_level, alarm_area.atmosalm))
|
||||
@@ -648,7 +914,7 @@ table tr:first-child th:first-child { border: none;}
|
||||
src.icon_state = "alarm1"
|
||||
|
||||
/obj/machinery/alarm/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if((stat & (NOPOWER|BROKEN)) || shorted)
|
||||
return
|
||||
|
||||
var/turf/simulated/location = src.loc
|
||||
@@ -742,26 +1008,37 @@ table tr:first-child th:first-child { border: none;}
|
||||
var/new_area_danger_level = 0
|
||||
for (var/area/A in alarm_area.related)
|
||||
for (var/obj/machinery/alarm/AA in A)
|
||||
if (!(AA.stat & (NOPOWER|BROKEN)))
|
||||
if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted)
|
||||
new_area_danger_level = max(new_area_danger_level,AA.danger_level)
|
||||
if (alarm_area.atmosalert(new_area_danger_level)) //if area was in normal state or if area was in alert state
|
||||
post_alert(new_area_danger_level)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wirecutters))
|
||||
/* if (istype(W, /obj/item/weapon/wirecutters))
|
||||
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)
|
||||
update_icon()
|
||||
return
|
||||
*/
|
||||
if(istype(W, /obj/item/weapon/screwdriver)) // Opening that Air Alarm up.
|
||||
//user << "You pop the Air Alarm's maintence panel open."
|
||||
wiresexposed = !wiresexposed
|
||||
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if (wiresexposed && ((istype(W, /obj/item/device/multitool) || istype(W, /obj/item/weapon/wirecutters))))
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
user << "It does nothing"
|
||||
else
|
||||
if(src.allowed(usr))
|
||||
if(src.allowed(usr) && !isWireCut(AALARM_WIRE_IDSCAN))
|
||||
locked = !locked
|
||||
user << "\blue You [ locked ? "lock" : "unlock"] the Air Alarm interface."
|
||||
src.updateUsrDialog()
|
||||
@@ -861,7 +1138,7 @@ table tr:first-child th:first-child { border: none;}
|
||||
d2 = text("<A href='?src=\ref[];time=1'>Initiate Time Lock</A>", src)
|
||||
var/second = src.time % 60
|
||||
var/minute = (src.time - second) / 60
|
||||
var/dat = text("<HTML><HEAD></HEAD><BODY><TT><B>Fire alarm</B> []\n<HR>\nTimer System: []<BR>\nTime Left: [][] <A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>\n</TT></BODY></HTML>", d1, d2, (minute ? text("[]:", minute) : null), second, src, src, src, src)
|
||||
var/dat = "<HTML><HEAD></HEAD><BODY><TT><B>Fire alarm</B> [d1]\n<HR>The current alert level is: [get_security_level()]</b><br><br>\nTimer System: [d2]<BR>\nTime Left: [(minute ? "[minute]:" : null)][second] <A href='?src=\ref[src];tp=-30'>-</A> <A href='?src=\ref[src];tp=-1'>-</A> <A href='?src=\ref[src];tp=1'>+</A> <A href='?src=\ref[src];tp=30'>+</A>\n</TT></BODY></HTML>"
|
||||
user << browse(dat, "window=firealarm")
|
||||
onclose(user, "firealarm")
|
||||
else
|
||||
@@ -876,7 +1153,7 @@ table tr:first-child th:first-child { border: none;}
|
||||
d2 = text("<A href='?src=\ref[];time=1'>[]</A>", src, stars("Initiate Time Lock"))
|
||||
var/second = src.time % 60
|
||||
var/minute = (src.time - second) / 60
|
||||
var/dat = text("<HTML><HEAD></HEAD><BODY><TT><B>[]</B> []\n<HR>\nTimer System: []<BR>\nTime Left: [][] <A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>\n</TT></BODY></HTML>", stars("Fire alarm"), d1, d2, (minute ? text("[]:", minute) : null), second, src, src, src, src)
|
||||
var/dat = "<HTML><HEAD></HEAD><BODY><TT><B>[stars("Fire alarm")]</B> [d1]\n<HR><b>The current alert level is: [stars(get_security_level())]</b><br><br>\nTimer System: [d2]<BR>\nTime Left: [(minute ? text("[]:", minute) : null)][second] <A href='?src=\ref[src];tp=-30'>-</A> <A href='?src=\ref[src];tp=-1'>-</A> <A href='?src=\ref[src];tp=1'>+</A> <A href='?src=\ref[src];tp=30'>+</A>\n</TT></BODY></HTML>"
|
||||
user << browse(dat, "window=firealarm")
|
||||
onclose(user, "firealarm")
|
||||
return
|
||||
|
||||
@@ -213,9 +213,10 @@ var/const
|
||||
|
||||
proc/RemoveActiveIndicators() //removes the "active" facehugger indicator from all aliens in the world for this hugger
|
||||
for(var/mob/living/carbon/alien/alien in world)
|
||||
for(var/image/image in alien.client.images)
|
||||
if(image.icon_state == "facehugger_active" && image.loc == src)
|
||||
del(image)
|
||||
if(alien.client)
|
||||
for(var/image/image in alien.client.images)
|
||||
if(image.icon_state == "facehugger_active" && image.loc == src)
|
||||
del(image)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
/obj/item/device/pda/captain
|
||||
default_cartridge = /obj/item/weapon/cartridge/captain
|
||||
icon_state = "pda-c"
|
||||
toff = 1
|
||||
|
||||
/obj/item/device/pda/quartermaster
|
||||
default_cartridge = /obj/item/weapon/cartridge/quartermaster
|
||||
@@ -143,6 +144,26 @@
|
||||
if (default_cartridge)
|
||||
cartridge = new default_cartridge(src)
|
||||
|
||||
/obj/item/device/pda/proc/can_use()
|
||||
if(!ismob(loc))
|
||||
return 0
|
||||
var/mob/M = loc
|
||||
|
||||
if(!M.canmove)
|
||||
return 0
|
||||
|
||||
if((src in M.contents) || ( istype(loc, /turf) && in_range(src, M) ) )
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/device/pda/MouseDrop(obj/over_object as obj, src_location, over_location)
|
||||
var/mob/M = usr
|
||||
if((!istype(over_object, /obj/screen)) && !M.restrained() && !M.stat && can_use())
|
||||
return attack_self(M)
|
||||
return
|
||||
|
||||
//NOTE: graphic resources are loaded on client login
|
||||
/obj/item/device/pda/attack_self(mob/user as mob)
|
||||
user.machine = src
|
||||
@@ -168,6 +189,8 @@
|
||||
dat += "<h2>PERSONAL DATA ASSISTANT v.1.2</h2>"
|
||||
dat += "Owner: [owner], [ownjob]<br>"
|
||||
dat += text("ID: <A href='?src=\ref[];choice=Authenticate'>[]</A><br>", src, (id ? "[id.registered_name], [id.assignment]" : "----------"))
|
||||
dat += text("<A href='?src=\ref[];choice=UpdateInfo'>[]</A><br>", src, (id ? "Update PDA Info" : ""))
|
||||
|
||||
dat += "Station Time: [round(world.time / 36000)+12]:[(world.time / 600 % 60) < 10 ? add_zero(world.time / 600 % 60, 1) : world.time / 600 % 60]"//:[world.time / 100 % 6][world.time / 100 % 10]"
|
||||
|
||||
dat += "<br><br>"
|
||||
@@ -323,6 +346,7 @@
|
||||
|
||||
dat += data_core.get_manifest(1)
|
||||
dat += "<br>"
|
||||
|
||||
else//Else it links to the cart menu proc. Although, it really uses menu hub 4--menu 4 doesn't really exist as it simply redirects to hub.
|
||||
dat += cart
|
||||
|
||||
@@ -333,9 +357,10 @@
|
||||
/obj/item/device/pda/Topic(href, href_list)
|
||||
..()
|
||||
var/mob/living/U = usr
|
||||
U.last_target_click = world.time
|
||||
//Looking for master was kind of pointless since PDAs don't appear to have one.
|
||||
if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
|
||||
//if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
|
||||
|
||||
if(can_use()) //Why reinvent the wheel? There's a proc that does exactly that.
|
||||
if ( !(U.stat || U.restrained()) )
|
||||
|
||||
add_fingerprint(U)
|
||||
@@ -362,6 +387,9 @@
|
||||
cartridge.unlock()
|
||||
if ("Authenticate")//Checks for ID
|
||||
id_check(U, 1)
|
||||
if("UpdateInfo")
|
||||
ownjob = id.assignment
|
||||
name = "PDA-[owner] ([ownjob])"
|
||||
if("Eject")//Ejects the cart, only done from hub.
|
||||
if (!isnull(cartridge))
|
||||
var/turf/T = loc
|
||||
@@ -470,6 +498,7 @@
|
||||
return
|
||||
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
if(!istype(P)) return
|
||||
|
||||
if(istype(P, /obj/item/device/pda))
|
||||
if (isnull(P)||P.toff || toff)
|
||||
@@ -480,8 +509,15 @@
|
||||
|
||||
last_text = world.time
|
||||
|
||||
|
||||
// var/AnsweringMS = 0
|
||||
for (var/obj/machinery/message_server/MS in world)
|
||||
MS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
// if(MS.active)
|
||||
// AnsweringMS++
|
||||
|
||||
// if(!AnsweringMS)
|
||||
// return
|
||||
|
||||
tnote += "<i><b>→ To [P.owner]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a>:</b></i><br>[t]<br>"
|
||||
@@ -508,13 +544,20 @@
|
||||
// pAI Message
|
||||
else
|
||||
|
||||
/* var/AnsweringMS = 0
|
||||
for (var/obj/machinery/message_server/MS in world)
|
||||
MS.send_pda_message("[P]","[src]","[t]")
|
||||
if(MS.active)
|
||||
AnsweringMS++
|
||||
|
||||
if(!AnsweringMS)
|
||||
return
|
||||
*/
|
||||
|
||||
tnote += "<i><b>→ To [P]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];soft=pdamessage;target=\ref[src]'>[src]</a>:</b></i><br>[t]<br>"
|
||||
|
||||
|
||||
for (var/obj/machinery/message_server/MS in world)
|
||||
MS.send_pda_message("[P]","[src]","[t]")
|
||||
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
var/who = src
|
||||
if(prob(50))
|
||||
@@ -524,6 +567,7 @@
|
||||
|
||||
playsound(P.loc, 'twobeep.ogg', 50, 1)
|
||||
|
||||
// log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
|
||||
|
||||
|
||||
if("Send Honk")//Honk virus
|
||||
@@ -697,22 +741,11 @@
|
||||
name = "PDA-[owner] ([ownjob])"
|
||||
user << "\blue Card scanned."
|
||||
else
|
||||
var/input=alert("Would you like to insert the card or update owner information?",,"Insert","Update")
|
||||
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
|
||||
|
||||
if ( ( (src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
|
||||
if ( !(user.stat || user.restrained()) )//If they can still act.
|
||||
if(input=="Insert")
|
||||
id_check(user, 2)
|
||||
else
|
||||
if(!(owner == C:registered_name))
|
||||
user << "\blue Name on card does not match registered name. Please try again."
|
||||
else if((owner == C:registered_name) && (ownjob == C:assignment))
|
||||
user << "\blue Rank is up to date."
|
||||
else if((owner == C:registered_name) && (ownjob != C:assignment))
|
||||
ownjob = C:assignment
|
||||
name = "PDA-[owner] ([ownjob])"
|
||||
user << "\blue Rank updated."
|
||||
id_check(user, 2)
|
||||
user << "\blue You put the ID into the [src.name]'s slot."
|
||||
updateSelfDialog()//Update self dialog on success.
|
||||
return//Return in case of failed check or when successful.
|
||||
updateSelfDialog()//For the non-input related code.
|
||||
@@ -733,10 +766,21 @@
|
||||
O.show_message("\red [user] has analyzed [C]'s vitals!", 1)
|
||||
|
||||
user.show_message("\blue Analyzing Results for [C]:")
|
||||
user.show_message("\blue \t Overall Status: [C.stat > 1 ? "dead" : "[C.health]% healthy"]", 1)
|
||||
user.show_message("\blue \t Overall Status: [C.stat > 1 ? "dead" : "[C.health - C.halloss]% healthy"]", 1)
|
||||
user.show_message("\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()]", 1)
|
||||
user.show_message("\blue \t Key: Suffocation/Toxin/Burns/Brute", 1)
|
||||
user.show_message("\blue \t Body Temperature: [C.bodytemperature-T0C]°C ([C.bodytemperature*1.8-459.67]°F)", 1)
|
||||
/*
|
||||
if(istype(C, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = C
|
||||
var/list/damaged = H.get_damaged_organs(1,1)
|
||||
user.show_message("\blue Localized Damage, Brute/Burn:",1)
|
||||
if(length(damaged)>0)
|
||||
for(var/datum/organ/external/org in damaged)
|
||||
user.show_message(text("\blue \t []: []\blue-[]",capitalize(org.getDisplayName()),(org.brute_dam > 0)?"\red [org.brute_dam]":0,(org.burn_dam > 0)?"\red [org.burn_dam]":0),1)
|
||||
else
|
||||
user.show_message("\blue \t Limbs are OK.",1)
|
||||
*/
|
||||
for(var/datum/disease/D in C.viruses)
|
||||
if(!D.hidden[SCANNER])
|
||||
user.show_message(text("\red <b>Warning: [D.form] Detected</b>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]"))
|
||||
@@ -916,6 +960,7 @@
|
||||
icon = 'pda.dmi'
|
||||
icon_state = "pdabox"
|
||||
item_state = "syringe_kit"
|
||||
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
|
||||
/obj/item/weapon/storage/PDAbox/New()
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/obj/structure/stool/bed/chair/e_chair
|
||||
name = "electrified chair"
|
||||
desc = "Looks absolutely terrifying!"
|
||||
icon_state = "e_chair0"
|
||||
var/atom/movable/overlay/overl = null
|
||||
var/on = 0.0
|
||||
var/obj/item/assembly/shock_kit/part1 = null
|
||||
var/isshocking
|
||||
var/datum/effect/effect/system/spark_spread/spark = new /datum/effect/effect/system/spark_spread
|
||||
var/list/mob/living/affected = list()
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/New()
|
||||
|
||||
src.overl = new /atom/movable/overlay( src.loc )
|
||||
src.overl.icon = 'objects.dmi'
|
||||
src.overl.icon_state = "e_chairo0"
|
||||
src.overl.layer = 5
|
||||
src.overl.name = "electrified chair"
|
||||
src.overl.master = src
|
||||
spark.set_up(12, 1, src)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/Del()
|
||||
|
||||
//src.overl = null
|
||||
del(src.overl)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
var/obj/structure/stool/bed/chair/C = new /obj/structure/stool/bed/chair( src.loc )
|
||||
playsound(src.loc, 'Ratchet.ogg', 50, 1)
|
||||
C.dir = src.dir
|
||||
src.part1.loc = src.loc
|
||||
src.part1.master = null
|
||||
src.part1 = null
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if(istype(W, /obj/item/device/assembly/signaler))
|
||||
var/obj/item/assembly/shock_kit/kit = src.part1
|
||||
var/obj/item/device/radio/electropack/target = kit.part2
|
||||
var/obj/item/device/assembly/signaler/S = W
|
||||
target.set_frequency(S.frequency)
|
||||
target.code = S.code
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message("\red [user] has set the electric chair using the [W].")
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/verb/toggle_power()
|
||||
set name = "Toggle Electric Chair"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if ((usr.stat || usr.restrained() || !( usr.canmove ) || usr.lying))
|
||||
return
|
||||
if(isshocking && on)
|
||||
shock()
|
||||
src.on = !( src.on )
|
||||
src.icon_state = text("e_chair[]", src.on)
|
||||
src.overl.icon_state = text("e_chairo[]", src.on)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/rotate()
|
||||
..()
|
||||
overlays = null
|
||||
overlays += image('objects.dmi', src, "echair_over", MOB_LAYER + 1, dir) //there's probably a better way of handling this, but eh. -Pete
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/proc/shock()
|
||||
if (!( src.on ))
|
||||
return
|
||||
if(isshocking)
|
||||
processing_objects.Remove(src)
|
||||
src.icon_state = text("e_chair[]", src.on)
|
||||
src.overl.icon_state = text("e_chairo[]", src.on)
|
||||
for(var/mob/living/M in affected)
|
||||
M.jitteriness = 0
|
||||
M.is_jittery = 0
|
||||
M.anchored = 0
|
||||
affected.Remove(M)
|
||||
isshocking = 0
|
||||
return
|
||||
else
|
||||
src.icon_state = "e_chairs"
|
||||
src.overl.icon_state = "e_chairos"
|
||||
spark.start()
|
||||
for(var/mob/M in hearers(src, null))
|
||||
M.show_message("\red The electric chair went off!.", 3, "\red You hear a deep sharp shock.", 2)
|
||||
processing_objects.Add(src)
|
||||
isshocking = 1
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/process()
|
||||
// special power handling
|
||||
var/area/A = get_area(src)
|
||||
if(isarea(A) && A.powered(EQUIP))
|
||||
A.use_power(EQUIP, 5000)
|
||||
for(var/mob/living/M in src.loc)
|
||||
affected.Add(M)
|
||||
M.make_jittery(1000)
|
||||
M.anchored = 1
|
||||
M.Stun(600)
|
||||
M.burn_skin(10)
|
||||
spark.start()
|
||||
@@ -49,8 +49,8 @@
|
||||
/obj/item/assembly/shock_kit/receive_signal()
|
||||
//*****
|
||||
//world << "Shock kit got r_signal"
|
||||
if (istype(src.loc, /obj/structure/stool/chair/e_chair))
|
||||
var/obj/structure/stool/chair/e_chair/C = src.loc
|
||||
if (istype(src.loc, /obj/structure/stool/bed/chair/e_chair))
|
||||
var/obj/structure/stool/bed/chair/e_chair/C = src.loc
|
||||
//world << "Shock kit sending shock to EC"
|
||||
C.shock()
|
||||
return
|
||||
|
||||
@@ -4,38 +4,13 @@ DATA CARD
|
||||
ID CARD
|
||||
FINGERPRINT CARD HOLDER
|
||||
FINGERPRINT CARD
|
||||
|
||||
*/
|
||||
|
||||
/obj/item/weapon/card
|
||||
name = "card"
|
||||
desc = "Does card things."
|
||||
icon = 'card.dmi'
|
||||
w_class = 1.0
|
||||
|
||||
var/list/files = list( )
|
||||
|
||||
/obj/item/weapon/card/emag
|
||||
desc = "An identification card. Seems to have some funny chip on it, though."
|
||||
name = "modified identification card"
|
||||
icon_state = "emag"
|
||||
item_state = "card-id"
|
||||
origin_tech = "magnets=2;syndicate=2"
|
||||
var/uses = 5
|
||||
|
||||
New()
|
||||
..()
|
||||
uses = rand(3,5)
|
||||
return
|
||||
|
||||
// DATA CARDS
|
||||
/obj/item/weapon/card/data
|
||||
name = "data disk"
|
||||
desc = "A disk with data."
|
||||
icon_state = "data"
|
||||
var/function = "storage"
|
||||
var/data = "null"
|
||||
var/special = null
|
||||
item_state = "card-id"
|
||||
|
||||
/obj/item/weapon/card/data/verb/label(t as text)
|
||||
set name = "Label Disk"
|
||||
@@ -50,58 +25,9 @@ FINGERPRINT CARD
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
// ID CARDS
|
||||
/obj/item/weapon/card/id
|
||||
name = "identification card"
|
||||
desc = "An identification card."
|
||||
icon_state = "id"
|
||||
item_state = "card-id"
|
||||
var/access = list()
|
||||
var/registered_name = null // The name registered on the card
|
||||
var/assignment = null
|
||||
var/obj/item/weapon/photo/PHOTO = null
|
||||
var/over_jumpsuit = 1 // If set to 0, it won't display on top of the mob's jumpsuit
|
||||
var/dorm = 0 // determines if this ID has claimed a dorm already
|
||||
|
||||
/obj/item/weapon/card/id/gold
|
||||
name = "identification card"
|
||||
desc = "A golden identification card."
|
||||
icon_state = "gold"
|
||||
item_state = "gold_id"
|
||||
|
||||
/obj/item/weapon/card/id/captains_spare
|
||||
name = "Captain's spare ID"
|
||||
icon_state = "gold"
|
||||
item_state = "gold_id"
|
||||
registered_name = "Captain"
|
||||
assignment = "Captain"
|
||||
New()
|
||||
access = get_access("Captain")
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/centcom
|
||||
name = "CentCom ID"
|
||||
desc = "An ID straight from Cent. Com."
|
||||
icon_state = "centcom"
|
||||
registered_name = "Central Command"
|
||||
assignment = "General"
|
||||
New()
|
||||
access = get_all_centcom_access()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/syndicate
|
||||
name = "agent card"
|
||||
desc = "Shhhhh."
|
||||
access = list(access_maint_tunnels)
|
||||
origin_tech = "syndicate=3"
|
||||
|
||||
/obj/item/weapon/card/id/syndicate_command
|
||||
name = "Syndicate ID card"
|
||||
desc = "An ID straight from the Syndicate."
|
||||
registered_name = "Syndicate"
|
||||
assignment = "Syndicate Overlord"
|
||||
access = list(access_syndicate)
|
||||
|
||||
|
||||
/obj/item/weapon/card/id/attack_self(mob/user as mob)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
@@ -110,6 +36,14 @@ FINGERPRINT CARD
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/card/id/attack_hand(mob/user as mob)
|
||||
var/obj/item/weapon/storage/wallet/WL
|
||||
if( istype(loc, /obj/item/weapon/storage/wallet) )
|
||||
WL = loc
|
||||
..()
|
||||
if(WL)
|
||||
WL.update_icon()
|
||||
|
||||
/obj/item/weapon/card/id/verb/read()
|
||||
set name = "Read ID Card"
|
||||
set category = "Object"
|
||||
@@ -119,37 +53,13 @@ FINGERPRINT CARD
|
||||
return
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
|
||||
src.registered_name = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)
|
||||
src.assignment = input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")
|
||||
src.name = "[src.registered_name]'s ID Card ([src.assignment])"
|
||||
user << "\blue You successfully forge the ID card."
|
||||
|
||||
/obj/item/weapon/card/id/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W,/obj/item/weapon/photo))
|
||||
if(!(PHOTO))
|
||||
src.PHOTO = W
|
||||
usr.before_take_item(W)
|
||||
W.loc = src
|
||||
//src.orient2hud(usr)
|
||||
add_fingerprint(usr)
|
||||
usr << "\blue You add the photo to the ID."
|
||||
else
|
||||
usr << "\blue There is already a photo on this ID."
|
||||
|
||||
//PHOTO.loc = locate(0,0,0)
|
||||
|
||||
/obj/item/weapon/card/id/verb/removePhoto()
|
||||
set name = "Remove Photo From ID"
|
||||
set category = "Object"
|
||||
|
||||
if(PHOTO)
|
||||
contents -= PHOTO
|
||||
PHOTO.loc = usr.loc
|
||||
PHOTO.layer = 3
|
||||
PHOTO = null
|
||||
if(!src.registered_name)
|
||||
src.registered_name = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)
|
||||
src.assignment = input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")
|
||||
src.name = "[src.registered_name]'s ID Card ([src.assignment])"
|
||||
user << "\blue You successfully forge the ID card."
|
||||
else
|
||||
usr << "\blue There is no photo to remove."
|
||||
..()
|
||||
|
||||
|
||||
// FINGERPRINT HOLDER
|
||||
@@ -271,7 +181,9 @@ FINGERPRINT CARD
|
||||
return
|
||||
|
||||
/obj/item/weapon/f_card/proc/display()
|
||||
|
||||
if(!fingerprints) return
|
||||
if (!istype(src.fingerprints, /list))
|
||||
src.fingerprints = params2list(src.fingerprints)
|
||||
if (length(src.fingerprints))
|
||||
var/dat = "<B>Fingerprints on Card</B><HR>"
|
||||
for(var/i = 1, i < (src.fingerprints.len + 1), i++)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/obj/item/weapon/dnainjector/proc/inject(mob/M as mob)
|
||||
M.radiation += rand(20,50)
|
||||
|
||||
if (!(M.mutations & HUSK)) // prevents husks from having their DNA changed
|
||||
if (!(M.mutations2 & NOCLONE)) // prevents drained people from having their DNA changed
|
||||
if (dnatype == "ui")
|
||||
if (!block) //isolated block?
|
||||
if (ue) //unique enzymes? yes
|
||||
@@ -66,6 +66,8 @@
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to inject [M.name] ([M.ckey])</font>")
|
||||
|
||||
// log_attack("<font color='red'>[user.name] ([user.ckey]) used the [name] to inject [M.name] ([M.ckey])</font>")
|
||||
|
||||
if (user)
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
|
||||
|
||||
@@ -211,6 +211,7 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
if(!istype(M, /mob/living/carbon/human)) return
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.mind in ticker.mode.head_revolutionaries)
|
||||
visible_message("\red [M] seems to resist the implant.", 1)
|
||||
for(var/mob/O in (viewers(M) - M))
|
||||
O.show_message("\red [M] seems to resist the implant.", 1)
|
||||
M << "\red You resist the implant."
|
||||
@@ -220,7 +221,6 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
H << "\blue You feel a surge of loyalty towards NanoTrasen."
|
||||
return
|
||||
|
||||
|
||||
//BS12 Explosive
|
||||
/obj/item/weapon/implant/explosive
|
||||
name = "explosive"
|
||||
|
||||
@@ -61,9 +61,9 @@ FLOOR TILES
|
||||
|
||||
// /datum/stack_recipe/New(title, result_type, req_amount, res_amount, max_res_amount, time, one_per_turf, on_floor = 0)
|
||||
var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
new/datum/stack_recipe("stool", /obj/structure/stool), \
|
||||
new/datum/stack_recipe("chair", /obj/structure/stool/chair, one_per_turf = 1), \
|
||||
new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1), \
|
||||
new/datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
|
||||
new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \
|
||||
new/datum/stack_recipe("closet", /obj/structure/closet, 2, one_per_turf = 1), \
|
||||
|
||||
+71
-249
@@ -1,49 +1,34 @@
|
||||
/obj/structure/stool/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
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
/obj/structure/stool/blob_act()
|
||||
if(prob(75))
|
||||
new /obj/item/stack/sheet/metal( src.loc )
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/structure/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'Ratchet.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/metal( src.loc )
|
||||
//SN src = null
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/stool/bed/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/stool/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'Ratchet.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/metal( src.loc )
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/structure/stool/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/assembly/shock_kit))
|
||||
var/obj/structure/stool/chair/e_chair/E = new /obj/structure/stool/chair/e_chair( src.loc )
|
||||
if(istype(W, /obj/item/assembly/shock_kit))
|
||||
var/obj/structure/stool/bed/chair/e_chair/E = new /obj/structure/stool/bed/chair/e_chair(src.loc)
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
E.dir = src.dir
|
||||
E.part1 = W
|
||||
@@ -51,52 +36,49 @@
|
||||
W.master = E
|
||||
user.u_equip(W)
|
||||
W.layer = initial(W.layer)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/Del()
|
||||
for(var/mob/M in src.buckled_mobs)
|
||||
if (M.buckled == src)
|
||||
M.lying = 0
|
||||
unbuckle_all()
|
||||
unbuckle()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/stool/proc/unbuckle_all()
|
||||
for(var/mob/M in src:buckled_mobs)
|
||||
if (M.buckled == src)
|
||||
M.buckled = null
|
||||
M.anchored = 0
|
||||
M.update_clothing()
|
||||
/obj/structure/stool/bed/proc/unbuckle()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.anchored = 0
|
||||
buckled_mob.lying = 0
|
||||
buckled_mob = null
|
||||
return
|
||||
|
||||
/obj/structure/stool/proc/manual_unbuckle_all(mob/user as mob)
|
||||
var/N = 0;
|
||||
for(var/mob/M in src:buckled_mobs)
|
||||
if (M.buckled == src)
|
||||
if (M != user)
|
||||
M.visible_message(\
|
||||
"\blue [M.name] was unbuckled by [user.name]!",\
|
||||
/obj/structure/stool/bed/proc/manual_unbuckle(mob/user as mob)
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
if(buckled_mob != user)
|
||||
buckled_mob.visible_message(\
|
||||
"\blue [buckled_mob.name] was unbuckled by [user.name]!",\
|
||||
"You unbuckled from [src] by [user.name].",\
|
||||
"You hear metal clanking")
|
||||
else
|
||||
M.visible_message(\
|
||||
"\blue [M.name] unbuckled \himself!",\
|
||||
buckled_mob.visible_message(\
|
||||
"\blue [buckled_mob.name] unbuckled himself!",\
|
||||
"You unbuckle yourself from [src].",\
|
||||
"You hear metal clanking")
|
||||
// world << "[M] is no longer buckled to [src]"
|
||||
M.anchored = 0
|
||||
M.buckled = null
|
||||
M.update_clothing()
|
||||
N++
|
||||
return N
|
||||
unbuckle()
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/proc/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if (!ticker)
|
||||
user << "You can't buckle anyone in before the game starts."
|
||||
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat || M.buckled))
|
||||
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai)))
|
||||
return
|
||||
|
||||
unbuckle()
|
||||
|
||||
if (M == usr)
|
||||
M.visible_message(\
|
||||
"\blue [M.name] buckles in!",\
|
||||
@@ -104,180 +86,57 @@
|
||||
"You hear metal clanking")
|
||||
else
|
||||
M.visible_message(\
|
||||
"\blue [M.name] is buckled into [src] by [user.name]!",\
|
||||
"You buckled in to [src] by [user.name].",\
|
||||
"\blue [M.name] is buckled in to [src] by [user.name]!",\
|
||||
"You are buckled in to [src] by [user.name].",\
|
||||
"You hear metal clanking")
|
||||
M.anchored = 1
|
||||
M.buckled = src
|
||||
M.loc = src.loc
|
||||
M.dir = src.dir
|
||||
M.update_clothing()
|
||||
src:buckled_mobs += M
|
||||
src.buckled_mob = M
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
if (!istype(M)) return
|
||||
if(!istype(M)) return
|
||||
buckle_mob(M, user)
|
||||
M.lying = 1
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/stool/bed/attack_hand(mob/user as mob)
|
||||
for(var/mob/M in src.buckled_mobs)
|
||||
if (M.buckled == src)
|
||||
M.lying = 0
|
||||
if (manual_unbuckle_all(user))
|
||||
src.add_fingerprint(user)
|
||||
manual_unbuckle(user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/chair/e_chair/New()
|
||||
|
||||
src.overl = new /atom/movable/overlay( src.loc )
|
||||
src.overl.icon = 'objects.dmi'
|
||||
src.overl.icon_state = "e_chairo0"
|
||||
src.overl.layer = 5
|
||||
src.overl.name = "electrified chair"
|
||||
src.overl.master = src
|
||||
spark.set_up(12, 1, src)
|
||||
return
|
||||
|
||||
/obj/structure/stool/chair/e_chair/Del()
|
||||
|
||||
//src.overl = null
|
||||
del(src.overl)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/stool/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
var/obj/structure/stool/chair/C = new /obj/structure/stool/chair( src.loc )
|
||||
playsound(src.loc, 'Ratchet.ogg', 50, 1)
|
||||
C.dir = src.dir
|
||||
src.part1.loc = src.loc
|
||||
src.part1.master = null
|
||||
src.part1 = null
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if(istype(W, /obj/item/device/assembly/signaler))
|
||||
var/obj/item/assembly/shock_kit/kit = src.part1
|
||||
var/obj/item/device/radio/electropack/target = kit.part2
|
||||
var/obj/item/device/assembly/signaler/S = W
|
||||
target.set_frequency(S.frequency)
|
||||
target.code = S.code
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message("\red [user] has set the electric chair using the [W].")
|
||||
return
|
||||
|
||||
/obj/structure/stool/chair/e_chair/verb/toggle_power()
|
||||
set name = "Toggle Electric Chair"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if ((usr.stat || usr.restrained() || !( usr.canmove ) || usr.lying))
|
||||
return
|
||||
if(isshocking && on)
|
||||
shock()
|
||||
src.on = !( src.on )
|
||||
src.icon_state = text("e_chair[]", src.on)
|
||||
src.overl.icon_state = text("e_chairo[]", src.on)
|
||||
return
|
||||
|
||||
/obj/structure/stool/chair/e_chair/proc/shock()
|
||||
if (!( src.on ))
|
||||
return
|
||||
if(isshocking)
|
||||
processing_objects.Remove(src)
|
||||
src.icon_state = text("e_chair[]", src.on)
|
||||
src.overl.icon_state = text("e_chairo[]", src.on)
|
||||
for(var/mob/living/M in affected)
|
||||
M.jitteriness = 0
|
||||
M.is_jittery = 0
|
||||
M.anchored = 0
|
||||
affected.Remove(M)
|
||||
isshocking = 0
|
||||
return
|
||||
else
|
||||
src.icon_state = "e_chairs"
|
||||
src.overl.icon_state = "e_chairos"
|
||||
spark.start()
|
||||
for(var/mob/M in hearers(src, null))
|
||||
M.show_message("\red The electric chair went off!.", 3, "\red You hear a deep sharp shock.", 2)
|
||||
processing_objects.Add(src)
|
||||
isshocking = 1
|
||||
return
|
||||
|
||||
/obj/structure/stool/chair/e_chair/process()
|
||||
// special power handling
|
||||
var/area/A = get_area(src)
|
||||
if(isarea(A) && A.powered(EQUIP))
|
||||
A.use_power(EQUIP, 5000)
|
||||
for(var/mob/living/M in src.loc)
|
||||
affected.Add(M)
|
||||
M.make_jittery(1000)
|
||||
M.anchored = 1
|
||||
M.Stun(600)
|
||||
M.burn_skin(10)
|
||||
spark.start()
|
||||
|
||||
/obj/structure/stool/chair/ex_act(severity)
|
||||
unbuckle_all()
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/stool/chair/blob_act()
|
||||
if(prob(75))
|
||||
unbuckle_all()
|
||||
del(src)
|
||||
|
||||
/obj/structure/stool/chair/New()
|
||||
/obj/structure/stool/bed/chair/New()
|
||||
src.verbs -= /atom/movable/verb/pull
|
||||
if (src.dir == NORTH)
|
||||
if(src.dir == NORTH)
|
||||
src.layer = FLY_LAYER
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/stool/chair/Del()
|
||||
unbuckle_all()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/stool/chair/verb/rotate()
|
||||
/obj/structure/stool/bed/chair/verb/rotate()
|
||||
set name = "Rotate Chair"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
src.dir = turn(src.dir, 90)
|
||||
if (src.dir == NORTH)
|
||||
if(src.dir == NORTH)
|
||||
src.layer = FLY_LAYER
|
||||
else
|
||||
src.layer = OBJ_LAYER
|
||||
|
||||
if(buckled_mob)
|
||||
buckled_mob.dir = dir
|
||||
return
|
||||
|
||||
/obj/structure/stool/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
/obj/structure/stool/bed/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
if(!istype(M)) return
|
||||
buckle_mob(M, user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/chair/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/stool/chair/attack_hand(mob/user as mob)
|
||||
if (manual_unbuckle_all(user))
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
//roller bed
|
||||
|
||||
/obj/structure/stool/bed/roller
|
||||
@@ -286,65 +145,28 @@
|
||||
icon_state = "down"
|
||||
anchored = 0
|
||||
|
||||
Move()
|
||||
..()
|
||||
for(var/mob/M in src:buckled_mobs)
|
||||
if (M.buckled == src)
|
||||
M.loc = src.loc
|
||||
/obj/structure/stool/bed/roller/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
buckled_mob.loc = src.loc
|
||||
|
||||
buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if (!ticker)
|
||||
user << "You can't buckle anyone in before the game starts."
|
||||
return 0
|
||||
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat || M.buckled))
|
||||
return 0
|
||||
if (M == usr)
|
||||
M.visible_message(\
|
||||
"\blue [M.name] buckles in!",\
|
||||
"You buckle yourself to [src].",\
|
||||
"You hear metal clanking")
|
||||
else
|
||||
M.visible_message(\
|
||||
"\blue [M.name] is buckled in to [src] by [user.name]!",\
|
||||
"You buckled into [src] by [user.name].",\
|
||||
"You hear metal clanking")
|
||||
M.anchored = 1
|
||||
M.buckled = src
|
||||
M.loc = src.loc
|
||||
M.pixel_y = 6
|
||||
M.update_clothing()
|
||||
src:buckled_mobs += M
|
||||
src.add_fingerprint(user)
|
||||
density = 1
|
||||
icon_state = "up"
|
||||
return 1
|
||||
/obj/structure/stool/bed/roller/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat || M.buckled || istype(usr, /mob/living/silicon/pai)))
|
||||
return
|
||||
M.pixel_y = 6
|
||||
M.update_clothing()
|
||||
density = 1
|
||||
icon_state = "up"
|
||||
..()
|
||||
return
|
||||
|
||||
manual_unbuckle_all(mob/user as mob)
|
||||
var/N = 0;
|
||||
for(var/mob/M in src:buckled_mobs)
|
||||
if (M.buckled == src)
|
||||
if (M != user)
|
||||
M.visible_message(\
|
||||
"\blue [M.name] was unbuckled by [user.name]!",\
|
||||
"You unbuckled from [src] by [user.name].",\
|
||||
"You hear metal clanking")
|
||||
else
|
||||
var/t_himself = "itself"
|
||||
if (M.gender == MALE)
|
||||
t_himself = "himself"
|
||||
else if (M.gender == FEMALE)
|
||||
t_himself = "herself"
|
||||
|
||||
M.visible_message(\
|
||||
"\blue [M.name] unbuckled [t_himself]!",\
|
||||
"You unbuckle yourself from [src].",\
|
||||
"You hear metal clanking")
|
||||
M.pixel_y = 0
|
||||
M.anchored = 0
|
||||
M.buckled = null
|
||||
M.update_clothing()
|
||||
N++
|
||||
if(N)
|
||||
density = 0
|
||||
icon_state = "down"
|
||||
return N
|
||||
/obj/structure/stool/bed/roller/manual_unbuckle(mob/user as mob)
|
||||
if(buckled_mob)
|
||||
buckled_mob.pixel_y = 0
|
||||
buckled_mob.anchored = 0
|
||||
buckled_mob.buckled = null
|
||||
density = 0
|
||||
icon_state = "down"
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
var/obj/screen/storage/boxes = null
|
||||
var/obj/screen/close/closer = null
|
||||
w_class = 3.0
|
||||
var/foldable = null // BubbleWrap - if set, can be folded (when empty) into a sheet of cardboard
|
||||
|
||||
/obj/item/weapon/storage/proc/return_inv()
|
||||
|
||||
@@ -96,7 +97,7 @@
|
||||
return
|
||||
|
||||
//This proc is called when you want to place an item into the storage item.
|
||||
/obj/item/weapon/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/item/weapon/storage/attackby(obj/item/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(isrobot(user))
|
||||
user << "\blue You're a robot. No."
|
||||
@@ -138,6 +139,7 @@
|
||||
user << "\red The tray won't fit in [src]."
|
||||
return
|
||||
else
|
||||
|
||||
W.loc = user.loc
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
@@ -157,19 +159,13 @@
|
||||
user << "\red The [src] cannot hold [W] as it's a storage item of the same size."
|
||||
return //To prevent the stacking of the same sized items.
|
||||
|
||||
if(user)
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
src.orient2hud(user)
|
||||
W.dropped(user)
|
||||
add_fingerprint(user)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\blue [user] has added [W] to [src]!"))
|
||||
else
|
||||
W.loc = src
|
||||
orient_objs(5, 10, 4 + min(7, storage_slots), 10)
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
src.orient2hud(user)
|
||||
W.dropped(user)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(istype(src, /obj/item/weapon/storage/backpack/santabag)) // update the santa bag icon
|
||||
if(contents.len < 5)
|
||||
@@ -180,6 +176,8 @@
|
||||
src.icon_state = "giftbag2"
|
||||
|
||||
if (istype(W, /obj/item/weapon/gun/energy/crossbow)) return //STEALTHY
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\blue [user] has added [W] to [src]!"))
|
||||
//Foreach goto(139)
|
||||
return
|
||||
|
||||
@@ -249,8 +247,29 @@
|
||||
/obj/screen/storage/attackby(W, mob/user as mob)
|
||||
src.master.attackby(W, user)
|
||||
return
|
||||
// BubbleWrap - A box can be folded up to make card
|
||||
/obj/item/weapon/storage/attack_self(mob/user as mob)
|
||||
if ( contents.len )
|
||||
return
|
||||
if ( !ispath(src.foldable) )
|
||||
return
|
||||
var/found = 0
|
||||
// Close any open UI windows first
|
||||
for(var/mob/M in range(1))
|
||||
if (M.s_active == src)
|
||||
src.close(M)
|
||||
if ( M == user )
|
||||
found = 1
|
||||
if ( !found ) // User is too far away
|
||||
return
|
||||
// Now make the cardboard
|
||||
user << "\blue You fold [src] flat."
|
||||
new src.foldable(get_turf(src))
|
||||
del(src)
|
||||
//BubbleWrap END
|
||||
|
||||
/obj/item/weapon/storage/box/
|
||||
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
|
||||
/obj/item/weapon/storage/box/survival/New()
|
||||
..()
|
||||
|
||||
+15
-8
@@ -10,6 +10,7 @@
|
||||
if ("clownstep") soundin = pick('clownstep1.ogg','clownstep2.ogg')
|
||||
if ("swing_hit") soundin = pick('genhit1.ogg', 'genhit2.ogg', 'genhit3.ogg')
|
||||
if ("hiss") soundin = pick('hiss1.ogg','hiss2.ogg','hiss3.ogg','hiss4.ogg')
|
||||
if ("pageturn") soundin = pick('pageturn1.ogg', 'pageturn2.ogg','pageturn3.ogg')
|
||||
|
||||
var/sound/S = sound(soundin)
|
||||
S.wait = 0 //No queue
|
||||
@@ -27,10 +28,16 @@
|
||||
|
||||
M << S
|
||||
|
||||
for(var/obj/structure/closet/L in range(world.view+extrarange, source))
|
||||
if(locate(/mob/, L))
|
||||
for(var/mob/Ml in L)
|
||||
Ml << S
|
||||
for(var/obj/structure/closet/L in range(world.view+extrarange, source))
|
||||
if(locate(/mob/, L))
|
||||
for(var/mob/M in L)
|
||||
if (M.client)
|
||||
if(M.ear_deaf <= 0 || !M.ear_deaf)
|
||||
if(isturf(source))
|
||||
var/dx = source.x - M.x
|
||||
S.pan = max(-100, min(100, dx/8.0 * 100))
|
||||
|
||||
M << S
|
||||
// Now plays for people in lockers! -- Polymorph
|
||||
|
||||
/mob/proc/playsound_local(var/atom/source, soundin, vol as num, vary, extrarange as num)
|
||||
@@ -58,14 +65,14 @@
|
||||
|
||||
src << S
|
||||
|
||||
client/verb/Toggle_Soundscape()
|
||||
set category = "OOC"
|
||||
client/verb/Toggle_Soundscape() //All new ambience should be added here so it works with this verb until someone better at things comes up with a fix that isn't awful
|
||||
set category = "Special Verbs"
|
||||
set name = "Toggle Ambience"
|
||||
usr:client:no_ambi = !usr:client:no_ambi
|
||||
if(usr:client:no_ambi)
|
||||
usr << sound(pick('shipambience.ogg'), repeat = 0, wait = 0, volume = 0, channel = 2)
|
||||
usr << sound(pick('shipambience.ogg','ambigen1.ogg','ambigen3.ogg','ambigen4.ogg','ambigen5.ogg','ambigen6.ogg','ambigen7.ogg','ambigen8.ogg','ambigen9.ogg','ambigen10.ogg','ambigen11.ogg','ambigen12.ogg','ambigen14.ogg','ambicha1.ogg','ambicha2.ogg','ambicha3.ogg','ambicha4.ogg','ambimalf.ogg','ambispace.ogg','ambimine.ogg','title2.ogg'), repeat = 0, wait = 0, volume = 0, channel = 2)
|
||||
else
|
||||
usr << sound(pick('shipambience.ogg'), repeat = 1, wait = 0, volume = 35, channel = 2)
|
||||
usr << sound(pick('shipambience.ogg','ambigen1.ogg','ambigen3.ogg','ambigen4.ogg','ambigen5.ogg','ambigen6.ogg','ambigen7.ogg','ambigen8.ogg','ambigen9.ogg','ambigen10.ogg','ambigen11.ogg','ambigen12.ogg','ambigen14.ogg','ambicha1.ogg','ambicha2.ogg','ambicha3.ogg','ambicha4.ogg','ambimalf.ogg','ambispace.ogg','ambimine.ogg','title2.ogg'), repeat = 1, wait = 0, volume = 35, channel = 2)
|
||||
usr << "Toggled ambience sound."
|
||||
return
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ var/list/supply_groups = new()
|
||||
if (prob(5))
|
||||
del(src)
|
||||
|
||||
/area/supplyshuttle/
|
||||
/area/supplyshuttle
|
||||
name = "Supply Shuttle"
|
||||
icon_state = "supply"
|
||||
requires_power = 0
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
if(istype(usr,/mob))
|
||||
var/mob/M = usr
|
||||
M.midis = !M.midis
|
||||
|
||||
if(M.client)
|
||||
M.client.midis = !M.client.midis
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
else if(!M.client.stealth && (M.client.holder.level != -3))
|
||||
usr << "\t[pick(nobles)] [M.client]"
|
||||
|
||||
var/list/nobles = list("Baron","Bookkeeper","Captain of the Guard","Chief medical dwarf","Count","Dungeon master","Duke","General","Mayor","Outpost liaison","Sheriff","Champion")
|
||||
var/list/nobles = list("Baron","Bookkeeper","Captain of the Guard","Chief Medical Dwarf","Count","Dungeon Master","Duke","General","Mayor","Outpost Liaison","Sheriff","Champion")
|
||||
|
||||
/client/verb/active_players()
|
||||
set category = "OOC"
|
||||
|
||||
Reference in New Issue
Block a user