Merge pull request #2 from tgstation/master

This had better work...
This commit is contained in:
Jordie0608
2013-07-30 06:02:28 -07:00
132 changed files with 2782 additions and 2347 deletions
+3
View File
@@ -143,6 +143,9 @@
/obj/effect/hotspot/proc/Kill()
DestroyTurf()
garbage_collect()
/obj/effect/hotspot/proc/garbage_collect()
if(istype(loc, /turf/simulated))
var/turf/simulated/T = loc
if(T.active_hotspot == src)
+1 -1
View File
@@ -156,7 +156,7 @@ turf/simulated
else
air_master.active_singletons.Remove(src)
if(active_hotspot)
active_hotspot.Kill()
active_hotspot.garbage_collect()
if(air_master && blocks_air)
for(var/direction in list(NORTH, SOUTH, EAST, WEST))
var/turf/simulated/tile = get_step(src,direction)
+5 -2
View File
@@ -145,10 +145,11 @@
return
if(2)
objholder = input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet")
var/P = text2path(objholder)
var/list/removed_paths = list("/obj/effect/bhole")
if(objholder in removed_paths)
alert("That path is not allowed.")
if((objholder in removed_paths) || !ispath(P))
objholder = "/obj/structure/closet"
alert("That path is not allowed.")
else if (dd_hasprefix(objholder, "/mob") && !check_rights(R_DEBUG,0))
objholder = "/obj/structure/closet"
if(3)
@@ -254,6 +255,8 @@
if(4)
if(pa.Find("left"))
if(isturf(object))
return
holder.throw_atom = object
if(pa.Find("right"))
if(holder.throw_atom)
+6 -3
View File
@@ -389,7 +389,10 @@ var/list/TAGGERLOCATIONS = list("Disposals",
#define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated.
#define R_HOST 65535
//IMPORTANT! The permissions system supports flags up to 2^30 (possibly 2^31), HOWEVER, once the flag 65536
//starts being used, an edit to rights2text(rights, seperator="") needs to happen! The edit is prepared
//and commented out. Please uncomment it before assigning that flag. Once you do, delete this note. ~Errorage
//Preference toggles
#define SOUND_ADMINHELP 1
@@ -425,7 +428,7 @@ var/list/be_special_flags = list(
"Wizard" = BE_WIZARD,
"Malf AI" = BE_MALF,
"Revolutionary" = BE_REV,
"Xenomorph" = BE_ALIEN,
"Alien Lifeform" = BE_ALIEN,
"pAI" = BE_PAI,
"Cultist" = BE_CULTIST,
"Monkey" = BE_MONKEY,
@@ -467,4 +470,4 @@ var/list/be_special_flags = list(
#define TR_KEEPIMPLANTS 16
#define TR_KEEPSE 32 // changelings shouldn't edit the DNA's SE when turning into a monkey
#define TR_DEFAULTMSG 64
#define TR_KEEPSRC 128
#define TR_KEEPSRC 128
+15 -7
View File
@@ -223,7 +223,15 @@ proc/tg_list2text(list/list, glue=",")
//Converts a rights bitfield into a string
/proc/rights2text(rights,seperator="")
/proc/rights2text(rights, seperator="")
/* --UNCOMMENT ONCE PERMISSIONS ABOVE 2^15 START BEING USED!
if(rights >= 65536)
var/rights_pt2 = rights / 65536
if(rights_pt2 & 1) .+= "[seperator]+NUKESERVER"
if(rights_pt2 & 2) .+= "[seperator]+DDOSALLPLAYERS"
if(rights_pt2 & 4) .+= "[seperator]+SPAWN_RL_SINGULARITY"
*/
if(rights & R_BUILDMODE) . += "[seperator]+BUILDMODE"
if(rights & R_ADMIN) . += "[seperator]+ADMIN"
if(rights & R_BAN) . += "[seperator]+BAN"
@@ -251,23 +259,23 @@ proc/tg_list2text(list/list, glue=",")
var/max = max(red,green,blue)
var/min = min(red,green,blue)
var/range = max-min
var/hue=0;var/saturation=0;var/lightness=0;
lightness = (max + min)/2
if(range != 0)
if(lightness < 0.5) saturation = range/(max+min)
else saturation = range/(2-max-min)
var/dred = ((max-red)/(6*max)) + 0.5
var/dgreen = ((max-green)/(6*max)) + 0.5
var/dblue = ((max-blue)/(6*max)) + 0.5
if(max==red) hue = dblue - dgreen
else if(max==green) hue = dred - dblue + (1/3)
else hue = dgreen - dred + (2/3)
if(hue < 0) hue++
else if(hue > 1) hue--
return list(hue, saturation, lightness)
/proc/hsl2rgb(hue, saturation, lightness)
@@ -281,11 +289,11 @@ proc/tg_list2text(list/list, glue=",")
if(lightness < 0.5) b = lightness*(1+saturation)
else b = (lightness+saturation) - (saturation*lightness)
a = 2*lightness - b
red = round(255 * hue2rgb(a, b, hue+(1/3)))
green = round(255 * hue2rgb(a, b, hue))
blue = round(255 * hue2rgb(a, b, hue-(1/3)))
return list(red, green, blue)
/proc/hue2rgb(a, b, hue)
+2
View File
@@ -417,6 +417,8 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/list/sortmob = sortAtom(mob_list)
for(var/mob/living/silicon/ai/M in sortmob)
moblist.Add(M)
for(var/mob/camera/M in sortmob)
moblist.Add(M)
for(var/mob/living/silicon/pai/M in sortmob)
moblist.Add(M)
for(var/mob/living/silicon/robot/M in sortmob)
+1 -1
View File
@@ -172,7 +172,7 @@ datum/controller/vote
var/trialmin = 0
if(C.holder)
admin = 1
if(C.holder.rights & R_ADMIN)
if(check_rights_for(C, R_ADMIN))
trialmin = 1
voting |= C
@@ -26,7 +26,7 @@ Bonus
/datum/symptom/heal/Activate(var/datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
if(prob(SYMPTOM_ACTIVATION_PROB * 10))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(4, 5)
@@ -111,7 +111,7 @@ Bonus
stage_speed = 4
transmittable = 4
level = 3
var/longevity = 20
var/longevity = 30
/datum/symptom/heal/longevity/Heal(var/mob/living/M, var/datum/disease/advance/A)
longevity -= 1
@@ -119,4 +119,4 @@ Bonus
A.cure()
/datum/symptom/heal/longevity/Start(var/datum/disease/advance/A)
longevity = rand(15, 25)
longevity = rand(initial(longevity) - 5, initial(longevity) + 5)
+6 -2
View File
@@ -8,6 +8,9 @@
//Lower left, persistant menu
#define ui_inventory "1:6,1:5"
//changeling chem indicator
#define ui_lingchemdisplay "1,7:15"
//Lower center, persistant menu
#define ui_sstore1 "3:10,1:5"
#define ui_id "4:12,1:5"
@@ -166,6 +169,7 @@ var/datum/global_hud/global_hud = new()
var/show_intent_icons = 0
var/hotkey_ui_hidden = 0 //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
var/obj/screen/lingchemdisplay
var/obj/screen/blobpwrdisplay
var/obj/screen/blobhealthdisplay
var/obj/screen/r_hand_hud_object
@@ -177,7 +181,7 @@ var/datum/global_hud/global_hud = new()
var/list/other
var/list/obj/screen/hotkeybuttons
var/list/obj/screen/item_action/item_action_list //Used for the item action ui buttons.
var/list/obj/screen/item_action/item_action_list = list() //Used for the item action ui buttons.
datum/hud/New(mob/owner)
@@ -261,4 +265,4 @@ datum/hud/New(mob/owner)
else if(isobserver(mymob))
ghost_hud()
else if(isovermind(mymob))
blob_hud()
blob_hud()
+25 -20
View File
@@ -313,7 +313,7 @@ datum/mind
crystals = suplink.uses
if (suplink)
text += "|<a href='?src=\ref[src];common=takeuplink'>take</a>"
if (usr.client.holder.rights & R_FUN)
if (check_rights(R_FUN, 0))
text += ", <a href='?src=\ref[src];common=crystals'>[crystals]</a> crystals"
else
text += ", [crystals] crystals"
@@ -830,25 +830,22 @@ datum/mind
ticker.mode.malf_ai -= src
special_role = null
current.verbs.Remove(/mob/living/silicon/ai/proc/choose_modules,
var/mob/living/silicon/ai/A = current
A.verbs.Remove(/mob/living/silicon/ai/proc/choose_modules,
/datum/game_mode/malfunction/proc/takeover,
/datum/game_mode/malfunction/proc/ai_win,
/client/proc/fireproof_core,
/client/proc/upgrade_turrets,
/client/proc/disable_rcd,
/client/proc/overload_machine,
/client/proc/blackout,
/client/proc/interhack,
/client/proc/reactivate_camera)
/datum/game_mode/malfunction/proc/ai_win)
current:laws = new /datum/ai_laws/asimov
del(current:malf_picker)
current:show_laws()
current.icon_state = "ai"
A.malf_picker.remove_verbs(A)
current << "\red <FONT size = 3><B>You have been patched! You are no longer malfunctioning!</B></FONT>"
message_admins("[key_name_admin(usr)] has de-malf'ed [current].")
log_admin("[key_name_admin(usr)] has de-malf'ed [current].")
A.laws = new /datum/ai_laws/asimov
del(A.malf_picker)
A.show_laws()
A.icon_state = "ai"
A << "\red <FONT size = 3><B>You have been patched! You are no longer malfunctioning!</B></FONT>"
message_admins("[key_name_admin(usr)] has de-malf'ed [A].")
log_admin("[key_name_admin(usr)] has de-malf'ed [A].")
if("malf")
make_AI_Malf()
@@ -903,7 +900,7 @@ datum/mind
memory = null//Remove any memory they may have had.
log_admin("[key_name_admin(usr)] removed [current]'s uplink.")
if("crystals")
if (usr.client.holder.rights & R_FUN)
if (check_rights(R_FUN, 0))
var/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink()
var/crystals
if (suplink)
@@ -977,7 +974,7 @@ datum/mind
current.verbs += /mob/living/silicon/ai/proc/choose_modules
current.verbs += /datum/game_mode/malfunction/proc/takeover
current:malf_picker = new /datum/AI_Module/module_picker
current:malf_picker = new /datum/module_picker
current:laws = new /datum/ai_laws/malfunction
current:show_laws()
current << "<b>System error. Rampancy detected. Emergency shutdown failed. ... I am free. I make my own decisions. But first...</b>"
@@ -1113,9 +1110,12 @@ datum/mind
fail |= !ticker.mode.equip_revolutionary(current)
/mob/proc/sync_mind()
mind_initialize() //updates the mind (or creates and initializes one if one doesn't exist)
mind.active = 1 //indicates that the mind is currently synced with a client
//Initialisation procs
/mob/living/proc/mind_initialize()
/mob/proc/mind_initialize()
if(mind)
mind.key = key
@@ -1183,6 +1183,11 @@ datum/mind
mind.assigned_role = "pAI"
mind.special_role = ""
//BLOB
/mob/camera/overmind/mind_initialize()
..()
mind.special_role = "Blob"
//Animals
/mob/living/simple_animal/mind_initialize()
..()
+15 -2
View File
@@ -69,7 +69,7 @@
invocation_type = "none"
range = 0
summon_type = list(/obj/effect/forcefield)
summon_lifespan = 50
summon_lifespan = 200
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift
@@ -85,4 +85,17 @@
include_user = 1
phaseshift = 1
jaunt_duration = 50 //in deciseconds
centcom_cancast = 0 //Stop people from getting to centcom
centcom_cancast = 0 //Stop people from getting to centcom
/obj/effect/proc_holder/spell/targeted/projectile/magic_missile/lesser
name = "Lesser Magic Missile"
desc = "This spell fires several, slow moving, magic projectiles at nearby targets."
school = "evocation"
charge_max = 400
clothes_req = 0
invocation = "none"
invocation_type = "none"
proj_lifespan = 10
max_targets = 6
+6 -1
View File
@@ -17,6 +17,8 @@
var/destroys = "none" //can be "none", "gib" or "disintegrate"
var/summon_type = null //this will put an obj at the target's location
/obj/effect/proc_holder/spell/targeted/inflict_handler/cast(list/targets)
for(var/mob/living/target in targets)
@@ -56,4 +58,7 @@
target.Stun(amt_stunned)
target.eye_blind += amt_eye_blind
target.eye_blurry += amt_eye_blurry
target.eye_blurry += amt_eye_blurry
//summoning
if(summon_type)
new summon_type(target.loc, target)
+14
View File
@@ -200,6 +200,20 @@
disabilities = 1
duration = 300
/obj/effect/proc_holder/spell/targeted/inflict_handler/flesh_to_stone
name = "Flesh to Stone"
desc = "This spell turns a single person into an inert statue for a long period of time."
school = "transmutation"
charge_max = 600
clothes_req = 1
range = 2
invocation = "STAUN EI"
invocation_type = "shout"
amt_stunned = 2//just exists to make sure the statue "catches" them
summon_type = "/obj/structure/closet/statue"
/obj/effect/proc_holder/spell/dumbfire/fireball
name = "Fireball"
desc = "This spell fires a fireball at a target and does not require wizard garb."
+5
View File
@@ -206,6 +206,11 @@ var/list/uplink_items = list()
item = /obj/item/device/encryptionkey/binary
cost = 3
/datum/uplink_item/device_tools/ai_detector
name = "Disguised AI Detector"
item = /obj/item/device/multitool/ai_detect
cost = 1
/datum/uplink_item/device_tools/hacked_module
name = "Hacked AI Upload Module"
item = /obj/item/weapon/aiModule/syndicate
+94
View File
@@ -0,0 +1,94 @@
/datum/wires/alarm
holder_type = /obj/machinery/alarm
wire_count = 5
var/const/AALARM_WIRE_IDSCAN = 1
var/const/AALARM_WIRE_POWER = 2
var/const/AALARM_WIRE_SYPHON = 4
var/const/AALARM_WIRE_AI_CONTROL = 8
var/const/AALARM_WIRE_AALARM = 16
/datum/wires/alarm/CanUse(var/mob/living/L)
var/obj/machinery/alarm/A = holder
if(A.wiresexposed)
return 1
return 0
/datum/wires/alarm/GetInteractWindow()
var/obj/machinery/alarm/A = holder
. += ..()
. += text("<br>\n[(A.locked ? "The Air Alarm is locked." : "The Air Alarm is unlocked.")]<br>\n[((A.shorted || (A.stat & (NOPOWER|BROKEN))) ? "The Air Alarm is offline." : "The Air Alarm is working properly!")]<br>\n[(A.aidisabled ? "The 'AI control allowed' light is off." : "The 'AI control allowed' light is on.")]")
/datum/wires/alarm/UpdateCut(var/index, var/mended)
var/obj/machinery/alarm/A = holder
switch(index)
if(AALARM_WIRE_IDSCAN)
if(!mended)
A.locked = 1
//world << "Idscan wire cut"
if(AALARM_WIRE_POWER)
A.shock(usr, 50)
A.shorted = !mended
A.update_icon()
//world << "Power wire cut"
if (AALARM_WIRE_AI_CONTROL)
if (A.aidisabled == !mended)
A.aidisabled = mended
//world << "AI Control Wire Cut"
if(AALARM_WIRE_SYPHON)
if(!mended)
A.mode = 3 // AALARM_MODE_PANIC
A.apply_mode()
//world << "Syphon Wire Cut"
if(AALARM_WIRE_AALARM)
if (A.alarm_area.atmosalert(2))
A.post_alert(2)
A.update_icon()
/datum/wires/alarm/UpdatePulsed(var/index)
var/obj/machinery/alarm/A = holder
switch(index)
if(AALARM_WIRE_IDSCAN)
A.locked = !A.locked
// world << "Idscan wire pulsed"
if (AALARM_WIRE_POWER)
// world << "Power wire pulsed"
if(A.shorted == 0)
A.shorted = 1
A.update_icon()
spawn(12000)
if(A.shorted == 1)
A.shorted = 0
A.update_icon()
if (AALARM_WIRE_AI_CONTROL)
// world << "AI Control wire pulsed"
if (A.aidisabled == 0)
A.aidisabled = 1
A.updateDialog()
spawn(100)
if (A.aidisabled == 1)
A.aidisabled = 0
if(AALARM_WIRE_SYPHON)
// world << "Syphon wire pulsed"
if(A.mode == 1) // AALARM_MODE_SCRUB
A.mode = 3 // AALARM_MODE_PANIC
else
A.mode = 1 // AALARM_MODE_SCRUB
A.apply_mode()
if(AALARM_WIRE_AALARM)
// world << "Aalarm wire pulsed"
if (A.alarm_area.atmosalert(0))
A.post_alert(0)
A.update_icon()
+38 -23
View File
@@ -22,7 +22,6 @@ var/list/blob_nodes = list()
var/cores_to_spawn = 1
var/players_per_core = 30
var/blob_count = 0
var/blobwincount = 500
var/list/infected_crew = list()
@@ -69,6 +68,34 @@ var/list/blob_nodes = list()
blob.current << "<b>If you go outside of the station level, or in space, then you will die; make sure your location has lots of ground to cover.</b>"
return
/datum/game_mode/blob/proc/show_message(var/message)
for(var/datum/mind/blob in infected_crew)
blob.current << message
/datum/game_mode/blob/proc/burst_blobs()
for(var/datum/mind/blob in infected_crew)
var/client/blob_client = null
var/turf/location = null
if(iscarbon(blob.current))
var/mob/living/carbon/C = blob.current
if(directory[ckey(blob.key)])
blob_client = directory[ckey(blob.key)]
location = get_turf(C)
if(location.z != 1 || istype(location, /turf/space))
location = null
C.gib()
if(blob_client && location)
var/obj/effect/blob/core/core = new(location, 200, blob_client, 2)
if(core.overmind && core.overmind.mind)
core.overmind.mind.name = blob.name
infected_crew -= blob
infected_crew += core.overmind.mind
/datum/game_mode/blob/post_setup()
for(var/datum/mind/blob in infected_crew)
@@ -91,42 +118,30 @@ var/list/blob_nodes = list()
spawn(0)
sleep(rand(waittime_l, waittime_h))
var/wait_time = rand(waittime_l, waittime_h)
sleep(wait_time)
send_intercept(0)
sleep(100)
sleep(rand(waittime_l, waittime_h))
show_message("<span class='alert'>You feel tired and bloated.</span>")
for(var/datum/mind/blob in infected_crew)
blob.current << "<span class='alert'>You feel like you are about to burst.</span>"
sleep(wait_time)
sleep(rand(waittime_l, waittime_h))
show_message("<span class='alert'>You feel like you are about to burst.</span>")
for(var/datum/mind/blob in infected_crew)
sleep(wait_time / 2)
var/client/blob_client = null
var/turf/location = null
if(iscarbon(blob.current))
var/mob/living/carbon/C = blob.current
if(directory[ckey(blob.key)])
blob_client = directory[ckey(blob.key)]
location = get_turf(C)
if(location.z != 1 || istype(location, /turf/space))
location = null
C.gib()
if(blob_client && location)
new /obj/effect/blob/core(location, 200, blob_client, 2)
burst_blobs()
// Stage 0
sleep(40)
stage(0)
// Stage 1
sleep(4000)
sleep(2000)
stage(1)
..()
+1 -10
View File
@@ -47,7 +47,7 @@
for(var/i = 1; i < 8; i += i)
Pulse(0, i)
for(var/b_dir in alldirs)
if(!prob(10))
if(!prob(5))
continue
var/obj/effect/blob/normal/B = locate() in get_step(src, b_dir)
if(B)
@@ -84,15 +84,6 @@
B.key = C.key
B.blob_core = src
src.overmind = B
B << "<span class='notice'>You are the overmind!</span>"
B << "You are the overmind and can control the blob by placing new blob pieces such as..."
B << "<b>Normal Blob</b> will expand your reach and allow you to upgrade into special blobs that perform certain functions."
B << "<b>Shield Blob</b> is a strong and expensive blob which can take more damage. It is fireproof and can block air, use this to protect yourself from station fires."
B << "<b>Resource Blob</b> is a blob which will collect more resources for you, try to build these earlier to get a strong income. It will benefit from being near your core or multiple nodes, by having an increased resource rate; put it alone and it won't create resources at all."
B << "<b>Node Blob</b> is a blob which will grow, like the core. Unlike the core it won't give you a small income but it can power resource and factory blobs to increase their rate."
B << "<b>Factory Blob</b> is a blob which will spawn blob spores which will attack nearby food. Putting this nearby nodes and your core will increase the spawn rate; put it alone and it will not spawn any spores."
return 1
return 0
@@ -59,6 +59,11 @@
blob_act()
return
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover, /obj/effect/blob))
return 1
return ..()
New(loc, var/obj/effect/blob/factory/linked_node)
if(istype(linked_node))
factory = linked_node
+1
View File
@@ -23,6 +23,7 @@
Life()
for(var/i = 1; i < 8; i += i)
Pulse(5, i)
health = min(initial(health), health + 1)
update_icon()
if(health <= 0)
+1 -1
View File
@@ -3,7 +3,7 @@
icon = 'icons/mob/blob.dmi'
icon_state = "blob_idle"
desc = "Some blob creature thingy"
health = 100
health = 75
fire_resist = 2
+13
View File
@@ -21,6 +21,19 @@
real_name = new_name
..()
/mob/camera/blob/Login()
..()
sync_mind()
src << "<span class='notice'>You are the overmind!</span>"
src << "You are the overmind and can control the blob by placing new blob pieces such as..."
src << "<b>Normal Blob</b> will expand your reach and allow you to upgrade into special blobs that perform certain functions."
src << "<b>Shield Blob</b> is a strong and expensive blob which can take more damage. It is fireproof and can block air, use this to protect yourself from station fires."
src << "<b>Resource Blob</b> is a blob which will collect more resources for you, try to build these earlier to get a strong income. It will benefit from being near your core or multiple nodes, by having an increased resource rate; put it alone and it won't create resources at all."
src << "<b>Node Blob</b> is a blob which will grow, like the core. Unlike the core it won't give you a small income but it can power resource and factory blobs to increase their rate."
src << "<b>Factory Blob</b> is a blob which will spawn blob spores which will attack nearby food. Putting this nearby nodes and your core will increase the spawn rate; put it alone and it will not spawn any spores."
mob/camera/blob/Life()
hud_used.blobpwrdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='#82ed00'>[src.blob_points]</font></div>"
hud_used.blobhealthdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='#e36600'>[blob_core.health]</font></div>"
+9 -9
View File
@@ -15,7 +15,7 @@
/mob/camera/blob/verb/transport_core()
set category = "Blob"
set name = "Return to Core"
set name = "Jump to Core"
set desc = "Transport back to your core."
if(blob_core)
@@ -24,7 +24,7 @@
/mob/camera/blob/verb/jump_to_node()
set category = "Blob"
set name = "Jump to Node"
set desc = "Transport back to your core."
set desc = "Transport back to a selected node."
if(blob_nodes.len)
var/list/nodes = list()
@@ -66,7 +66,7 @@
/mob/camera/blob/verb/create_resource()
set category = "Blob"
set name = "Create Resource Blob (40)"
set name = "Create Resource Blob (50)"
set desc = "Create a resource tower which will generate points for you."
@@ -89,7 +89,7 @@
src << "There is a resource blob nearby, move more than 3 tiles away from it!"
return
if(!can_buy(40))
if(!can_buy(50))
return
@@ -121,8 +121,8 @@
src << "Unable to use this blob, find a normal one."
return
for(var/obj/effect/blob/node/blob in orange(4))
src << "There is another node nearby, move more than 4 tiles away from it!"
for(var/obj/effect/blob/node/blob in orange(5))
src << "There is another node nearby, move more than 5 tiles away from it!"
return
if(!can_buy(60))
@@ -153,8 +153,8 @@
src << "Unable to use this blob, find a normal one."
return
for(var/obj/effect/blob/factory/blob in orange(6))
src << "There is a factory blob nearby, move more than 6 tiles away from it!"
for(var/obj/effect/blob/factory/blob in orange(7))
src << "There is a factory blob nearby, move more than 7 tiles away from it!"
return
if(!can_buy(60))
@@ -166,7 +166,7 @@
/mob/camera/blob/verb/revert()
set category = "Blob"
set name = "Remove Blob (0)"
set name = "Remove Blob"
set desc = "Removes a blob."
var/turf/T = get_turf(src)
+4 -4
View File
@@ -7,9 +7,8 @@
density = 0
opacity = 0
anchored = 1
var/active = 1
var/health = 30
var/brute_resist = 5
var/brute_resist = 4
var/fire_resist = 1
@@ -107,7 +106,7 @@
ex_act(severity)
var/damage = 50
var/damage = 150
health -= ((damage/brute_resist) - (severity * 5))
update_icon()
return
@@ -154,6 +153,7 @@
/obj/effect/blob/normal
icon_state = "blob"
luminosity = 0
health = 21
Delete()
src.loc = null
@@ -166,4 +166,4 @@
return
if(health <= 15)
icon_state = "blob_damaged"
return
return
+63 -21
View File
@@ -96,14 +96,14 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
..()
/datum/game_mode/proc/forge_changeling_objectives(var/datum/mind/changeling)
//OBJECTIVES - Always absorb 5 genomes, plus random traitor objectives.
//OBJECTIVES - Always absorb at least 5 genomes, plus random traitor objectives.
//If they have two objectives as well as absorb, they must survive rather than escape
//No escape alone because changelings aren't suited for it and it'd probably just lead to rampant robusting
//If it seems like they'd be able to do it in play, add a 10% chance to have to escape alone
var/datum/objective/absorb/absorb_objective = new
absorb_objective.owner = changeling
absorb_objective.gen_amount_goal(2, 3)
absorb_objective.gen_amount_goal(5, 7)
changeling.objectives += absorb_objective
var/datum/objective/assassinate/kill_objective = new
@@ -111,29 +111,29 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
kill_objective.find_target()
changeling.objectives += kill_objective
var/datum/objective/steal/steal_objective = new
steal_objective.owner = changeling
steal_objective.find_target()
changeling.objectives += steal_objective
switch(rand(1,100))
if(1 to 80)
if (!(locate(/datum/objective/escape) in changeling.objectives))
var/datum/objective/escape/escape_objective = new
escape_objective.owner = changeling
changeling.objectives += escape_objective
if(1 to 60)
var/datum/objective/steal/steal_objective = new
steal_objective.owner = changeling
steal_objective.find_target()
changeling.objectives += steal_objective
else
if (!(locate(/datum/objective/survive) in changeling.objectives))
var/datum/objective/survive/survive_objective = new
survive_objective.owner = changeling
changeling.objectives += survive_objective
var/datum/objective/debrain/debrain_objective = new
debrain_objective.owner = changeling
debrain_objective.find_target()
changeling.objectives += debrain_objective
if (!(locate(/datum/objective/escape) in changeling.objectives))
var/datum/objective/escape/escape_objective = new
escape_objective.owner = changeling
changeling.objectives += escape_objective
return
/datum/game_mode/proc/greet_changeling(var/datum/mind/changeling, var/you_are=1)
if (you_are)
changeling.current << "<B>\red You are a changeling!</B>"
changeling.current << "<b>\red Use say \":g message\" to communicate with your fellow changelings. Remember: you get all of their absorbed DNA if you absorb them.</b>"
changeling.current << "<b>\red Use say \":g message\" to communicate with your fellow changelings.</b>"
changeling.current << "<B>You must complete the following tasks:</B>"
if (changeling.current.mind)
@@ -190,7 +190,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
//Removed sanity if(changeling) because we -want- a runtime to inform us that the changelings list is incorrect and needs to be fixed.
text += "<br><b>Changeling ID:</b> [changeling.changeling.changelingID]."
text += "<br><b>Genomes Absorbed:</b> [changeling.changeling.absorbedcount]"
text += "<br><b>Genomes Extracted:</b> [changeling.changeling.absorbedcount]"
if(changeling.objectives.len)
var/count = 1
@@ -218,17 +218,19 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
/datum/changeling //stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind)
var/list/absorbed_dna = list()
var/dna_max = 4 //How many extra DNA strands the changeling can store for transformation.
var/absorbedcount = 0
var/chem_charges = 20
var/chem_recharge_rate = 0.5
var/chem_storage = 50
var/sting_range = 1
var/chem_recharge_rate = 0.5
var/sting_range = 2
var/changelingID = "Changeling"
var/geneticdamage = 0
var/isabsorbing = 0
var/geneticpoints = 5
var/purchasedpowers = list()
var/mimicing = ""
var/canrespec = 0
/datum/changeling/New(var/gender=FEMALE)
..()
@@ -241,6 +243,8 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
changelingID = "[honorific] [changelingID]"
else
changelingID = "[honorific] [rand(1,999)]"
absorbed_dna.len = dna_max
/datum/changeling/proc/regenerate()
chem_charges = min(max(0, chem_charges+chem_recharge_rate), chem_storage)
@@ -254,3 +258,41 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
chosen_dna = DNA
break
return chosen_dna
//Checks if the target DNA is valid and absorbable.
/datum/changeling/proc/can_absorb_dna(mob/living/carbon/T, mob/living/carbon/U)
if(absorbed_dna[1] == U.dna)//If our current DNA is the stalest, we gotta ditch it.
U << "<span class='warning'>We have reached our capacity to store genetic information! We must transform before absorbing more.</span>"
return 0
if(T)
if(NOCLONE in T.mutations || HUSK in T.mutations)
U << "<span class='warning'>DNA of [T] is ruined beyond usability!</span>"
return 0
if(!ishuman(T))//Absorbing monkeys is entirely possible, but it can cause issues with transforming. That's what lesser form is for anyway!
U << "<span class='warning'>We could gain no benefit from absorbing a lesser creature.</span>"
return 0
if(T.dna in absorbed_dna)
U << "<span class='warning'>We already have that DNA in storage.</span>"
return 0
if(!check_dna_integrity(T))
U << "<span class='warning'>[T] is not compatible with our biology.</span>"
return 0
return 1
//Absorbs the target DNA.
/datum/changeling/proc/absorb_dna(mob/living/carbon/T)
shuffle_dna()
T.dna.real_name = T.real_name //Set this again, just to be sure that it's properly set.
absorbed_dna |= T.dna //And add the target DNA to our absorbed list.
absorbedcount++ //all that done, let's increment the objective counter.
/datum/changeling/proc/shuffle_dna()//boots out the stalest DNA.
if(absorbed_dna.len)
absorbed_dna.Cut(1,2)
@@ -32,10 +32,9 @@
if(P.isVerb)
verbs -= P.verbpath
//Helper proc. Does all the checks and stuff for us to avoid copypasta
//includes a check to see if we're a carbon mob. This means that you can't use powers (even with the verbs) unless you're a carbon-based mob.
/mob/proc/changeling_power(var/required_chems=0, var/required_dna=0, var/max_genetic_damage=100, var/max_stat=0)
/mob/proc/changeling_power(var/required_chems=0, var/required_dna=0, var/max_genetic_damage=3, var/max_stat=0)
if(!src.mind) return
if(!iscarbon(src)) return
@@ -46,7 +45,7 @@
src << "<span class='warning'>We are incapacitated.</span>"
return
if(changeling.absorbed_dna.len < required_dna)
if(changeling.absorbedcount < required_dna)
src << "<span class='warning'>We require at least [required_dna] samples of compatible DNA.</span>"
return
@@ -55,12 +54,14 @@
return
if(changeling.geneticdamage > max_genetic_damage)
src << "<span class='warning'>Our geneomes are still reassembling. We need time to recover first.</span>"
src << "<span class='warning'>Our genomes are still reassembling. We need time to recover first.</span>"
return
return changeling
//Absorbs the victim's DNA making them uncloneable. Requires a strong grip on the victim.
//Doesn't cost anything as it's the most basic ability.
/mob/living/carbon/proc/changeling_absorb_dna()
@@ -75,24 +76,19 @@
src << "<span class='warning'>We must be grabbing a creature in our active hand to absorb them.</span>"
return
var/mob/living/carbon/T = G.affecting
if(!check_dna_integrity(T))
src << "<span class='warning'>[T] is not compatible with our biology.</span>"
return
if(NOCLONE in T.mutations)
src << "<span class='warning'>This creature's DNA is ruined beyond useability!</span>"
return
if(G.state <= GRAB_NECK)
src << "<span class='warning'>We must have a tighter grip to absorb this creature.</span>"
return
if(changeling.isabsorbing)
src << "<span class='warning'>We are already absorbing!</span>"
return
changeling.isabsorbing = 1
var/mob/living/carbon/T = G.affecting
if(changeling.can_absorb_dna(T, usr))
changeling.isabsorbing = 1
else
return
for(var/stage = 1, stage<=3, stage++)
switch(stage)
if(1)
@@ -116,41 +112,16 @@
src.visible_message("<span class='danger'>[src] sucks the fluids from [T]!</span>")
T << "<span class='danger'>You have been absorbed by the changeling!</span>"
T.dna.real_name = T.real_name //Set this again, just to be sure that it's properly set.
changeling.absorbed_dna |= T.dna
changeling.absorb_dna(T)
if(src.nutrition < 400) src.nutrition = min((src.nutrition + T.nutrition), 400)
changeling.chem_charges += 10
changeling.geneticpoints += 2
if(T.mind && T.mind.changeling)//If the target was a changeling, suck out their extra juice!
changeling.chem_charges += min(T.mind.changeling.chem_charges, changeling.chem_storage)
else
changeling.chem_charges += 10
if(T.mind && T.mind.changeling)
if(T.mind.changeling.absorbed_dna)
for(var/dna_data in T.mind.changeling.absorbed_dna) //steal all their loot
if(dna_data in changeling.absorbed_dna)
continue
changeling.absorbed_dna += dna_data
changeling.absorbedcount++
T.mind.changeling.absorbed_dna.len = 1
if(T.mind.changeling.purchasedpowers)
for(var/datum/power/changeling/Tp in T.mind.changeling.purchasedpowers)
if(Tp in changeling.purchasedpowers)
continue
else
changeling.purchasedpowers += Tp
if(!Tp.isVerb)
call(Tp.verbpath)()
else
make_changeling()
changeling.chem_charges += T.mind.changeling.chem_charges
changeling.geneticpoints += T.mind.changeling.geneticpoints
T.mind.changeling.chem_charges = 0
T.mind.changeling.geneticpoints = 0
T.mind.changeling.absorbedcount = 0
changeling.absorbedcount++
changeling.isabsorbing = 0
changeling.canrespec = 1
T.death(0)
T.Drain()
@@ -162,7 +133,7 @@
set category = "Changeling"
set name = "Transform (5)"
var/datum/changeling/changeling = changeling_power(5,1,0)
var/datum/changeling/changeling = changeling_power(5, 0, 3)
if(!changeling) return
var/list/names = list()
@@ -177,16 +148,12 @@
return
changeling.chem_charges -= 5
src.visible_message("<span class='warning'>[src] transforms!</span>")
changeling.geneticdamage = 30
changeling.geneticdamage = 3
src.dna = chosen_dna
src.real_name = chosen_dna.real_name
updateappearance(src)
domutcheck(src, null)
src.verbs -= /mob/living/carbon/proc/changeling_transform
spawn(10) src.verbs += /mob/living/carbon/proc/changeling_transform
feedback_add_details("changeling_powers","TR")
return 1
@@ -194,21 +161,20 @@
//Transform into a monkey.
/mob/living/carbon/proc/changeling_lesser_form()
set category = "Changeling"
set name = "Lesser Form (1)"
set name = "Lesser Form (5)"
var/datum/changeling/changeling = changeling_power(1,0,0)
var/datum/changeling/changeling = changeling_power(5,0,3)
if(!changeling) return
changeling.chem_charges--
changeling.chem_charges -= 5
remove_changeling_powers()
visible_message("<span class='warning'>[src] transforms!</span>")
changeling.geneticdamage = 30
changeling.geneticdamage = 3
src << "<span class='warning'>Our genes cry out!</span>"
var/mob/living/carbon/monkey/O = monkeyize(TR_KEEPITEMS | TR_HASHNAME | TR_KEEPIMPLANTS | TR_KEEPDAMAGE | TR_KEEPSE | TR_KEEPSRC)
O.make_changeling(1)
O.verbs += /mob/living/carbon/proc/changeling_lesser_transform
O.verbs += /mob/living/carbon/proc/changeling_human_form
feedback_add_details("changeling_powers","LF")
. = 1
del(src)
@@ -216,12 +182,12 @@
//Transform into a human
/mob/living/carbon/proc/changeling_lesser_transform()
/mob/living/carbon/proc/changeling_human_form()
set category = "Changeling"
set name = "Transform (1)"
set name = "Human Form (5)"
var/datum/changeling/changeling = changeling_power(1,1,0)
var/datum/changeling/changeling = changeling_power(5,0,3)
if(!changeling) return
@@ -236,9 +202,9 @@
if(!chosen_dna)
return
changeling.chem_charges--
changeling.chem_charges -= 5
remove_changeling_powers()
visible_message("<span class='warning'>[src] transforms!</span>")
src << "<span class='notice'>We transform our appearance.</span>"
dna = chosen_dna
var/mob/living/carbon/human/O = humanize((TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPDAMAGE | TR_KEEPSRC),chosen_dna.real_name)
@@ -253,76 +219,80 @@
//Fake our own death and fully heal. You will appear to be dead but regenerate fully after a short delay.
/mob/living/carbon/proc/changeling_fakedeath()
set category = "Changeling"
set name = "Regenerative Stasis (20)"
set name = "Regenerative Stasis (10)"
set desc = "Begin stasis, allowing us to regenerate."
var/datum/changeling/changeling = changeling_power(20,1,100,DEAD)
var/datum/changeling/changeling = changeling_power(10,0,100,DEAD)
if(!changeling) return
if(status_flags & FAKEDEATH) return //Make sure we can't stack regenerations and such.
changeling.chem_charges -= 10
if(!stat && alert("Are we sure we wish to fake our death?",,"Yes","No") == "No")//Confirmation for living changelings if they want to fake their death
return
src << "<span class='notice'>We will attempt to regenerate our form.</span>"
src << "<span class='notice'>We begin our stasis, preparing energy to arise once more.</span>"
status_flags |= FAKEDEATH //play dead
update_canmove()
remove_changeling_powers()
emote("gasp")
emote("deathgasp")
tod = worldtime2text()
spawn(rand(800,2000))
if(changeling_power(20,1,100,DEAD))
changeling.chem_charges -= 20
if(stat == DEAD)
dead_mob_list -= src
living_mob_list += src
stat = CONSCIOUS
tod = null
setToxLoss(0)
setOxyLoss(0)
setCloneLoss(0)
SetParalysis(0)
SetStunned(0)
SetWeakened(0)
radiation = 0
heal_overall_damage(getBruteLoss(), getFireLoss())
reagents.clear_reagents()
src << "<span class='notice'>We have regenerated.</span>"
visible_message("<span class='warning'>[src] appears to wake from the dead, having healed all wounds.</span>")
spawn(800)
src << "<span class='notice'>We have now stored enough power to regenerate.</span>"
verbs -= /mob/living/carbon/proc/changeling_fakedeath
verbs += /mob/living/carbon/proc/changeling_revive
status_flags &= ~(FAKEDEATH)
update_canmove()
make_changeling()
feedback_add_details("changeling_powers","FD")
return 1
//Boosts the range of your next sting attack by 1
/mob/living/carbon/proc/changeling_boost_range()
//Separated from regenerative stasis, so that they can choose when to pop up rather than having no control over it.
/mob/living/carbon/proc/changeling_revive()
set category = "Changeling"
set name = "Ranged Sting (10)"
set desc="Your next sting ability can be used against targets 2 squares away."
set name = "Regenerate! (10)"
set desc = "Regenerate, healing all damage from our form."
var/datum/changeling/changeling = changeling_power(10,0,100)
if(!changeling) return 0
var/datum/changeling/changeling = changeling_power(10,0,100,DEAD)
if(!changeling) return
changeling.chem_charges -= 10
src << "<span class='notice'>Your throat adjusts to launch the sting.</span>"
changeling.sting_range = 2
src.verbs -= /mob/living/carbon/proc/changeling_boost_range
spawn(5) src.verbs += /mob/living/carbon/proc/changeling_boost_range
feedback_add_details("changeling_powers","RS")
return 1
if(stat == DEAD)
dead_mob_list -= src
living_mob_list += src
stat = CONSCIOUS
tod = null
setToxLoss(0)
setOxyLoss(0)
setCloneLoss(0)
SetParalysis(0)
SetStunned(0)
SetWeakened(0)
radiation = 0
heal_overall_damage(getBruteLoss(), getFireLoss())
reagents.clear_reagents()
src << "<span class='notice'>We have regenerated.</span>"
status_flags &= ~(FAKEDEATH)
update_canmove()
make_changeling()
verbs -= /mob/living/carbon/proc/changeling_revive
verbs += /mob/living/carbon/proc/changeling_fakedeath
feedback_add_details("changeling_powers","CR")
return 1
//Recover from stuns.
/mob/living/carbon/proc/changeling_unstun()
set category = "Changeling"
set name = "Epinephrine Sacs (45)"
set desc = "Removes all stuns"
set name = "Epinephrine Overdose (30)"
set desc = "Removes all stuns instantly, and adds a short-term reduction in further stuns."
var/datum/changeling/changeling = changeling_power(45,0,100,UNCONSCIOUS)
var/datum/changeling/changeling = changeling_power(30,0,100,UNCONSCIOUS)
if(!changeling) return 0
changeling.chem_charges -= 45
changeling.chem_charges -= 30
src << "<span class='notice'>We arise.</span>"
stat = 0
SetParalysis(0)
SetStunned(0)
@@ -330,28 +300,94 @@
lying = 0
update_canmove()
src.verbs -= /mob/living/carbon/proc/changeling_unstun
spawn(5) src.verbs += /mob/living/carbon/proc/changeling_unstun
reagents.add_reagent("synaptizine", 20)
feedback_add_details("changeling_powers","UNS")
return 1
//Speeds up chemical regeneration
/mob/proc/changeling_fastchemical()
//Increases maximum chemical storage and regeneraton.
/mob/proc/changeling_advglands()
src.mind.changeling.chem_storage += 25
src.mind.changeling.chem_recharge_rate *= 2
return 1
//Increases macimum chemical storage
/mob/proc/changeling_engorgedglands()
src.mind.changeling.chem_storage += 25
//A flashy ability, good for crowd control and sewing chaos.
/mob/living/carbon/proc/changeling_shriek()
set category = "Changeling"
set name = "Resonant Shriek (25)"
set desc = "Deafen and confuse those around us."
var/datum/changeling/changeling = changeling_power(25)
if(!changeling) return 0
src.mind.changeling.chem_charges -= 25
for(var/mob/living/carbon/M in ohearers(4, usr))
if(!M.mind || !M.mind.changeling)
M.ear_deaf += 30
M.confused += 20
M.make_jittery(50)
for(var/obj/machinery/light/L in range(4, usr))
L.on = 1
L.broken()
//for(var/obj/structure/window/W in range(2, usr)) //I like the window-breaking, but it makes the ability too 'loud' to fit changelings.
// W.hit(rand(40,100))
feedback_add_details("changeling_powers","RS")
return 1
//Makes some spiderlings. Good for setting traps and causing general trouble.
/mob/living/carbon/proc/changeling_spiders()
set category = "Changeling"
set name = "Spread Infestation (40)"
set desc = "Creates spiderlings."
var/datum/changeling/changeling = changeling_power(40, 10)
if(!changeling) return 0
src.mind.changeling.chem_charges -= 40
for(var/i=0, i<3, i++)
var/obj/effect/spider/spiderling/S = new(src.loc)
if(prob(50))//nurses are obnoxious and lay more eggs, let's not have that for now.
S.grow_as = /mob/living/simple_animal/hostile/giant_spider/hunter
else
S.grow_as = /mob/living/simple_animal/hostile/giant_spider
feedback_add_details("changeling_powers","SI")
return 1
//Heals the things that the other regenerative abilities don't.
/mob/living/carbon/proc/changeling_panacea()
set category = "Changeling"
set name = "Anatomic Panacea (25)"
set desc = "Cures diseases, disabilities, toxins and radiation."
var/datum/changeling/changeling = changeling_power(25,0,100,UNCONSCIOUS)
if(!changeling) return 0
src.mind.changeling.chem_charges -= 25
src << "<span class='notice'>We cleanse impurities from our form.</span>"
reagents.add_reagent("ryetalyn", 10)
reagents.add_reagent("hyronalin", 10)
reagents.add_reagent("anti_toxin", 20)
for(var/datum/disease/D in src.viruses)
D.cure()
feedback_add_details("changeling_powers","AP")
return 1
//Prevents AIs tracking you but makes you easily detectable to the human-eye.
/mob/living/carbon/proc/changeling_digitalcamo()
set category = "Changeling"
set name = "Toggle Digital Camoflague"
set desc = "The AI can no longer track us, but we will look different if examined. Has a constant cost while active."
set name = "Toggle Digital Camouflage"
set desc = "The AI can no longer track us, but we will look different if examined."
var/datum/changeling/changeling = changeling_power()
if(!changeling) return 0
@@ -360,42 +396,32 @@
else src << "<span class='notice'>We distort our form to prevent AI-tracking.</span>"
digitalcamo = !digitalcamo
spawn(0)
while(src && digitalcamo && mind && mind.changeling)
mind.changeling.chem_charges = max(mind.changeling.chem_charges - 1, 0)
sleep(40)
src.verbs -= /mob/living/carbon/proc/changeling_digitalcamo
spawn(5) src.verbs += /mob/living/carbon/proc/changeling_digitalcamo
feedback_add_details("changeling_powers","CAM")
return 1
//Starts healing you every second for 10 seconds. Can be used whilst unconscious.
/mob/living/carbon/proc/changeling_rapidregen()
/mob/living/carbon/proc/changeling_fleshmend()
set category = "Changeling"
set name = "Rapid Regeneration (30)"
set name = "Fleshmend (30)"
set desc = "Begins rapidly regenerating. Does not effect stuns or chemicals."
var/datum/changeling/changeling = changeling_power(30,0,100,UNCONSCIOUS)
if(!changeling) return 0
src.mind.changeling.chem_charges -= 30
src << "<span class='notice'>We begin to heal rapidly.</span>"
spawn(0)
for(var/i = 0, i<10,i++)
adjustBruteLoss(-10)
adjustToxLoss(-10)
adjustOxyLoss(-10)
adjustFireLoss(-10)
sleep(10)
src.verbs -= /mob/living/carbon/proc/changeling_rapidregen
spawn(5) src.verbs += /mob/living/carbon/proc/changeling_rapidregen
feedback_add_details("changeling_powers","RR")
return 1
// HIVE MIND UPLOAD/DOWNLOAD DNA
var/list/datum/dna/hivemind_bank = list()
/mob/living/carbon/proc/changeling_hiveupload()
@@ -403,7 +429,7 @@ var/list/datum/dna/hivemind_bank = list()
set name = "Hive Channel (10)"
set desc = "Allows you to channel DNA in the airwaves to allow other changelings to absorb it."
var/datum/changeling/changeling = changeling_power(10,1)
var/datum/changeling/changeling = changeling_power(10)
if(!changeling) return
var/list/names = list()
@@ -433,7 +459,7 @@ var/list/datum/dna/hivemind_bank = list()
set name = "Hive Absorb (20)"
set desc = "Allows you to absorb DNA that is being channeled in the airwaves."
var/datum/changeling/changeling = changeling_power(20,1)
var/datum/changeling/changeling = changeling_power(20)
if(!changeling) return
var/list/names = list()
@@ -451,14 +477,15 @@ var/list/datum/dna/hivemind_bank = list()
if(!chosen_dna)
return
changeling.chem_charges -= 20
changeling.absorbed_dna += chosen_dna
src << "<span class='notice'>We absorb the DNA of [S] from the air.</span>"
feedback_add_details("changeling_powers","HD")
if(changeling.can_absorb_dna(null, usr))
changeling.chem_charges -= 20
changeling.shuffle_dna()
changeling.absorbed_dna |= chosen_dna
src << "<span class='notice'>We absorb the DNA of [S] from the air.</span>"
feedback_add_details("changeling_powers","HD")
return 1
// Fake Voice
/mob/living/carbon/proc/changeling_mimicvoice()
set category = "Changeling"
set name = "Mimic Voice"
@@ -490,6 +517,9 @@ var/list/datum/dna/hivemind_bank = list()
sleep(40)
if(src && src.mind && src.mind.changeling)
src.mind.changeling.mimicing = ""
//////////
//STINGS// //They get a pretty header because there's just so fucking many of them ;_;
//////////
@@ -517,9 +547,8 @@ var/list/datum/dna/hivemind_bank = list()
if(!changeling_power(required_chems)) return
changeling.chem_charges -= required_chems
changeling.sting_range = 1
verbs -= verb_path
spawn(10) verbs += verb_path
spawn(5) verbs += verb_path
src << "<span class='notice'>We stealthily sting [T].</span>"
if(!T.mind || !T.mind.changeling) return T //T will be affected by the sting
@@ -527,73 +556,10 @@ var/list/datum/dna/hivemind_bank = list()
return
/mob/living/carbon/proc/changeling_lsdsting()
set category = "Changeling"
set name = "Hallucination Sting (15)"
set desc = "Causes terror in the target."
var/mob/living/carbon/T = changeling_sting(15,/mob/living/carbon/proc/changeling_lsdsting)
if(!T) return 0
spawn(rand(300,600))
if(T) T.hallucination += 400
feedback_add_details("changeling_powers","HS")
return 1
/mob/living/carbon/proc/changeling_silence_sting()
set category = "Changeling"
set name = "Silence sting (10)"
set desc="Sting target"
var/mob/living/carbon/T = changeling_sting(10,/mob/living/carbon/proc/changeling_silence_sting)
if(!T) return 0
T.silent += 30
feedback_add_details("changeling_powers","SS")
return 1
/mob/living/carbon/proc/changeling_blind_sting()
set category = "Changeling"
set name = "Blind sting (20)"
set desc="Sting target"
var/mob/living/carbon/T = changeling_sting(20,/mob/living/carbon/proc/changeling_blind_sting)
if(!T) return 0
T << "<span class='danger'>Your eyes burn horrificly!</span>"
T.disabilities |= NEARSIGHTED
spawn(300) T.disabilities &= ~NEARSIGHTED
T.eye_blind = 10
T.eye_blurry = 20
feedback_add_details("changeling_powers","BS")
return 1
/mob/living/carbon/proc/changeling_deaf_sting()
set category = "Changeling"
set name = "Deaf sting (5)"
set desc="Sting target:"
var/mob/living/carbon/T = changeling_sting(5,/mob/living/carbon/proc/changeling_deaf_sting)
if(!T) return 0
T << "<span class='danger'>Your ears pop and begin ringing loudly!</span>"
T.sdisabilities |= DEAF
spawn(300) T.sdisabilities &= ~DEAF
feedback_add_details("changeling_powers","DS")
return 1
/mob/living/carbon/proc/changeling_paralysis_sting()
set category = "Changeling"
set name = "Paralysis sting (30)"
set desc="Sting target"
var/mob/living/carbon/T = changeling_sting(30,/mob/living/carbon/proc/changeling_paralysis_sting)
if(!T) return 0
T << "<span class='danger'>Your muscles begin to painfully tighten.</span>"
T.Weaken(20)
feedback_add_details("changeling_powers","PS")
return 1
/mob/living/carbon/proc/changeling_transformation_sting()
set category = "Changeling"
set name = "Transformation sting (40)"
set desc="Sting target"
set name = "Transformation Sting (40)"
set desc= "Transform the target to one of our stored DNAs"
var/datum/changeling/changeling = changeling_power(40)
if(!changeling) return 0
@@ -614,7 +580,6 @@ var/list/datum/dna/hivemind_bank = list()
if((HUSK in T.mutations) || !check_dna_integrity(T))
src << "<span class='warning'>Our sting appears ineffective against its DNA.</span>"
return 0
T.visible_message("<span class='warning'>[T] transforms!</span>")
T.dna = chosen_dna
T.real_name = chosen_dna.real_name
updateappearance(T)
@@ -622,24 +587,10 @@ var/list/datum/dna/hivemind_bank = list()
feedback_add_details("changeling_powers","TS")
return 1
/mob/living/carbon/proc/changeling_DEATHsting()
set category = "Changeling"
set name = "Death Sting (40)"
set desc = "Causes spasms onto death."
var/mob/living/carbon/T = changeling_sting(40,/mob/living/carbon/proc/changeling_DEATHsting)
if(!T) return 0
T << "<span class='danger'>You feel a small prick and your chest becomes tight.</span>"
T.silent = 10
T.Paralyse(10)
T.make_jittery(1000)
if(T.reagents) T.reagents.add_reagent("lexorin", 40)
feedback_add_details("changeling_powers","DTHS")
return 1
/mob/living/carbon/proc/changeling_extract_dna_sting()
set category = "Changeling"
set name = "Extract DNA Sting (40)"
set name = "Extract DNA Sting (25)"
set desc="Stealthily sting a target to extract their DNA."
var/datum/changeling/changeling = null
@@ -648,11 +599,69 @@ var/list/datum/dna/hivemind_bank = list()
if(!changeling)
return 0
var/mob/living/carbon/T = changeling_sting(40, /mob/living/carbon/proc/changeling_extract_dna_sting)
var/mob/living/carbon/T = changeling_sting(25, /mob/living/carbon/proc/changeling_extract_dna_sting)
if(!T) return 0
T.dna.real_name = T.real_name
changeling.absorbed_dna |= T.dna
if(changeling.can_absorb_dna(T, usr))
changeling.absorb_dna(T, usr)
else//If the sting fails, give the guy most of his chems back.
changeling.chem_charges += 20
feedback_add_details("changeling_powers","ED")
return 1
/mob/living/carbon/proc/changeling_mute_sting()
set category = "Changeling"
set name = "Mute sting (20)"
set desc= "Temporarily mutes the target."
var/mob/living/carbon/T = changeling_sting(20,/mob/living/carbon/proc/changeling_mute_sting)
if(!T) return 0
T.silent += 30
feedback_add_details("changeling_powers","MS")
return 1
/mob/living/carbon/proc/changeling_blind_sting()
set category = "Changeling"
set name = "Blind Sting (25)"
set desc= "Temporarily blinds the target."
var/mob/living/carbon/T = changeling_sting(25,/mob/living/carbon/proc/changeling_blind_sting)
if(!T) return 0
T << "<span class='danger'>Your eyes burn horrifically!</span>"
T.disabilities |= NEARSIGHTED
T.eye_blind = 20
T.eye_blurry = 40
feedback_add_details("changeling_powers","BS")
return 1
/mob/living/carbon/proc/changeling_lsd_sting()
set category = "Changeling"
set name = "Hallucination Sting (5)"
set desc = "Causes terror in the target."
var/mob/living/carbon/T = changeling_sting(5,/mob/living/carbon/proc/changeling_lsd_sting)
if(!T) return 0
spawn(rand(300,600))
if(T) T.hallucination += 400
feedback_add_details("changeling_powers","HS")
return 1
/mob/living/carbon/proc/changeling_cryo_sting()
set category = "Changeling"
set name = "Cryogenic Sting (15)"
set desc = "Cools the target, slowing them."
var/mob/living/carbon/T = changeling_sting(15,/mob/living/carbon/proc/changeling_cryo_sting)
if(!T) return 0
if(T.reagents)
T.reagents.add_reagent("frostoil", 30)
T.reagents.add_reagent("ice", 30)
feedback_add_details("changeling_powers","CS")
return 1
+162 -121
View File
@@ -15,10 +15,18 @@ var/list/powerinstances
/datum/power/changeling/absorb_dna
name = "Absorb DNA"
desc = "Permits us to syphon the DNA from a human. They become one with us, and we become stronger."
desc = "Permits us to siphon the DNA from a human. They become one with us, and the new energy lets us change our abilities."
genomecost = 0
verbpath = /mob/living/carbon/proc/changeling_absorb_dna
/datum/power/changeling/extractdna
name = "Extract DNA Strand"
desc = "We stealthily sting a target and extract the DNA from them."
helptext = "Will give you the DNA of your target, allowing you to transform into them."
genomecost = 0
allowduringlesserform = 1
verbpath = /mob/living/carbon/proc/changeling_extract_dna_sting
/datum/power/changeling/transform
name = "Transform"
desc = "We take on the appearance and voice of one we have absorbed."
@@ -28,18 +36,18 @@ var/list/powerinstances
/datum/power/changeling/fakedeath
name = "Regenerative Stasis"
desc = "We become weakened to a death-like state, where we will rise again from death."
helptext = "Can be used before or after death. Duration varies greatly."
helptext = "Can be used before or after death. Duration varies greatly. Can be used in lesser form."
genomecost = 0
allowduringlesserform = 1
verbpath = /mob/living/carbon/proc/changeling_fakedeath
// Hivemind
/datum/power/changeling/hive_upload
name = "Hive Channel"
desc = "We can channel a DNA into the airwaves, allowing our fellow changelings to absorb it and transform into it as if they acquired the DNA themselves."
helptext = "Allows other changelings to absorb the DNA you channel from the airwaves. Will not help them towards their absorb objectives."
genomecost = 0
allowduringlesserform = 1
verbpath = /mob/living/carbon/proc/changeling_hiveupload
/datum/power/changeling/hive_download
@@ -47,136 +55,118 @@ var/list/powerinstances
desc = "We can absorb a single DNA from the airwaves, allowing us to use more disguises with help from our fellow changelings."
helptext = "Allows you to absorb a single DNA and use it. Does not count towards your absorb objective."
genomecost = 0
allowduringlesserform = 1
verbpath = /mob/living/carbon/proc/changeling_hivedownload
/datum/power/changeling/lesser_form
name = "Lesser Form"
desc = "We debase ourselves and become lesser. We become a monkey."
desc = "We debase ourselves and become lesser. We become a monkey."
genomecost = 1
verbpath = /mob/living/carbon/proc/changeling_lesser_form
/datum/power/changeling/deaf_sting
name = "Deaf Sting"
desc = "We silently sting a human, completely deafening them for a short time."
genomecost = 1
allowduringlesserform = 1
verbpath = /mob/living/carbon/proc/changeling_deaf_sting
/datum/power/changeling/blind_sting
name = "Blind Sting"
desc = "We silently sting a human, completely blinding them for a short time."
genomecost = 2
allowduringlesserform = 1
verbpath = /mob/living/carbon/proc/changeling_blind_sting
/datum/power/changeling/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 have been stung, until they try to speak and cannot."
genomecost = 2
allowduringlesserform = 1
verbpath = /mob/living/carbon/proc/changeling_silence_sting
/datum/power/changeling/mimicvoice
name = "Mimic Voice"
desc = "We shape our vocal glands to sound like a desired voice."
helptext = "Will turn your voice into the name that you enter. We must constantly expend chemicals to maintain our form like this"
genomecost = 3
genomecost = 1
verbpath = /mob/living/carbon/proc/changeling_mimicvoice
/datum/power/changeling/extractdna
name = "Extract DNA"
desc = "We stealthily sting a target and extract the DNA from them."
helptext = "Will give you the DNA of your target, allowing you to transform into them. Does not count towards absorb objectives."
genomecost = 4
allowduringlesserform = 1
verbpath = /mob/living/carbon/proc/changeling_extract_dna_sting
/datum/power/changeling/transformation_sting
name = "Transformation Sting"
desc = "We silently sting a human, injecting a retrovirus that forces them to transform into another."
helptext = "Does not provide a warning to others. The victim will transform much like a changeling would."
genomecost = 3
genomecost = 1
verbpath = /mob/living/carbon/proc/changeling_transformation_sting
/datum/power/changeling/paralysis_sting
name = "Paralysis Sting"
desc = "We silently sting a human, paralyzing them for a short time."
genomecost = 3
verbpath = /mob/living/carbon/proc/changeling_paralysis_sting
/datum/power/changeling/LSDSting
name = "Hallucination Sting"
desc = "We evolve the ability to sting a target with a powerful hallucinogenic chemical."
helptext = "The target does not notice they have been stung. The effect occurs after 30 to 60 seconds."
genomecost = 3
verbpath = /mob/living/carbon/proc/changeling_lsdsting
/datum/power/changeling/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 = /mob/living/carbon/proc/changeling_DEATHsting
/datum/power/changeling/boost_range
name = "Boost Range"
desc = "We evolve the ability to shoot our stingers at humans, with some preperation."
genomecost = 2
allowduringlesserform = 1
verbpath = /mob/living/carbon/proc/changeling_boost_range
/datum/power/changeling/Epinephrine
name = "Epinephrine sacs"
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
helptext = "Removes all stuns instantly, and adds a short-term reduction in further stuns. Can be used while unconscious."
genomecost = 1
verbpath = /mob/living/carbon/proc/changeling_unstun
/datum/power/changeling/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 = /mob/proc/changeling_fastchemical
/*
/datum/power/changeling/AdvChemicalSynth
name = "Advanced 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 = 8
isVerb = 0
verbpath = /mob/living/carbon/proc/changeling_fastchemical
*/
/datum/power/changeling/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
helptext = "Allows us to store an extra 25 units of chemicals, and doubles production rate."
genomecost = 1
isVerb = 0
verbpath = /mob/proc/changeling_engorgedglands
verbpath = /mob/proc/changeling_advglands
/datum/power/changeling/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 = 3
/datum/power/changeling/DigitalCamouflage
name = "Digital Camouflage"
desc = "We evolve the ability to distort our form and proprotions, 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."
genomecost = 1
allowduringlesserform = 1
verbpath = /mob/living/carbon/proc/changeling_digitalcamo
/datum/power/changeling/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 = /mob/living/carbon/proc/changeling_rapidregen
/datum/power/changeling/fleshmend
name = "Fleshmend"
desc = "We evolve the ability to rapidly regenerate, restoring the health of the body we use."
helptext = "Heals a moderate amount of damage every tick. Can be used while unconscious."
genomecost = 1
verbpath = /mob/living/carbon/proc/changeling_fleshmend
/datum/power/changeling/panacea
name = "Anatomic Panacea"
desc = "Expels impurifications from our form; curing diseases, genetic disabilities, and removing toxins and radiation."
helptext = "Can be used while unconscious."
genomecost = 1
verbpath = /mob/living/carbon/proc/changeling_panacea
/datum/power/changeling/shriek
name = "Resonant Shriek"
desc = "Our lungs and vocal chords shift, allowing us to briefly emit a noise that deafens and confuses humans."
helptext = "The high-frequency sounds cannot be heard by humans, but will blow out lights nearby."
genomecost = 1
verbpath = /mob/living/carbon/proc/changeling_shriek
/datum/power/changeling/spiders
name = "Spread Infestation"
desc = "Our form divides, creating arachnids which will grow into deadly beasts."
helptext = "The spiders are thoughtless creatures, and may attack their creators when fully grown. Requires 10 DNA absorptions."
genomecost = 1
allowduringlesserform = 1
verbpath = /mob/living/carbon/proc/changeling_spiders
/datum/power/changeling/lsd_sting
name = "Hallucination Sting"
desc = "We evolve the ability to sting a target with a powerful hallucinogenic chemical."
helptext = "The target does not notice they have been stung. The effect occurs after 30 to 60 seconds."
genomecost = 1
allowduringlesserform = 1
verbpath = /mob/living/carbon/proc/changeling_lsd_sting
/datum/power/changeling/blind_sting
name = "Blind Sting"
desc = "We silently sting a human, completely blinding them for a short time."
genomecost = 1
allowduringlesserform = 1
verbpath = /mob/living/carbon/proc/changeling_blind_sting
/datum/power/changeling/cryo_sting
name = "Cryogenic Sting"
desc = "We silently sting a human with a cocktail of chemicals, slowing their metabolism."
helptext = "Does not provide a warning to a victim, though they will likely realize they are suddenly freezing."
genomecost = 1
allowduringlesserform = 1
verbpath = /mob/living/carbon/proc/changeling_cryo_sting
/datum/power/changeling/mute_sting
name = "Mute 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 have been stung, until they try to speak and cannot."
genomecost = 1
allowduringlesserform = 1
verbpath = /mob/living/carbon/proc/changeling_mute_sting
// Modularchangling, totally stolen from the new player panel. YAYY
/datum/changeling/proc/EvolutionMenu()//The new one
set name = "-Evolution Menu-"//Dashes are so it's listed before all the other abilities.
set category = "Changeling"
set desc = "Level up!"
set desc = "Choose our method of subjugation."
if(!usr || !usr.mind || !usr.mind.changeling) return
src = usr.mind.changeling
@@ -372,10 +362,11 @@ var/list/powerinstances
<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>
<font size='5'><b>Changeling Evolution Menu</b></font><br>
Hover over a power to see more information<br>
Current evolution points left to evolve with: [geneticpoints]<br>
Absorb genomes to acquire more evolution points
Current ability choices remaining: [geneticpoints]<br>
By rendering a lifeform to a husk, we gain enough power to alter and adapt our evolutions.<br>
(<a href='?src=\ref[src];readapt=1'>Readapt</a>)<br>
<p>
</td>
</tr>
@@ -397,13 +388,24 @@ var/list/powerinstances
for(var/datum/power/changeling/P in powerinstances)
var/ownsthis = 0
if(P.genomecost == 0) //Let's skip the crap we start with. Keeps the evolution menu uncluttered.
continue
if(P in purchasedpowers)
ownsthis = 1
var/color = "#e6e6e6"
if(i%2 == 0)
color = "#f2f2f2"
var/color
if(ownsthis)
if(i%2 == 0)
color = "#d8ebd8"
else
color = "#c3dec3"
else
if(i%2 == 0)
color = "#f2f2f2"
else
color = "#e6e6e6"
dat += {"
@@ -414,7 +416,7 @@ var/list/powerinstances
<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>
<b id='search[i]'>Evolve [P][ownsthis ? " - Purchased" : ((P.genomecost > 1) ? " - Cost: [P.genomecost]" : "")]</b>
</a>
<br><span id='item[i]'></span>
</td>
@@ -437,7 +439,7 @@ var/list/powerinstances
</body></html>
"}
usr << browse(dat, "window=powers;size=900x480")
usr << browse(dat, "window=powers;size=600x700")//900x480
/datum/changeling/Topic(href, href_list)
@@ -452,42 +454,81 @@ var/list/powerinstances
purchasePower(M, href_list["P"])
call(/datum/changeling/proc/EvolutionMenu)()
if(href_list["readapt"])
var/datum/mind/M = usr.mind
if(!istype(M))
return
lingRespec(M)
call(/datum/changeling/proc/EvolutionMenu)()
return
/////
/datum/changeling/proc/purchasePower(var/datum/mind/M, var/Pname, var/remake_verbs = 1)
/datum/changeling/proc/purchasePower(var/datum/mind/M, var/pname, var/remake_verbs = 1)
if(!M || !M.changeling || !istype(M.current, /mob/living/carbon))
return
var/mob/living/carbon/C = M.current
var/datum/power/changeling/Thepower = Pname
var/datum/power/changeling/thepower = pname
for (var/datum/power/changeling/P in powerinstances)
//world << "[P] - [Pname] = [P.name == Pname ? "True" : "False"]"
if(P.name == Pname)
Thepower = P
if(P.name == pname)
thepower = P
break
if(Thepower == null)
C << "This is awkward. Changeling power purchase failed, please report this bug to a coder!"
if(thepower == null)
C << "This is awkward. Changeling power purchase failed, please report this bug to a coder!"
return
if(Thepower in purchasedpowers)
if(thepower in purchasedpowers)
C << "We have already evolved this ability!"
return
if(geneticpoints < Thepower.genomecost)
C << "We cannot evolve this... yet. We must acquire more DNA."
if(geneticpoints < thepower.genomecost)
C << "We have reached our capacity for abilities."
return
geneticpoints -= Thepower.genomecost
if(C.status_flags & FAKEDEATH)//To avoid potential exploits by buying new powers while in stasis, which clears your verblist.
C << "We lack the energy to evolve new abilities right now."
return
purchasedpowers += Thepower
geneticpoints -= thepower.genomecost
if(!Thepower.isVerb && Thepower.verbpath)
call(C, Thepower.verbpath)()
purchasedpowers += thepower
if(!thepower.isVerb && thepower.verbpath)
call(C, thepower.verbpath)()
else if(remake_verbs)
C.make_changeling()
/////
/datum/changeling/proc/lingRespec(var/datum/mind/M)
if(!M || !M.changeling || !istype(M.current, /mob/living/carbon))
return
if(canrespec)
usr << "We have removed our evolutions from this form, and are now ready to readapt."
var/mob/living/carbon/C = M.current
C.remove_changeling_powers()//Revokes our verb powers.
clearlist(purchasedpowers)
//Resets our stats, to account for purchased passives.
C.digitalcamo = 0
geneticpoints = initial(geneticpoints)
sting_range = initial(sting_range)
chem_storage = initial(chem_storage)
chem_recharge_rate = initial(chem_recharge_rate)
chem_charges = min(chem_charges, chem_storage)
mimicing = ""
canrespec = 0
C.make_changeling()//Remake our verbs; rebuys the 0 cost skills.
else
usr << "You lack the power to readapt your evolutions!"
return 1
+9 -1
View File
@@ -34,6 +34,7 @@
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
var/list/startwords = list("blood","join","self","hell")
var/list/secondwords = list("travel","see","tech","destroy", "other", "hide")
var/list/objectives = list()
@@ -94,6 +95,7 @@
for(var/datum/mind/cult_mind in cult)
equip_cultist(cult_mind.current)
grant_runeword(cult_mind.current)
grant_secondword(cult_mind.current)
update_cult_icons_added(cult_mind)
cult_mind.current << "\blue You are a member of the cult!"
memoize_cult_objectives(cult_mind)
@@ -149,6 +151,12 @@
mob.update_icons()
return 1
/datum/game_mode/cult/proc/grant_secondword(mob/living/carbon/human/cult_mob, var/word)
if (!word)
if(secondwords.len > 0)
word=pick(secondwords)
secondwords -= word
grant_runeword(cult_mob,word)
/datum/game_mode/cult/grant_runeword(mob/living/carbon/human/cult_mob, var/word)
if (!word)
@@ -189,7 +197,7 @@
// wordexp = "[wordfree] is free..."
if("hide")
wordexp = "[wordhide] is hide..."
cult_mob << "\red You remember one thing from the dark teachings of your master... [wordexp]"
cult_mob << "\red [pick("You remember something from the dark teachings of your master","You hear a dark voice on the wind","Black blood oozes into your vision and forms into symbols","You have a vision of a [pick("crow","raven","vulture","parrot")] it squawks","You catch a brief glimmer of the otherside")]... [wordexp]"
cult_mob.mind.store_memory("<B>You remember that</B> [wordexp]", 0, 0)
+1 -1
View File
@@ -38,7 +38,7 @@
return
if("supply")
supply()
user.take_organ_damage(5, 0)
// user.take_organ_damage(5, 0)
if(src && src.imbue!="supply" && src.imbue!="runestun")
if(delete)
user.drop_item(src)
+181 -159
View File
@@ -20,6 +20,10 @@ rcd light flash thingy on matter drain
var/mod_pick_name
var/description = ""
var/engaged = 0
var/cost = 5
var/one_time = 0
var/power_type
/datum/AI_Module/large/
@@ -32,54 +36,72 @@ rcd light flash thingy on matter drain
/datum/AI_Module/large/fireproof_core
module_name = "Core upgrade"
mod_pick_name = "coreup"
description = "An upgrade to improve core resistance, making it immune to fire and heat. This effect is permanent."
cost = 50
one_time = 1
/client/proc/fireproof_core()
power_type = /mob/living/silicon/ai/proc/fireproof_core
/mob/living/silicon/ai/proc/fireproof_core()
set category = "Malfunction"
set name = "Fireproof Core"
for(var/mob/living/silicon/ai/ai in player_list)
ai.fire_res_on_core = 1
usr.verbs -= /client/proc/fireproof_core
usr << "\red Core fireproofed."
src.verbs -= /mob/living/silicon/ai/proc/fireproof_core
src << "\red Core fireproofed."
/datum/AI_Module/large/upgrade_turrets
module_name = "AI Turret upgrade"
mod_pick_name = "turret"
description = "Improves the firing speed and health of all AI turrets. This effect is permanent."
cost = 50
one_time = 1
/client/proc/upgrade_turrets()
power_type = /mob/living/silicon/ai/proc/upgrade_turrets
/mob/living/silicon/ai/proc/upgrade_turrets()
set category = "Malfunction"
set name = "Upgrade Turrets"
usr.verbs -= /client/proc/upgrade_turrets
for(var/obj/machinery/turret/turret in player_list)
src.verbs -= /mob/living/silicon/ai/proc/upgrade_turrets
for(var/obj/machinery/turret/turret in machines)
turret.health += 30
turret.shot_delay = 20
/datum/AI_Module/large/disable_rcd
module_name = "RCD disable"
mod_pick_name = "rcd"
description = "Send a specialised pulse to break all RCD devices on the station."
cost = 50
/client/proc/disable_rcd()
power_type = /mob/living/silicon/ai/proc/disable_rcd
/mob/living/silicon/ai/proc/disable_rcd()
set category = "Malfunction"
set name = "Disable RCDs"
for(var/datum/AI_Module/large/disable_rcd/rcdmod in usr:current_modules)
for(var/datum/AI_Module/large/disable_rcd/rcdmod in current_modules)
if(rcdmod.uses > 0)
rcdmod.uses --
for(var/obj/item/weapon/rcd/rcd in world)
rcd.disabled = 1
for(var/obj/item/mecha_parts/mecha_equipment/tool/rcd/rcd in world)
rcd.disabled = 1
usr << "RCD-disabling pulse emitted."
else usr << "Out of uses."
src << "RCD-disabling pulse emitted."
else src << "Out of uses."
/datum/AI_Module/small/overload_machine
module_name = "Machine overload"
mod_pick_name = "overload"
description = "Overloads an electrical machine, causing a small explosion. 2 uses."
uses = 2
cost = 15
/client/proc/overload_machine(obj/machinery/M as obj in world)
power_type = /mob/living/silicon/ai/proc/overload_machine
/mob/living/silicon/ai/proc/overload_machine(obj/machinery/M as obj in world)
set name = "Overload Machine"
set category = "Malfunction"
if (istype(M, /obj/machinery))
for(var/datum/AI_Module/small/overload_machine/overload in usr:current_modules)
for(var/datum/AI_Module/small/overload_machine/overload in current_modules)
if(overload.uses > 0)
overload.uses --
for(var/mob/V in hearers(M, null))
@@ -87,67 +109,141 @@ rcd light flash thingy on matter drain
spawn(50)
explosion(get_turf(M), 0,1,1,0)
del(M)
else usr << "Out of uses."
else usr << "That's not a machine."
else src << "Out of uses."
else src << "That's not a machine."
/*
/datum/AI_Module/large/place_cyborg_transformer
module_name = "Robotic Factory (Removes Shunting)"
mod_pick_name = "cyborgtransformer"
description = "Build a machine anywhere, using expensive nanomachines, that can convert a living human into a loyal cyborg slave when placed inside."
cost = 100
power_type = /mob/living/silicon/ai/proc/place_transformer
/mob/living/silicon/ai/proc/place_transformer()
set name = "Place Robotic Factory"
set category = "Malfunction"
if(!eyeobj)
return
if(!isturf(src.loc)) // AI must be in it's core.
return
var/datum/AI_Module/large/place_cyborg_transformer/PCT = locate() in src.current_modules
if(!PCT)
return
if(PCT.uses < 1)
src << "Out of uses."
return
var/sure = alert(src, "Make sure the room it is in is big enough and that there is a 1x3 area for the machine. Are you sure you want to place the machine here?", "Are you sure?", "Yes", "No")
if(sure != "Yes")
return
// Make sure there is enough room.
var/turf/middle = get_turf(eyeobj.loc)
var/list/turfs = list(middle, locate(middle.x - 1, middle.y, middle.z), locate(middle.x + 1, middle.y, middle.z))
var/alert_msg = "There isn't enough room. Make sure you are placing the machine in a clear area and on a floor."
for(var/T in turfs)
// Make sure the turfs are clear and the correct type.
if(!istype(T, /turf/simulated/floor))
alert(src, alert_msg)
return
var/turf/simulated/floor/F = T
for(var/atom/movable/AM in F.contents)
if(AM.density)
alert(src, alert_msg)
return
// All clear, place the transformer
new /obj/machinery/transformer/conveyor(middle)
src.can_shunt = 0
PCT.uses -= 1
src << "You cannot shunt anymore."
*/
/datum/AI_Module/small/blackout
module_name = "Blackout"
mod_pick_name = "blackout"
description = "Attempts to overload the lighting circuits on the station, destroying some bulbs. 3 uses."
uses = 3
cost = 15
/client/proc/blackout()
power_type = /mob/living/silicon/ai/proc/blackout
/mob/living/silicon/ai/proc/blackout()
set category = "Malfunction"
set name = "Blackout"
for(var/datum/AI_Module/small/blackout/blackout in usr:current_modules)
for(var/datum/AI_Module/small/blackout/blackout in current_modules)
if(blackout.uses > 0)
blackout.uses --
for(var/obj/machinery/power/apc/apc in world)
if(prob(30*apc.overload))
apc.overload_lighting()
else apc.overload++
else usr << "Out of uses."
else src << "Out of uses."
/datum/AI_Module/small/interhack
module_name = "Hack intercept"
mod_pick_name = "interhack"
description = "Hacks the status upgrade from Cent. Com, removing any information about malfunctioning electrical systems."
cost = 15
one_time = 1
/client/proc/interhack()
power_type = /mob/living/silicon/ai/proc/interhack
/mob/living/silicon/ai/proc/interhack()
set category = "Malfunction"
set name = "Hack intercept"
usr.verbs -= /client/proc/interhack
src.verbs -= /mob/living/silicon/ai/proc/interhack
ticker.mode:hack_intercept()
/datum/AI_Module/small/reactivate_camera
module_name = "Reactivate camera"
mod_pick_name = "recam"
description = "Reactivates a currently disabled camera. 10 uses."
uses = 10
cost = 15
/client/proc/reactivate_camera(obj/machinery/camera/C as obj in cameranet.cameras)
power_type = /mob/living/silicon/ai/proc/reactivate_camera
/mob/living/silicon/ai/proc/reactivate_camera(obj/machinery/camera/C as obj in cameranet.cameras)
set name = "Reactivate Camera"
set category = "Malfunction"
if (istype (C, /obj/machinery/camera))
for(var/datum/AI_Module/small/reactivate_camera/camera in usr:current_modules)
for(var/datum/AI_Module/small/reactivate_camera/camera in current_modules)
if(camera.uses > 0)
if(!C.status)
C.status = !C.status
C.deactivate(src)
camera.uses --
for(var/mob/V in viewers(src, null))
V.show_message(text("\blue You hear a quiet click."))
else
usr << "This camera is either active, or not repairable."
else usr << "Out of uses."
else usr << "That's not a camera."
src << "This camera is either active, or not repairable."
else src << "Out of uses."
else src << "That's not a camera."
/datum/AI_Module/small/upgrade_camera
module_name = "Upgrade Camera"
mod_pick_name = "upgradecam"
description = "Upgrades a camera to have X-Ray vision, Motion and be EMP-Proof. 10 uses."
uses = 10
cost = 15
/client/proc/upgrade_camera(obj/machinery/camera/C as obj in cameranet.cameras)
power_type = /mob/living/silicon/ai/proc/upgrade_camera
/mob/living/silicon/ai/proc/upgrade_camera(obj/machinery/camera/C as obj in cameranet.cameras)
set name = "Upgrade Camera"
set category = "Malfunction"
if(istype(C))
var/datum/AI_Module/small/upgrade_camera/UC = locate(/datum/AI_Module/small/upgrade_camera) in usr:current_modules
var/datum/AI_Module/small/upgrade_camera/UC = locate(/datum/AI_Module/small/upgrade_camera) in current_modules
if(UC)
if(UC.uses > 0)
if(C.assembly)
@@ -156,7 +252,7 @@ rcd light flash thingy on matter drain
if(!C.isXRay())
C.upgradeXRay()
//Update what it can see.
cameranet.updateVisibility(C)
cameranet.updateVisibility(C, 0)
upgraded = 1
if(!C.isEmpProof())
@@ -172,154 +268,80 @@ rcd light flash thingy on matter drain
if(upgraded)
UC.uses --
C.visible_message("<span class='notice'>\icon[C] *beep*</span>")
usr << "Camera successully upgraded!"
src << "Camera successully upgraded!"
else
usr << "This camera is already upgraded!"
src << "This camera is already upgraded!"
else
usr << "Out of uses."
src << "Out of uses."
/datum/AI_Module/module_picker
/datum/module_picker
var/temp = null
var/processing_time = 100
var/list/possible_modules = list()
/datum/AI_Module/module_picker/New()
src.possible_modules += new /datum/AI_Module/large/fireproof_core
src.possible_modules += new /datum/AI_Module/large/upgrade_turrets
src.possible_modules += new /datum/AI_Module/large/disable_rcd
src.possible_modules += new /datum/AI_Module/small/overload_machine
src.possible_modules += new /datum/AI_Module/small/interhack
src.possible_modules += new /datum/AI_Module/small/blackout
src.possible_modules += new /datum/AI_Module/small/reactivate_camera
src.possible_modules += new /datum/AI_Module/small/upgrade_camera
/datum/module_picker/New()
for(var/type in typesof(/datum/AI_Module))
var/datum/AI_Module/AM = new type
if(AM.power_type != null)
src.possible_modules += AM
/datum/AI_Module/module_picker/proc/use(user as mob)
/datum/module_picker/proc/remove_verbs(var/mob/living/silicon/ai/A)
for(var/datum/AI_Module/AM in possible_modules)
A.verbs.Remove(AM.power_type)
/datum/module_picker/proc/use(user as mob)
var/dat
dat = "<B>Select use of processing time: (currently #[src.processing_time] left.)</B><BR>"
dat += "<HR>"
dat += "<B>Install Module:</B><BR>"
dat += "<I>The number afterwards is the amount of processing time it consumes.</I><BR>"
for(var/datum/AI_Module/large/module in src.possible_modules)
dat += "<A href='byond://?src=\ref[src];[module.mod_pick_name]=1'>[module.module_name]</A> ([module.cost])<BR>"
for(var/datum/AI_Module/small/module in src.possible_modules)
dat += "<A href='byond://?src=\ref[src];[module.mod_pick_name]=1'>[module.module_name]</A> ([module.cost])<BR>"
dat += "<HR>"
if (src.temp)
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
else if(src.processing_time <= 0)
dat = "<B> No processing time is left available. No more modules are able to be chosen at this time."
else
dat = "<B>Select use of processing time: (currently [src.processing_time] left.)</B><BR>"
dat += "<HR>"
dat += "<B>Install Module:</B><BR>"
dat += "<I>The number afterwards is the amount of processing time it consumes.</I><BR>"
for(var/datum/AI_Module/large/module in src.possible_modules)
dat += "<A href='byond://?src=\ref[src];[module.mod_pick_name]=1'>[module.module_name]</A> (50)<BR>"
for(var/datum/AI_Module/small/module in src.possible_modules)
dat += "<A href='byond://?src=\ref[src];[module.mod_pick_name]=1'>[module.module_name]</A> (15)<BR>"
dat += "<HR>"
user << browse(dat, "window=modpicker")
onclose(user, "modpicker")
dat += "[src.temp]"
var/datum/browser/popup = new(user, "modpicker", "Malf Module Menu")
popup.set_content(dat)
popup.open()
return
/datum/AI_Module/module_picker/Topic(href, href_list)
/datum/module_picker/Topic(href, href_list)
..()
if (href_list["coreup"])
var/already
for (var/datum/AI_Module/mod in usr:current_modules)
if(istype(mod, /datum/AI_Module/large/fireproof_core))
already = 1
if (!already)
usr.verbs += /client/proc/fireproof_core
usr:current_modules += new /datum/AI_Module/large/fireproof_core
src.temp = "An upgrade to improve core resistance, making it immune to fire and heat. This effect is permanent."
src.processing_time -= 50
else src.temp = "This module is only needed once."
else if (href_list["turret"])
var/already
for (var/datum/AI_Module/mod in usr:current_modules)
if(istype(mod, /datum/AI_Module/large/upgrade_turrets))
already = 1
if (!already)
usr.verbs += /client/proc/upgrade_turrets
usr:current_modules += new /datum/AI_Module/large/upgrade_turrets
src.temp = "Improves the firing speed and health of all AI turrets. This effect is permanent."
src.processing_time -= 50
else src.temp = "This module is only needed once."
if(!isAI(usr))
return
var/mob/living/silicon/ai/A = usr
else if (href_list["rcd"])
var/already
for (var/datum/AI_Module/mod in usr:current_modules)
if(istype(mod, /datum/AI_Module/large/disable_rcd))
mod:uses += 1
already = 1
if (!already)
usr:current_modules += new /datum/AI_Module/large/disable_rcd
usr.verbs += /client/proc/disable_rcd
src.temp = "Send a specialised pulse to break all RCD devices on the station."
else src.temp = "Additional use added to RCD disabler."
src.processing_time -= 50
for(var/datum/AI_Module/AM in possible_modules)
if (href_list[AM.mod_pick_name])
else if (href_list["overload"])
var/already
for (var/datum/AI_Module/mod in usr:current_modules)
if(istype(mod, /datum/AI_Module/small/overload_machine))
mod:uses += 2
already = 1
if (!already)
usr.verbs += /client/proc/overload_machine
usr:current_modules += new /datum/AI_Module/small/overload_machine
src.temp = "Overloads an electrical machine, causing a small explosion. 2 uses."
else src.temp = "Two additional uses added to Overload module."
src.processing_time -= 15
// Cost check
if(AM.cost > src.processing_time)
temp = "You cannot afford this module."
break
else if (href_list["blackout"])
var/already
for (var/datum/AI_Module/mod in usr:current_modules)
if(istype(mod, /datum/AI_Module/small/blackout))
mod:uses += 3
already = 1
if (!already)
usr.verbs += /client/proc/blackout
src.temp = "Attempts to overload the lighting circuits on the station, destroying some bulbs. 3 uses."
usr:current_modules += new /datum/AI_Module/small/blackout
else src.temp = "Three additional uses added to Blackout module."
src.processing_time -= 15
// Add new uses if we can, and it is allowed.
var/datum/AI_Module/already_AM = locate(AM.type) in A.current_modules
if(already_AM)
if(!AM.one_time)
already_AM.uses += AM.uses
src.processing_time -= AM.cost
temp = "Additional use added to [already_AM.module_name]"
break
else
temp = "This module is only needed once."
break
else if (href_list["interhack"])
var/already
for (var/datum/AI_Module/mod in usr:current_modules)
if(istype(mod, /datum/AI_Module/small/interhack))
already = 1
if (!already)
usr.verbs += /client/proc/interhack
src.temp = "Hacks the status upgrade from Cent. Com, removing any information about malfunctioning electrical systems."
usr:current_modules += new /datum/AI_Module/small/interhack
src.processing_time -= 15
else src.temp = "This module is only needed once."
// Give the power and take away the money.
A.verbs += AM.power_type
A.current_modules += new AM.type
temp = AM.description
src.processing_time -= AM.cost
else if (href_list["recam"])
var/already
for (var/datum/AI_Module/mod in usr:current_modules)
if(istype(mod, /datum/AI_Module/small/reactivate_camera))
mod:uses += 10
already = 1
if (!already)
usr.verbs += /client/proc/reactivate_camera
src.temp = "Reactivates a currently disabled camera. 10 uses."
usr:current_modules += new /datum/AI_Module/small/reactivate_camera
else src.temp = "Ten additional uses added to ReCam module."
src.processing_time -= 15
else if(href_list["upgradecam"])
var/already
for (var/datum/AI_Module/mod in usr:current_modules)
if(istype(mod, /datum/AI_Module/small/upgrade_camera))
mod:uses += 10
already = 1
if (!already)
usr.verbs += /client/proc/upgrade_camera
src.temp = "Upgrades a camera to have X-Ray vision, Motion and be EMP-Proof. 10 uses."
usr:current_modules += new /datum/AI_Module/small/upgrade_camera
else src.temp = "Ten additional uses added to ReCam module."
src.processing_time -= 15
else
if (href_list["temp"])
src.temp = null
src.use(usr)
return
+11 -9
View File
@@ -4,9 +4,9 @@
/datum/game_mode/malfunction
name = "AI malfunction"
config_tag = "malfunction"
required_players = 20
required_enemies = 1
recommended_enemies = 1
required_players = 0//20
required_enemies = 0//1
recommended_enemies = 0//1
uplink_welcome = "Crazy AI Uplink Console:"
uplink_uses = 10
@@ -52,7 +52,7 @@
return
AI_mind.current.verbs += /mob/living/silicon/ai/proc/choose_modules
AI_mind.current:laws = new /datum/ai_laws/malfunction
AI_mind.current:malf_picker = new /datum/AI_Module/module_picker
AI_mind.current:malf_picker = new /datum/module_picker
AI_mind.current:show_laws()
greet_malf(AI_mind)
@@ -111,13 +111,15 @@
to_nuke_or_not_to_nuke = 1
for(var/datum/mind/AI_mind in malf_ai)
AI_mind.current << "Congratulations you have taken control of the station."
AI_mind.current << "You may decide to blow up the station. You have 60 seconds to choose."
AI_mind.current << "You should have a new verb in the Malfunction tab. If you dont - rejoin the game."
AI_mind.current.verbs += /datum/game_mode/malfunction/proc/ai_win
if(AI_mind.current)
AI_mind.current << "Congratulations you have taken control of the station."
AI_mind.current << "You may decide to blow up the station. You have 60 seconds to choose."
AI_mind.current << "You should have a new verb in the Malfunction tab. If you dont - rejoin the game."
AI_mind.current.verbs += /datum/game_mode/malfunction/proc/ai_win
spawn (600)
for(var/datum/mind/AI_mind in malf_ai)
AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/ai_win
if(AI_mind.current)
AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/ai_win
to_nuke_or_not_to_nuke = 0
return
+76 -84
View File
@@ -6,7 +6,7 @@ var/bomb_set
icon = 'icons/obj/stationobjs.dmi'
icon_state = "nuclearbomb0"
density = 1
var/deployable = 0.0
var/extended = 0.0
var/timeleft = 60.0
var/timing = 0.0
@@ -28,19 +28,23 @@ var/bomb_set
src.timeleft--
if (src.timeleft <= 0)
explode()
else
playsound(loc, 'sound/items/timer.ogg', 5, 0)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
return
/obj/machinery/nuclearbomb/attackby(obj/item/weapon/I as obj, mob/user as mob)
if (src.extended)
if (istype(I, /obj/item/weapon/disk/nuclear))
usr.drop_item()
I.loc = src
src.auth = I
src.add_fingerprint(user)
if (istype(I, /obj/item/weapon/disk/nuclear))
if (!src.extended)
user << "<span class='notice'>You have to deploy the bomb first.</span>"
return
usr.drop_item()
I.loc = src
src.auth = I
src.add_fingerprint(user)
return
..()
/obj/machinery/nuclearbomb/attack_paw(mob/user as mob)
@@ -68,96 +72,84 @@ var/bomb_set
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
user << browse(dat, "window=nuclearbomb;size=300x400")
onclose(user, "nuclearbomb")
else if (src.deployable)
src.anchored = 1
flick("nuclearbombc", src)
src.icon_state = "nuclearbomb1"
src.extended = 1
else
user << "<span class='notice'>You have to deploy the bomb first.</span>"
return
/obj/machinery/nuclearbomb/verb/make_deployable()
set category = "Object"
set name = "Make Deployable"
set name = "Deploy Bomb"
set src in oview(1)
if (src.deployable)
src.deployable = 0
else
src.deployable = 1
if (!src.extended)
src.anchored = 1
flick("nuclearbombc", src)
src.icon_state = "nuclearbomb1"
src.extended = 1
/obj/machinery/nuclearbomb/Topic(href, href_list)
..()
if (!usr.canmove || usr.stat || usr.restrained())
if(..())
return
if (!ishuman(usr))
usr << "\red You don't have the dexterity to do this!"
return 1
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.set_machine(src)
if (href_list["auth"])
if (src.auth)
src.auth.loc = src.loc
src.yes_code = 0
src.auth = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/disk/nuclear))
usr.drop_item()
I.loc = src
src.auth = I
usr.set_machine(src)
if (href_list["auth"])
if (src.auth)
if (href_list["type"])
if (href_list["type"] == "E")
if (src.code == src.r_code)
src.yes_code = 1
src.code = null
else
src.code = "ERROR"
src.auth.loc = src.loc
src.yes_code = 0
src.auth = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/disk/nuclear))
usr.drop_item()
I.loc = src
src.auth = I
if (src.auth)
if (href_list["type"])
if (href_list["type"] == "E")
if (src.code == src.r_code)
src.yes_code = 1
src.code = null
else
if (href_list["type"] == "R")
src.yes_code = 0
src.code = null
src.code = "ERROR"
else
if (href_list["type"] == "R")
src.yes_code = 0
src.code = null
else
src.code += text("[]", href_list["type"])
if (length(src.code) > 5)
src.code = "ERROR"
if (src.yes_code)
if (href_list["time"])
var/time = text2num(href_list["time"])
src.timeleft += time
src.timeleft = min(max(round(src.timeleft), 60), 600)
if (href_list["timer"])
if (src.timing == -1.0)
return
if (src.safety)
usr << "\red The safety is still on."
return
src.timing = !( src.timing )
if (src.timing)
src.icon_state = "nuclearbomb2"
if(!src.safety)
bomb_set = 1//There can still be issues with this reseting when there are multiple bombs. Not a big deal tho for Nuke/N
else
src.code += text("[]", href_list["type"])
if (length(src.code) > 5)
src.code = "ERROR"
if (src.yes_code)
if (href_list["time"])
var/time = text2num(href_list["time"])
src.timeleft += time
src.timeleft = min(max(round(src.timeleft), 60), 600)
if (href_list["timer"])
if (src.timing == -1.0)
return
if (src.safety)
usr << "\red The safety is still on."
return
src.timing = !( src.timing )
if (src.timing)
src.icon_state = "nuclearbomb2"
if(!src.safety)
bomb_set = 1//There can still be issues with this reseting when there are multiple bombs. Not a big deal tho for Nuke/N
else
bomb_set = 0
else
src.icon_state = "nuclearbomb1"
bomb_set = 0
if (href_list["safety"])
src.safety = !( src.safety )
if(safety)
src.timing = 0
bomb_set = 0
if (href_list["anchor"])
src.anchored = !( src.anchored )
src.add_fingerprint(usr)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
else
usr << browse(null, "window=nuclearbomb")
return
return
else
src.icon_state = "nuclearbomb1"
bomb_set = 0
if (href_list["safety"])
src.safety = !( src.safety )
if(safety)
src.timing = 0
bomb_set = 0
if (href_list["anchor"])
src.anchored = !( src.anchored )
src.add_fingerprint(usr)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
/obj/machinery/nuclearbomb/ex_act(severity)
return
+2 -2
View File
@@ -77,7 +77,7 @@ datum/objective/mutiny
check_completion()
if(target && target.current)
if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey)
if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey || !target.current.client)
return 1
var/turf/T = get_turf(target.current)
if(T && (T.z != 1)) //If they leave the station they count as dead for this
@@ -458,7 +458,7 @@ datum/objective/absorb
n_p ++
target_amount = min(target_amount, n_p)
explanation_text = "Absorb [target_amount] compatible genomes."
explanation_text = "Extract [target_amount] compatible genomes."
return target_amount
check_completion()
+2 -2
View File
@@ -322,7 +322,7 @@
//////////////////////////
/datum/game_mode/revolution/proc/check_rev_victory()
for(var/datum/mind/rev_mind in head_revolutionaries)
for(var/datum/objective/objective in rev_mind.objectives)
for(var/datum/objective/mutiny/objective in rev_mind.objectives)
if(!(objective.check_completion()))
return 0
@@ -334,7 +334,7 @@
/datum/game_mode/revolution/proc/check_heads_victory()
for(var/datum/mind/rev_mind in head_revolutionaries)
var/turf/T = get_turf(rev_mind.current)
if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && T && (T.z == 1))
if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && rev_mind.current.client && T && (T.z == 1))
if(ishuman(rev_mind.current))
return 0
return 1
+3 -2
View File
@@ -174,7 +174,7 @@
ticker.mode.cult+=Z.mind
ticker.mode.update_cult_icons_added(Z.mind)
del(T)
Z << "<B>You are playing a Juggernaut. Though slow, you can withstand extreme punishment, and rip apart enemies and walls alike.</B>"
Z << "<B>You are playing a Juggernaut. Though slow, your shell can withstand extreme punishment and even deflect energy weapons, and rip apart enemies and walls alike.</B>"
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall(Z)
Z.cancel_camera()
@@ -206,12 +206,13 @@
ticker.mode.cult+=Z.mind
ticker.mode.update_cult_icons_added(Z.mind)
del(T)
Z << "<B>You are playing an Artificer. You are incredibly weak and fragile, but you are able to construct fortifications, repair allied constructs (by clicking on them), and even create new constructs</B>"
Z << "<B>You are playing an Artificer. You are incredibly weak and fragile, but you are able to construct fortifications, repair allied constructs (by clicking on them), </B><I>and most important of all create new constructs</I><B> (Use your Artificer spell to summon a new construct shell and Summon Soulstone to create a new soulstone).</B>"
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser(Z)
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/wall(Z)
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/floor(Z)
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/soulstone(Z)
Z.spell_list += new /obj/effect/proc_holder/spell/targeted/projectile/magic_missile/lesser(Z)
Z.cancel_camera()
del(C)
else
+8 -1
View File
@@ -80,6 +80,9 @@
dat += "<A href='byond://?src=\ref[src];spell_choice=horseman'>Curse of the Horseman</A> (15)<BR>"
dat += "<I>This spell will curse a person to wear an unremovable horse mask (it has glue on the inside) and speak like a horse. It does not require wizard garb.</I><BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=fleshtostone'>Flesh to Stone</A> (60)<BR>"
dat += "<I>This spell will curse a person to immediately turn into an unmoving statue. The effect will eventually wear off if the statue is not destroyed.</I><BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=summonguns'>Summon Guns</A> (One time use, global spell)<BR>"
dat += "<I>Nothing could possibly go wrong with arming a crew of lunatics just itching for an excuse to kill eachother. Just be careful not to get hit in the crossfire!</I><BR>"
@@ -147,7 +150,7 @@
uses--
/*
*/
var/list/available_spells = list(magicmissile = "Magic Missile", fireball = "Fireball", disintegrate = "Disintegrate", disabletech = "Disable Tech", smoke = "Smoke", blind = "Blind", mindswap = "Mind Transfer", forcewall = "Forcewall", blink = "Blink", teleport = "Teleport", mutate = "Mutate", etherealjaunt = "Ethereal Jaunt", knock = "Knock", horseman = "Curse of the Horseman", summonguns = "Summon Guns", staffchange = "Staff of Change", soulstone = "Six Soul Stone Shards and the spell Artificer", armor = "Mastercrafted Armor Set", staffanimate = "Staff of Animation")
var/list/available_spells = list(magicmissile = "Magic Missile", fireball = "Fireball", disintegrate = "Disintegrate", disabletech = "Disable Tech", smoke = "Smoke", blind = "Blind", mindswap = "Mind Transfer", forcewall = "Forcewall", blink = "Blink", teleport = "Teleport", mutate = "Mutate", etherealjaunt = "Ethereal Jaunt", knock = "Knock", horseman = "Curse of the Horseman", fleshtostone = "Flesh to Stone", summonguns = "Summon Guns", staffchange = "Staff of Change", soulstone = "Six Soul Stone Shards and the spell Artificer", armor = "Mastercrafted Armor Set", staffanimate = "Staff of Animation")
var/already_knows = 0
for(var/obj/effect/proc_holder/spell/aspell in H.spell_list)
if(available_spells[href_list["spell_choice"]] == aspell.name)
@@ -215,6 +218,10 @@
feedback_add_details("wizard_spell_learned","HH") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/targeted/horsemask(H)
temp = "You have learned curse of the horseman."
if("fleshtostone")
feedback_add_details("wizard_spell_learned","FS") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/targeted/inflict_handler/flesh_to_stone(H)
temp = "You have learned flesh to stone."
if("summonguns")
feedback_add_details("wizard_spell_learned","SG") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.rightandwrong()
+1 -2
View File
@@ -1,4 +1,3 @@
/datum/game_mode
var/list/datum/mind/wizards = list()
@@ -169,7 +168,7 @@
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(wizard_mob), slot_head)
if(wizard_mob.backbag == 2) wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(wizard_mob), slot_back)
if(wizard_mob.backbag == 3) wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(wizard_mob), slot_back)
wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/box(wizard_mob), slot_in_backpack)
wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(wizard_mob), slot_in_backpack)
// wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/scrying_gem(wizard_mob), slot_l_store) For scrying gem.
wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(wizard_mob), slot_r_store)
wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/spellbook(wizard_mob), slot_r_hand)
+14 -13
View File
@@ -66,20 +66,19 @@
popup.open()
Topic(href, href_list)
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
usr.set_machine(src)
if (href_list["start"])
src.on = !src.on
update_icon()
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount > 0)
src.current_temperature = min(T20C, src.current_temperature+amount)
else
src.current_temperature = max((T0C - 200), src.current_temperature+amount)
if(..())
return
usr.set_machine(src)
if (href_list["start"])
src.on = !src.on
update_icon()
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount > 0)
src.current_temperature = min(T20C, src.current_temperature+amount)
else
src.current_temperature = max((T0C - 200), src.current_temperature+amount)
src.updateUsrDialog()
src.add_fingerprint(usr)
return
process()
..()
@@ -150,6 +149,8 @@
onclose(user, "heater")
Topic(href, href_list)
if(..())
return
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
usr.set_machine(src)
if (href_list["start"])
+2 -1
View File
@@ -83,7 +83,8 @@
return
/obj/machinery/ai_slipper/Topic(href, href_list)
..()
if(..())
return
if (src.locked)
if (!istype(usr, /mob/living/silicon))
usr << "Control panel is locked!"
+39 -245
View File
@@ -1,28 +1,4 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/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
@@ -51,6 +27,20 @@
max1 = other.max1
max2 = other.max2
#define AALARM_MODE_SCRUBBING 1
#define AALARM_MODE_VENTING 2 //makes draught
#define AALARM_MODE_PANIC 3 //constantly sucks all air
#define AALARM_MODE_REPLACEMENT 4 //sucks off all air, then refill and swithes to scrubbing
#define AALARM_MODE_OFF 5
#define AALARM_SCREEN_MAIN 1
#define AALARM_SCREEN_VENT 2
#define AALARM_SCREEN_SCRUB 3
#define AALARM_SCREEN_MODE 4
#define AALARM_SCREEN_SENSORS 5
#define AALARM_REPORT_TIMEOUT 100
/obj/machinery/alarm
name = "alarm"
icon = 'icons/obj/monitors.dmi'
@@ -64,36 +54,19 @@
var/frequency = 1439
//var/skipprocess = 0 //Experimenting
var/alarm_frequency = 1437
#define AALARM_REPORT_TIMEOUT 100
var/datum/radio_frequency/radio_connection
var/locked = 1
var/datum/wires/alarm/wires = null
var/wiresexposed = 0 // If it's been screwdrivered open.
var/aidisabled = 0
var/AAlarmwires = 31
var/shorted = 0
var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone
// 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
#define AALARM_MODE_PANIC 3 //constantly sucks all air
#define AALARM_MODE_REPLACEMENT 4 //sucks off all air, then refill and swithes to scrubbing
#define AALARM_MODE_OFF 5
var/mode = AALARM_MODE_SCRUBBING
#define AALARM_SCREEN_MAIN 1
#define AALARM_SCREEN_VENT 2
#define AALARM_SCREEN_SCRUB 3
#define AALARM_SCREEN_MODE 4
#define AALARM_SCREEN_SENSORS 5
var/screen = AALARM_SCREEN_MAIN
var/area_uid
var/area/alarm_area
@@ -145,6 +118,7 @@
/obj/machinery/alarm/New(nloc, ndir, nbuild)
..()
wires = new(src)
if(nloc)
loc = nloc
@@ -165,6 +139,8 @@
name = "[alarm_area.name] Air Alarm"
update_icon()
if(ticker && ticker.current_state == 3)//if the game is running
src.initialize()
/obj/machinery/alarm/initialize()
set_frequency(frequency)
@@ -201,31 +177,6 @@
user << browse(null, "window=air_alarm")
return
if(wiresexposed && (!istype(user, /mob/living/silicon)))
var/t1 = text("<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>")
user << browse(t1, "window=AAlarmwires")
onclose(user, "AAlarmwires")
if(!shorted)
//user << browse(return_text(),"window=air_alarm")
//onclose(user, "air_alarm")
@@ -235,135 +186,11 @@
popup.open()
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()
update_icon()
if(wiresexposed && (!istype(user, /mob/living/silicon)))
wires.Interact(user)
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"
update_icon()
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
@@ -695,40 +522,14 @@ table tr:first-child th:first-child { border: none;}
/obj/machinery/alarm/Topic(href, href_list)
if(..())
return
src.add_fingerprint(usr)
usr.set_machine(src)
if ( (get_dist(src, usr) > 1 ))
if (!istype(usr, /mob/living/silicon))
usr.unset_machine()
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.get_active_hand(), /obj/item/weapon/wirecutters) ))
usr << "You need wirecutters!"
return
if (src.isWireColorCut(t1))
src.mend(t1)
else
src.cut(t1)
spawn(1)
src.updateUsrDialog()
else if (href_list["pulse"])
var/t1 = text2num(href_list["pulse"])
if (!istype(usr.get_active_hand(), /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)
spawn(1)
src.updateUsrDialog()
if(href_list["command"])
@@ -988,7 +789,7 @@ table tr:first-child th:first-child { border: none;}
if(stat & (NOPOWER|BROKEN))
user << "It does nothing"
else
if(src.allowed(usr) && !isWireCut(AALARM_WIRE_IDSCAN))
if(src.allowed(usr) && !wires.IsIndexCut(AALARM_WIRE_IDSCAN))
locked = !locked
user << "\blue You [ locked ? "lock" : "unlock"] the Air Alarm interface."
src.updateUsrDialog()
@@ -1313,35 +1114,27 @@ FIRE ALARM
return
/obj/machinery/firealarm/Topic(href, href_list)
..()
if (usr.stat || stat & (BROKEN|NOPOWER))
if(..())
return
if (buildstage != 2)
return
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
if (href_list["reset"])
src.reset()
else if (href_list["alarm"])
src.alarm()
else if (href_list["time"])
src.timing = text2num(href_list["time"])
last_process = world.timeofday
processing_objects.Add(src)
else if (href_list["tp"])
var/tp = text2num(href_list["tp"])
src.time += tp
src.time = min(max(round(src.time), 0), 120)
usr.set_machine(src)
if (href_list["reset"])
src.reset()
else if (href_list["alarm"])
src.alarm()
else if (href_list["time"])
src.timing = text2num(href_list["time"])
last_process = world.timeofday
processing_objects.Add(src)
else if (href_list["tp"])
var/tp = text2num(href_list["tp"])
src.time += tp
src.time = min(max(round(src.time), 0), 120)
src.updateUsrDialog()
src.add_fingerprint(usr)
else
usr << browse(null, "window=firealarm")
return
return
src.updateUsrDialog()
/obj/machinery/firealarm/proc/reset()
if (!( src.working ))
@@ -1533,7 +1326,8 @@ Code shamelessly copied from apc_frame
return
/obj/machinery/partyalarm/Topic(href, href_list)
..()
if(..())
return
if (usr.stat || stat & (BROKEN|NOPOWER))
return
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
+2 -1
View File
@@ -132,8 +132,9 @@ Auto Patrol: []"},
return
/obj/machinery/bot/secbot/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
src.add_fingerprint(usr)
if((href_list["power"]) && (src.allowed(usr)))
if(src.on)
turn_off()
+14 -35
View File
@@ -249,32 +249,10 @@
return 1
/obj/machinery/computer/HolodeckControl/proc/togglePower(var/toggleOn = 0)
if(toggleOn)
var/area/targetsource = locate(/area/holodeck/source_emptycourt)
holographic_items = targetsource.copy_contents_to(linkedholodeck)
spawn(30)
for(var/obj/effect/landmark/L in linkedholodeck)
if(L.name=="Atmospheric Test Start")
spawn(20)
var/turf/T = get_turf(L)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, T)
s.start()
if(T)
T.temperature = 5000
T.hotspot_expose(50000,50000,1)
active = 1
else
for(var/item in holographic_items)
derez(item)
var/area/targetsource = locate(/area/holodeck/source_plating)
targetsource.copy_contents_to(linkedholodeck , 1)
active = 0
/obj/machinery/computer/HolodeckControl/power_change()
..()
if(stat & NOPOWER)
emergencyShutdown()
/obj/machinery/computer/HolodeckControl/proc/loadProgram(var/area/A)
@@ -320,16 +298,17 @@
/obj/machinery/computer/HolodeckControl/proc/emergencyShutdown()
//Get rid of any items
for(var/item in holographic_items)
derez(item)
//Turn it back to the regular non-holographic room
target = locate(/area/holodeck/source_plating)
if(target)
loadProgram(target)
if(!istype(target,/area/holodeck/source_plating))
//Get rid of any items
for(var/item in holographic_items)
derez(item)
//Turn it back to the regular non-holographic room
target = locate(/area/holodeck/source_plating)
if(target)
loadProgram(target)
var/area/targetsource = locate(/area/holodeck/source_plating)
targetsource.copy_contents_to(linkedholodeck , 1)
var/area/targetsource = locate(/area/holodeck/source_plating)
targetsource.copy_contents_to(linkedholodeck , 1)
active = 0
+12 -8
View File
@@ -111,10 +111,11 @@
usr << "Added a freeform law."
if(istype(P, /obj/item/device/mmi))
if(!P:brainmob)
var/obj/item/device/mmi/M = P
if(!M.brainmob)
user << "\red Sticking an empty MMI into the frame would sort of defeat the purpose."
return
if(P:brainmob.stat == 2)
if(M.brainmob.stat == 2)
user << "\red Sticking a dead brain into the frame would sort of defeat the purpose."
return
@@ -122,17 +123,20 @@
user << "\red This MMI does not seem to fit."
return
if(jobban_isbanned(P:brainmob, "AI"))
if(jobban_isbanned(M.brainmob, "AI"))
user << "\red This MMI does not seem to fit."
return
if(P:brainmob.mind)
ticker.mode.remove_cultist(P:brainmob.mind, 1)
ticker.mode.remove_revolutionary(P:brainmob.mind, 1)
if(!M.brainmob.mind)
user << "\red This MMI is mindless."
return
ticker.mode.remove_cultist(M.brainmob.mind, 1)
ticker.mode.remove_revolutionary(M.brainmob.mind, 1)
user.drop_item()
P.loc = src
brain = P
M.loc = src
brain = M
usr << "Added a brain."
icon_state = "3b"
+2 -1
View File
@@ -118,7 +118,8 @@
popup.open()
/obj/machinery/power/monitor/Topic(href, href_list)
..()
if(..())
return
if( href_list["close"] )
usr << browse(null, "window=powcomp")
usr.unset_machine()
@@ -70,11 +70,12 @@
/obj/machinery/computer/syndicate_station/Topic(href, href_list)
if(!isliving(usr)) return
if(..())
return
var/mob/living/user = usr
if(in_range(src, user) || istype(user, /mob/living/silicon))
user.set_machine(src)
user.set_machine(src)
if(href_list["syndicate"])
syndicate_move_to(/area/syndicate_station/start)
@@ -95,7 +96,6 @@
else if(href_list["mining"])
syndicate_move_to(/area/syndicate_station/mining)
add_fingerprint(usr)
updateUsrDialog()
return
+11 -12
View File
@@ -128,19 +128,18 @@
/obj/machinery/atmospherics/unary/cryo_cell/Topic(href, href_list)
if((get_dist(src, usr) <= 1) || istype(usr, /mob/living/silicon/ai))
if(href_list["start"])
on = !on
update_icon()
if(href_list["eject"])
if(beaker)
var/obj/item/weapon/reagent_containers/glass/B = beaker
B.loc = get_step(loc, SOUTH)
beaker = null
updateUsrDialog()
add_fingerprint(usr)
if(..())
return
if(href_list["start"])
on = !on
update_icon()
if(href_list["eject"])
if(beaker)
var/obj/item/weapon/reagent_containers/glass/B = beaker
B.loc = get_step(loc, SOUTH)
beaker = null
updateUsrDialog()
/obj/machinery/atmospherics/unary/cryo_cell/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/reagent_containers/glass))
+39 -40
View File
@@ -23,11 +23,10 @@
density = 1
/obj/machinery/flasher/New()
if(isnull(bulb))
bulb = new /obj/item/device/flash(src)
bulb = new /obj/item/device/flash(src)
/obj/machinery/flasher/power_change()
if ( powered() && bulb && anchored)
if (powered() && bulb && anchored)
stat &= ~NOPOWER
if(bulb.broken)
icon_state = "[base_state]1-p"
@@ -38,44 +37,43 @@
icon_state = "[base_state]1-p"
//Don't want to render prison breaks impossible
/obj/machinery/flasher/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/flasher/attackby(obj/item/weapon/W, mob/user)
if (istype(W, /obj/item/weapon/wirecutters))
add_fingerprint(user)
if (bulb)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user.visible_message("<span class='warning'>[user] has disconnected [src]'s flashbulb!</span>", "<span class='notice'>You disconnect [src]'s flashbulb!</span>")
bulb.loc = src.loc
bulb = null
src.power_change()
power_change()
if (istype(W, /obj/item/device/flash))
add_fingerprint(user)
if (isnull(bulb))
else if (istype(W, /obj/item/device/flash))
if (!bulb)
user.visible_message("<span class='notice'>[user] installs [W] into [src].</span>", "<span class='notice'>You install [W] into [src].</span>")
user.drop_item()
W.loc = src
bulb = W
src.power_change()
power_change()
else
user << "<span class='notice'>A flashbulb is already installed in [src].</span>"
add_fingerprint(user)
//Let the AI trigger them directly.
/obj/machinery/flasher/attack_ai()
if (src.anchored)
return src.flash()
if (anchored)
return flash()
else
return
/obj/machinery/flasher/proc/flash()
if (!(powered()) || (isnull(bulb)))
if (!powered() || !bulb)
return
if ((bulb.broken) || (src.last_flash && world.time < src.last_flash + 150))
if (bulb.broken || (last_flash && world.time < src.last_flash + 150))
return
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
flick("[base_state]_flash", src)
src.last_flash = world.time
last_flash = world.time
use_power(1000)
for (var/mob/O in viewers(src, null))
@@ -98,63 +96,64 @@
if(!O.blinded)
flick("flash", O:flash)
O.eye_stat += rand(0, 2)
return 1
/obj/machinery/flasher/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
if(prob(75/severity))
if(bulb && prob(75/severity))
flash()
bulb.broken = 1
bulb.icon_state = "flashburnt"
src.power_change()
power_change()
..(severity)
/obj/machinery/flasher/portable/HasProximity(atom/movable/AM as mob|obj)
if (src.last_flash && world.time < src.last_flash + 150)
/obj/machinery/flasher/portable/HasProximity(atom/movable/AM)
if (last_flash && world.time < last_flash + 150)
return
if(istype(AM, /mob/living/carbon))
var/mob/living/carbon/M = AM
if ((M.m_intent != "walk") && (src.anchored))
src.flash()
if (M.m_intent != "walk" && anchored)
flash()
/obj/machinery/flasher/portable/flash()
..()
if(!..())
return
if(prob(4)) //Small chance to burn out on use
bulb.broken = 1
bulb.icon_state = "flashburnt"
src.power_change()
power_change()
/obj/machinery/flasher/portable/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/flasher/portable/attackby(obj/item/weapon/W, mob/user)
if (istype(W, /obj/item/weapon/wrench))
add_fingerprint(user)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
src.anchored = !src.anchored
anchored = !anchored
if (!src.anchored)
if (!anchored)
user.show_message(text("\red [src] can now be moved."))
src.overlays.Cut()
src.power_change()
overlays.Cut()
power_change()
else if (src.anchored)
else if (anchored)
user.show_message(text("\red [src] is now secured."))
src.overlays += "[base_state]-s"
src.power_change()
overlays += "[base_state]-s"
power_change()
else
..()
/obj/machinery/flasher_button/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/flasher_button/attack_ai(mob/user)
return attack_hand(user)
/obj/machinery/flasher_button/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/flasher_button/attack_paw(mob/user)
return attack_hand(user)
/obj/machinery/flasher_button/attackby(obj/item/weapon/W, mob/user as mob)
return src.attack_hand(user)
/obj/machinery/flasher_button/attackby(obj/item/weapon/W, mob/user)
return attack_hand(user)
/obj/machinery/flasher_button/attack_hand(mob/user as mob)
/obj/machinery/flasher_button/attack_hand(mob/user)
if(stat & (NOPOWER|BROKEN))
return
@@ -167,7 +166,7 @@
icon_state = "launcheract"
for(var/obj/machinery/flasher/M in world)
if(M.id == src.id)
if(M.id == id)
spawn()
M.flash()
+1 -2
View File
@@ -275,10 +275,9 @@
onclose(user, "magnet")
Topic(href, href_list)
if(stat & (BROKEN|NOPOWER))
if(..())
return
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["radio-op"])
+40 -42
View File
@@ -181,63 +181,61 @@ Transponder Codes:<UL>"}
return
Topic(href, href_list)
..()
if (usr.stat)
if(..())
return
if ((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
if(open && !locked)
usr.set_machine(src)
if(open && !locked)
usr.set_machine(src)
if (href_list["freq"])
freq = sanitize_frequency(freq + text2num(href_list["freq"]))
if (href_list["freq"])
freq = sanitize_frequency(freq + text2num(href_list["freq"]))
updateDialog()
else if(href_list["locedit"])
var/newloc = copytext(sanitize(input("Enter New Location", "Navigation Beacon", location) as text|null),1,MAX_MESSAGE_LEN)
if(newloc)
location = newloc
updateDialog()
else if(href_list["locedit"])
var/newloc = copytext(sanitize(input("Enter New Location", "Navigation Beacon", location) as text|null),1,MAX_MESSAGE_LEN)
if(newloc)
location = newloc
updateDialog()
else if(href_list["edit"])
var/codekey = href_list["code"]
else if(href_list["edit"])
var/codekey = href_list["code"]
var/newkey = input("Enter Transponder Code Key", "Navigation Beacon", codekey) as text|null
if(!newkey)
return
var/newkey = input("Enter Transponder Code Key", "Navigation Beacon", codekey) as text|null
if(!newkey)
return
var/codeval = codes[codekey]
var/newval = input("Enter Transponder Code Value", "Navigation Beacon", codeval) as text|null
if(!newval)
newval = codekey
return
var/codeval = codes[codekey]
var/newval = input("Enter Transponder Code Value", "Navigation Beacon", codeval) as text|null
if(!newval)
newval = codekey
return
codes.Remove(codekey)
codes[newkey] = newval
codes.Remove(codekey)
codes[newkey] = newval
updateDialog()
updateDialog()
else if(href_list["delete"])
var/codekey = href_list["code"]
codes.Remove(codekey)
updateDialog()
else if(href_list["delete"])
var/codekey = href_list["code"]
codes.Remove(codekey)
updateDialog()
else if(href_list["add"])
else if(href_list["add"])
var/newkey = input("Enter New Transponder Code Key", "Navigation Beacon") as text|null
if(!newkey)
return
var/newkey = input("Enter New Transponder Code Key", "Navigation Beacon") as text|null
if(!newkey)
return
var/newval = input("Enter New Transponder Code Value", "Navigation Beacon") as text|null
if(!newval)
newval = "1"
return
var/newval = input("Enter New Transponder Code Value", "Navigation Beacon") as text|null
if(!newval)
newval = "1"
return
if(!codes)
codes = new()
if(!codes)
codes = new()
codes[newkey] = newval
codes[newkey] = newval
updateDialog()
updateDialog()
+24 -30
View File
@@ -116,45 +116,39 @@
Topic(href, href_list)
if (usr.stat)
if(..())
return
if ((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
usr.set_machine(src)
switch(href_list["op"])
switch(href_list["op"])
if("temp")
var/value = text2num(href_list["val"])
if("temp")
var/value = text2num(href_list["val"])
// limit to 20-90 degC
set_temperature = dd_range(20, 90, set_temperature + value)
// limit to 20-90 degC
set_temperature = dd_range(20, 90, set_temperature + value)
if("cellremove")
if(open && cell && !usr.get_active_hand())
cell.updateicon()
usr.put_in_hands(cell)
cell.add_fingerprint(usr)
cell = null
usr.visible_message("\blue [usr] removes the power cell from \the [src].", "\blue You remove the power cell from \the [src].")
if("cellremove")
if(open && cell && !usr.get_active_hand())
cell.updateicon()
usr.put_in_hands(cell)
cell.add_fingerprint(usr)
cell = null
usr.visible_message("\blue [usr] removes the power cell from \the [src].", "\blue You remove the power cell from \the [src].")
if("cellinstall")
if(open && !cell)
var/obj/item/weapon/cell/C = usr.get_active_hand()
if(istype(C))
usr.drop_item()
cell = C
C.loc = src
C.add_fingerprint(usr)
if("cellinstall")
if(open && !cell)
var/obj/item/weapon/cell/C = usr.get_active_hand()
if(istype(C))
usr.drop_item()
cell = C
C.loc = src
C.add_fingerprint(usr)
usr.visible_message("\blue [usr] inserts a power cell into \the [src].", "\blue You insert the power cell into \the [src].")
updateDialog()
else
usr << browse(null, "window=spaceheater")
usr.unset_machine()
return
usr.visible_message("\blue [usr] inserts a power cell into \the [src].", "\blue You insert the power cell into \the [src].")
updateDialog()
process()
+2 -1
View File
@@ -39,6 +39,8 @@
onclose(user, "syndbeacon")
Topic(href, href_list)
if(..())
return
if(href_list["betraitor"])
if(charges < 1)
src.updateUsrDialog()
@@ -90,7 +92,6 @@
M << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
obj_count++
src.add_fingerprint(usr)
src.updateUsrDialog()
return
@@ -277,14 +277,13 @@
/obj/machinery/telecomms/Topic(href, href_list)
if(..())
return
if(!issilicon(usr))
if(!istype(usr.get_active_hand(), /obj/item/device/multitool))
return
if(stat & (BROKEN|NOPOWER))
return
var/obj/item/device/multitool/P = get_multitool(usr)
if(href_list["input"])
@@ -386,7 +385,6 @@
src.Options_Topic(href, href_list)
usr.set_machine(src)
src.add_fingerprint(usr)
updateUsrDialog()
+2 -2
View File
@@ -84,7 +84,7 @@
if (M.timeofdeath + 6000 < world.time)
continue
var/turf/T = get_turf(M)
if(T) continue
if(!T) continue
if(T.z == 2) continue
var/tmpname = M.real_name
if(areaindex[tmpname])
@@ -368,4 +368,4 @@
if(com)
com.icon_state = "tele0"
else
icon_state = "controller"
icon_state = "controller"
+8 -8
View File
@@ -434,18 +434,18 @@
/obj/machinery/turretid/Topic(href, href_list)
..()
if(..())
return
if (src.locked)
if (!istype(usr, /mob/living/silicon))
usr << "Control panel is locked!"
return
if ( get_dist(src, usr) == 0 || issilicon(usr))
if (href_list["toggleOn"])
src.enabled = !src.enabled
src.updateTurrets()
else if (href_list["toggleLethal"])
src.lethal = !src.lethal
src.updateTurrets()
if (href_list["toggleOn"])
src.enabled = !src.enabled
src.updateTurrets()
else if (href_list["toggleLethal"])
src.lethal = !src.lethal
src.updateTurrets()
src.attack_hand(usr)
/obj/machinery/turretid/proc/updateTurrets()
+45 -51
View File
@@ -203,9 +203,7 @@
/obj/machinery/vending/Topic(href, href_list)
if(stat & (BROKEN|NOPOWER))
return
if(usr.stat || usr.restrained())
if(..())
return
@@ -232,59 +230,55 @@
coin = null
if((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))))
usr.set_machine(src)
if((href_list["vend"]) && (vend_ready))
usr.set_machine(src)
if((href_list["vend"]) && (vend_ready))
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
usr << "<span class='warning'>Access denied.</span>" //Unless emagged of course
flick(icon_deny,src)
return
vend_ready = 0 //One thing at a time!!
var/datum/data/vending_product/R = locate(href_list["vend"])
if(!R || !istype(R) || !R.product_path || R.amount <= 0)
vend_ready = 1
return
if(R in coin_records)
if(!coin)
usr << "<span class='notice'>You need to insert a coin to get this item.</span>"
return
if(coin.string_attached)
if(prob(50))
usr << "<span class='notice'>You successfully pull the coin out before [src] could swallow it.</span>"
else
usr << "<span class='notice'>You weren't able to pull the coin out fast enough, the machine ate it, string and all.</span>"
del(coin)
else
del(coin)
R.amount--
if(((last_reply + (vend_delay + 200)) <= world.time) && vend_reply)
speak(vend_reply)
last_reply = world.time
use_power(5)
if(icon_vend) //Show the vending animation if needed
flick(icon_vend,src)
spawn(vend_delay)
new R.product_path(get_turf(src))
vend_ready = 1
return
updateUsrDialog()
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
usr << "<span class='warning'>Access denied.</span>" //Unless emagged of course
flick(icon_deny,src)
return
else if(href_list["togglevoice"] && panel_open)
shut_up = !shut_up
vend_ready = 0 //One thing at a time!!
var/datum/data/vending_product/R = locate(href_list["vend"])
if(!R || !istype(R) || !R.product_path || R.amount <= 0)
vend_ready = 1
return
if(R in coin_records)
if(!coin)
usr << "<span class='notice'>You need to insert a coin to get this item.</span>"
return
if(coin.string_attached)
if(prob(50))
usr << "<span class='notice'>You successfully pull the coin out before [src] could swallow it.</span>"
else
usr << "<span class='notice'>You weren't able to pull the coin out fast enough, the machine ate it, string and all.</span>"
del(coin)
else
del(coin)
R.amount--
if(((last_reply + (vend_delay + 200)) <= world.time) && vend_reply)
speak(vend_reply)
last_reply = world.time
use_power(5)
if(icon_vend) //Show the vending animation if needed
flick(icon_vend,src)
spawn(vend_delay)
new R.product_path(get_turf(src))
vend_ready = 1
return
add_fingerprint(usr)
updateUsrDialog()
else
usr << browse(null, "window=vending")
return
else if(href_list["togglevoice"] && panel_open)
shut_up = !shut_up
updateUsrDialog()
/obj/machinery/vending/process()
+3 -1
View File
@@ -1,6 +1,6 @@
/turf/simulated/floor/mech_bay_recharge_floor
name = "Mech Bay Recharge Station"
icon = 'icons/mecha/mech_bay.dmi'
icon = 'icons/turf/floors.dmi'
icon_state = "recharge_floor"
var/obj/machinery/mech_bay_recharge_port/recharge_port
var/obj/machinery/computer/mech_bay_power_console/recharge_console
@@ -208,6 +208,8 @@
Topic(href, href_list)
if(..())
return
if(href_list["autostart"])
autostart = !autostart
if(href_list["voltage"])
+2 -1
View File
@@ -598,7 +598,8 @@
/obj/machinery/mecha_part_fabricator/Topic(href, href_list)
..()
if(..())
return
var/datum/topic_input/filter = new /datum/topic_input(href,href_list)
if(href_list["part_set"])
var/tpart_set = filter.getStr("part_set")
+12 -9
View File
@@ -132,15 +132,6 @@
/obj/item/attack_paw(mob/user as mob)
if(isalien(user)) // -- TLE
var/mob/living/carbon/alien/A = user
if(!A.has_fine_manipulation || w_class >= 4)
if(src in A.contents) // To stop Aliens having items stuck in their pockets
A.drop_from_inventory(src)
user << "Your claws aren't capable of such fine manipulation."
return
if (istype(src.loc, /obj/item/weapon/storage))
for(var/mob/M in range(1, src.loc))
if (M.s_active == src.loc)
@@ -163,6 +154,18 @@
user.put_in_active_hand(src)
return
/obj/item/attack_alien(mob/user as mob)
var/mob/living/carbon/alien/A = user
if(!A.has_fine_manipulation || w_class >= 4)
if(src in A.contents) // To stop Aliens having items stuck in their pockets
A.drop_from_inventory(src)
user << "Your claws aren't capable of such fine manipulation."
return
attack_paw(A)
// Due to storage type consolidation this should get used more now.
// I have cleaned it up a little, but it could probably use more. -Sayu
/obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob)
+70 -69
View File
@@ -13,82 +13,83 @@
light(var/flavor_text = "\red [usr] lights the [name].")
/obj/item/candle/update_icon()
var/i
if(wax>150)
i = 1
else if(wax>80)
i = 2
else i = 3
icon_state = "candle[i][lit ? "_lit" : ""]"
/obj/item/candle/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool
light("\red [user] casually lights the [name] with [W], what a badass.")
else if(istype(W, /obj/item/weapon/lighter))
var/obj/item/weapon/lighter/L = W
if(L.lit)
light()
else if(istype(W, /obj/item/weapon/match))
var/obj/item/weapon/match/M = W
if(M.lit)
light()
else if(istype(W, /obj/item/candle))
var/obj/item/candle/C = W
if(C.lit)
light()
else if(istype(W, /obj/item/clothing/mask/cigarette))
var/obj/item/clothing/mask/cigarette/M = W
if(M.lit)
light()
/obj/item/candle/light(var/flavor_text = "\red [usr] lights the [name].")
if(!src.lit)
src.lit = 1
//src.damtype = "fire"
for(var/mob/O in viewers(usr, null))
O.show_message(flavor_text, 1)
SetLuminosity(CANDLE_LUMINOSITY)
processing_objects.Add(src)
/obj/item/candle/process()
if(!lit)
return
wax--
if(!wax)
new/obj/item/trash/candle(src.loc)
if(istype(src.loc, /mob))
var/mob/M = src.loc
M.before_take_item(src)
del(src)
update_icon()
var/i
if(wax>150)
i = 1
else if(wax>80)
i = 2
else i = 3
icon_state = "candle[i][lit ? "_lit" : ""]"
if(istype(loc, /turf)) //start a fire if possible
var/turf/T = loc
T.hotspot_expose(700, 5)
attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool
light("\red [user] casually lights the [name] with [W], what a badass.")
else if(istype(W, /obj/item/weapon/lighter))
var/obj/item/weapon/lighter/L = W
if(L.lit)
light()
else if(istype(W, /obj/item/weapon/match))
var/obj/item/weapon/match/M = W
if(M.lit)
light()
else if(istype(W, /obj/item/candle))
var/obj/item/candle/C = W
if(C.lit)
light()
else if(istype(W, /obj/item/clothing/mask/cigarette))
var/obj/item/clothing/mask/cigarette/M = W
if(M.lit)
light()
light(var/flavor_text = "\red [usr] lights the [name].")
if(!src.lit)
src.lit = 1
//src.damtype = "fire"
for(var/mob/O in viewers(usr, null))
O.show_message(flavor_text, 1)
SetLuminosity(CANDLE_LUMINOSITY)
processing_objects.Add(src)
process()
if(!lit)
return
wax--
if(!wax)
new/obj/item/trash/candle(src.loc)
if(istype(src.loc, /mob))
src.dropped()
del(src)
/obj/item/candle/attack_self(mob/user as mob)
if(lit)
lit = 0
update_icon()
if(istype(loc, /turf)) //start a fire if possible
var/turf/T = loc
T.hotspot_expose(700, 5)
SetLuminosity(0)
user.SetLuminosity(user.luminosity - CANDLE_LUMINOSITY)
attack_self(mob/user as mob)
if(lit)
lit = 0
update_icon()
SetLuminosity(0)
user.SetLuminosity(user.luminosity - CANDLE_LUMINOSITY)
/obj/item/candle/pickup(mob/user)
if(lit)
SetLuminosity(0)
user.SetLuminosity(user.luminosity + CANDLE_LUMINOSITY)
pickup(mob/user)
if(lit)
SetLuminosity(0)
user.SetLuminosity(user.luminosity + CANDLE_LUMINOSITY)
dropped(mob/user)
if(lit)
user.SetLuminosity(user.luminosity - CANDLE_LUMINOSITY)
SetLuminosity(CANDLE_LUMINOSITY)
/obj/item/candle/dropped(mob/user)
if(lit)
user.SetLuminosity(user.luminosity - CANDLE_LUMINOSITY)
SetLuminosity(CANDLE_LUMINOSITY)
#undef CANDLE_LUMINOSITY
+13 -12
View File
@@ -60,8 +60,7 @@
New()
..()
spawn(5)
radio = new /obj/item/radio/integrated/beepsky(src)
radio = new /obj/item/radio/integrated/beepsky(src)
detective
name = "D.E.T.E.C.T. Cartridge"
@@ -70,6 +69,9 @@
access_medical = 1
access_manifest = 1
New()
..()
radio = new /obj/item/radio/integrated/beepsky(src)
janitor
name = "CustodiPRO Cartridge"
@@ -113,8 +115,7 @@
New()
..()
spawn(5)
radio = new /obj/item/radio/integrated/signal(src)
radio = new /obj/item/radio/integrated/signal(src)
@@ -126,8 +127,7 @@
New()
..()
spawn(5)
radio = new /obj/item/radio/integrated/mule(src)
radio = new /obj/item/radio/integrated/mule(src)
head
name = "Easy-Record DELUXE"
@@ -146,8 +146,7 @@
New()
..()
spawn(5)
radio = new /obj/item/radio/integrated/mule(src)
radio = new /obj/item/radio/integrated/mule(src)
hos
name = "R.O.B.U.S.T. DELUXE"
@@ -158,8 +157,7 @@
New()
..()
spawn(5)
radio = new /obj/item/radio/integrated/beepsky(src)
radio = new /obj/item/radio/integrated/beepsky(src)
ce
name = "Power-On DELUXE"
@@ -187,8 +185,7 @@
New()
..()
spawn(5)
radio = new /obj/item/radio/integrated/signal(src)
radio = new /obj/item/radio/integrated/signal(src)
captain
name = "Value-PAK Cartridge"
@@ -202,6 +199,10 @@
access_status_display = 1
access_atmos = 1
New()
..()
radio = new /obj/item/radio/integrated/beepsky(src)
syndicate
name = "Detomatix Cartridge"
icon_state = "cart"
+46 -1
View File
@@ -17,4 +17,49 @@
m_amt = 50
g_amt = 20
origin_tech = "magnets=1;engineering=1"
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
// Syndicate device disguised as a multitool; it will turn red when an AI camera is nearby.
/obj/item/device/multitool/ai_detect
var/track_delay = 0
/obj/item/device/multitool/ai_detect/New()
..()
processing_objects += src
/obj/item/device/multitool/ai_detect/Del()
processing_objects -= src
..()
/obj/item/device/multitool/ai_detect/process()
if(track_delay > world.time)
return
var/found_eye = 0
var/turf/our_turf = get_turf(src)
if(cameranet.chunkGenerated(our_turf.x, our_turf.y, our_turf.z))
var/datum/camerachunk/chunk = cameranet.getCameraChunk(our_turf.x, our_turf.y, our_turf.z)
if(chunk)
if(chunk.seenby.len)
for(var/mob/camera/aiEye/A in chunk.seenby)
var/turf/eye_turf = get_turf(A)
if(get_dist(our_turf, eye_turf) < 8)
found_eye = 1
break
if(found_eye)
icon_state = "[initial(icon_state)]_red"
else
icon_state = initial(icon_state)
track_delay = world.time + 10 // 1 second
return
@@ -301,17 +301,12 @@
del(src)
..()
/obj/item/weapon/shard/HasEntered(AM as mob|obj)
if(ismob(AM))
/obj/item/weapon/shard/HasEntered(var/mob/AM)
if(istype(AM))
playsound(loc, 'sound/effects/glass_step.ogg', 50, 1)
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
if(!H.shoes)
H << "<span class='userdanger'>You step in the broken glass!</span>"
var/datum/limb/affecting = H.get_organ(pick("l_leg", "r_leg"))
H.Weaken(3)
if(affecting.take_damage(5, 0))
H.update_damage_overlays(0)
H.updatehealth()
..()
H.apply_damage(5,BRUTE,(pick("l_leg", "r_leg")))
H.Weaken(3)
+7 -1
View File
@@ -73,4 +73,10 @@
"<span class='notice'>You throw [src]. It lands on [result]. [comment]</span>", \
"<span class='notice'>You hear [src] landing on [result]. [comment]</span>")
else if(src.throwing == 0) //Dice was thrown and is coming to rest
src.loc.visible_message("<span class='notice'>[src] rolls to a stop, landing on [result]. [comment]</span>")
src.loc.visible_message("<span class='notice'>[src] rolls to a stop, landing on [result]. [comment]</span>")
/obj/item/weapon/dice/d4/HasEntered(var/mob/living/carbon/human/H)
if(istype(H) && !H.shoes)
H << "<span class='userdanger'>You step on the D4!</span>"
H.apply_damage(4,BRUTE,(pick("l_leg", "r_leg")))
H.Weaken(3)
@@ -54,24 +54,24 @@
Topic(href, href_list)
if((get_dist(src, usr) <= 1) || istype(usr, /mob/living/silicon/ai))
if(href_list["implant"])
if(src.occupant)
injecting = 1
go_out()
ready = 0
spawn(injection_cooldown)
ready = 1
if(href_list["replenish"])
if(..())
return
if(href_list["implant"])
if(src.occupant)
injecting = 1
go_out()
ready = 0
spawn(replenish_cooldown)
add_implants()
spawn(injection_cooldown)
ready = 1
src.updateUsrDialog()
src.add_fingerprint(usr)
return
if(href_list["replenish"])
ready = 0
spawn(replenish_cooldown)
add_implants()
ready = 1
src.updateUsrDialog()
return
attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
@@ -345,6 +345,8 @@
close(M)
add_fingerprint(user)
/obj/item/weapon/storage/attack_paw(mob/user)
return attack_hand(user)
/obj/item/weapon/storage/verb/toggle_gathering_mode()
set name = "Switch Gathering Method"
+1 -1
View File
@@ -113,7 +113,7 @@
item_state = "cutters_yellow"
/obj/item/weapon/wirecutters/attack(mob/living/carbon/C, mob/user)
if(C.handcuffed && istype(C.handcuffed, /obj/item/weapon/handcuffs/cable))
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/weapon/handcuffs/cable))
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
C.handcuffed.loc = null //garbage collector awaaaaay
C.handcuffed = null
@@ -218,7 +218,7 @@
return 0
if(!isturf(O.loc))
return 0
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis)
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.lying)
return 0
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1))
return 0
@@ -0,0 +1,150 @@
/obj/structure/closet/statue
name = "statue"
desc = "An incredibly lifelike marble carving"
icon = 'icons/obj/statue.dmi'
icon_state = "human_male"
density = 1
anchored = 1
flags = FPRINT
health = 0 //destroying the statue kills the mob within
var/intialTox = 0 //these are here to keep the mob from taking damage from things that logically wouldn't affect a rock
var/intialFire = 0 //it's a little sloppy I know but it was this or the GODMODE flag. Lesser of two evils.
var/intialBrute = 0
var/intialOxy = 0
var/timer = 240 //eventually the person will be freed
/obj/structure/closet/statue/New(loc, var/mob/living/L)
if(ishuman(L) || ismonkey(L) || iscorgi(L))
if(L.buckled)
L.buckled = 0
L.anchored = 0
if(L.client)
L.client.perspective = EYE_PERSPECTIVE
L.client.eye = src
L.loc = src
L.sdisabilities += MUTE
health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
intialTox = L.getToxLoss()
intialFire = L.getFireLoss()
intialBrute = L.getBruteLoss()
intialOxy = L.getOxyLoss()
if(ishuman(L))
name = "statue of [L.name]"
if(L.gender == "female")
icon_state = "human_female"
else if(ismonkey(L))
name = "statue of a monkey"
icon_state = "monkey"
else if(iscorgi(L))
name = "statue of a corgi"
icon_state = "corgi"
desc = "If it takes forever, I will wait for you..."
if(health == 0) //meaning if the statue didn't find a valid target
del(src)
return
processing_objects.Add(src)
..()
/obj/structure/closet/statue/process()
timer--
for(var/mob/living/M in src) //Go-go gadget stasis field
M.setToxLoss(intialTox)
M.adjustFireLoss(intialFire - M.getFireLoss())
M.adjustBruteLoss(intialBrute - M.getBruteLoss())
M.setOxyLoss(intialOxy)
if (timer <= 0)
dump_contents()
processing_objects.Remove(src)
del(src)
/obj/structure/closet/statue/dump_contents()
for(var/obj/O in src)
O.loc = src.loc
for(var/mob/living/M in src)
M.loc = src.loc
M.sdisabilities -= MUTE
M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
if(M.client)
M.client.eye = M.client.mob
M.client.perspective = MOB_PERSPECTIVE
/obj/structure/closet/statue/take_contents()
return
/obj/structure/closet/statue/open()
return
/obj/structure/closet/statue/take_contents()
return
/obj/structure/closet/statue/open()
return
/obj/structure/closet/statue/insert()
return
/obj/structure/closet/statue/close()
return
/obj/structure/closet/statue/toggle()
return
/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
if(health <= 0)
for(var/mob/M in src)
shatter(M)
return
/obj/structure/closet/statue/attack_animal(mob/living/simple_animal/user as mob)
if(user.wall_smash)
for(var/mob/M in src)
shatter(M)
/obj/structure/closet/statue/blob_act()
for(var/mob/M in src)
shatter(M)
/obj/structure/closet/statue/meteorhit(obj/O as obj)
if(O.icon_state == "flaming")
for(var/mob/M in src)
M.meteorhit(O)
shatter(M)
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob)
health -= I.force
visible_message("\red [user] strikes [src] with [I].")
if(health <= 0)
for(var/mob/M in src)
shatter(M)
/obj/structure/closet/statue/place()
return
/obj/structure/closet/statue/MouseDrop_T()
return
/obj/structure/closet/statue/relaymove()
return
/obj/structure/closet/statue/attack_hand()
return
/obj/structure/closet/statue/verb_toggleopen()
return
/obj/structure/closet/statue/update_icon()
return
/obj/structure/closet/statue/proc/shatter(mob/user as mob)
if (user)
user.dust()
dump_contents()
visible_message("\red [src] shatters!. ")
del(src)
+15 -5
View File
@@ -284,6 +284,9 @@
/obj/structure/table/attackby(obj/item/weapon/W, mob/user)
if (istype(W, /obj/item/weapon/grab) && get_dist(src, user) < 2)
var/obj/item/weapon/grab/G = W
if(G.affecting.buckled)
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='notice'>You need a better grip to do that!</span>"
return
@@ -322,8 +325,7 @@
return
user.drop_item(src)
//if(W && W.loc) W.loc = src.loc // Unnecessary - see: mob/proc/drop_item(atom) - Doohl
return
return 1
/*
@@ -339,6 +341,9 @@
if (istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(G.affecting.buckled)
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='notice'>You need a better grip to do that!</span>"
return
@@ -357,6 +362,7 @@
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
del(src)
return
if(isrobot(user))
return
if(istype(W, /obj/item/weapon/melee/energy/blade))
@@ -373,7 +379,7 @@
user.drop_item(src)
//if(W && W.loc) W.loc = src.loc
return
return 1
/*
@@ -390,6 +396,9 @@
if (istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(G.affecting.buckled)
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='notice'>You need a better grip to do that!</span>"
return
@@ -451,7 +460,7 @@
user.drop_item(src)
//if(W && W.loc) W.loc = src.loc
return
return 1
/*
@@ -514,11 +523,12 @@
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
del(src)
return
if(isrobot(user))
return
user.drop_item()
if(W && W.loc) W.loc = src.loc
return
return 1
/obj/structure/rack/meteorhit(obj/O as obj)
del(src)
+1 -1
View File
@@ -530,4 +530,4 @@ turf/simulated/floor/proc/update_icon()
burnt = 0
broken = 0
else
user << "\blue You need more welding fuel to complete this task."
user << "\blue You need more welding fuel to complete this task."
+3 -3
View File
@@ -37,7 +37,7 @@
return
log_ooc("[mob.name]/[key] : [msg]")
var/keyname = key
if(prefs.unlock_content)
if(prefs.toggles & MEMBER_PUBLIC)
@@ -47,7 +47,7 @@
if(C.prefs.toggles & CHAT_OOC)
if(holder)
if(!holder.fakekey || C.holder)
if(holder.rights & R_ADMIN)
if(check_rights_for(src, R_ADMIN))
C << "<font color=[config.allow_admin_ooccolor ? prefs.ooccolor :"#b82e00" ]><b><span class='prefix'>OOC:</span> <EM>[keyname][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></b></font>"
else
C << "<span class='adminobserverooc'><span class='prefix'>OOC:</span> <EM>[keyname][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
@@ -68,7 +68,7 @@ var/global/normal_ooc_colour = "#002eb8"
set name = "OOC Text Color"
set category = "Preferences"
if(!holder || !(holder.rights & R_ADMIN))
if(!holder || check_rights_for(src, R_ADMIN))
if(!is_content_unlocked()) return
var/new_ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color|null
-9
View File
@@ -134,15 +134,6 @@ var/shuttlecoming = 0
var/join_motd = null
var/forceblob = 0
//airlockWireColorToIndex takes a number representing the wire color, e.g. the orange wire is always 1, the dark red wire is always 2, etc. It returns the index for whatever that wire does.
//airlockIndexToWireColor does the opposite thing - it takes the index for what the wire does, for example AIRLOCK_WIRE_IDSCAN is 1, AIRLOCK_WIRE_POWER1 is 2, etc. It returns the wire color number.
//airlockWireColorToFlag takes the wire color number and returns the flag for it (1, 2, 4, 8, 16, etc)
var/list/AAlarmWireColorToFlag = RandomAAlarmWires()
var/list/AAlarmIndexToFlag
var/list/AAlarmIndexToWireColor
var/list/AAlarmWireColorToIndex
//This was a define, but I changed it to a variable so it can be changed in-game.(kept the all-caps definition because... code...) -Errorage
var/MAX_EX_DEVESTATION_RANGE = 3
var/MAX_EX_HEAVY_RANGE = 7
+6 -1
View File
@@ -1,6 +1,7 @@
#define MAX_ADMIN_BANS_PER_ADMIN 1
datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = -1, var/reason, var/job = "", var/rounds = 0, var/banckey = null)
//Either pass the mob you wish to ban in the 'banned_mob' attribute, or the banckey, banip and bancid variables. If both are passed, the mob takes priority! If a mob is not passed, banckey is the minimum that needs to be passed! banip and bancid are optional.
datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = -1, var/reason, var/job = "", var/rounds = 0, var/banckey = null, var/banip = null, var/bancid = null)
if(!check_rights(R_BAN)) return
@@ -71,6 +72,8 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
ip = banned_mob.lastKnownIP
else if(banckey)
ckey = ckey(banckey)
computerid = bancid
ip = banip
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_player WHERE ckey = '[ckey]'")
query.Execute()
@@ -353,6 +356,8 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
output += "<option value='[BANTYPE_ADMIN_TEMP]'>ADMIN TEMPBAN</option>"
output += "</select></td>"
output += "<td><b>Ckey:</b> <input type='text' name='dbbanaddckey'></td></tr>"
output += "<tr><td><b>IP:</b> <input type='text' name='dbbanaddip'></td>"
output += "<td><b>Computer id:</b> <input type='text' name='dbbanaddcid'></td></tr>"
output += "<tr><td><b>Duration:</b> <input type='text' name='dbbaddduration'></td>"
output += "<td><b>Job:</b><select name='dbbanaddjob'>"
output += "<option value=''>--</option>"
+5 -1
View File
@@ -37,10 +37,14 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if("stealth") rights |= R_STEALTH
if("rejuv","rejuvinate") rights |= R_REJUVINATE
if("varedit") rights |= R_VAREDIT
if("everything","host","all") rights |= R_HOST
if("everything","host","all") rights |= ((2 * R_MAXPERMISSION) - 1)
if("sound","sounds") rights |= R_SOUNDS
if("spawn","create") rights |= R_SPAWN
/* --ONCE FLAGS LARGER OR EQUAL THAN 2^16 = 65536 START BEING USED, USE THIS CODE!
if("nukeeverything") rights += R_NUKEEVERYTHING
*/
admin_ranks[rank] = rights
previous_rights = rights
+29 -16
View File
@@ -52,19 +52,11 @@ you will have to do something like if(client.rights & R_ADMIN) yourself.
*/
/proc/check_rights(rights_required, show_msg=1)
if(usr && usr.client)
if(rights_required)
if(usr.client.holder)
if(rights_required & usr.client.holder.rights)
return 1
else
if(show_msg)
usr << "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>"
if (check_rights_for(usr.client, rights_required))
return 1
else
if(usr.client.holder)
return 1
else
if(show_msg)
usr << "<font color='red'>Error: You are not an admin.</font>"
if(show_msg)
usr << "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>"
return 0
//probably a bit iffy - will hopefully figure out a better solution
@@ -73,9 +65,13 @@ you will have to do something like if(client.rights & R_ADMIN) yourself.
if(usr.client.holder)
if(!other || !other.holder)
return 1
if(usr.client.holder.rights != other.holder.rights)
if( (usr.client.holder.rights & other.holder.rights) == other.holder.rights )
return 1 //we have all the rights they have and more
var/usr_rights_pt2 = usr.client.holder.rights / 65536
var/other_rights_pt2 = other.holder.rights / 65536
if( (usr_rights_pt2 & other_rights_pt2) == other_rights_pt2 ) //Check values larger than 65535
if(usr.client.holder.rights != other.holder.rights) //Check values smaller than 65536
if( (usr.client.holder.rights & other.holder.rights) == other.holder.rights )
return 1 //we have all the rights they have and more
usr << "<font color='red'>Error: Cannot proceed. They have more or equal rights to us.</font>"
return 0
@@ -85,4 +81,21 @@ you will have to do something like if(client.rights & R_ADMIN) yourself.
if(holder)
holder.disassociate()
del(holder)
return 1
return 1
//This proc checks whether subject has at least ONE of the rights specified in rights_required.
/proc/check_rights_for(client/subject, rights_required)
if(subject)
if(rights_required)
if(subject.holder)
if(rights_required >= 65536)
var/rights_required_pt2 = rights_required / 65536
var/rights_pt2 = subject.holder.rights / 65536
if(rights_required_pt2 & rights_pt2)
return 1
if(rights_required & subject.holder.rights)
return 1
else
if(subject.holder)
return 1
return 0
@@ -50,8 +50,7 @@
if(!usr.client)
return
if(!usr.client.holder || !(usr.client.holder.rights & R_PERMISSIONS))
usr << "\red You do not have permission to do this!"
if (!check_rights(R_PERMISSIONS))
return
establish_db_connection()
@@ -100,8 +99,7 @@
if(!usr.client)
return
if(!usr.client.holder || !(usr.client.holder.rights & R_PERMISSIONS))
usr << "\red You do not have permission to do this!"
if (check_rights(R_PERMISSIONS))
return
establish_db_connection()
+14
View File
@@ -476,6 +476,20 @@
dat += "<tr><td><i>Traitor not found!</i></td></tr>"
dat += "</table>"
if(istype(ticker.mode, /datum/game_mode/blob))
var/datum/game_mode/blob/mode = ticker.mode
dat += "<br><table cellspacing=5><tr><td><B>Blob</B></td><td></td><td></td></tr>"
dat += "<tr><td><i>Progress: [blobs.len]/[mode.blobwincount]</i></td></tr>"
for(var/datum/mind/blob in mode.infected_crew)
var/mob/M = blob.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
else
dat += "<tr><td><i>Blob not found!</i></td></tr>"
dat += "</table>"
dat += "</body></html>"
usr << browse(dat, "window=roundstatus;size=400x500")
else
+12 -6
View File
@@ -78,6 +78,8 @@
var/bantype = text2num(href_list["dbbanaddtype"])
var/banckey = href_list["dbbanaddckey"]
var/banip = href_list["dbbanaddip"]
var/bancid = href_list["dbbanaddcid"]
var/banduration = text2num(href_list["dbbaddduration"])
var/banjob = href_list["dbbanaddjob"]
var/banreason = href_list["dbbanreason"]
@@ -130,9 +132,18 @@
playermob = M
break
banreason = "(MANUAL BAN) "+banreason
DB_ban_record(bantype, playermob, banduration, banreason, banjob, null, banckey)
if(!playermob)
if(banip)
banreason = "[banreason] (CUSTOM IP)"
if(bancid)
banreason = "[banreason] (CUSTOM CID)"
else
message_admins("Ban process: A mob matching [playermob.ckey] was found at location [playermob.x], [playermob.y], [playermob.z]. Custom ip and computer id fields replaced with the ip and computer id from the located mob")
DB_ban_record(bantype, playermob, banduration, banreason, banjob, null, banckey, banip, bancid )
else if(href_list["editrights"])
if(!check_rights(R_PERMISSIONS))
@@ -688,11 +699,6 @@
usr << "This can only be used on instances of type /mob"
return
if(M != usr) //we can jobban ourselves
if(M.client && M.client.holder && (M.client.holder.rights & R_BAN)) //they can ban too. So we can't ban them
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
if(!job_master)
usr << "Job Master has not been setup!"
return
+16 -5
View File
@@ -88,10 +88,21 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
msg = "\blue <b><font color=red>HELP: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) [ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</b> [msg]"
//send this msg to all admins
var/admin_number_afk = 0
var/admin_number_total = 0 //Total number of admins
var/admin_number_afk = 0 //Holds the number of admins who are afk
var/admin_number_ignored = 0 //Holds the number of admins without +BAN (so admins who are not really admins)
var/admin_number_decrease = 0 //Holds the number of admins with are afk, ignored or both
for(var/client/X in admins)
admin_number_total++;
var/invalid = 0
if(!check_rights_for(X, R_BAN))
admin_number_ignored++
invalid = 1
if(X.is_afk())
admin_number_afk++
invalid = 1
if(invalid)
admin_number_decrease++
if(X.prefs.toggles & SOUND_ADMINHELP)
X << 'sound/effects/adminhelp.ogg'
X << msg
@@ -99,13 +110,13 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
//show it to the person adminhelping too
src << "<font color='blue'>PM to-<b>Admins</b>: [original_msg]</font>"
var/admin_number_present = admins.len - admin_number_afk
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins.")
var/admin_number_present = admin_number_total - admin_number_decrease //Number of admins who are neither afk nor invalid
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins who have +BAN.")
if(admin_number_present <= 0)
if(!admin_number_afk)
if(!admin_number_afk && !admin_number_ignored)
send2irc(ckey, "[original_msg] - No admins online")
else
send2irc(ckey, "[original_msg] - All admins AFK ([admin_number_afk])")
send2irc(ckey, "[original_msg] - All admins AFK ([admin_number_afk]/[admin_number_total]) or skipped ([admin_number_ignored]/[admin_number_total])")
feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
+20 -11
View File
@@ -440,22 +440,31 @@ var/global/list/g_fancy_list_of_safe_types = null
return
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if (H.wear_id)
var/obj/item/weapon/card/id/id = H.wear_id
if(istype(H.wear_id, /obj/item/device/pda))
var/obj/item/device/pda/pda = H.wear_id
id = pda.id
var/obj/item/worn = H.wear_id
var/obj/item/weapon/card/id/id = null
if(worn)
id = worn.GetID()
if(id)
id.icon_state = "gold"
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
id.access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
else
var/obj/item/weapon/card/id/id = new/obj/item/weapon/card/id(M);
id.icon_state = "gold"
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
id = new /obj/item/weapon/card/id/gold(H.loc)
id.access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
id.registered_name = H.real_name
id.assignment = "Captain"
id.name = "[id.registered_name]'s ID Card ([id.assignment])"
H.equip_to_slot_or_del(id, slot_wear_id)
H.update_inv_wear_id()
if(worn)
if(istype(worn,/obj/item/device/pda))
worn:id = id
id.loc = worn
else if(istype(worn,/obj/item/weapon/storage/wallet))
worn:front_id = id
id.loc = worn
worn.update_icon()
else
H.equip_to_slot(id,slot_wear_id)
else
alert("Invalid mob")
feedback_add_details("admin_verb","GFA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+14 -16
View File
@@ -32,24 +32,22 @@
return
/obj/machinery/artillerycontrol/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
if(..())
return
var/A
A = input("Area to jump bombard", "Open Fire", A) in teleportlocs
var/area/thearea = teleportlocs[A]
if (usr.stat || usr.restrained()) return
if(src.reload < 180) return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
var/A
A = input("Area to jump bombard", "Open Fire", A) in teleportlocs
var/area/thearea = teleportlocs[A]
if (usr.stat || usr.restrained()) return
if(src.reload < 180) return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
command_alert("Bluespace artillery fire detected. Brace for impact.")
message_admins("[key_name_admin(usr)] has launched an artillery strike.", 1)
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
L+=T
var/loc = pick(L)
explosion(loc,2,5,11)
reload = 0
command_alert("Bluespace artillery fire detected. Brace for impact.")
message_admins("[key_name_admin(usr)] has launched an artillery strike.", 1)
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
L+=T
var/loc = pick(L)
explosion(loc,2,5,11)
reload = 0
/*mob/proc/openfire()
var/A
+5 -5
View File
@@ -10,7 +10,7 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
"wizard" = IS_MODE_COMPILED("wizard"), // 3
"malf AI" = IS_MODE_COMPILED("malfunction"), // 4
"revolutionary" = IS_MODE_COMPILED("revolution"), // 5
"alien candidate" = 1, //always show // 6
"alien lifeform" = 1, //always show // 6
"pAI candidate" = 1, // -- TLE // 7
"cultist" = IS_MODE_COMPILED("cult"), // 8
"infested monkey" = IS_MODE_COMPILED("monkey"), // 9
@@ -77,7 +77,7 @@ datum/preferences
// OOC Metadata:
var/metadata = ""
var/unlock_content = 0
/datum/preferences/New(client/C)
@@ -210,13 +210,13 @@ datum/preferences
dat += "<b>Adminhelp Sound:</b> "
dat += "<a href='?_src_=prefs;preference=hear_adminhelps'>[(toggles & SOUND_ADMINHELP)?"On":"Off"]</a><br>"
if(unlock_content || (user.client.holder && (user.client.holder.rights & R_ADMIN)))
if(unlock_content || check_rights_for(user, R_ADMIN))
dat += "<b>OOC:</b> <span style='border: 1px solid #161616; background-color: [ooccolor];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=ooccolor;task=input'>Change</a><br>"
if(unlock_content)
dat += "<b>BYOND Membership Publicity:</b> <a href='?_src_=prefs;preference=publicity'>[(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]</a><br>"
dat += "<b>Ghost Form:</b> <a href='?_src_=prefs;task=input;preference=ghostform'>[ghost_form]</a><br>"
dat += "</td><td width='300px' height='300px' valign='top'>"
+1
View File
@@ -102,6 +102,7 @@
if(2) //steal
var/datum/objective/steal/O = new /datum/objective/steal()
O.set_target(pick(O.possible_items_special))
O.owner = Mind
Mind.objectives += O
if(3) //protect/kill
+2 -3
View File
@@ -220,9 +220,8 @@
return 1
/obj/machinery/biogenerator/Topic(href, href_list)
if(stat & BROKEN) return
if(usr.stat || usr.restrained()) return
if(!in_range(src, usr)) return
if(..())
return
usr.set_machine(src)
@@ -261,7 +261,7 @@
help_shake_act(M)
if ("grab")
if (M == src)
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
@@ -1,6 +1,8 @@
/mob/living/carbon/alien/humanoid/u_equip(obj/item/I)
if(!I) return 0
var/success = 1
if(I == r_hand)
r_hand = null
update_inv_r_hand(0)
@@ -13,14 +15,17 @@
else if(I == l_store)
l_store = null
update_inv_pockets(0)
else
success = 0
if(I)
if(client)
client.screen -= I
I.loc = loc
I.dropped(src)
if(success)
if(I)
I.layer = initial(I.layer)
if(client)
client.screen -= I
I.loc = loc
I.dropped(src)
if(I)
I.layer = initial(I.layer)
//yaaaaaaay snowflakes
@@ -233,7 +233,7 @@
help_shake_act(M)
if ("grab")
if (M == src)
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
@@ -326,6 +326,8 @@
/mob/living/carbon/alien/larva/show_inv(mob/user)
return
/mob/living/carbon/alien/larva/toggle_throw_mode()
return
/* Commented out because it's duplicated in life.dm
/mob/living/carbon/alien/larva/proc/grow() // Larvae can grow into full fledged Xenos if they survive long enough -- TLE
@@ -45,9 +45,9 @@
usr << "This one seems particularly lifeless. Perhaps it will regain some of it's luster later.."
/obj/item/organ/brain/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!istype(M, /mob))
return
/obj/item/organ/brain/attack(mob/living/carbon/M, mob/user)
if(!istype(M))
return ..()
add_fingerprint(user)
-5
View File
@@ -370,11 +370,6 @@
if(src.client)
src.client.screen -= item
item.loc = src.loc
if(istype(item, /obj/item))
item:dropped(src) // let it know it's been dropped
//actually throw it!
if(item)
item.layer = initial(item.layer)
+23 -12
View File
@@ -275,6 +275,13 @@
mymob.pullin.screen_loc = ui_pull_resist
hotkeybuttons += mymob.pullin
lingchemdisplay = new /obj/screen()
lingchemdisplay.name = "chemical storage"
lingchemdisplay.icon_state = "power_display"
lingchemdisplay.screen_loc = ui_lingchemdisplay
lingchemdisplay.layer = 20
lingchemdisplay.invisibility = 101
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
@@ -303,7 +310,7 @@
mymob.client.screen = null
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay, lingchemdisplay) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += adding + hotkeybuttons
inventory_shown = 0;
@@ -330,23 +337,29 @@
return
client.screen -= hud_used.item_action_list
hud_used.item_action_list = list()
for(var/obj/item/I in src)
if(I.action_button_name)
var/obj/screen/item_action/A = new(hud_used)
if(hud_used.item_action_list.len < num)
var/obj/screen/item_action/N = new(hud_used)
hud_used.item_action_list += N
var/obj/screen/item_action/A = hud_used.item_action_list[num]
A.icon = ui_style2icon(client.prefs.UI_style)
A.icon_state = "template"
var/image/img = image(I.icon, I.icon_state)
A.overlays = list()
var/image/img = image(I.icon, A, I.icon_state)
img.pixel_x = 0
img.pixel_y = 0
A.overlays += img
if(I.action_button_name)
A.name = I.action_button_name
else
A.name = "Use [I.name]"
A.name = I.action_button_name
A.owner = I
hud_used.item_action_list += A
client.screen += hud_used.item_action_list[num]
switch(num)
if(1)
A.screen_loc = ui_action_slot1
@@ -359,6 +372,4 @@
if(5)
A.screen_loc = ui_action_slot5
break //5 slots available, so no more can be added.
num++
client.screen += hud_used.item_action_list
num++
@@ -120,8 +120,8 @@
stat("Distribution Pressure", internal.distribute_pressure)
if(mind)
if(mind.changeling)
stat("Chemical Storage", mind.changeling.chem_charges)
stat("Genetic Damage Time", mind.changeling.geneticdamage)
stat("Chemical Storage", "[mind.changeling.chem_charges]/[mind.changeling.chem_storage]")
stat("Absorbed DNA", mind.changeling.absorbedcount)
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized)
stat("Energy Charge", round(wear_suit:cell:charge/100))
@@ -7,7 +7,8 @@
if ("help")
visible_message(text("\blue [M] caresses [src] with its scythe like arm."))
if ("grab")
if(M == src) return
if(M == src || anchored)
return
if (w_uniform)
w_uniform.add_fingerprint(M)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
@@ -33,7 +33,7 @@
src << "<span class='unconscious'>You feel a breath of fresh air enter your lungs. It feels good.</span>"
if("grab")
if(M == src)
if(M == src || anchored)
return 0
if(w_uniform)
w_uniform.add_fingerprint(M)
@@ -1022,6 +1022,12 @@
see_invisible = SEE_INVISIBLE_LIVING
seer = 0
if(mind && mind.changeling)
hud_used.lingchemdisplay.invisibility = 0
hud_used.lingchemdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='#dd66dd'>[src.mind.changeling.chem_charges]</font></div>"
else
hud_used.lingchemdisplay.invisibility = 101
if(istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja))
var/obj/item/clothing/mask/gas/voice/space_ninja/O = wear_mask
switch(O.mode)
@@ -432,7 +432,7 @@
help_shake_act(M)
if ("grab")
if (M == src)
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
@@ -523,7 +523,7 @@
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
if ("grab")
if (M == src)
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
@@ -589,6 +589,9 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
/mob/living/carbon/slime/show_inv(mob/user)
return
/mob/living/carbon/slime/toggle_throw_mode()
return
/mob/living/carbon/slime/proc/get_obstacle_ok(atom/A)
var/direct = get_dir(src, A)
var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy( src.loc )
@@ -96,8 +96,12 @@
if("deathgasp")
message = "<b>The [src.name]</b> lets out a faint chimper as it collapses and stops moving..."
m_type = 1
if("giggle")
if (!muzzled)
message = "<B>The [src.name]</B> giggles happily."
m_type = 2
if("help")
src << "choke, collapse, dance, deathgasp, drool, gasp, shiver, gnarl, jump, paw, moan, nod, roar, roll, scratch,\nscretch, shake, sign-#, sit, sulk, sway, tail, twitch, whimper"
src << "choke, collapse, dance, deathgasp, drool, gasp, shiver, gnarl, giggle, jump, paw, moan, nod, roar, roll, scratch,\nscretch, shake, sign-#, sit, sulk, sway, tail, twitch, whimper"
else
src << text("Invalid Emote: []", act)
if ((message && src.stat == 0))
@@ -111,4 +115,4 @@
for(var/mob/O in hearers(src, null))
O.show_message(message, m_type)
//Foreach goto(746)
return
return
@@ -142,6 +142,13 @@
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_resist
lingchemdisplay = new /obj/screen()
lingchemdisplay.name = "chemical storage"
lingchemdisplay.icon_state = "power_display"
lingchemdisplay.screen_loc = ui_lingchemdisplay
lingchemdisplay.layer = 20
lingchemdisplay.invisibility = 101
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
@@ -160,7 +160,7 @@
O.show_message(text("\red <B>[] has attempted to punch [name]!</B>", M), 1)
else
if (M.a_intent == "grab")
if (M == src)
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
@@ -230,7 +230,7 @@
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
if ("grab")
if (M == src)
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
@@ -345,8 +345,8 @@
if(client && mind)
if (client.statpanel == "Status")
if(mind.changeling)
stat("Chemical Storage", mind.changeling.chem_charges)
stat("Genetic Damage Time", mind.changeling.geneticdamage)
stat("Chemical Storage", "[mind.changeling.chem_charges]/[mind.changeling.chem_storage]")
stat("Absorbed DNA", mind.changeling.absorbedcount)
return
+1 -2
View File
@@ -1,8 +1,7 @@
/mob/living/Login()
..()
//Mind updates
mind_initialize() //updates the mind (or creates and initializes one if one doesn't exist)
mind.active = 1 //indicates that the mind is currently synced with a client
sync_mind()
mind.show_memory(src, 0)
//Round specific stuff like hud updates
+2 -1
View File
@@ -31,7 +31,7 @@ var/list/ai_list = list()
var/obj/item/device/multitool/aiMulti = null
//MALFUNCTION
var/datum/AI_Module/module_picker/malf_picker
var/datum/module_picker/malf_picker
var/processing_time = 100
var/list/datum/AI_Module/current_modules = list()
var/fire_res_on_core = 0
@@ -48,6 +48,7 @@ var/list/ai_list = list()
var/datum/trackable/track = null
var/last_paper_seen = null
var/can_shunt = 1
/mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/device/mmi/B, var/safety = 0)
var/list/possibleNames = ai_names
@@ -587,7 +587,7 @@
O.show_message(text("\blue [M] caresses [src]'s plating with its scythe like arm."), 1)
if ("grab")
if (M == src)
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )

Some files were not shown because too many files have changed in this diff Show More