Merge remote-tracking branch 'upstream/dev' into iaasuit

This commit is contained in:
Mustafa Kalash
2015-06-20 14:07:44 -04:00
257 changed files with 6330 additions and 5692 deletions
+2 -1
View File
@@ -26,5 +26,6 @@ script:
- (! find nano/templates/ -type f -exec md5sum {} + | sort | uniq -D -w 32 | grep nano)
- (num=`grep -E '\\\\(red|blue|green|black|b|i[^mc])' **/*.dm | wc -l`; [ $num -le 1355 ])
- ( md5sum -c - <<< "0af969f671fba6cf9696c78cd175a14a *baystation12.int")
- DreamMaker baystation12.dme
- python tools/TagMatcher/tag-matcher.py ../..
- python tools/GenerateChangelog/ss13_genchangelog.py html/changelog.html html/changelogs
- DreamMaker baystation12.dme
+7 -2
View File
@@ -15,6 +15,7 @@
#include "code\names.dm"
#include "code\stylesheet.dm"
#include "code\world.dm"
#include "code\__defines\_compile_options.dm"
#include "code\__defines\admin.dm"
#include "code\__defines\atmos.dm"
#include "code\__defines\chemistry.dm"
@@ -600,7 +601,10 @@
#include "code\game\objects\items\devices\taperecorder.dm"
#include "code\game\objects\items\devices\traitordevices.dm"
#include "code\game\objects\items\devices\transfer_valve.dm"
#include "code\game\objects\items\devices\uplinks.dm"
#include "code\game\objects\items\devices\uplink.dm"
#include "code\game\objects\items\devices\uplink_categories.dm"
#include "code\game\objects\items\devices\uplink_items.dm"
#include "code\game\objects\items\devices\uplink_random_lists.dm"
#include "code\game\objects\items\devices\violin.dm"
#include "code\game\objects\items\devices\whistle.dm"
#include "code\game\objects\items\devices\PDA\cart.dm"
@@ -621,7 +625,6 @@
#include "code\game\objects\items\stacks\nanopaste.dm"
#include "code\game\objects\items\stacks\rods.dm"
#include "code\game\objects\items\stacks\stack.dm"
#include "code\game\objects\items\stacks\sheets\glass.dm"
#include "code\game\objects\items\stacks\sheets\leather.dm"
#include "code\game\objects\items\stacks\sheets\light.dm"
#include "code\game\objects\items\stacks\tiles\light.dm"
@@ -1145,6 +1148,7 @@
#include "code\modules\mob\language\synthetic.dm"
#include "code\modules\mob\living\damage_procs.dm"
#include "code\modules\mob\living\default_language.dm"
#include "code\modules\mob\living\life.dm"
#include "code\modules\mob\living\living.dm"
#include "code\modules\mob\living\living_defense.dm"
#include "code\modules\mob\living\living_defines.dm"
@@ -1511,6 +1515,7 @@
#include "code\modules\reagents\Chemistry-Colours.dm"
#include "code\modules\reagents\Chemistry-Holder.dm"
#include "code\modules\reagents\Chemistry-Machinery.dm"
#include "code\modules\reagents\Chemistry-Metabolism.dm"
#include "code\modules\reagents\Chemistry-Readme.dm"
#include "code\modules\reagents\Chemistry-Reagents.dm"
#include "code\modules\reagents\Chemistry-Recipes.dm"
+2 -2
View File
@@ -281,8 +281,8 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
var/direct = !(block & ZONE_BLOCKED)
var/space = !istype(B)
if(!space)
if(min(A.zone.contents.len, B.zone.contents.len) < ZONE_MIN_SIZE || (direct && (equivalent_pressure(A.zone,B.zone) || current_cycle == 0)))
if(direct && !space)
if(min(A.zone.contents.len, B.zone.contents.len) <= ZONE_MIN_SIZE || equivalent_pressure(A.zone,B.zone) || current_cycle == 0)
merge(A.zone,B.zone)
return
+2
View File
@@ -0,0 +1,2 @@
#define BACKGROUND_ENABLED 0 // The default value for all uses of set background. Set background can cause gradual lag and is recommended you only turn this on if necessary.
// 1 will enable set background. 0 will disable set background.
+2
View File
@@ -80,6 +80,8 @@ var/list/be_special_flags = list(
#define MODE_MALFUNCTION "malf"
#define MODE_TRAITOR "traitor"
#define DEFAULT_TELECRYSTAL_AMOUNT 12
/////////////////
////WIZARD //////
/////////////////
+1
View File
@@ -135,6 +135,7 @@
#define WALL_CAN_OPEN 1
#define WALL_OPENING 2
#define DEFAULT_TABLE_MATERIAL "plastic"
#define DEFAULT_WALL_MATERIAL "steel"
#define SHARD_SHARD "shard"
+2 -2
View File
@@ -115,7 +115,7 @@
if(W.flags&USEDELAY)
next_move += 5
var/resolved = A.attackby(W,src)
var/resolved = W.resolve_attackby(A, src)
if(!resolved && A && W)
W.afterattack(A,src,1,params) // 1 indicates adjacency
else
@@ -136,7 +136,7 @@
next_move += 5
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
var/resolved = A.attackby(W,src)
var/resolved = W.resolve_attackby(A,src)
if(!resolved && A && W)
W.afterattack(A,src,1,params) // 1: clicking something Adjacent
else
+87 -118
View File
@@ -74,135 +74,104 @@ var/const/tk_maxrange = 15
var/atom/movable/focus = null
var/mob/living/host = null
/obj/item/tk_grab/dropped(mob/user as mob)
if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item
if(focus.Adjacent(loc))
focus.loc = loc
loc = null
spawn(1)
qdel(src)
return
dropped(mob/user as mob)
if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item
if(focus.Adjacent(loc))
focus.loc = loc
//stops TK grabs being equipped anywhere but into hands
/obj/item/tk_grab/equipped(var/mob/user, var/slot)
if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return
qdel(src)
return
/obj/item/tk_grab/attack_self(mob/user as mob)
if(focus)
focus.attack_self_tk(user)
/obj/item/tk_grab/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity)//TODO: go over this
if(!target || !user) return
if(last_throw+3 > world.time) return
if(!host || host != user)
qdel(src)
return
//stops TK grabs being equipped anywhere but into hands
equipped(var/mob/user, var/slot)
if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return
if(!(TK in host.mutations))
qdel(src)
return
if(isobj(target) && !isturf(target.loc))
return
attack_self(mob/user as mob)
if(focus)
focus.attack_self_tk(user)
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity)//TODO: go over this
if(!target || !user) return
if(last_throw+3 > world.time) return
if(!host || host != user)
qdel(src)
return
if(!(TK in host.mutations))
qdel(src)
return
if(isobj(target) && !isturf(target.loc))
return
var/d = get_dist(user, target)
if(focus) d = max(d,get_dist(user,focus)) // whichever is further
switch(d)
if(0)
;
if(1 to 5) // not adjacent may mean blocked by window
if(!proximity)
user.next_move += 2
if(5 to 7)
user.next_move += 5
if(8 to tk_maxrange)
user.next_move += 10
else
user << "<span class='notice'>Your mind won't reach that far.</span>"
return
if(!focus)
focus_object(target, user)
return
if(target == focus)
target.attack_self_tk(user)
return // todo: something like attack_self not laden with assumptions inherent to attack_self
if(!istype(target, /turf) && istype(focus,/obj/item) && target.Adjacent(focus))
var/obj/item/I = focus
var/resolved = target.attackby(I, user, user:get_organ_target())
if(!resolved && target && I)
I.afterattack(target,user,1) // for splashing with beakers
var/d = get_dist(user, target)
if(focus) d = max(d,get_dist(user,focus)) // whichever is further
switch(d)
if(0)
;
if(1 to 5) // not adjacent may mean blocked by window
if(!proximity)
user.next_move += 2
if(5 to 7)
user.next_move += 5
if(8 to tk_maxrange)
user.next_move += 10
else
apply_focus_overlay()
focus.throw_at(target, 10, 1, user)
last_throw = world.time
return
attack(mob/living/M as mob, mob/living/user as mob, def_zone)
return
proc/focus_object(var/obj/target, var/mob/living/user)
if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later
if(target.anchored || !isturf(target.loc))
qdel(src)
user << "<span class='notice'>Your mind won't reach that far.</span>"
return
focus = target
update_icon()
if(!focus)
focus_object(target, user)
return
if(target == focus)
target.attack_self_tk(user)
return // todo: something like attack_self not laden with assumptions inherent to attack_self
if(!istype(target, /turf) && istype(focus,/obj/item) && target.Adjacent(focus))
var/obj/item/I = focus
var/resolved = target.attackby(I, user, user:get_organ_target())
if(!resolved && target && I)
I.afterattack(target,user,1) // for splashing with beakers
else
apply_focus_overlay()
focus.throw_at(target, 10, 1, user)
last_throw = world.time
return
/obj/item/tk_grab/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
return
/obj/item/tk_grab/proc/focus_object(var/obj/target, var/mob/living/user)
if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later
if(target.anchored || !isturf(target.loc))
qdel(src)
return
proc/apply_focus_overlay()
if(!focus) return
var/obj/effect/overlay/O = PoolOrNew(/obj/effect/overlay, locate(focus.x,focus.y,focus.z))
O.name = "sparkles"
O.anchored = 1
O.density = 0
O.layer = FLY_LAYER
O.set_dir(pick(cardinal))
O.icon = 'icons/effects/effects.dmi'
O.icon_state = "nothing"
flick("empdisable",O)
spawn(5)
qdel(O)
return
focus = target
update_icon()
overlays.Cut()
if(focus && focus.icon && focus.icon_state)
overlays += icon(focus.icon,focus.icon_state)
return
apply_focus_overlay()
return
/*Not quite done likely needs to use something thats not get_step_to
proc/check_path()
var/turf/ref = get_turf(src.loc)
var/turf/target = get_turf(focus.loc)
if(!ref || !target) return 0
var/distance = get_dist(ref, target)
if(distance >= 10) return 0
for(var/i = 1 to distance)
ref = get_step_to(ref, target, 0)
if(ref != target) return 0
return 1
*/
//equip_to_slot_or_del(obj/item/W, slot, del_on_fail = 1)
/*
if(istype(user, /mob/living/carbon))
if(user:mutations & TK && get_dist(source, user) <= 7)
if(user:get_active_hand()) return 0
var/X = source:x
var/Y = source:y
var/Z = source:z
*/
/obj/item/tk_grab/proc/apply_focus_overlay()
if(!focus) return
var/obj/effect/overlay/O = PoolOrNew(/obj/effect/overlay, locate(focus.x,focus.y,focus.z))
O.name = "sparkles"
O.anchored = 1
O.density = 0
O.layer = FLY_LAYER
O.set_dir(pick(cardinal))
O.icon = 'icons/effects/effects.dmi'
O.icon_state = "nothing"
flick("empdisable",O)
spawn(5)
qdel(O)
return
/obj/item/tk_grab/update_icon()
overlays.Cut()
if(focus && focus.icon && focus.icon_state)
overlays += icon(focus.icon,focus.icon_state)
return
+8
View File
@@ -91,6 +91,7 @@ var/list/gamemode_cache = list()
var/guests_allowed = 1
var/debugparanoid = 0
var/serverurl
var/server
var/banappeals
var/wikiurl
@@ -163,6 +164,7 @@ var/list/gamemode_cache = list()
var/use_irc_bot = 0
var/irc_bot_host = ""
var/irc_bot_export = 0 // whether the IRC bot in use is a Bot32 (or similar) instance; Bot32 uses world.Export() instead of nudge.py/libnudge
var/main_irc = ""
var/admin_irc = ""
var/python_path = "" //Path to the python executable. Defaults to "python" on windows and "/usr/bin/env python2" on unix
@@ -385,6 +387,9 @@ var/list/gamemode_cache = list()
if ("hostedby")
config.hostedby = value
if ("serverurl")
config.serverurl = value
if ("server")
config.server = value
@@ -500,6 +505,9 @@ var/list/gamemode_cache = list()
if("use_irc_bot")
use_irc_bot = 1
if("irc_bot_export")
irc_bot_export = 1
if("ticklag")
Ticklag = text2num(value)
+344 -414
View File
@@ -29,7 +29,7 @@
*/
datum/mind
/datum/mind
var/key
var/name //replaces mob/var/original_name
var/mob/living/current
@@ -58,459 +58,389 @@ datum/mind
// the world.time since the mob has been brigged, or -1 if not at all
var/brigged_since = -1
New(var/key)
src.key = key
//put this here for easier tracking ingame
var/datum/money_account/initial_account
proc/transfer_to(mob/living/new_character)
if(!istype(new_character))
world.log << "## DEBUG: transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob. Please inform Carn"
if(current) //remove ourself from our old body's mind variable
if(changeling)
current.remove_changeling_powers()
current.verbs -= /datum/changeling/proc/EvolutionMenu
current.mind = null
/datum/mind/New(var/key)
src.key = key
nanomanager.user_transferred(current, new_character) // transfer active NanoUI instances to new user
if(new_character.mind) //remove any mind currently in our new body's mind variable
new_character.mind.current = null
current = new_character //link ourself to our new body
new_character.mind = src //and link our new body to ourself
/datum/mind/proc/transfer_to(mob/living/new_character)
if(!istype(new_character))
world.log << "## DEBUG: transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob. Please inform Carn"
if(current) //remove ourself from our old body's mind variable
if(changeling)
new_character.make_changeling()
current.remove_changeling_powers()
current.verbs -= /datum/changeling/proc/EvolutionMenu
current.mind = null
if(active)
new_character.key = key //now transfer the key to link the client to our new body
nanomanager.user_transferred(current, new_character) // transfer active NanoUI instances to new user
if(new_character.mind) //remove any mind currently in our new body's mind variable
new_character.mind.current = null
proc/store_memory(new_text)
memory += "[new_text]<BR>"
current = new_character //link ourself to our new body
new_character.mind = src //and link our new body to ourself
proc/show_memory(mob/recipient)
var/output = "<B>[current.real_name]'s Memory</B><HR>"
output += memory
if(changeling)
new_character.make_changeling()
if(objectives.len>0)
output += "<HR><B>Objectives:</B>"
if(active)
new_character.key = key //now transfer the key to link the client to our new body
var/obj_count = 1
for(var/datum/objective/objective in objectives)
output += "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
/datum/mind/proc/store_memory(new_text)
memory += "[new_text]<BR>"
recipient << browse(output,"window=memory")
/datum/mind/proc/show_memory(mob/recipient)
var/output = "<B>[current.real_name]'s Memory</B><HR>"
output += memory
proc/edit_memory()
if(!ticker || !ticker.mode)
alert("Not before round-start!", "Alert")
return
if(objectives.len>0)
output += "<HR><B>Objectives:</B>"
var/out = "<B>[name]</B>[(current&&(current.real_name!=name))?" (as [current.real_name])":""]<br>"
out += "Mind currently owned by key: [key] [active?"(synced)":"(not synced)"]<br>"
out += "Assigned role: [assigned_role]. <a href='?src=\ref[src];role_edit=1'>Edit</a><br>"
out += "<hr>"
out += "Factions and special roles:<br><table>"
for(var/antag_type in all_antag_types)
var/datum/antagonist/antag = all_antag_types[antag_type]
out += "[antag.get_panel_entry(src)]"
out += "</table><hr>"
out += "<b>Objectives</b></br>"
var/obj_count = 1
for(var/datum/objective/objective in objectives)
output += "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
if(objectives && objectives.len)
var/num = 1
for(var/datum/objective/O in objectives)
out += "<b>Objective #[num]:</b> [O.explanation_text] "
if(O.completed)
out += "(<font color='green'>complete</font>)"
else
out += "(<font color='red'>incomplete</font>)"
out += " <a href='?src=\ref[src];obj_completed=\ref[O]'>\[toggle\]</a>"
out += " <a href='?src=\ref[src];obj_delete=\ref[O]'>\[remove\]</a><br>"
num++
out += "<br><a href='?src=\ref[src];obj_announce=1'>\[announce objectives\]</a>"
recipient << browse(output,"window=memory")
else
out += "None."
out += "<br><a href='?src=\ref[src];obj_add=1'>\[add\]</a>"
usr << browse(out, "window=edit_memory[src]")
/datum/mind/proc/edit_memory()
if(!ticker || !ticker.mode)
alert("Not before round-start!", "Alert")
return
Topic(href, href_list)
if(!check_rights(R_ADMIN)) return
var/out = "<B>[name]</B>[(current&&(current.real_name!=name))?" (as [current.real_name])":""]<br>"
out += "Mind currently owned by key: [key] [active?"(synced)":"(not synced)"]<br>"
out += "Assigned role: [assigned_role]. <a href='?src=\ref[src];role_edit=1'>Edit</a><br>"
out += "<hr>"
out += "Factions and special roles:<br><table>"
for(var/antag_type in all_antag_types)
var/datum/antagonist/antag = all_antag_types[antag_type]
out += "[antag.get_panel_entry(src)]"
out += "</table><hr>"
out += "<b>Objectives</b></br>"
if(href_list["add_antagonist"])
var/datum/antagonist/antag = all_antag_types[href_list["add_antagonist"]]
if(antag) antag.add_antagonist(src)
else if(href_list["remove_antagonist"])
var/datum/antagonist/antag = all_antag_types[href_list["remove_antagonist"]]
if(antag) antag.remove_antagonist(src)
else if(href_list["equip_antagonist"])
var/datum/antagonist/antag = all_antag_types[href_list["equip_antagonist"]]
if(antag) antag.equip(src.current)
else if(href_list["unequip_antagonist"])
var/datum/antagonist/antag = all_antag_types[href_list["unequip_antagonist"]]
if(antag) antag.unequip(src.current)
else if(href_list["move_antag_to_spawn"])
var/datum/antagonist/antag = all_antag_types[href_list["move_antag_to_spawn"]]
if(antag) antag.place_mob(src.current)
else if (href_list["role_edit"])
var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in joblist
if (!new_role) return
assigned_role = new_role
else if (href_list["memory_edit"])
var/new_memo = sanitize(input("Write new memory", "Memory", memory) as null|message)
if (isnull(new_memo)) return
memory = new_memo
else if (href_list["obj_edit"] || href_list["obj_add"])
var/datum/objective/objective
var/objective_pos
var/def_value
if (href_list["obj_edit"])
objective = locate(href_list["obj_edit"])
if (!objective) return
objective_pos = objectives.Find(objective)
//Text strings are easy to manipulate. Revised for simplicity.
var/temp_obj_type = "[objective.type]"//Convert path into a text string.
def_value = copytext(temp_obj_type, 19)//Convert last part of path into an objective keyword.
if(!def_value)//If it's a custom objective, it will be an empty string.
def_value = "custom"
var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "debrain", "protect", "prevent", "harm", "brig", "hijack", "escape", "survive", "steal", "download", "mercenary", "capture", "absorb", "custom")
if (!new_obj_type) return
var/datum/objective/new_objective = null
switch (new_obj_type)
if ("assassinate","protect","debrain", "harm", "brig")
//To determine what to name the objective in explanation text.
var/objective_type_capital = uppertext(copytext(new_obj_type, 1,2))//Capitalize first letter.
var/objective_type_text = copytext(new_obj_type, 2)//Leave the rest of the text.
var/objective_type = "[objective_type_capital][objective_type_text]"//Add them together into a text string.
var/list/possible_targets = list("Free objective")
for(var/datum/mind/possible_target in ticker.minds)
if ((possible_target != src) && istype(possible_target.current, /mob/living/carbon/human))
possible_targets += possible_target.current
var/mob/def_target = null
var/objective_list[] = list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain)
if (objective&&(objective.type in objective_list) && objective:target)
def_target = objective:target.current
var/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets
if (!new_target) return
var/objective_path = text2path("/datum/objective/[new_obj_type]")
if (new_target == "Free objective")
new_objective = new objective_path
new_objective.owner = src
new_objective:target = null
new_objective.explanation_text = "Free objective"
else
new_objective = new objective_path
new_objective.owner = src
new_objective:target = new_target:mind
//Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
new_objective.explanation_text = "[objective_type] [new_target:real_name], the [new_target:mind:assigned_role=="MODE" ? (new_target:mind:special_role) : (new_target:mind:assigned_role)]."
if ("prevent")
new_objective = new /datum/objective/block
new_objective.owner = src
if ("hijack")
new_objective = new /datum/objective/hijack
new_objective.owner = src
if ("escape")
new_objective = new /datum/objective/escape
new_objective.owner = src
if ("survive")
new_objective = new /datum/objective/survive
new_objective.owner = src
if ("mercenary")
new_objective = new /datum/objective/nuclear
new_objective.owner = src
if ("steal")
if (!istype(objective, /datum/objective/steal))
new_objective = new /datum/objective/steal
new_objective.owner = src
else
new_objective = objective
var/datum/objective/steal/steal = new_objective
if (!steal.select_target())
return
if("download","capture","absorb")
var/def_num
if(objective&&objective.type==text2path("/datum/objective/[new_obj_type]"))
def_num = objective.target_amount
var/target_number = input("Input target number:", "Objective", def_num) as num|null
if (isnull(target_number))//Ordinarily, you wouldn't need isnull. In this case, the value may already exist.
return
switch(new_obj_type)
if("download")
new_objective = new /datum/objective/download
new_objective.explanation_text = "Download [target_number] research levels."
if("capture")
new_objective = new /datum/objective/capture
new_objective.explanation_text = "Accumulate [target_number] capture points."
if("absorb")
new_objective = new /datum/objective/absorb
new_objective.explanation_text = "Absorb [target_number] compatible genomes."
new_objective.owner = src
new_objective.target_amount = target_number
if ("custom")
var/expl = sanitize(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null)
if (!expl) return
new_objective = new /datum/objective
new_objective.owner = src
new_objective.explanation_text = expl
if (!new_objective) return
if (objective)
objectives -= objective
objectives.Insert(objective_pos, new_objective)
if(objectives && objectives.len)
var/num = 1
for(var/datum/objective/O in objectives)
out += "<b>Objective #[num]:</b> [O.explanation_text] "
if(O.completed)
out += "(<font color='green'>complete</font>)"
else
objectives += new_objective
out += "(<font color='red'>incomplete</font>)"
out += " <a href='?src=\ref[src];obj_completed=\ref[O]'>\[toggle\]</a>"
out += " <a href='?src=\ref[src];obj_delete=\ref[O]'>\[remove\]</a><br>"
num++
out += "<br><a href='?src=\ref[src];obj_announce=1'>\[announce objectives\]</a>"
else if (href_list["obj_delete"])
var/datum/objective/objective = locate(href_list["obj_delete"])
if(!istype(objective)) return
objectives -= objective
else
out += "None."
out += "<br><a href='?src=\ref[src];obj_add=1'>\[add\]</a>"
usr << browse(out, "window=edit_memory[src]")
else if(href_list["obj_completed"])
var/datum/objective/objective = locate(href_list["obj_completed"])
if(!istype(objective)) return
objective.completed = !objective.completed
/datum/mind/Topic(href, href_list)
if(!check_rights(R_ADMIN)) return
else if(href_list["implant"])
var/mob/living/carbon/human/H = current
if(href_list["add_antagonist"])
var/datum/antagonist/antag = all_antag_types[href_list["add_antagonist"]]
if(antag) antag.add_antagonist(src)
BITSET(H.hud_updateflag, IMPLOYAL_HUD) // updates that players HUD images so secHUD's pick up they are implanted or not.
else if(href_list["remove_antagonist"])
var/datum/antagonist/antag = all_antag_types[href_list["remove_antagonist"]]
if(antag) antag.remove_antagonist(src)
switch(href_list["implant"])
if("remove")
for(var/obj/item/weapon/implant/loyalty/I in H.contents)
for(var/obj/item/organ/external/organs in H.organs)
if(I in organs.implants)
qdel(I)
break
H << "<span class='notice'><font size =3><B>Your loyalty implant has been deactivated.</font></span>"
log_admin("[key_name_admin(usr)] has de-loyalty implanted [current].")
if("add")
H << "<span class='danger'><font size =3>You somehow have become the recepient of a loyalty transplant, and it just activated!</font>"
H.implant_loyalty(H, override = TRUE)
log_admin("[key_name_admin(usr)] has loyalty implanted [current].")
else if(href_list["equip_antagonist"])
var/datum/antagonist/antag = all_antag_types[href_list["equip_antagonist"]]
if(antag) antag.equip(src.current)
else if(href_list["unequip_antagonist"])
var/datum/antagonist/antag = all_antag_types[href_list["unequip_antagonist"]]
if(antag) antag.unequip(src.current)
else if(href_list["move_antag_to_spawn"])
var/datum/antagonist/antag = all_antag_types[href_list["move_antag_to_spawn"]]
if(antag) antag.place_mob(src.current)
else if (href_list["role_edit"])
var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in joblist
if (!new_role) return
assigned_role = new_role
else if (href_list["memory_edit"])
var/new_memo = sanitize(input("Write new memory", "Memory", memory) as null|message)
if (isnull(new_memo)) return
memory = new_memo
else if (href_list["obj_edit"] || href_list["obj_add"])
var/datum/objective/objective
var/objective_pos
var/def_value
if (href_list["obj_edit"])
objective = locate(href_list["obj_edit"])
if (!objective) return
objective_pos = objectives.Find(objective)
//Text strings are easy to manipulate. Revised for simplicity.
var/temp_obj_type = "[objective.type]"//Convert path into a text string.
def_value = copytext(temp_obj_type, 19)//Convert last part of path into an objective keyword.
if(!def_value)//If it's a custom objective, it will be an empty string.
def_value = "custom"
var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "debrain", "protect", "prevent", "harm", "brig", "hijack", "escape", "survive", "steal", "download", "mercenary", "capture", "absorb", "custom")
if (!new_obj_type) return
var/datum/objective/new_objective = null
switch (new_obj_type)
if ("assassinate","protect","debrain", "harm", "brig")
//To determine what to name the objective in explanation text.
var/objective_type_capital = uppertext(copytext(new_obj_type, 1,2))//Capitalize first letter.
var/objective_type_text = copytext(new_obj_type, 2)//Leave the rest of the text.
var/objective_type = "[objective_type_capital][objective_type_text]"//Add them together into a text string.
var/list/possible_targets = list("Free objective")
for(var/datum/mind/possible_target in ticker.minds)
if ((possible_target != src) && istype(possible_target.current, /mob/living/carbon/human))
possible_targets += possible_target.current
var/mob/def_target = null
var/objective_list[] = list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain)
if (objective&&(objective.type in objective_list) && objective:target)
def_target = objective:target.current
var/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets
if (!new_target) return
var/objective_path = text2path("/datum/objective/[new_obj_type]")
if (new_target == "Free objective")
new_objective = new objective_path
new_objective.owner = src
new_objective:target = null
new_objective.explanation_text = "Free objective"
else
/*
else if (href_list["monkey"])
var/mob/living/L = current
if (L.monkeyizing)
return
switch(href_list["monkey"])
if("healthy")
if (usr.client.holder.rights & R_ADMIN)
var/mob/living/carbon/human/H = current
var/mob/living/carbon/monkey/M = current
if (istype(H))
log_admin("[key_name(usr)] attempting to monkeyize [key_name(current)]")
message_admins("<span class='notice'>[key_name_admin(usr)] attempting to monkeyize [key_name_admin(current)]</span>")
src = null
M = H.monkeyize()
src = M.mind
//world << "DEBUG: \"healthy\": M=[M], M.mind=[M.mind], src=[src]!"
else if (istype(M) && length(M.viruses))
for(var/datum/disease/D in M.viruses)
D.cure(0)
sleep(0) //because deleting of virus is done through spawn(0)
if("infected")
if (usr.client.holder.rights & R_ADMIN)
var/mob/living/carbon/human/H = current
var/mob/living/carbon/monkey/M = current
if (istype(H))
log_admin("[key_name(usr)] attempting to monkeyize and infect [key_name(current)]")
message_admins("<span class='notice'>[key_name_admin(usr)] attempting to monkeyize and infect [key_name_admin(current)]</span>", 1)
src = null
M = H.monkeyize()
src = M.mind
current.contract_disease(new /datum/disease/jungle_fever,1,0)
else if (istype(M))
current.contract_disease(new /datum/disease/jungle_fever,1,0)
if("human")
var/mob/living/carbon/monkey/M = current
if (istype(M))
for(var/datum/disease/D in M.viruses)
if (istype(D,/datum/disease/jungle_fever))
D.cure(0)
sleep(0) //because deleting of virus is doing throught spawn(0)
log_admin("[key_name(usr)] attempting to humanize [key_name(current)]")
message_admins("<span class='notice'>[key_name_admin(usr)] attempting to humanize [key_name_admin(current)]</span>")
var/obj/item/weapon/dnainjector/m2h/m2h = new
var/obj/item/weapon/implant/mobfinder = new(M) //hack because humanizing deletes mind --rastaf0
src = null
m2h.inject(M)
src = mobfinder.loc:mind
qdel(mobfinder)
current.radiation -= 50
*/
else if (href_list["silicon"])
BITSET(current.hud_updateflag, SPECIALROLE_HUD)
switch(href_list["silicon"])
new_objective = new objective_path
new_objective.owner = src
new_objective:target = new_target:mind
//Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
new_objective.explanation_text = "[objective_type] [new_target:real_name], the [new_target:mind:assigned_role=="MODE" ? (new_target:mind:special_role) : (new_target:mind:assigned_role)]."
if("unemag")
var/mob/living/silicon/robot/R = current
if (istype(R))
if ("prevent")
new_objective = new /datum/objective/block
new_objective.owner = src
if ("hijack")
new_objective = new /datum/objective/hijack
new_objective.owner = src
if ("escape")
new_objective = new /datum/objective/escape
new_objective.owner = src
if ("survive")
new_objective = new /datum/objective/survive
new_objective.owner = src
if ("mercenary")
new_objective = new /datum/objective/nuclear
new_objective.owner = src
if ("steal")
if (!istype(objective, /datum/objective/steal))
new_objective = new /datum/objective/steal
new_objective.owner = src
else
new_objective = objective
var/datum/objective/steal/steal = new_objective
if (!steal.select_target())
return
if("download","capture","absorb")
var/def_num
if(objective&&objective.type==text2path("/datum/objective/[new_obj_type]"))
def_num = objective.target_amount
var/target_number = input("Input target number:", "Objective", def_num) as num|null
if (isnull(target_number))//Ordinarily, you wouldn't need isnull. In this case, the value may already exist.
return
switch(new_obj_type)
if("download")
new_objective = new /datum/objective/download
new_objective.explanation_text = "Download [target_number] research levels."
if("capture")
new_objective = new /datum/objective/capture
new_objective.explanation_text = "Accumulate [target_number] capture points."
if("absorb")
new_objective = new /datum/objective/absorb
new_objective.explanation_text = "Absorb [target_number] compatible genomes."
new_objective.owner = src
new_objective.target_amount = target_number
if ("custom")
var/expl = sanitize(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null)
if (!expl) return
new_objective = new /datum/objective
new_objective.owner = src
new_objective.explanation_text = expl
if (!new_objective) return
if (objective)
objectives -= objective
objectives.Insert(objective_pos, new_objective)
else
objectives += new_objective
else if (href_list["obj_delete"])
var/datum/objective/objective = locate(href_list["obj_delete"])
if(!istype(objective)) return
objectives -= objective
else if(href_list["obj_completed"])
var/datum/objective/objective = locate(href_list["obj_completed"])
if(!istype(objective)) return
objective.completed = !objective.completed
else if(href_list["implant"])
var/mob/living/carbon/human/H = current
BITSET(H.hud_updateflag, IMPLOYAL_HUD) // updates that players HUD images so secHUD's pick up they are implanted or not.
switch(href_list["implant"])
if("remove")
for(var/obj/item/weapon/implant/loyalty/I in H.contents)
for(var/obj/item/organ/external/organs in H.organs)
if(I in organs.implants)
qdel(I)
break
H << "<span class='notice'><font size =3><B>Your loyalty implant has been deactivated.</font></span>"
log_admin("[key_name_admin(usr)] has de-loyalty implanted [current].")
if("add")
H << "<span class='danger'><font size =3>You somehow have become the recepient of a loyalty transplant, and it just activated!</font></span>"
H.implant_loyalty(H, override = TRUE)
log_admin("[key_name_admin(usr)] has loyalty implanted [current].")
else
else if (href_list["silicon"])
BITSET(current.hud_updateflag, SPECIALROLE_HUD)
switch(href_list["silicon"])
if("unemag")
var/mob/living/silicon/robot/R = current
if (istype(R))
R.emagged = 0
if (R.activated(R.module.emag))
R.module_active = null
if(R.module_state_1 == R.module.emag)
R.module_state_1 = null
R.contents -= R.module.emag
else if(R.module_state_2 == R.module.emag)
R.module_state_2 = null
R.contents -= R.module.emag
else if(R.module_state_3 == R.module.emag)
R.module_state_3 = null
R.contents -= R.module.emag
log_admin("[key_name_admin(usr)] has unemag'ed [R].")
if("unemagcyborgs")
if (istype(current, /mob/living/silicon/ai))
var/mob/living/silicon/ai/ai = current
for (var/mob/living/silicon/robot/R in ai.connected_robots)
R.emagged = 0
if (R.activated(R.module.emag))
R.module_active = null
if(R.module_state_1 == R.module.emag)
R.module_state_1 = null
R.contents -= R.module.emag
else if(R.module_state_2 == R.module.emag)
R.module_state_2 = null
R.contents -= R.module.emag
else if(R.module_state_3 == R.module.emag)
R.module_state_3 = null
R.contents -= R.module.emag
log_admin("[key_name_admin(usr)] has unemag'ed [R].")
if (R.module)
if (R.activated(R.module.emag))
R.module_active = null
if(R.module_state_1 == R.module.emag)
R.module_state_1 = null
R.contents -= R.module.emag
else if(R.module_state_2 == R.module.emag)
R.module_state_2 = null
R.contents -= R.module.emag
else if(R.module_state_3 == R.module.emag)
R.module_state_3 = null
R.contents -= R.module.emag
log_admin("[key_name_admin(usr)] has unemag'ed [ai]'s Cyborgs.")
if("unemagcyborgs")
if (istype(current, /mob/living/silicon/ai))
var/mob/living/silicon/ai/ai = current
for (var/mob/living/silicon/robot/R in ai.connected_robots)
R.emagged = 0
if (R.module)
if (R.activated(R.module.emag))
R.module_active = null
if(R.module_state_1 == R.module.emag)
R.module_state_1 = null
R.contents -= R.module.emag
else if(R.module_state_2 == R.module.emag)
R.module_state_2 = null
R.contents -= R.module.emag
else if(R.module_state_3 == R.module.emag)
R.module_state_3 = null
R.contents -= R.module.emag
log_admin("[key_name_admin(usr)] has unemag'ed [ai]'s Cyborgs.")
else if (href_list["common"])
switch(href_list["common"])
if("undress")
for(var/obj/item/W in current)
current.drop_from_inventory(W)
if("takeuplink")
take_uplink()
memory = null//Remove any memory they may have had.
if("crystals")
if (usr.client.holder.rights & R_FUN)
var/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink()
var/crystals
else if (href_list["common"])
switch(href_list["common"])
if("undress")
for(var/obj/item/W in current)
current.drop_from_inventory(W)
if("takeuplink")
take_uplink()
memory = null//Remove any memory they may have had.
if("crystals")
if (usr.client.holder.rights & R_FUN)
var/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink()
var/crystals
if (suplink)
crystals = suplink.uses
crystals = input("Amount of telecrystals for [key]","Operative uplink", crystals) as null|num
if (!isnull(crystals))
if (suplink)
crystals = suplink.uses
crystals = input("Amount of telecrystals for [key]","Operative uplink", crystals) as null|num
if (!isnull(crystals))
if (suplink)
suplink.uses = crystals
suplink.uses = crystals
else if (href_list["obj_announce"])
var/obj_count = 1
current << "<span class='notice'>Your current objectives:</span>"
for(var/datum/objective/objective in objectives)
current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
edit_memory()
/*
proc/clear_memory(var/silent = 1)
var/datum/game_mode/current_mode = ticker.mode
else if (href_list["obj_announce"])
var/obj_count = 1
current << "\blue Your current objectives:"
for(var/datum/objective/objective in objectives)
current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
edit_memory()
// remove traitor uplinks
var/list/L = current.get_contents()
for (var/t in L)
if (istype(t, /obj/item/device/pda))
if (t:uplink) qdel(t:uplink)
t:uplink = null
else if (istype(t, /obj/item/device/radio))
if (t:traitorradio) qdel(t:traitorradio)
t:traitorradio = null
t:traitor_frequency = 0.0
else if (istype(t, /obj/item/weapon/SWF_uplink) || istype(t, /obj/item/weapon/syndicate_uplink))
if (t:origradio)
var/obj/item/device/radio/R = t:origradio
R.loc = current.loc
R.traitorradio = null
R.traitor_frequency = 0.0
qdel(t)
/datum/mind/proc/find_syndicate_uplink()
var/list/L = current.get_contents()
for (var/obj/item/I in L)
if (I.hidden_uplink)
return I.hidden_uplink
return null
// remove wizards spells
//If there are more special powers that need removal, they can be procced into here./N
current.spellremove(current)
// clear memory
memory = ""
special_role = null
*/
proc/find_syndicate_uplink()
var/list/L = current.get_contents()
for (var/obj/item/I in L)
if (I.hidden_uplink)
return I.hidden_uplink
return null
proc/take_uplink()
var/obj/item/device/uplink/hidden/H = find_syndicate_uplink()
if(H)
qdel(H)
/datum/mind/proc/take_uplink()
var/obj/item/device/uplink/hidden/H = find_syndicate_uplink()
if(H)
qdel(H)
// check whether this mind's mob has been brigged for the given duration
// have to call this periodically for the duration to work properly
proc/is_brigged(duration)
var/turf/T = current.loc
if(!istype(T))
brigged_since = -1
return 0
var/is_currently_brigged = 0
if(istype(T.loc,/area/security/brig))
is_currently_brigged = 1
for(var/obj/item/weapon/card/id/card in current)
// check whether this mind's mob has been brigged for the given duration
// have to call this periodically for the duration to work properly
/datum/mind/proc/is_brigged(duration)
var/turf/T = current.loc
if(!istype(T))
brigged_since = -1
return 0
var/is_currently_brigged = 0
if(istype(T.loc,/area/security/brig))
is_currently_brigged = 1
for(var/obj/item/weapon/card/id/card in current)
is_currently_brigged = 0
break // if they still have ID they're not brigged
for(var/obj/item/device/pda/P in current)
if(P.id)
is_currently_brigged = 0
break // if they still have ID they're not brigged
for(var/obj/item/device/pda/P in current)
if(P.id)
is_currently_brigged = 0
break // if they still have ID they're not brigged
if(!is_currently_brigged)
brigged_since = -1
return 0
if(!is_currently_brigged)
brigged_since = -1
return 0
if(brigged_since == -1)
brigged_since = world.time
if(brigged_since == -1)
brigged_since = world.time
return (duration <= world.time - brigged_since)
return (duration <= world.time - brigged_since)
/datum/mind/proc/reset()
assigned_role = null
special_role = null
role_alt_title = null
assigned_job = null
//faction = null //Uncommenting this causes a compile error due to 'undefined type', fucked if I know.
changeling = null
initial_account = null
objectives = list()
special_verbs = list()
has_been_rev = 0
rev_cooldown = 0
brigged_since = -1
//Antagonist role check
/mob/living/proc/check_special_role(role)
+2 -4
View File
@@ -192,14 +192,12 @@
var/uplink_true = 0
var/purchases = ""
for(var/obj/item/device/uplink/H in world_uplinks)
if(H && H.uplink_owner && H.uplink_owner == ply)
if(H && H.owner && H.owner == ply)
TC_uses += H.used_TC
uplink_true = 1
var/list/refined_log = new()
for(var/datum/uplink_item/UI in H.purchase_log)
var/obj/I = new UI.path
refined_log.Add("[H.purchase_log[UI]]x\icon[I][UI.name]")
qdel(I)
refined_log.Add("[H.purchase_log[UI]]x[UI.log_icon()][UI.name]")
purchases = english_list(refined_log, nothing_text = "")
if(uplink_true)
text += " (used [TC_uses] TC)"
+1 -1
View File
@@ -120,7 +120,7 @@
code_owner.current << "The nuclear authorization code is: <B>[code]</B>"
else
world << "<spam class='danger'>Could not spawn nuclear bomb. Contact a developer.</span>"
world << "<span class='danger'>Could not spawn nuclear bomb. Contact a developer.</span>"
return
spawned_nuke = code
+1 -1
View File
@@ -7,7 +7,7 @@ var/datum/antagonist/ninja/ninjas
role_text_plural = "Ninja"
bantype = "ninja"
landmark_id = "ninjastart"
welcome_text = "You are an elite mercenary assassin of the Spider Clan. You have a variety of abilities at your disposal, thanks to your nano-enhanced cyber armor.</span>"
welcome_text = "<span class='info'>You are an elite mercenary assassin of the Spider Clan. You have a variety of abilities at your disposal, thanks to your nano-enhanced cyber armor.</span>"
flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_RANDSPAWN | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE
max_antags = 3
max_antags_round = 3
+1 -1
View File
@@ -150,7 +150,7 @@ var/datum/antagonist/raider/raiders
else
win_msg += "<B>The Raiders were repelled!</B>"
world << "<span class='danger'><font size = 3>[win_type] [win_group] victory!</font>"
world << "<span class='danger'><font size = 3>[win_type] [win_group] victory!</font></span>"
world << "[win_msg]"
feedback_set_details("round_end_result","heist - [win_type] [win_group]")
+1 -1
View File
@@ -98,7 +98,7 @@ var/datum/antagonist/cultist/cult
/datum/antagonist/cultist/remove_antagonist(var/datum/mind/player, var/show_message, var/implanted)
if(!..())
return 0
player.current << "<span class='danger'>An unfamiliar white light flashes through your mind, cleansing the taint of the dark-one and the memories of your time as his servant with it."
player.current << "<span class='danger'>An unfamiliar white light flashes through your mind, cleansing the taint of the dark-one and the memories of your time as his servant with it.</span>"
player.memory = ""
if(show_message)
player.current.visible_message("<FONT size = 3>[player.current] looks like they just reverted to their old faith!</FONT>")
+7 -9
View File
@@ -147,19 +147,17 @@ var/datum/antagonist/traitor/traitors
freq += 2
if ((freq % 2) == 0)
freq += 1
freq = freqlist[rand(1, freqlist.len)]
var/obj/item/device/uplink/hidden/T = new(R)
T.uplink_owner = traitor_mob.mind
target_radio.hidden_uplink = T
target_radio.traitor_frequency = freq
traitor_mob << "A portable object teleportation relay has been installed in your [R.name] [loc]. Simply dial the frequency [format_frequency(freq)] to unlock its hidden features."
traitor_mob.mind.store_memory("<B>Radio Freq:</B> [format_frequency(freq)] ([R.name] [loc]).")
freq = freqlist[rand(1, freqlist.len)]
var/obj/item/device/uplink/hidden/T = new(R, traitor_mob.mind)
target_radio.hidden_uplink = T
target_radio.traitor_frequency = freq
traitor_mob << "A portable object teleportation relay has been installed in your [R.name] [loc]. Simply dial the frequency [format_frequency(freq)] to unlock its hidden features."
traitor_mob.mind.store_memory("<B>Radio Freq:</B> [format_frequency(freq)] ([R.name] [loc]).")
else if (istype(R, /obj/item/device/pda))
// generate a passcode if the uplink is hidden in a PDA
var/pda_pass = "[rand(100,999)] [pick("Alpha","Bravo","Delta","Omega")]"
var/obj/item/device/uplink/hidden/T = new(R)
T.uplink_owner = traitor_mob.mind
var/obj/item/device/uplink/hidden/T = new(R, traitor_mob.mind)
R.hidden_uplink = T
var/obj/item/device/pda/P = R
P.lock_code = pda_pass
+4 -1
View File
@@ -220,6 +220,9 @@ its easier to just keep the beam vertical.
/atom/proc/ex_act()
return
/atom/proc/emag_act(var/remaining_charges, var/mob/user, var/emag_source)
return -1
/atom/proc/blob_act()
return
@@ -418,7 +421,7 @@ its easier to just keep the beam vertical.
src.color = initial(src.color) //paint
src.germ_level = 0
if(istype(blood_DNA, /list))
qdel(blood_DNA)
del(blood_DNA)
return 1
-562
View File
@@ -1,562 +0,0 @@
/////////////////////////// DNA HELPER-PROCS
/proc/getleftblocks(input,blocknumber,blocksize)
var/string
if (blocknumber > 1)
string = copytext(input,1,((blocksize*blocknumber)-(blocksize-1)))
return string
else
return null
/proc/getrightblocks(input,blocknumber,blocksize)
var/string
if (blocknumber < (length(input)/blocksize))
string = copytext(input,blocksize*blocknumber+1,length(input)+1)
return string
else
return null
/proc/getblockstring(input,block,subblock,blocksize,src,ui) // src is probably used here just for urls; ui is 1 when requesting for the unique identifier screen, 0 for structural enzymes screen
var/string
var/subpos = 1 // keeps track of the current sub block
var/blockpos = 1 // keeps track of the current block
for(var/i = 1, i <= length(input), i++) // loop through each letter
var/pushstring
if(subpos == subblock && blockpos == block) // if the current block/subblock is selected, mark it
pushstring = "</font color><b>[copytext(input, i, i+1)]</b><font color='blue'>"
else
if(ui) //This is for allowing block clicks to be differentiated
pushstring = "<a href='?src=\ref[src];uimenuset=[num2text(blockpos)];uimenusubset=[num2text(subpos)]'>[copytext(input, i, i+1)]</a>"
else
pushstring = "<a href='?src=\ref[src];semenuset=[num2text(blockpos)];semenusubset=[num2text(subpos)]'>[copytext(input, i, i+1)]</a>"
string += pushstring // push the string to the return string
if(subpos >= blocksize) // add a line break for every block
string += " </font color><font color='#285B5B'>|</font color><font color='blue'> "
subpos = 0
blockpos++
subpos++
return string
/proc/getblock(input,blocknumber,blocksize)
var/result
result = copytext(input ,(blocksize*blocknumber)-(blocksize-1),(blocksize*blocknumber)+1)
return result
/proc/getblockbuffer(input,blocknumber,blocksize)
var/result[3]
var/block = copytext(input ,(blocksize*blocknumber)-(blocksize-1),(blocksize*blocknumber)+1)
for(var/i = 1, i <= 3, i++)
result[i] = copytext(block, i, i+1)
return result
/proc/setblock(istring, blocknumber, replacement, blocksize)
if(!blocknumber)
return istring
if(!istring || !replacement || !blocksize) return 0
var/result = getleftblocks(istring, blocknumber, blocksize) + replacement + getrightblocks(istring, blocknumber, blocksize)
return result
/proc/add_zero2(t, u)
var/temp1
while (length(t) < u)
t = "0[t]"
temp1 = t
if (length(t) > u)
temp1 = copytext(t,2,u+1)
return temp1
/proc/miniscramble(input,rs,rd)
var/output
output = null
if (input == "C" || input == "D" || input == "E" || input == "F")
output = pick(prob((rs*10));"4",prob((rs*10));"5",prob((rs*10));"6",prob((rs*10));"7",prob((rs*5)+(rd));"0",prob((rs*5)+(rd));"1",prob((rs*10)-(rd));"2",prob((rs*10)-(rd));"3")
if (input == "8" || input == "9" || input == "A" || input == "B")
output = pick(prob((rs*10));"4",prob((rs*10));"5",prob((rs*10));"A",prob((rs*10));"B",prob((rs*5)+(rd));"C",prob((rs*5)+(rd));"D",prob((rs*5)+(rd));"2",prob((rs*5)+(rd));"3")
if (input == "4" || input == "5" || input == "6" || input == "7")
output = pick(prob((rs*10));"4",prob((rs*10));"5",prob((rs*10));"A",prob((rs*10));"B",prob((rs*5)+(rd));"C",prob((rs*5)+(rd));"D",prob((rs*5)+(rd));"2",prob((rs*5)+(rd));"3")
if (input == "0" || input == "1" || input == "2" || input == "3")
output = pick(prob((rs*10));"8",prob((rs*10));"9",prob((rs*10));"A",prob((rs*10));"B",prob((rs*10)-(rd));"C",prob((rs*10)-(rd));"D",prob((rs*5)+(rd));"E",prob((rs*5)+(rd));"F")
if (!output) output = "5"
return output
//Instead of picking a value far from the input, this will pick values closer to it.
//Sorry for the block of code, but it's more efficient then calling text2hex -> loop -> hex2text
/proc/miniscrambletarget(input,rs,rd)
var/output = null
switch(input)
if("0")
output = pick(prob((rs*10)+(rd));"0",prob((rs*10)+(rd));"1",prob((rs*10));"2",prob((rs*10)-(rd));"3")
if("1")
output = pick(prob((rs*10)+(rd));"0",prob((rs*10)+(rd));"1",prob((rs*10)+(rd));"2",prob((rs*10));"3",prob((rs*10)-(rd));"4")
if("2")
output = pick(prob((rs*10));"0",prob((rs*10)+(rd));"1",prob((rs*10)+(rd));"2",prob((rs*10)+(rd));"3",prob((rs*10));"4",prob((rs*10)-(rd));"5")
if("3")
output = pick(prob((rs*10)-(rd));"0",prob((rs*10));"1",prob((rs*10)+(rd));"2",prob((rs*10)+(rd));"3",prob((rs*10)+(rd));"4",prob((rs*10));"5",prob((rs*10)-(rd));"6")
if("4")
output = pick(prob((rs*10)-(rd));"1",prob((rs*10));"2",prob((rs*10)+(rd));"3",prob((rs*10)+(rd));"4",prob((rs*10)+(rd));"5",prob((rs*10));"6",prob((rs*10)-(rd));"7")
if("5")
output = pick(prob((rs*10)-(rd));"2",prob((rs*10));"3",prob((rs*10)+(rd));"4",prob((rs*10)+(rd));"5",prob((rs*10)+(rd));"6",prob((rs*10));"7",prob((rs*10)-(rd));"8")
if("6")
output = pick(prob((rs*10)-(rd));"3",prob((rs*10));"4",prob((rs*10)+(rd));"5",prob((rs*10)+(rd));"6",prob((rs*10)+(rd));"7",prob((rs*10));"8",prob((rs*10)-(rd));"9")
if("7")
output = pick(prob((rs*10)-(rd));"4",prob((rs*10));"5",prob((rs*10)+(rd));"6",prob((rs*10)+(rd));"7",prob((rs*10)+(rd));"8",prob((rs*10));"9",prob((rs*10)-(rd));"A")
if("8")
output = pick(prob((rs*10)-(rd));"5",prob((rs*10));"6",prob((rs*10)+(rd));"7",prob((rs*10)+(rd));"8",prob((rs*10)+(rd));"9",prob((rs*10));"A",prob((rs*10)-(rd));"B")
if("9")
output = pick(prob((rs*10)-(rd));"6",prob((rs*10));"7",prob((rs*10)+(rd));"8",prob((rs*10)+(rd));"9",prob((rs*10)+(rd));"A",prob((rs*10));"B",prob((rs*10)-(rd));"C")
if("10")//A
output = pick(prob((rs*10)-(rd));"7",prob((rs*10));"8",prob((rs*10)+(rd));"9",prob((rs*10)+(rd));"A",prob((rs*10)+(rd));"B",prob((rs*10));"C",prob((rs*10)-(rd));"D")
if("11")//B
output = pick(prob((rs*10)-(rd));"8",prob((rs*10));"9",prob((rs*10)+(rd));"A",prob((rs*10)+(rd));"B",prob((rs*10)+(rd));"C",prob((rs*10));"D",prob((rs*10)-(rd));"E")
if("12")//C
output = pick(prob((rs*10)-(rd));"9",prob((rs*10));"A",prob((rs*10)+(rd));"B",prob((rs*10)+(rd));"C",prob((rs*10)+(rd));"D",prob((rs*10));"E",prob((rs*10)-(rd));"F")
if("13")//D
output = pick(prob((rs*10)-(rd));"A",prob((rs*10));"B",prob((rs*10)+(rd));"C",prob((rs*10)+(rd));"D",prob((rs*10)+(rd));"E",prob((rs*10));"F")
if("14")//E
output = pick(prob((rs*10)-(rd));"B",prob((rs*10));"C",prob((rs*10)+(rd));"D",prob((rs*10)+(rd));"E",prob((rs*10)+(rd));"F")
if("15")//F
output = pick(prob((rs*10)-(rd));"C",prob((rs*10));"D",prob((rs*10)+(rd));"E",prob((rs*10)+(rd));"F")
if(!input || !output) //How did this happen?
output = "8"
return output
/proc/isblockon(hnumber, bnumber , var/UI = 0)
var/temp2
temp2 = hex2num(hnumber)
if(UI)
if(temp2 >= 2050)
return 1
else
return 0
if (bnumber == HULKBLOCK || bnumber == TELEBLOCK || bnumber == NOBREATHBLOCK || bnumber == NOPRINTSBLOCK || bnumber == SMALLSIZEBLOCK || bnumber == SHOCKIMMUNITYBLOCK)
if (temp2 >= 3500 + BLOCKADD)
return 1
else
return 0
if (bnumber == XRAYBLOCK || bnumber == FIREBLOCK || bnumber == REMOTEVIEWBLOCK || bnumber == REGENERATEBLOCK || bnumber == INCREASERUNBLOCK || bnumber == REMOTETALKBLOCK || bnumber == MORPHBLOCK)
if (temp2 >= 3050 + BLOCKADD)
return 1
else
return 0
if (temp2 >= 2050 + BLOCKADD)
return 1
else
return 0
/proc/ismuton(var/block,var/mob/M)
return isblockon(getblock(M.dna.struc_enzymes, block,3),block)
/proc/randmutb(mob/M as mob)
if(!M) return
var/num
var/newdna
num = pick(GLASSESBLOCK,COUGHBLOCK,FAKEBLOCK,NERVOUSBLOCK,CLUMSYBLOCK,TWITCHBLOCK,HEADACHEBLOCK,BLINDBLOCK,DEAFBLOCK,HALLUCINATIONBLOCK)
M.dna.check_integrity()
newdna = setblock(M.dna.struc_enzymes,num,toggledblock(getblock(M.dna.struc_enzymes,num,3)),3)
M.dna.struc_enzymes = newdna
return
/proc/randmutg(mob/M as mob)
if(!M) return
var/num
var/newdna
num = pick(HULKBLOCK,XRAYBLOCK,FIREBLOCK,TELEBLOCK,NOBREATHBLOCK,REMOTEVIEWBLOCK,REGENERATEBLOCK,INCREASERUNBLOCK,REMOTETALKBLOCK,MORPHBLOCK,BLENDBLOCK,NOPRINTSBLOCK,SHOCKIMMUNITYBLOCK,SMALLSIZEBLOCK)
M.dna.check_integrity()
newdna = setblock(M.dna.struc_enzymes,num,toggledblock(getblock(M.dna.struc_enzymes,num,3)),3)
M.dna.struc_enzymes = newdna
return
/proc/scramble(var/type, mob/M as mob, var/p)
if(!M) return
M.dna.check_integrity()
if(type)
for(var/i = 1, i <= STRUCDNASIZE-1, i++)
if(prob(p))
M.dna.uni_identity = setblock(M.dna.uni_identity, i, add_zero2(num2hex(rand(1,4095), 1), 3), 3)
updateappearance(M, M.dna.uni_identity)
else
for(var/i = 1, i <= STRUCDNASIZE-1, i++)
if(prob(p))
M.dna.struc_enzymes = setblock(M.dna.struc_enzymes, i, add_zero2(num2hex(rand(1,4095), 1), 3), 3)
domutcheck(M, null)
return
/proc/randmuti(mob/M as mob)
if(!M) return
var/num
var/newdna
num = rand(1,UNIDNASIZE)
M.dna.check_integrity()
newdna = setblock(M.dna.uni_identity,num,add_zero2(num2hex(rand(1,4095),1),3),3)
M.dna.uni_identity = newdna
return
/proc/toggledblock(hnumber) //unused
var/temp3
var/chtemp
temp3 = hex2num(hnumber)
if (temp3 < 2050)
chtemp = rand(2050,4095)
return add_zero2(num2hex(chtemp,1),3)
else
chtemp = rand(1,2049)
return add_zero2(num2hex(chtemp,1),3)
/////////////////////////// DNA HELPER-PROCS
/////////////////////////// DNA MISC-PROCS
/proc/updateappearance(mob/M as mob , structure)
if(istype(M, /mob/living/carbon/human))
M.dna.check_integrity()
var/mob/living/carbon/human/H = M
H.r_hair = hex2num(getblock(structure,1,3))
H.b_hair = hex2num(getblock(structure,2,3))
H.g_hair = hex2num(getblock(structure,3,3))
H.r_facial = hex2num(getblock(structure,4,3))
H.b_facial = hex2num(getblock(structure,5,3))
H.g_facial = hex2num(getblock(structure,6,3))
H.s_tone = round(((hex2num(getblock(structure,7,3)) / 16) - 220))
H.r_eyes = hex2num(getblock(structure,8,3))
H.g_eyes = hex2num(getblock(structure,9,3))
H.b_eyes = hex2num(getblock(structure,10,3))
if(H.internal_organs_by_name["eyes"])
H.update_eyes()
if (isblockon(getblock(structure, 11,3),11 , 1))
H.gender = FEMALE
else
H.gender = MALE
//Hair
var/hairnum = hex2num(getblock(structure,13,3))
var/index = round(1 +(hairnum / 4096)*hair_styles_list.len)
if((0 < index) && (index <= hair_styles_list.len))
H.h_style = hair_styles_list[index]
//Facial Hair
var/beardnum = hex2num(getblock(structure,12,3))
index = round(1 +(beardnum / 4096)*facial_hair_styles_list.len)
if((0 < index) && (index <= facial_hair_styles_list.len))
H.f_style = facial_hair_styles_list[index]
H.update_body(0)
H.update_hair()
return 1
else
return 0
/proc/probinj(var/pr, var/inj)
return prob(pr+inj*pr)
/proc/domutcheck(mob/living/M as mob, connected, inj)
if (!M) return
M.dna.check_integrity()
M.disabilities = 0
M.sdisabilities = 0
var/old_mutations = M.mutations
M.mutations = list()
// M.see_in_dark = 2
// M.see_invisible = 0
if(PLANT in old_mutations)
M.mutations.Add(PLANT)
if(SKELETON in old_mutations)
M.mutations.Add(SKELETON)
if(FAT in old_mutations)
M.mutations.Add(FAT)
if(HUSK in old_mutations)
M.mutations.Add(HUSK)
if(ismuton(NOBREATHBLOCK,M))
if(probinj(45,inj) || (mNobreath in old_mutations))
M << "<span class='notice'>You feel no need to breathe.</span>"
M.mutations.Add(mNobreath)
if(ismuton(REMOTEVIEWBLOCK,M))
if(probinj(45,inj) || (mRemote in old_mutations))
M << "<span class='notice'>Your mind expands.</span>"
M.mutations.Add(mRemote)
if(ismuton(REGENERATEBLOCK,M))
if(probinj(45,inj) || (mRegen in old_mutations))
M << "<span class='notice'>You feel strange.</span>"
M.mutations.Add(mRegen)
if(ismuton(INCREASERUNBLOCK,M))
if(probinj(45,inj) || (mRun in old_mutations))
M << "<span class='notice'>You feel quick.</span>"
M.mutations.Add(mRun)
if(ismuton(REMOTETALKBLOCK,M))
if(probinj(45,inj) || (mRemotetalk in old_mutations))
M << "<span class='notice'>You expand your mind outwards.</span>"
M.mutations.Add(mRemotetalk)
if(ismuton(MORPHBLOCK,M))
if(probinj(45,inj) || (mMorph in old_mutations))
M.mutations.Add(mMorph)
M << "<span class='notice'>Your skin feels strange.</span>"
if(ismuton(BLENDBLOCK,M))
if(probinj(45,inj) || (mBlend in old_mutations))
M.mutations.Add(mBlend)
M << "<span class='notice'>You feel alone.</span>"
if(ismuton(HALLUCINATIONBLOCK,M))
if(probinj(45,inj) || (mHallucination in old_mutations))
M.mutations.Add(mHallucination)
M << "<span class='notice'>Your mind says 'Hello'.</span>"
if(ismuton(NOPRINTSBLOCK,M))
if(probinj(45,inj) || (mFingerprints in old_mutations))
M.mutations.Add(mFingerprints)
M << "<span class='notice'>Your fingers feel numb.</span>"
if(ismuton(SHOCKIMMUNITYBLOCK,M))
if(probinj(45,inj) || (mShock in old_mutations))
M.mutations.Add(mShock)
M << "<span class='notice'>You feel strange.</span>"
if(ismuton(SMALLSIZEBLOCK,M))
if(probinj(45,inj) || (mSmallsize in old_mutations))
M << "<span class='notice'>Your skin feels rubbery.</span>"
M.mutations.Add(mSmallsize)
if (isblockon(getblock(M.dna.struc_enzymes, HULKBLOCK,3),HULKBLOCK))
if(probinj(5,inj) || (HULK in old_mutations))
M << "<span class='notice'>Your muscles hurt.</span>"
M.mutations.Add(HULK)
if (isblockon(getblock(M.dna.struc_enzymes, HEADACHEBLOCK,3),HEADACHEBLOCK))
M.disabilities |= EPILEPSY
M << "<span class='warning'>You get a headache.</span>"
if (isblockon(getblock(M.dna.struc_enzymes, FAKEBLOCK,3),FAKEBLOCK))
M << "<span class='warning'>You feel strange.</span>"
if (prob(95))
if(prob(50))
randmutb(M)
else
randmuti(M)
else
randmutg(M)
if (isblockon(getblock(M.dna.struc_enzymes, COUGHBLOCK,3),COUGHBLOCK))
M.disabilities |= COUGHING
M << "<span class='warning'>You start coughing.</span>"
if (isblockon(getblock(M.dna.struc_enzymes, CLUMSYBLOCK,3),CLUMSYBLOCK))
M << "<span class='warning'>You feel lightheaded.</span>"
M.mutations.Add(CLUMSY)
if (isblockon(getblock(M.dna.struc_enzymes, TWITCHBLOCK,3),TWITCHBLOCK))
M.disabilities |= TOURETTES
M << "<span class='warning'>You twitch.</span></span>"
if (isblockon(getblock(M.dna.struc_enzymes, XRAYBLOCK,3),XRAYBLOCK))
if(probinj(30,inj) || (XRAY in old_mutations))
M << "<span class='notice'>The walls suddenly disappear.</span>"
// M.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
// M.see_in_dark = 8
// M.see_invisible = 2
M.mutations.Add(XRAY)
if (isblockon(getblock(M.dna.struc_enzymes, NERVOUSBLOCK,3),NERVOUSBLOCK))
M.disabilities |= NERVOUS
M << "<span class='warning'>You feel nervous.</span>"
if (isblockon(getblock(M.dna.struc_enzymes, FIREBLOCK,3),FIREBLOCK))
if(probinj(30,inj) || (COLD_RESISTANCE in old_mutations))
M << "<span class='warning'>Your body feels warm.</span>"
M.mutations.Add(COLD_RESISTANCE)
if (isblockon(getblock(M.dna.struc_enzymes, BLINDBLOCK,3),BLINDBLOCK))
M.sdisabilities |= BLIND
M << "<span class='warning'>You can't seem to see anything.</span>"
if (isblockon(getblock(M.dna.struc_enzymes, TELEBLOCK,3),TELEBLOCK))
if(probinj(15,inj) || (TK in old_mutations))
M << "<span class='warning'>You feel smarter.</span>"
M.mutations.Add(TK)
if (isblockon(getblock(M.dna.struc_enzymes, DEAFBLOCK,3),DEAFBLOCK))
M.sdisabilities |= DEAF
M.ear_deaf = 1
M << "<span class='warning'>It's kinda quiet..</span>"
if (isblockon(getblock(M.dna.struc_enzymes, GLASSESBLOCK,3),GLASSESBLOCK))
M.disabilities |= NEARSIGHTED
M << "<span class='warning'>Your eyes feel weird...</span>"
/* If you want the new mutations to work, UNCOMMENT THIS.
if(istype(M, /mob/living/carbon))
for (var/datum/mutations/mut in global_mutations)
mut.check_mutation(M)
*/
//////////////////////////////////////////////////////////// Monkey Block
if (isblockon(getblock(M.dna.struc_enzymes, MONKEYBLOCK,3),MONKEYBLOCK) && istype(M, /mob/living/carbon/human))
// human > monkey
var/mob/living/carbon/human/H = M
H.monkeyizing = 1
var/list/implants = list() //Try to preserve implants.
for(var/obj/item/weapon/implant/W in H)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (H.contents-implants))
if (W==H.w_uniform) // will be teared
continue
H.drop_from_inventory(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("h2monkey", animation)
sleep(48)
qdel(animation)
var/mob/living/carbon/monkey/O = null
if(H.species.primitive)
O = new H.species.primitive(src)
else
H.gib() //Trying to change the species of a creature with no primitive var set is messy.
return
if(M)
if (M.dna)
O.dna = M.dna
M.dna = null
if (M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
for(var/datum/disease/D in M.viruses)
O.viruses += D
D.affected_mob = O
M.viruses -= D
for(var/obj/T in (M.contents-implants))
qdel(T)
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the cute little monkey
if (connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
O.real_name = text("monkey ([])",copytext(md5(M.real_name), 2, 6))
O.take_overall_damage(M.getBruteLoss() + 40, M.getFireLoss())
O.adjustToxLoss(M.getToxLoss() + 20)
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
O.a_intent = "hurt"
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
qdel(M)
return
if (!isblockon(getblock(M.dna.struc_enzymes, MONKEYBLOCK,3),MONKEYBLOCK) && !istype(M, /mob/living/carbon/human))
// monkey > human,
var/mob/living/carbon/monkey/Mo = M
Mo.monkeyizing = 1
var/list/implants = list() //Still preserving implants
for(var/obj/item/weapon/implant/W in Mo)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (Mo.contents-implants))
Mo.drop_from_inventory(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("monkey2h", animation)
sleep(48)
qdel(animation)
var/mob/living/carbon/human/O = new( src )
if(Mo.greaterform)
O.set_species(Mo.greaterform)
if (isblockon(getblock(M.dna.uni_identity, 11,3),11))
O.gender = FEMALE
else
O.gender = MALE
if (M)
if (M.dna)
O.dna = M.dna
M.dna = null
if (M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
for(var/datum/disease/D in M.viruses)
O.viruses += D
D.affected_mob = O
M.viruses -= D
//for(var/obj/T in M)
// qdel(T)
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the human
if (connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
var/i
while (!i)
var/randomname
if (O.gender == MALE)
randomname = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names)))
else
randomname = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names)))
if (findname(randomname))
continue
else
O.real_name = randomname
i++
updateappearance(O,O.dna.uni_identity)
O.take_overall_damage(M.getBruteLoss(), M.getFireLoss())
O.adjustToxLoss(M.getToxLoss())
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
qdel(M)
return
//////////////////////////////////////////////////////////// Monkey Block
if(M)
M.update_icon = 1 //queue a full icon update at next life() call
return null
/////////////////////////// DNA MISC-PROCS
+4 -4
View File
@@ -12,7 +12,7 @@
//testing("Cannot monkey-ify [M], type is [M.type].")
return
var/mob/living/carbon/human/H = M
H.monkeyizing = 1
H.transforming = 1
var/list/implants = list() //Try to preserve implants.
for(var/obj/item/weapon/implant/W in H)
implants += W
@@ -23,7 +23,7 @@
if (W==H.w_uniform) // will be teared
continue
H.drop_from_inventory(W)
M.monkeyizing = 1
M.transforming = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
@@ -90,7 +90,7 @@
//testing("Cannot humanize [M], type is [M.type].")
return
var/mob/living/carbon/monkey/Mo = M
Mo.monkeyizing = 1
Mo.transforming = 1
var/list/implants = list() //Still preserving implants
for(var/obj/item/weapon/implant/W in Mo)
implants += W
@@ -98,7 +98,7 @@
if(!connected)
for(var/obj/item/W in (Mo.contents-implants))
Mo.drop_from_inventory(W)
M.monkeyizing = 1
M.transforming = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
@@ -374,7 +374,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
for (var/obj/item/weapon/implant/I in C) //Still preserving implants
implants += I
C.monkeyizing = 1
C.transforming = 1
C.canmove = 0
C.icon = null
C.overlays.Cut()
-1
View File
@@ -6,6 +6,5 @@
required_players = 5
required_players_secret = 15
required_enemies = 3
uplink_welcome = "Nar-Sie Uplink Console:"
end_on_antag_death = 1
antag_tag = MODE_CULTIST
+2 -2
View File
@@ -138,7 +138,7 @@
var/mob/living/M = A
if(M.stat != DEAD)
if(M.monkeyizing)
if(M.transforming)
return
if(M.has_brain_worms())
return //Borer stuff - RR
@@ -146,7 +146,7 @@
if(iscultist(M)) return
if(!ishuman(M) && !isrobot(M)) return
M.monkeyizing = 1
M.transforming = 1
M.canmove = 0
M.icon = null
M.overlays.len = 0
+1 -1
View File
@@ -425,7 +425,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
if(botEmagChance)
for(var/obj/machinery/bot/bot in machines)
if(prob(botEmagChance))
bot.Emag()
bot.emag_act(1)
/*
+1 -80
View File
@@ -61,85 +61,6 @@ var/global/list/additional_antag_types = list()
var/event_delay_mod_moderate // Modifies the timing of random events.
var/event_delay_mod_major // As above.
var/uplink_welcome = "Illegal Uplink Console:"
var/uplink_uses = 12
var/list/datum/uplink_item/uplink_items = list(
"Ammunition" = list(
new/datum/uplink_item(/obj/item/ammo_magazine/a357, 2, ".357", "RA"),
new/datum/uplink_item(/obj/item/ammo_magazine/mc9mm, 2, "9mm", "R9"),
new/datum/uplink_item(/obj/item/ammo_magazine/chemdart, 2, "Darts", "AD"),
new/datum/uplink_item(/obj/item/weapon/storage/box/sniperammo, 2, "14.5mm", "SA")
),
"Highly Visible and Dangerous Weapons" = list(
new/datum/uplink_item(/obj/item/weapon/storage/box/emps, 3, "5 EMP Grenades", "EM"),
new/datum/uplink_item(/obj/item/weapon/melee/energy/sword, 4, "Energy Sword", "ES"),
new/datum/uplink_item(/obj/item/weapon/gun/projectile/dartgun, 5, "Dart Gun", "DG"),
new/datum/uplink_item(/obj/item/weapon/gun/energy/crossbow, 5, "Energy Crossbow", "XB"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/g9mm, 5, "Silenced 9mm", "S9"),
new/datum/uplink_item(/obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, 6, "Exosuit Rigged Laser", "RL"),
new/datum/uplink_item(/obj/item/weapon/gun/projectile/revolver, 6, "Revolver", "RE"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndicate, 10, "Mercenary Bundle", "BU"),
new/datum/uplink_item(/obj/item/weapon/gun/projectile/heavysniper, 12, "Anti-materiel Rifle", "AMR")
),
"Stealthy and Inconspicuous Weapons" = list(
new/datum/uplink_item(/obj/item/weapon/soap/syndie, 1, "Subversive Soap", "SP"),
new/datum/uplink_item(/obj/item/weapon/cane/concealed, 2, "Concealed Cane Sword", "CC"),
new/datum/uplink_item(/obj/item/weapon/cartridge/syndicate, 3, "Detomatix PDA Cartridge", "DC"),
new/datum/uplink_item(/obj/item/weapon/pen/reagent/paralysis, 3, "Paralysis Pen", "PP"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/cigarette, 4, "Cigarette Kit", "BH"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/toxin, 4, "Random Toxin - Beaker", "RT")
),
"Stealth and Camouflage Items" = list(
new/datum/uplink_item(/obj/item/weapon/card/id/syndicate, 2, "Agent ID card", "AC"),
new/datum/uplink_item(/obj/item/clothing/shoes/syndigaloshes, 2, "No-Slip Shoes", "SH"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/spy, 2, "Bug Kit", "BK"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/chameleon, 3, "Chameleon Kit", "CB"),
new/datum/uplink_item(/obj/item/device/chameleon, 4, "Chameleon-Projector", "CP"),
new/datum/uplink_item(/obj/item/clothing/mask/gas/voice, 4, "Voice Changer", "VC"),
new/datum/uplink_item(/obj/item/weapon/disk/file/cameras/syndicate, 6, "Camera Network Access - Floppy", "SF")
),
"Devices and Tools" = list(
new/datum/uplink_item(/obj/item/weapon/storage/toolbox/syndicate, 1, "Fully Loaded Toolbox", "ST"),
new/datum/uplink_item(/obj/item/weapon/plastique, 2, "C-4 (Destroys walls)", "C4"),
new/datum/uplink_item(/obj/item/device/encryptionkey/syndicate, 2, "Encrypted Radio Channel Key", "ER"),
new/datum/uplink_item(/obj/item/device/encryptionkey/binary, 3, "Binary Translator Key", "BT"),
new/datum/uplink_item(/obj/item/weapon/card/emag, 3, "Cryptographic Sequencer", "EC"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/clerical, 3, "Morphic Clerical Kit", "CK"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/space, 3, "Space Suit", "SS"),
new/datum/uplink_item(/obj/item/clothing/glasses/thermal/syndi, 3, "Thermal Imaging Glasses", "TM"),
new/datum/uplink_item(/obj/item/clothing/suit/storage/vest/heavy/merc, 4, "Heavy Armor Vest", "HAV"),
new/datum/uplink_item(/obj/item/weapon/aiModule/syndicate, 7, "Hacked AI Upload Module", "AI"),
new/datum/uplink_item(/obj/item/device/powersink, 5, "Powersink (DANGER!)", "PS",),
new/datum/uplink_item(/obj/item/device/radio/beacon/syndicate, 7, "Singularity Beacon (DANGER!)", "SB"),
new/datum/uplink_item(/obj/item/weapon/circuitboard/teleporter, 20, "Teleporter Circuit Board", "TP")
),
"Implants" = list(
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_freedom, 3, "Freedom Implant", "FI"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_compress, 4, "Compressed Matter Implant", "CI"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_explosive, 6, "Explosive Implant (DANGER!)", "EI"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_uplink, 10, "Uplink Implant (Contains 5 Telecrystals)", "UI")
),
"Medical" = list(
new/datum/uplink_item(/obj/item/weapon/storage/box/sinpockets, 1, "Box of Sin-Pockets", "DP"),
new/datum/uplink_item(/obj/item/weapon/storage/firstaid/surgery, 5, "Surgery kit", "SK"),
new/datum/uplink_item(/obj/item/weapon/storage/firstaid/combat, 5, "Combat medical kit", "CM")
),
"Hardsuit Modules" = list(
new/datum/uplink_item(/obj/item/rig_module/vision/thermal, 2, "Thermal Scanner", "RTS"),
new/datum/uplink_item(/obj/item/rig_module/fabricator/energy_net, 3, "Net Projector", "REN"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/ewar_voice, 4, "Electrowarfare Suite and Voice Synthesiser", "REV"),
new/datum/uplink_item(/obj/item/rig_module/maneuvering_jets, 4, "Maneuvering Jets", "RMJ"),
new/datum/uplink_item(/obj/item/rig_module/mounted/egun, 6, "Mounted Energy Gun", "REG"),
new/datum/uplink_item(/obj/item/rig_module/power_sink, 6, "Power Sink", "RPS"),
new/datum/uplink_item(/obj/item/rig_module/mounted, 8, "Mounted Laser Cannon", "RLC")
),
"(Pointless) Badassery" = list(
new/datum/uplink_item(/obj/item/toy/syndicateballoon, 10, "For showing that You Are The BOSS (Useless Balloon)", "BS"),
new/datum/uplink_item(/obj/item/toy/nanotrasenballoon, 10, "For showing that you love NT SOO much (Useless Balloon)", "NT")
)
)
/datum/game_mode/Topic(href, href_list[])
if(..())
return
@@ -685,7 +606,7 @@ proc/display_roundstart_logout_report()
msg += "<b>[L.name]</b> ([ckey(D.mind.key)]), the [L.job] (<font color='red'><b>Ghosted</b></font>)\n"
continue //Ghosted while alive
msg += "</span>" // close the <span class='notice'> from right at the top
msg += "</span>" // close the span from right at the top
for(var/mob/M in mob_list)
if(M.client && M.client.holder)
@@ -2,7 +2,6 @@
name = "AI malfunction"
round_description = "The AI is behaving abnormally and must be stopped."
extended_round_description = "The AI will attempt to hack the APCs around the station in order to gain as much control as possible."
uplink_welcome = "Crazy AI Uplink Console:"
config_tag = "malfunction"
required_players = 2
required_players_secret = 7
-1
View File
@@ -7,7 +7,6 @@
config_tag = "meteor"
required_players = 0
votable = 0
uplink_welcome = "EVIL METEOR Uplink Console:"
deny_respawn = 1
var/next_wave = METEOR_DELAY
-2
View File
@@ -14,8 +14,6 @@ var/list/nuke_disks = list()
end_on_antag_death = 1
antag_tag = MODE_MERCENARY
uplink_welcome = "Corporate Backed Uplink Console:"
uplink_uses = 40
var/nuke_off_station = 0 //Used for tracking if the syndies actually haul the nuke to the station
var/syndies_didnt_escape = 0 //Used for tracking if the syndies got the shuttle off of the z-level
@@ -7,8 +7,6 @@
required_players_secret = 15
required_enemies = 3
auto_recall_shuttle = 1
uplink_welcome = "AntagCorp Uplink Console:"
uplink_uses = 10
end_on_antag_death = 1
shuttle_delay = 3
antag_tag = MODE_REVOLUTIONARY
+1 -2
View File
@@ -5,7 +5,6 @@
config_tag = "traitor"
required_players = 0
required_enemies = 1
uplink_welcome = "AntagCorp Portable Teleportation Relay:"
end_on_antag_death = 1
antag_scaling_coeff = 10
antag_tag = MODE_TRAITOR
antag_tag = MODE_TRAITOR
-2
View File
@@ -6,7 +6,5 @@
required_players = 1
required_players_secret = 10
required_enemies = 1
uplink_welcome = "Wizardly Uplink Console:"
uplink_uses = 10
end_on_antag_death = 1
antag_tag = MODE_WIZARD
+1 -1
View File
@@ -14,7 +14,7 @@
region = ACCESS_REGION_SECURITY
/var/const/access_brig = 2 // Brig timers and permabrig
/datum/access/security
/datum/access/holding
id = access_brig
desc = "Holding Cells"
region = ACCESS_REGION_SECURITY
@@ -175,15 +175,15 @@
C.add_fingerprint(user)
cell = C
C.loc = src
user.visible_message("<span class='notice'>[user] opens the panel on [src] and inserts [C].<span class='notice'>", "<span class='notice'>You open the panel on [src] and insert [C].<span class='notice'>")
user.visible_message("<span class='notice'>[user] opens the panel on [src] and inserts [C].</span>", "<span class='notice'>You open the panel on [src] and insert [C].</span>")
return
if(istype(I, /obj/item/weapon/screwdriver))
if(!cell)
user << "<span class='warning'>There is no power cell installed.<span class='notice'>"
user << "<span class='warning'>There is no power cell installed.</span>"
return
user.visible_message("<span class='notice'>[user] opens the panel on [src] and removes [cell].<span class='notice'>", "<span class='notice'>You open the panel on [src] and remove [cell].<span class='notice'>")
user.visible_message("<span class='notice'>[user] opens the panel on [src] and removes [cell].</span>", "<span class='notice'>You open the panel on [src] and remove [cell].</span>")
cell.add_fingerprint(user)
cell.loc = src.loc
cell = null
+1 -1
View File
@@ -262,7 +262,7 @@
if(!making || !src) return
//Create the desired item.
var/obj/item/I = new making.path(get_step(loc, get_dir(src,usr)))
var/obj/item/I = new making.path(loc)
if(multiplier > 1 && istype(I, /obj/item/stack))
var/obj/item/stack/S = I
S.amount = multiplier
+6 -5
View File
@@ -32,15 +32,18 @@
if (src.health <= 0)
src.explode()
/obj/machinery/bot/proc/Emag(mob/user as mob)
if(locked)
/obj/machinery/bot/emag_act(var/remaining_charges, var/user)
if(locked && !emagged)
locked = 0
emagged = 1
user << "<span class='warning'>You short out [src]'s maintenance hatch lock.</span>"
log_and_message_admins("emagged [src]'s maintenance hatch lock")
if(!locked && open)
return 1
if(!locked && open && emagged == 1)
emagged = 2
log_and_message_admins("emagged [src]'s inner circuits")
return 1
/obj/machinery/bot/examine(mob/user)
..(user)
@@ -65,8 +68,6 @@
user << "<span class='notice'>Unable to repair with the maintenance panel closed.</span>"
else
user << "<span class='notice'>[src] does not need a repair.</span>"
else if (istype(W, /obj/item/weapon/card/emag) && emagged < 2)
Emag(user)
else
if(hasvar(W,"force") && hasvar(W,"damtype"))
switch(W.damtype)
+9 -8
View File
@@ -88,12 +88,7 @@
// cell: insert it
// other: chance to knock rider off bot
/obj/machinery/bot/mulebot/attackby(var/obj/item/I, var/mob/user)
if(istype(I,/obj/item/weapon/card/emag))
locked = !locked
user << "<span class='notice'>You [locked ? "lock" : "unlock"] the mulebot's controls!</span>"
flick("mulebot-emagged", src)
playsound(src.loc, 'sound/effects/sparks1.ogg', 100, 0)
else if(istype(I,/obj/item/weapon/cell) && open && !cell)
if(istype(I,/obj/item/weapon/cell) && open && !cell)
var/obj/item/weapon/cell/C = I
user.drop_item()
C.loc = src
@@ -106,11 +101,11 @@
open = !open
if(open)
src.visible_message("[user] opens the maintenance hatch of [src]", "<span class='notice'>You open [src]'s maintenance hatch.")
src.visible_message("[user] opens the maintenance hatch of [src]", "<span class='notice'>You open [src]'s maintenance hatch.</span>")
on = 0
icon_state="mulebot-hatch"
else
src.visible_message("[user] closes the maintenance hatch of [src]", "<span class='notice'>You close [src]'s maintenance hatch.")
src.visible_message("[user] closes the maintenance hatch of [src]", "<span class='notice'>You close [src]'s maintenance hatch.</span>")
icon_state = "mulebot0"
updateDialog()
@@ -133,6 +128,12 @@
..()
return
/obj/machinery/bot/mulebot/emag_act(var/remaining_charges, var/user)
locked = !locked
user << "<span class='notice'>You [locked ? "lock" : "unlock"] the mulebot's controls!</span>"
flick("mulebot-emagged", src)
playsound(src.loc, 'sound/effects/sparks1.ogg', 100, 0)
return 1
/obj/machinery/bot/mulebot/ex_act(var/severity)
unload(0)
+2 -2
View File
@@ -130,11 +130,11 @@
/mob/living/silicon/ai/proc/ai_camera_track(var/target_name in trackable_mobs())
set category = "AI Commands"
set name = "Track With Camera"
set name = "Follow With Camera"
set desc = "Select who you would like to track."
if(src.stat == 2)
src << "You can't track with camera because you are dead!"
src << "You can't follow [target_name] with cameras because you are dead!"
return
if(!target_name)
src.cameraFollow = null
+9 -8
View File
@@ -216,13 +216,6 @@
else
locked = 0
user << "System unlocked."
else if(istype(W, /obj/item/weapon/card/emag))
if(isnull(occupant))
return
user << "You force an emergency ejection."
locked = 0
go_out()
return
else if(istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat))
user << "<span class='notice'>\The [src] processes \the [W].</span>"
biomass += 50
@@ -252,6 +245,14 @@
else
..()
/obj/machinery/clonepod/emag_act(var/remaining_charges, var/mob/user)
if(isnull(occupant))
return
user << "You force an emergency ejection."
locked = 0
go_out()
return 1
//Put messages in the connected computer's temp var for display.
/obj/machinery/clonepod/proc/connected_message(var/message)
if((isnull(connected)) || (!istype(connected, /obj/machinery/computer/cloning)))
@@ -306,7 +307,7 @@
occupant.client.perspective = MOB_PERSPECTIVE
occupant.loc = loc
eject_wait = 0 //If it's still set somehow.
domutcheck(occupant) //Waiting until they're out before possible monkeyizing.
domutcheck(occupant) //Waiting until they're out before possible transforming.
occupant = null
biomass -= CLONE_BIOMASS
+3 -7
View File
@@ -221,8 +221,8 @@
return
/obj/machinery/computer/arcade/attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
/obj/machinery/computer/arcade/emag_act(var/charges, var/mob/user)
if(!emagged)
temp = "If you die in the game, you die for real!"
player_hp = 30
player_mp = 10
@@ -230,17 +230,13 @@
enemy_mp = 20
gameover = 0
blocked = 0
emagged = 1
enemy_name = "Cuban Pete"
name = "Outbomb Cuban Pete"
src.updateUsrDialog()
else
..()
return 1
/obj/machinery/computer/arcade/emp_act(severity)
if(stat & (NOPOWER|BROKEN))
@@ -31,14 +31,13 @@
return 1
ui_interact(user)
/obj/machinery/computer/atmoscontrol/attackby(var/obj/item/I as obj, var/mob/user as mob)
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
user.visible_message("<span class='warning'>\The [user] swipes \a [I] through \the [src], causing the screen to flash!</span>",\
"<span class='warning'>You swipe your [I] through \the [src], the screen flashing as you gain full control.</span>",\
"You hear the swipe of a card through a reader, and an electronic warble.")
/obj/machinery/computer/atmoscontrol/emag_act(var/remaining_carges, var/mob/user)
if(!emagged)
user.visible_message("<span class='warning'>\The [user] does something \the [src], causing the screen to flash!</span>",\
"<span class='warning'>You cause the screen to flash as you gain full control.</span>",\
"You hear an electronic warble.")
atmos_control.emagged = 1
return
return ..()
return 1
/obj/machinery/computer/atmoscontrol/ui_interact(var/mob/user)
if(!atmos_control)
+18 -31
View File
@@ -7,7 +7,7 @@
var/authorised = 0
var/possibleNets[0]
var/network = ""
build_path = 0
build_path = null
//when adding a new camera network, you should only need to update these two procs
New()
@@ -19,36 +19,24 @@
possibleNets["Medbay"] = access_cmo
proc/updateBuildPath()
build_path = ""
build_path = null
if(authorised && secured)
switch(network)
if("SS13")
build_path = "/obj/machinery/computer/security"
build_path = /obj/machinery/computer/security
if("Engineering")
build_path = "/obj/machinery/computer/security/engineering"
build_path = /obj/machinery/computer/security/engineering
if("Mining")
build_path = "/obj/machinery/computer/security/mining"
build_path = /obj/machinery/computer/security/mining
if("Research")
build_path = "/obj/machinery/computer/security/research"
build_path = /obj/machinery/computer/security/research
if("Medbay")
build_path = "/obj/machinery/computer/security/medbay"
build_path = /obj/machinery/computer/security/medbay
if("Cargo")
build_path = "/obj/machinery/computer/security/cargo"
build_path = /obj/machinery/computer/security/cargo
attackby(var/obj/item/I, var/mob/user)//if(health > 50)
..()
if(istype(I,/obj/item/weapon/card/emag))
if(network)
var/obj/item/weapon/card/emag/E = I
if(E.uses)
E.uses--
else
return
authorised = 1
user << "<span class='notice'>You authorised the circuit network!</span>"
updateDialog()
else
user << "<span class='warning'>You must select a camera network circuit!</span>"
else if(istype(I,/obj/item/weapon/screwdriver))
secured = !secured
user.visible_message("<span class='notice'>The [src] can [secured ? "no longer" : "now"] be modified.</span>")
@@ -107,17 +95,7 @@
else if (possibleNets[network] in I.access)
authorised = 1
if(istype(I,/obj/item/weapon/card/emag))
if(network)
var/obj/item/weapon/card/emag/E = I
if(E.uses)
E.uses--
else
return
authorised = 1
usr << "<span class='notice'>You authorised the circuit network!</span>"
updateDialog()
else
usr << "<span class='warning'>You must select a camera network circuit!</span>"
I.resolve_attackby(src, usr)
else if( href_list["removeauth"] )
authorised = 0
updateDialog()
@@ -125,3 +103,12 @@
updateDialog()
if(istype(src.loc,/mob))
attack_self(src.loc)
/obj/item/weapon/circuitboard/camera/emag_act(var/remaining_charges, var/mob/user)
if(network)
authorised = 1
user << "<span class='notice'>You authorised the circuit network!</span>"
updateDialog()
return 1
else
user << "<span class='warning'>You must select a camera network circuit!</span>"
@@ -269,11 +269,11 @@
src.updateUsrDialog()
/obj/machinery/computer/communications/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I,/obj/item/weapon/card/emag/))
/obj/machinery/computer/communications/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
src.emagged = 1
user << "You scramble the communication routing circuits!"
..()
return 1
/obj/machinery/computer/communications/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
+20 -18
View File
@@ -37,24 +37,6 @@
return
if(!istype(user))
return
if(istype(O,/obj/item/weapon/card/emag/))
// Will create sparks and print out the console's password. You will then have to wait a while for the console to be back online.
// It'll take more time if there's more characters in the password..
if(!emag)
if(!isnull(src.linkedServer))
icon_state = hack_icon // An error screen I made in the computers.dmi
emag = 1
screen = 2
spark_system.set_up(5, 0, src)
src.spark_system.start()
var/obj/item/weapon/paper/monitorkey/MK = new/obj/item/weapon/paper/monitorkey
MK.loc = src.loc
// Will help make emagging the console not so easy to get away with.
MK.info += "<br><br><font color='red'>£%@%(*$%&(£&?*(%&£/{}</font>"
spawn(100*length(src.linkedServer.decryptkey)) UnmagConsole()
message = rebootmsg
else
user << "<span class='notice'>A no server error appears on the screen.</span>"
if(isscrewdriver(O) && emag)
//Stops people from just unscrewing the monitor and putting it back to get the console working again.
user << "<span class='warning'>It is too hot to mess with!</span>"
@@ -63,6 +45,26 @@
..()
return
/obj/machinery/computer/message_monitor/emag_act(var/remaining_charges, var/mob/user)
// Will create sparks and print out the console's password. You will then have to wait a while for the console to be back online.
// It'll take more time if there's more characters in the password..
if(!emag && operable())
if(!isnull(src.linkedServer))
icon_state = hack_icon // An error screen I made in the computers.dmi
emag = 1
screen = 2
spark_system.set_up(5, 0, src)
src.spark_system.start()
var/obj/item/weapon/paper/monitorkey/MK = new/obj/item/weapon/paper/monitorkey
MK.loc = src.loc
// Will help make emagging the console not so easy to get away with.
MK.info += "<br><br><font color='red'>£%@%(*$%&(£&?*(%&£/{}</font>"
spawn(100*length(src.linkedServer.decryptkey)) UnmagConsole()
message = rebootmsg
return 1
else
user << "<span class='notice'>A no server error appears on the screen.</span>"
/obj/machinery/computer/message_monitor/update_icon()
..()
if(stat & (NOPOWER|BROKEN))
@@ -47,9 +47,6 @@ var/prison_shuttle_timeleft = 0
A.icon_state = "4"
qdel(src)
else if(istype(I,/obj/item/weapon/card/emag) && (!hacked))
hacked = 1
user << "<span class='notice'>You disable the lock.</span>"
else
return src.attack_hand(user)
@@ -235,3 +232,9 @@ var/prison_shuttle_timeleft = 0
start_location.move_contents_to(end_location)
return
/obj/machinery/computer/prison_shuttle/emag_act(var/charges, var/mob/user)
if(!hacked)
hacked = 1
user << "<span class='notice'>You disable the lock.</span>"
return 1
@@ -249,11 +249,8 @@ var/specops_shuttle_timeleft = 0
/obj/machinery/computer/specops_shuttle/attack_ai(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/specops_shuttle/attackby(I as obj, user as mob)
if(istype(I,/obj/item/weapon/card/emag))
user << "<span class='notice'>The electronic systems in this console are far too advanced for your primitive hacking peripherals.</span>"
else
return attack_hand(user)
/obj/machinery/computer/specops_shuttle/emag_act(var/remaining_charges, var/mob/user)
user << "<span class='notice'>The electronic systems in this console are far too advanced for your primitive hacking peripherals.</span>"
/obj/machinery/computer/specops_shuttle/attack_hand(var/mob/user as mob)
if(!allowed(user))
@@ -291,8 +288,8 @@ var/specops_shuttle_timeleft = 0
usr << "<span class='notice'>Central Command will not allow the Special Operations shuttle to return yet.</span>"
if(world.timeofday <= specops_shuttle_timereset)
if (((world.timeofday - specops_shuttle_timereset)/10) > 60)
usr << "<span class='notice'>[-((world.timeofday - specops_shuttle_timereset)/10)/60] minutes remain!"
usr << "<span class='notice'>[-(world.timeofday - specops_shuttle_timereset)/10] seconds remain!"
usr << "<span class='notice'>[-((world.timeofday - specops_shuttle_timereset)/10)/60] minutes remain!</span>"
usr << "<span class='notice'>[-(world.timeofday - specops_shuttle_timereset)/10] seconds remain!</span>"
return
usr << "<span class='notice'>The Special Operations shuttle will arrive at Central Command in [(SPECOPS_MOVETIME/10)] seconds.</span>"
+3 -6
View File
@@ -207,14 +207,11 @@
onclose(user, "computer")
return
/obj/machinery/computer/supplycomp/attackby(I as obj, user as mob)
if(istype(I,/obj/item/weapon/card/emag) && !hacked)
/obj/machinery/computer/supplycomp/emag_act(var/remaining_charges, var/mob/user)
if(!hacked)
user << "<span class='notice'>Special supplies unlocked.</span>"
hacked = 1
return
else
..()
return
return 1
/obj/machinery/computer/supplycomp/Topic(href, href_list)
if(!supply_controller)
@@ -185,11 +185,8 @@ var/syndicate_elite_shuttle_timeleft = 0
/obj/machinery/computer/syndicate_elite_shuttle/attack_ai(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/syndicate_elite_shuttle/attackby(I as obj, user as mob)
if(istype(I,/obj/item/weapon/card/emag))
user << "<span class='notice'>The electronic systems in this console are far too advanced for your primitive hacking peripherals.</span>"
else
return attack_hand(user)
/obj/machinery/computer/syndicate_elite_shuttle/emag_act(var/remaining_charges, var/mob/user)
user << "<span class='notice'>The electronic systems in this console are far too advanced for your primitive hacking peripherals.</span>"
/obj/machinery/computer/syndicate_elite_shuttle/attack_hand(var/mob/user as mob)
if(!allowed(user))
+1 -1
View File
@@ -124,7 +124,7 @@
return
if(!Adjacent(usr))
usr << "You can't reach it.</span>"
usr << "<span class='warning'>You can't reach it.</span>"
return
close_laptop(usr)
+2 -2
View File
@@ -393,9 +393,9 @@
occupant.ckey = null
//Make an announcement and log the person entering storage.
control_computer.frozen_crew += "[occupant.real_name], [occupant.mind.assigned_role] - [worldtime2text()]"
control_computer.frozen_crew += "[occupant.real_name], [occupant.mind.role_alt_title] - [worldtime2text()]"
announce.autosay("[occupant.real_name], [occupant.mind.assigned_role] [on_store_message]", "[on_store_name]")
announce.autosay("[occupant.real_name], [occupant.mind.role_alt_title], [on_store_message]", "[on_store_name]")
visible_message("<span class='notice'>\The [initial(name)] hums and hisses as it moves [occupant.real_name] into storage.</span>", 3)
// Delete the mob.
+21 -19
View File
@@ -186,25 +186,6 @@ for reference:
visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
return
return
else if (istype(W, /obj/item/weapon/card/emag))
if (src.emagged == 0)
src.emagged = 1
src.req_access.Cut()
src.req_one_access.Cut()
user << "You break the ID authentication lock on \the [src]."
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
return
else if (src.emagged == 1)
src.emagged = 2
user << "You short out the anchoring mechanism on \the [src]."
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
return
else if (istype(W, /obj/item/weapon/wrench))
if (src.health < src.maxhealth)
src.health = src.maxhealth
@@ -276,3 +257,24 @@ for reference:
explosion(src.loc,-1,-1,0)
if(src)
qdel(src)
/obj/machinery/deployable/barrier/emag_act(var/remaining_charges, var/mob/user)
if (src.emagged == 0)
src.emagged = 1
src.req_access.Cut()
src.req_one_access.Cut()
user << "You break the ID authentication lock on \the [src]."
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
return 1
else if (src.emagged == 1)
src.emagged = 2
user << "You short out the anchoring mechanism on \the [src]."
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
return 1
+5 -2
View File
@@ -40,11 +40,14 @@
*/
if(istype(W, /obj/item/device/detective_scanner))
return
if(istype(W, /obj/item/weapon/card/emag))
return src.attack_hand(user)
/obj/machinery/button/remote/emag_act(var/remaining_charges, var/mob/user)
if(req_access.len || req_one_access.len)
req_access = list()
req_one_access = list()
playsound(src.loc, "sparks", 100, 1)
return src.attack_hand(user)
return 1
/obj/machinery/button/remote/attack_hand(mob/user as mob)
if(..())
+5
View File
@@ -171,6 +171,11 @@ obj/machinery/door/blast/regular
icon_state = "pdoor1"
maxhealth = 600
obj/machinery/door/blast/regular/open
icon_state = "pdoor0"
density = 0
opacity = 0
// SUBTYPE: Shutters
// Nicer looking, and also weaker, shutters. Found in kitchen and similar areas.
/obj/machinery/door/blast/shutters
+8 -7
View File
@@ -272,13 +272,6 @@
if(src.operating) return
if(src.density && (operable() && istype(I, /obj/item/weapon/card/emag)))
do_animate("spark")
sleep(6)
open()
operating = -1
return 1
if(src.allowed(user) && operable())
if(src.density)
open()
@@ -290,6 +283,14 @@
do_animate("deny")
return
/obj/machinery/door/emag_act(var/remaining_charges)
if(density && operable())
do_animate("spark")
sleep(6)
open()
operating = -1
return 1
/obj/machinery/door/proc/take_damage(var/damage)
var/initialhealth = src.health
src.health = max(0, src.health - damage)
+1 -4
View File
@@ -102,10 +102,7 @@
continue
var/celsius = convert_k2c(tile_info[index][1])
var/pressure = tile_info[index][2]
if(dir_alerts[index] & (FIREDOOR_ALERT_HOT|FIREDOOR_ALERT_COLD))
o += "<span class='warning'>"
else
o += "<span style='color:blue'>"
o += "<span class='[(dir_alerts[index] & (FIREDOOR_ALERT_HOT|FIREDOOR_ALERT_COLD)) ? "warning" : "color:blue"]'>"
o += "[celsius]&deg;C</span> "
o += "<span style='color:blue'>"
o += "[pressure]kPa</span></li>"
+25 -26
View File
@@ -1,26 +1,25 @@
/obj/machinery/door/unpowered
autoclose = 0
var/locked = 0
Bumped(atom/AM)
if(src.locked)
return
..()
return
attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade)) return
if(src.locked) return
..()
return
/obj/machinery/door/unpowered/shuttle
icon = 'icons/turf/shuttle.dmi'
name = "door"
icon_state = "door1"
opacity = 1
density = 1
/obj/machinery/door/unpowered
autoclose = 0
var/locked = 0
/obj/machinery/door/unpowered/Bumped(atom/AM)
if(src.locked)
return
..()
return
/obj/machinery/door/unpowered/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/melee/energy/blade)) return
if(src.locked) return
..()
return
/obj/machinery/door/unpowered/emag_act()
return -1
/obj/machinery/door/unpowered/shuttle
icon = 'icons/turf/shuttle.dmi'
name = "door"
icon_state = "door1"
opacity = 1
density = 1
+10 -6
View File
@@ -163,6 +163,14 @@
return
return src.attackby(user, user)
/obj/machinery/door/window/emag_act(var/remaining_charges, var/mob/user)
if (density && operable())
operating = -1
flick("[src.base_state]spark", src)
sleep(6)
open()
return 1
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/user as mob)
//If it's in the process of opening/closing, ignore the click
@@ -170,18 +178,14 @@
return
//Emags and ninja swords? You may pass.
if (src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade)))
src.operating = -1
if(istype(I, /obj/item/weapon/melee/energy/blade))
if (istype(I, /obj/item/weapon/melee/energy/blade))
if(emag_act(10, user))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, "sparks", 50, 1)
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
visible_message("<span class='warning'>The glass door was sliced open by [user]!</span>")
flick("[src.base_state]spark", src)
sleep(6)
open()
return 1
//If it's emagged, crowbar can pry electronics out.
+1 -1
View File
@@ -37,7 +37,7 @@ var/list/doppler_arrays = list()
var/message = "Explosive disturbance detected - Epicenter at: grid ([x0],[y0]). Epicenter radius: [devastation_range]. Outer radius: [heavy_impact_range]. Shockwave radius: [light_impact_range]. Temporal displacement of tachyons: [took]seconds."
for(var/mob/O in hearers(src, null))
O.show_message("<span class='game say'><span class='name'>[src]</span> states coldly, \"[message]\"",2)
O.show_message("<span class='game say'><span class='name'>[src]</span> states coldly, \"[message]\"</span>",2)
/obj/machinery/doppler_array/power_change()
+8 -9
View File
@@ -174,17 +174,16 @@ datum/track/New(var/title_name, var/audio)
power_change()
update_icon()
return
if(istype(W, /obj/item/weapon/card/emag))
if(!emagged)
emagged = 1
StopPlaying()
visible_message("<span class='danger'>\the [src] makes a fizzling sound.</span>")
log_and_message_admins("emagged \the [src]")
update_icon()
return
return ..()
/obj/machinery/media/jukebox/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
emagged = 1
StopPlaying()
visible_message("<span class='danger'>\The [src] makes a fizzling sound.</span>")
update_icon()
return 1
/obj/machinery/media/jukebox/proc/StopPlaying()
var/area/main_area = get_area(src)
// Always kill the current sound
+5 -9
View File
@@ -84,16 +84,12 @@
..()
usr << "The safety guard is [emagged ? "<span class='danger'>disabled</span>" : "enabled"]."
/obj/machinery/gibber/emag_act(var/remaining_charges, var/mob/user)
emagged = !emagged
user << "<span class='danger'>You [emagged ? "disable" : "enable"] the gibber safety guard.</span>"
return 1
/obj/machinery/gibber/attackby(var/obj/item/W, var/mob/user)
if(istype(W,/obj/item/weapon/card))
if(!allowed(user) && !istype(W,/obj/item/weapon/card/emag))
user << "<span class='danger'>Access denied.</span>"
return
emagged = !emagged
user << "<span class='danger'>You [emagged ? "disable" : "enable"] the gibber safety guard.</span>"
return
var/obj/item/weapon/grab/G = W
if(!istype(G))
+3 -5
View File
@@ -235,14 +235,12 @@
user << "<span class='notice'>\The [src] smartly refuses [O].</span>"
return 1
/obj/machinery/smartfridge/secure/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/card/emag))
/obj/machinery/smartfridge/secure/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
emagged = 1
locked = -1
user << "You short out the product lock on [src]."
return
..()
return 1
/obj/machinery/smartfridge/attack_ai(mob/user as mob)
attack_hand(user)
+9
View File
@@ -123,6 +123,15 @@ Class Procs:
/obj/machinery/Destroy()
machines -= src
if(component_parts)
for(var/atom/A in component_parts)
if(A.loc == src) // If the components are inside the machine, delete them.
qdel(A)
else // Otherwise we assume they were dropped to the ground during deconstruction, and were not removed from the component_parts list by deconstruction code.
component_parts -= A
if(contents) // The same for contents.
for(var/atom/A in contents)
qdel(A)
..()
/obj/machinery/process()//If you dont use process or power why are you here
+14 -12
View File
@@ -276,18 +276,6 @@
user << "<span class='notice'>You remove the turret but did not manage to salvage anything.</span>"
qdel(src) // qdel
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
//Emagging the turret makes it go bonkers and stun everyone. It also makes
//the turret shoot much, much faster.
user << "<span class='warning'>You short out [src]'s threat assessment circuits.</span>"
visible_message("[src] hums oddly...")
emagged = 1
iconholder = 1
controllock = 1
enabled = 0 //turns off the turret temporarily
sleep(60) //6 seconds for the traitor to gtfo of the area before the turret decides to ruin his shit
enabled = 1 //turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here
else if((istype(I, /obj/item/weapon/wrench)))
if(enabled || raised)
user << "<span class='warning'>You cannot unsecure an active turret!</span>"
@@ -343,6 +331,20 @@
sleep(60)
attacked = 0
..()
/obj/machinery/porta_turret/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
//Emagging the turret makes it go bonkers and stun everyone. It also makes
//the turret shoot much, much faster.
user << "<span class='warning'>You short out [src]'s threat assessment circuits.</span>"
visible_message("[src] hums oddly...")
emagged = 1
iconholder = 1
controllock = 1
enabled = 0 //turns off the turret temporarily
sleep(60) //6 seconds for the traitor to gtfo of the area before the turret decides to ruin his shit
enabled = 1 //turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here
return 1
/obj/machinery/porta_turret/proc/take_damage(var/force)
health -= force
+60 -141
View File
@@ -7,6 +7,7 @@
#define RC_INFO 4 //Relay Info
//Request Console Screens
#define RCS_MAINMENU 0 // Main menu
#define RCS_RQASSIST 1 // Request supplies
#define RCS_RQSUPPLY 2 // Request assistance
#define RCS_SENDINFO 3 // Relay information
@@ -15,7 +16,6 @@
#define RCS_VIEWMSGS 6 // View messages
#define RCS_MESSAUTH 7 // Authentication before sending
#define RCS_ANNOUNCE 8 // Send announcement
#define RCS_MAINMENU 9 // Main menu
var/req_console_assistance = list()
var/req_console_supplies = list()
@@ -29,13 +29,12 @@ var/list/obj/machinery/requests_console/allConsoles = list()
icon = 'icons/obj/terminals.dmi'
icon_state = "req_comp0"
var/department = "Unknown" //The list of all departments on the station (Determined from this variable on each unit) Set this to the same thing if you want several consoles in one department
var/list/messages = list() //List of all messages
var/list/message_log = list() //List of all messages
var/departmentType = 0 //Bitflag. Zero is reply-only. Map currently uses raw numbers instead of defines.
var/newmessagepriority = 0
// 0 = no new message
// 1 = normal priority
// 2 = high priority
// 3 = extreme priority - not implemented, will probably require some hacking... everything needs to have a hidden feature in this game.
var/screen = RCS_MAINMENU
var/silent = 0 // set to 1 for it not to beep all the time
// var/hackState = 0
@@ -49,7 +48,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
var/msgVerified = "" //Will contain the name of the person who varified it
var/msgStamped = "" //If a message is stamped, this will contain the stamp name
var/message = "";
var/dpt = ""; //the department which will be receiving the message
var/recipient = ""; //the department which will be receiving the message
var/priority = -1 ; //Priority of the message being sent
light_range = 0
var/datum/announcement/announcement = new
@@ -64,7 +63,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
icon_state = "req_comp_off"
else
if(icon_state == "req_comp_off")
icon_state = "req_comp0"
icon_state = "req_comp[newmessagepriority]"
/obj/machinery/requests_console/New()
..()
@@ -80,6 +79,8 @@ var/list/obj/machinery/requests_console/allConsoles = list()
req_console_supplies |= department
if (departmentType & RC_INFO)
req_console_information |= department
set_light(1)
/obj/machinery/requests_console/Destroy()
allConsoles -= src
@@ -100,105 +101,34 @@ var/list/obj/machinery/requests_console/allConsoles = list()
/obj/machinery/requests_console/attack_hand(user as mob)
if(..(user))
return
var/dat
dat = text("<HEAD><TITLE>Requests Console</TITLE></HEAD><H3>[department] Requests Console</H3>")
if(!open)
switch(screen)
if(RCS_RQASSIST) //req. assistance
dat += text("Which department do you need assistance from?<BR><BR>")
for(var/dpt in req_console_assistance)
if (dpt != department)
dat += text("[dpt] (<A href='?src=\ref[src];write=[ckey(dpt)]'>Message</A> or ")
dat += text("<A href='?src=\ref[src];write=[ckey(dpt)];priority=2'>High Priority</A>")
// if (hackState == 1)
// dat += text(" or <A href='?src=\ref[src];write=[ckey(dpt)];priority=3'>EXTREME</A>)")
dat += text(")<BR>")
dat += text("<BR><A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Back</A><BR>")
ui_interact(user)
if(RCS_RQSUPPLY) //req. supplies
dat += text("Which department do you need supplies from?<BR><BR>")
for(var/dpt in req_console_supplies)
if (dpt != department)
dat += text("[dpt] (<A href='?src=\ref[src];write=[ckey(dpt)]'>Message</A> or ")
dat += text("<A href='?src=\ref[src];write=[ckey(dpt)];priority=2'>High Priority</A>")
// if (hackState == 1)
// dat += text(" or <A href='?src=\ref[src];write=[ckey(dpt)];priority=3'>EXTREME</A>)")
dat += text(")<BR>")
dat += text("<BR><A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Back</A><BR>")
/obj/machinery/requests_console/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
if(RCS_SENDINFO) //relay information
dat += text("Which department would you like to send information to?<BR><BR>")
for(var/dpt in req_console_information)
if (dpt != department)
dat += text("[dpt] (<A href='?src=\ref[src];write=[ckey(dpt)]'>Message</A> or ")
dat += text("<A href='?src=\ref[src];write=[ckey(dpt)];priority=2'>High Priority</A>")
// if (hackState == 1)
// dat += text(" or <A href='?src=\ref[src];write=[ckey(dpt)];priority=3'>EXTREME</A>)")
dat += text(")<BR>")
dat += text("<BR><A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Back</A><BR>")
data["department"] = department
data["screen"] = screen
data["message_log"] = message_log
data["newmessagepriority"] = newmessagepriority
data["silent"] = silent
data["announcementConsole"] = announcementConsole
if(RCS_SENTPASS) //sent successfully
dat += text("<FONT COLOR='GREEN'>Message sent</FONT><BR><BR>")
dat += text("<A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Continue</A><BR>")
data["assist_dept"] = req_console_assistance
data["supply_dept"] = req_console_supplies
data["info_dept"] = req_console_information
if(RCS_SENTFAIL) //unsuccessful; not sent
dat += text("<FONT COLOR='RED'>An error occurred. </FONT><BR><BR>")
dat += text("<A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Continue</A><BR>")
data["message"] = message
data["recipient"] = recipient
data["priortiy"] = priority
data["msgStamped"] = msgStamped
data["msgVerified"] = msgVerified
data["announceAuth"] = announceAuth
if(RCS_VIEWMSGS) //view messages
for (var/obj/machinery/requests_console/Console in allConsoles)
if (Console.department == department)
Console.newmessagepriority = 0
Console.icon_state = "req_comp0"
Console.set_light(1)
newmessagepriority = 0
icon_state = "req_comp0"
for(var/msg in messages)
dat += text("[msg]<BR>")
dat += text("<A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Back to main menu</A><BR>")
if(RCS_MESSAUTH) //authentication before sending
dat += text("<B>Message Authentication</B><BR><BR>")
dat += text("<b>Message for [dpt]: </b>[message]<BR><BR>")
dat += text("You may authenticate your message now by scanning your ID or your stamp<BR><BR>")
dat += text("Validated by: [msgVerified]<br>");
dat += text("Stamped by: [msgStamped]<br>");
dat += text("<A href='?src=\ref[src];department=[dpt]'>Send</A><BR>");
dat += text("<BR><A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Back</A><BR>")
if(RCS_ANNOUNCE) //send announcement
dat += text("<B>Station wide announcement</B><BR><BR>")
if(announceAuth)
dat += text("<b>Authentication accepted</b><BR><BR>")
else
dat += text("Swipe your card to authenticate yourself.<BR><BR>")
dat += text("<b>Message: </b>[message] <A href='?src=\ref[src];writeAnnouncement=1'>Write</A><BR><BR>")
if (announceAuth && message)
dat += text("<A href='?src=\ref[src];sendAnnouncement=1'>Announce</A><BR>");
dat += text("<BR><A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Back</A><BR>")
else //main menu
screen = RCS_MAINMENU
reset_announce()
if (newmessagepriority == 1)
dat += text("<FONT COLOR='RED'>There are new messages</FONT><BR>")
if (newmessagepriority == 2)
dat += text("<FONT COLOR='RED'><B>NEW PRIORITY MESSAGES</B></FONT><BR>")
dat += text("<A href='?src=\ref[src];setScreen=[RCS_VIEWMSGS]'>View Messages</A><BR><BR>")
dat += text("<A href='?src=\ref[src];setScreen=[RCS_RQASSIST]'>Request Assistance</A><BR>")
dat += text("<A href='?src=\ref[src];setScreen=[RCS_RQSUPPLY]'>Request Supplies</A><BR>")
dat += text("<A href='?src=\ref[src];setScreen=[RCS_SENDINFO]'>Relay Anonymous Information</A><BR><BR>")
if(announcementConsole)
dat += text("<A href='?src=\ref[src];setScreen=[RCS_ANNOUNCE]'>Send station-wide announcement</A><BR><BR>")
if (silent)
dat += text("Speaker <A href='?src=\ref[src];setSilent=0'>OFF</A>")
else
dat += text("Speaker <A href='?src=\ref[src];setSilent=1'>ON</A>")
user << browse("[dat]", "window=request_console")
onclose(user, "req_console")
return
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "request_console.tmpl", "[department] Request Console", 520, 410)
ui.set_initial_data(data)
ui.open()
/obj/machinery/requests_console/Topic(href, href_list)
if(..()) return
@@ -206,38 +136,30 @@ var/list/obj/machinery/requests_console/allConsoles = list()
add_fingerprint(usr)
if(reject_bad_text(href_list["write"]))
dpt = ckey(href_list["write"]) //write contains the string of the receiving department's name
recipient = href_list["write"] //write contains the string of the receiving department's name
var/new_message = sanitize(input("Write your message:", "Awaiting Input", ""))
if(new_message)
message = new_message
screen = RCS_MESSAUTH
switch(href_list["priority"])
if("1") priority = 1
if("2") priority = 2
else priority = -1
else priority = 0
else
dpt = "";
msgVerified = ""
msgStamped = ""
screen = RCS_MAINMENU
priority = -1
reset_message(1)
if(href_list["writeAnnouncement"])
var/new_message = sanitize(input("Write your message:", "Awaiting Input", ""))
if(new_message)
message = new_message
switch(href_list["priority"])
if("2") priority = 2
else priority = -1
else
reset_announce()
screen = RCS_MAINMENU
reset_message(1)
if(href_list["sendAnnouncement"])
if(!announcementConsole) return
announcement.Announce(message, msg_sanitized = 1)
reset_announce()
screen = RCS_MAINMENU
reset_message(1)
if( href_list["department"] && message )
var/log_msg = message
@@ -245,38 +167,37 @@ var/list/obj/machinery/requests_console/allConsoles = list()
screen = RCS_SENTFAIL
for (var/obj/machinery/message_server/MS in world)
if(!MS.active) continue
MS.send_rc_message(href_list["department"],department,log_msg,msgStamped,msgVerified,priority)
MS.send_rc_message(ckey(href_list["department"]),department,log_msg,msgStamped,msgVerified,priority)
pass = 1
if(pass)
screen = RCS_SENTPASS
messages += "<B>Message sent to [dpt]</B><BR>[message]"
message_log += "<B>Message sent to [recipient]</B><BR>[message]"
else
audible_message(text("\icon[src] *The Requests Console beeps: 'NOTICE: No server detected!'"),,4)
//Handle screen switching
var/tempScreen = text2num(href_list["setScreen"])
if(tempScreen)
if(href_list["setScreen"])
var/tempScreen = text2num(href_list["setScreen"])
if(tempScreen == RCS_ANNOUNCE && !announcementConsole)
return
if(tempScreen == RCS_VIEWMSGS)
for (var/obj/machinery/requests_console/Console in allConsoles)
if (Console.department == department)
Console.newmessagepriority = 0
Console.icon_state = "req_comp0"
Console.set_light(1)
if(tempScreen == RCS_MAINMENU)
dpt = ""
msgVerified = ""
msgStamped = ""
message = ""
priority = -1
reset_message()
screen = tempScreen
//Handle silencing the console
switch( href_list["setSilent"] )
if(null) //skip
if("1") silent = 1
else silent = 0
if(href_list["toggleSilent"])
silent = !silent
updateUsrDialog()
return
//err... hacking code, which has no reason for existing... but anyway... it's supposed to unlock priority 3 messanging on that console (EXTREME priority...) the code for that actually exists.
//err... hacking code, which has no reason for existing... but anyway... it was once supposed to unlock priority 3 messanging on that console (EXTREME priority...), but the code for that was removed.
/obj/machinery/requests_console/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob)
/*
if (istype(O, /obj/item/weapon/crowbar))
@@ -301,6 +222,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
user << "You can't do much with that."*/
if (istype(O, /obj/item/weapon/card/id))
if(inoperable(MAINT)) return
if(screen == RCS_MESSAUTH)
var/obj/item/weapon/card/id/T = O
msgVerified = text("<font color='green'><b>Verified by [T.registered_name] ([T.assignment])</b></font>")
@@ -311,27 +233,24 @@ var/list/obj/machinery/requests_console/allConsoles = list()
announceAuth = 1
announcement.announcer = ID.assignment ? "[ID.assignment] [ID.registered_name]" : ID.registered_name
else
reset_announce()
reset_message()
user << "<span class='warning'>You are not authorized to send announcements.</span>"
updateUsrDialog()
if (istype(O, /obj/item/weapon/stamp))
if(inoperable(MAINT)) return
if(screen == RCS_MESSAUTH)
var/obj/item/weapon/stamp/T = O
msgStamped = text("<font color='blue'><b>Stamped with the [T.name]</b></font>")
updateUsrDialog()
return
/obj/machinery/requests_console/proc/reset_announce()
announceAuth = 0
/obj/machinery/requests_console/proc/reset_message(var/mainmenu = 0)
message = ""
recipient = ""
priority = 0
msgVerified = ""
msgStamped = ""
announceAuth = 0
announcement.announcer = ""
#undef RCS_RQASSIST
#undef RCS_RQSUPPLY
#undef RCS_SENDINFO
#undef RCS_SENTPASS
#undef RCS_SENTFAIL
#undef RCS_VIEWMSGS
#undef RCS_MESSAUTH
#undef RCS_ANNOUNCE
#undef RCS_MAINMENU
if(mainmenu)
screen = RCS_MAINMENU
+15 -19
View File
@@ -684,7 +684,7 @@
user << "<span class='danger'>There is no room inside the cycler for [G.affecting.name].</span>"
return
visible_message("[user] starts putting [G.affecting.name] into the suit cycler.</span>", 3)
visible_message("<span class='notice'>[user] starts putting [G.affecting.name] into the suit cycler.</span>", 3)
if(do_after(user, 20))
if(!G || !G.affecting) return
@@ -708,24 +708,6 @@
src.updateUsrDialog()
return
else if(istype(I,/obj/item/weapon/card/emag))
if(emagged)
user << "<span class='danger'>The cycler has already been subverted.</span>"
return
var/obj/item/weapon/card/emag/E = I
src.updateUsrDialog()
E.uses--
//Clear the access reqs, disable the safeties, and open up all paintjobs.
user << "<span class='danger'>You run the sequencer across the interface, corrupting the operating protocols.</span>"
departments = list("Engineering","Mining","Medical","Security","Atmos","^%###^%$")
emagged = 1
safeties = 0
req_access = list()
return
else if(istype(I,/obj/item/clothing/head/helmet/space) && !istype(I, /obj/item/clothing/head/helmet/space/rig))
if(locked)
@@ -773,6 +755,20 @@
return
..()
/obj/machinery/suit_cycler/emag_act(var/remaining_charges, var/mob/user)
if(emagged)
user << "<span class='danger'>The cycler has already been subverted.</span>"
return
//Clear the access reqs, disable the safeties, and open up all paintjobs.
user << "<span class='danger'>You run the sequencer across the interface, corrupting the operating protocols.</span>"
departments = list("Engineering","Mining","Medical","Security","Atmos","^%###^%$")
emagged = 1
safeties = 0
req_access = list()
src.updateUsrDialog()
return 1
/obj/machinery/suit_cycler/attack_hand(mob/user as mob)
+7 -4
View File
@@ -353,7 +353,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
// --- This following recording is intended for research and feedback in the use of department radio channels ---
var/part_blackbox_b = "</span><b> \[[freq_text]\]</b> <span class='message'>" // Tweaked for security headsets -- TLE
var/blackbox_msg = "[part_a][name][part_blackbox_b][quotedmsg][part_c]"
var/blackbox_msg = "[part_a][name][part_blackbox_b][quotedmsg][part_c]</span>"
//var/blackbox_admin_msg = "[part_a][M.name] (Real name: [M.real_name])[part_blackbox_b][quotedmsg][part_c]"
//BR.messages_admin += blackbox_admin_msg
@@ -533,12 +533,15 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
var/part_b = "</span><b> \icon[radio]\[[freq_text]\][part_b_extra]</b> <span class='message'>" // Tweaked for security headsets -- TLE
var/part_c = "</span></span>"
part_a = "<span class='"
if (display_freq in ANTAG_FREQS)
part_a = "<span class='syndradio'><span class='name'>"
part_a += "syndradio"
else if (display_freq==COMM_FREQ)
part_a = "<span class='comradio'><span class='name'>"
part_a += "comradio"
else if (display_freq in DEPT_FREQS)
part_a = "<span class='deptradio'><span class='name'>"
part_a += "deptradio"
part_a += "'><span class='name'>"
// --- This following recording is intended for research and feedback in the use of department radio channels ---
+8 -4
View File
@@ -212,9 +212,13 @@
A.icon_state = "4"
A.anchored = 1
qdel(src)
else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
user << "<span class='notice'>You you disable the security protocols</span>"
src.updateUsrDialog()
return
/obj/machinery/computer/telecomms/server/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
user << "<span class='notice'>You you disable the security protocols</span>"
src.updateUsrDialog()
return 1
+8 -4
View File
@@ -150,9 +150,13 @@
A.icon_state = "4"
A.anchored = 1
qdel(src)
else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
user << "<span class='notice'>You you disable the security protocols</span>"
src.updateUsrDialog()
return
/obj/machinery/computer/telecomms/monitor/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
user << "<span class='notice'>You you disable the security protocols</span>"
src.updateUsrDialog()
return 1
@@ -233,9 +233,13 @@
A.icon_state = "4"
A.anchored = 1
qdel(src)
else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
user << "<span class='notice'>You you disable the security protocols</span>"
src.updateUsrDialog()
return
/obj/machinery/computer/telecomms/traffic/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
user << "<span class='notice'>You you disable the security protocols</span>"
src.updateUsrDialog()
return 1
+8 -7
View File
@@ -84,13 +84,6 @@
if(stat & BROKEN)
return
if(!emagged && istype(W, /obj/item/weapon/card/emag))
user << "<span class='danger'>You short out the turret controls' access analysis module.</span>"
emagged = 1
locked = 0
ailock = 0
return
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(src.allowed(usr))
if(emagged)
@@ -100,6 +93,14 @@
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the panel.</span>"
return
return ..()
/obj/machinery/turretid/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
user << "<span class='danger'>You short out the turret controls' access analysis module.</span>"
emagged = 1
locked = 0
ailock = 0
return 1
/obj/machinery/turretid/attack_ai(mob/user as mob)
if(isLocked(user))
+7 -5
View File
@@ -176,6 +176,12 @@
return
return
/obj/machinery/vending/emag_act(var/remaining_charges, var/mob/user)
if (!emagged)
src.emagged = 1
user << "You short out the product lock on \the [src]"
return 1
/obj/machinery/vending/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -207,10 +213,6 @@
if (I || istype(W, /obj/item/weapon/spacecash))
attack_hand(user)
return
else if (istype(W, /obj/item/weapon/card/emag))
src.emagged = 1
user << "You short out the product lock on \the [src]"
return
else if(istype(W, /obj/item/weapon/screwdriver))
src.panel_open = !src.panel_open
user << "You [src.panel_open ? "open" : "close"] the maintenance panel."
@@ -592,7 +594,7 @@
return
for(var/mob/O in hearers(src, null))
O.show_message("<span class='game say'><span class='name'>\The [src]</span> beeps, \"[message]\"",2)
O.show_message("<span class='game say'><span class='name'>\The [src]</span> beeps, \"[message]\"</span>",2)
return
/obj/machinery/vending/power_change()
@@ -5,8 +5,8 @@
icon_state = "sleeper_0"
origin_tech = list(TECH_DATA = 2, TECH_BIO = 3)
energy_drain = 20
range = MELEE
construction_cost = list(DEFAULT_WALL_MATERIAL=5000,"glass"=10000)
range = MELEE
construction_cost = list(DEFAULT_WALL_MATERIAL=5000,"glass"=10000)
equip_cooldown = 20
var/mob/living/carbon/occupant = null
var/datum/global_iterator/pr_mech_sleeper
@@ -644,7 +644,7 @@
return stop()
var/energy_drain = S.energy_drain*10
if(!S.processed_reagents.len || S.reagents.total_volume >= S.reagents.maximum_volume || !S.chassis.has_charge(energy_drain))
S.occupant_message("<span class=\"alert\">Reagent processing stopped.</a>")
S.occupant_message("<span class=\"alert\">Reagent processing stopped.</span>")
S.log_message("Reagent processing stopped.")
return stop()
var/amount = S.synth_speed / S.processed_reagents.len
+1 -1
View File
@@ -1052,7 +1052,7 @@
if(M.stat>1) return
if(chassis.occupant.a_intent == I_HURT)
chassis.occupant_message("<span class='danger'>You obliterate [target] with [src.name], leaving blood and guts everywhere.</span>")
chassis.visible_message("<span class='danger'>[chassis] destroys [target] in an unholy fury.<span>")
chassis.visible_message("<span class='danger'>[chassis] destroys [target] in an unholy fury.</span>")
if(chassis.occupant.a_intent == I_DISARM)
chassis.occupant_message("<span class='danger'>You tear [target]'s limbs off with [src.name].</span>")
chassis.visible_message("<span class='danger'>[chassis] rips [target]'s arms off.</span>")
+20 -26
View File
@@ -192,27 +192,6 @@
M << "<font color='red'>You don't have required permissions to use [src]</font>"
return 0
/obj/machinery/mecha_part_fabricator/proc/emag()
sleep()
switch(emagged)
if(0)
emagged = 0.5
src.visible_message("\icon[src] <b>[src]</b> beeps: \"DB error \[Code 0x00F1\]\"")
sleep(10)
src.visible_message("\icon[src] <b>[src]</b> beeps: \"Attempting auto-repair\"")
sleep(15)
src.visible_message("\icon[src] <b>[src]</b> beeps: \"User DB corrupted \[Code 0x00FA\]. Truncating data structure...\"")
sleep(30)
src.visible_message("\icon[src] <b>[src]</b> beeps: \"User DB truncated. Please contact your Nanotrasen system operator for future assistance.\"")
req_access = null
emagged = 1
if(0.5)
src.visible_message("\icon[src] <b>[src]</b> beeps: \"DB not responding \[Code 0x0003\]...\"")
if(1)
src.visible_message("\icon[src] <b>[src]</b> beeps: \"No records in User DB\"")
return
/obj/machinery/mecha_part_fabricator/proc/convert_part_set(set_name as text)
var/list/parts = part_sets[set_name]
if(istype(parts, /list))
@@ -724,7 +703,26 @@
qdel(res)
return result
/obj/machinery/mecha_part_fabricator/emag_act(var/remaining_charges, var/mob/user)
sleep()
switch(emagged)
if(0)
emagged = 0.5
src.visible_message("\icon[src] <b>[src]</b> beeps: \"DB error \[Code 0x00F1\]\"")
sleep(10)
src.visible_message("\icon[src] <b>[src]</b> beeps: \"Attempting auto-repair\"")
sleep(15)
src.visible_message("\icon[src] <b>[src]</b> beeps: \"User DB corrupted \[Code 0x00FA\]. Truncating data structure...\"")
sleep(30)
src.visible_message("\icon[src] <b>[src]</b> beeps: \"User DB truncated. Please contact your Nanotrasen system operator for future assistance.\"")
req_access = null
emagged = 1
return 1
if(0.5)
src.visible_message("\icon[src] <b>[src]</b> beeps: \"DB not responding \[Code 0x0003\]...\"")
if(1)
src.visible_message("\icon[src] <b>[src]</b> beeps: \"No records in User DB\"")
/obj/machinery/mecha_part_fabricator/attackby(obj/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
if (!opened)
@@ -771,10 +769,6 @@
user << "<span class='warning'>You can't load the [src.name] while it's opened.</span>"
return 1
if(istype(W, /obj/item/weapon/card/emag))
emag()
return
var/material
switch(W.type)
if(/obj/item/stack/material/gold)
+1 -1
View File
@@ -30,7 +30,7 @@
else if(ismob(A) && !M)
M = A
if(M)
reagents.splash_mob(M, reagents.total_volume)
reagents.trans_to(M, reagents.total_volume)
break
if(T == get_turf(target))
break
@@ -20,10 +20,12 @@ var/global/list/image/splatter_cache=list()
var/basecolor="#A10808" // Color when wet.
var/list/datum/disease2/disease/virus2 = list()
var/amount = 5
var/drytime
/obj/effect/decal/cleanable/blood/Destroy()
for(var/datum/disease/D in viruses)
D.cure(0)
processing_objects -= src
return ..()
/obj/effect/decal/cleanable/blood/New()
@@ -38,7 +40,11 @@ var/global/list/image/splatter_cache=list()
if (B.blood_DNA)
blood_DNA |= B.blood_DNA.Copy()
qdel(B)
spawn(DRYING_TIME * (amount+1))
drytime = world.time + DRYING_TIME * (amount+1)
processing_objects += src
/obj/effect/decal/cleanable/blood/process()
if(world.time > drytime)
dry()
/obj/effect/decal/cleanable/blood/update_icon()
@@ -91,6 +97,7 @@ var/global/list/image/splatter_cache=list()
desc = drydesc
color = adjust_brightness(color, -50)
amount = 0
processing_objects -= src
/obj/effect/decal/cleanable/blood/attack_hand(mob/living/carbon/human/user)
..()
@@ -125,8 +132,7 @@ var/global/list/image/splatter_cache=list()
/obj/effect/decal/cleanable/blood/drip/New()
..()
spawn(1)
drips |= icon_state
drips |= icon_state
/obj/effect/decal/cleanable/blood/writing
icon_state = "tracks"
+4 -1
View File
@@ -151,7 +151,7 @@
if (user.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.name], but cannot!"
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"
return
if (istype(src.loc, /obj/item/weapon/storage))
@@ -608,3 +608,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
/obj/item/proc/pwr_drain()
return 0 // Process Kill
/obj/item/proc/resolve_attackby(atom/A, mob/source)
return A.attackby(src,source)
+17 -2
View File
@@ -1058,6 +1058,21 @@ var/global/list/obj/item/device/pda/PDAs = list()
log_pda("[usr] (PDA: [sending_unit]) sent \"[message]\" to [name]")
new_message = 1
/obj/item/device/pda/verb/verb_reset_pda()
set category = "Object"
set name = "Reset PDA"
set src in usr
if(issilicon(usr))
return
if(can_use(usr))
mode = 0
nanomanager.update_uis(src)
usr << "<span class='notice'>You press the reset button on \the [src].</span>"
else
usr << "<span class='notice'>You cannot do this while restrained.</span>"
/obj/item/device/pda/verb/verb_remove_id()
set category = "Object"
set name = "Remove id"
@@ -1200,7 +1215,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
user.show_message("<span class='notice'>Analyzing Results for [C]:</span>")
user.show_message("<span class='notice'> Overall Status: [C.stat > 1 ? "dead" : "[C.health - C.halloss]% healthy"]</span>", 1)
user.show_message(text("<span class='notice'> Damage Specifics: <span class='[]'>[]</span>-<span class='[]'>[]</span>-<span class='[]'>[]</span>-<span class='[]'>[]</span>",
user.show_message(text("<span class='notice'> Damage Specifics:</span> <span class='[]'>[]</span>-<span class='[]'>[]</span>-<span class='[]'>[]</span>-<span class='[]'>[]</span>",
(C.getOxyLoss() > 50) ? "warning" : "", C.getOxyLoss(),
(C.getToxLoss() > 50) ? "warning" : "", C.getToxLoss(),
(C.getFireLoss() > 50) ? "warning" : "", C.getFireLoss(),
@@ -1216,7 +1231,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
user.show_message("<span class='notice'>Localized Damage, Brute/Burn:</span>",1)
if(length(damaged)>0)
for(var/obj/item/organ/external/org in damaged)
user.show_message(text("<span class='notice'> []: <span class='[]'>[]</span>-<span class='[]'>[]</span>",
user.show_message(text("<span class='notice'> []: <span class='[]'>[]</span>-<span class='[]'>[]</span></span>",
capitalize(org.name), (org.brute_dam > 0) ? "warning" : "notice", org.brute_dam, (org.burn_dam > 0) ? "warning" : "notice", org.burn_dam),1)
else
user.show_message("<span class='notice'> Limbs are OK.</span>",1)
+33 -28
View File
@@ -48,38 +48,43 @@
if(((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly
return ..() //just hit them in the head
if(!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") //don't have dexterity
user << "<span class='notice'>You don't have the dexterity to do this!</span>"
return
var/mob/living/carbon/human/H = M //mob has protective eyewear
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
user << "<span class='notice'>You're going to need to remove that [(H.head && H.head.flags & HEADCOVERSEYES) ? "helmet" : (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) ? "mask": "glasses"] first.</span>"
return
if(istype(H))
for(var/obj/item/clothing/C in list(H.head,H.wear_mask,H.glasses))
if(istype(C) && C.flags & (HEADCOVERSEYES|MASKCOVERSEYES|GLASSESCOVERSEYES))
user << "<span class='warning'>You're going to need to remove [C.name] first.</span>"
return
if(M == user) //they're using it on themselves
if(!M.blinded)
flick("flash", M.flash)
M.visible_message("<span class='notice'>[M] directs [src] to \his eyes.</span>", \
"<span class='notice'>You wave the light in front of your eyes! Trippy!</span>")
else
M.visible_message("<span class='notice'>[M] directs [src] to \his eyes.</span>", \
"<span class='notice'>You wave the light in front of your eyes.</span>")
return
var/obj/item/organ/vision
if(H.species.vision_organ)
vision = H.internal_organs_by_name[H.species.vision_organ]
if(!vision)
user << "<span class='warning'>You can't find any [H.species.vision_organ ? H.species.vision_organ : "eyes"] on [H]!</span>"
user.visible_message("<span class='notice'>[user] directs [src] to [M]'s eyes.</span>", \
"<span class='notice'>You direct [src] to [M]'s eyes.</span>")
user.visible_message("<span class='notice'>\The [user] directs [src] to [M]'s eyes.</span>", \
"<span class='notice'>You direct [src] to [M]'s eyes.</span>")
if(H == user) //can't look into your own eyes buster
if(M.stat == DEAD || M.blinded) //mob is dead or fully blind
user << "<span class='warning'>\The [M]'s pupils do not react to the light!</span>"
return
if(XRAY in M.mutations)
user << "<span class='notice'>\The [M] pupils give an eerie glow!</span>"
if(vision.is_bruised())
user << "<span class='warning'>There's visible damage to [M]'s [vision.name]!</span>"
else if(M.eye_blurry)
user << "<span class='notice'>\The [M]'s pupils react slower than normally.</span>"
if(M.getBrainLoss() > 15)
user << "<span class='notice'>There's visible lag between left and right pupils' reactions.</span>"
if(istype(M, /mob/living/carbon/human)) //robots and aliens are unaffected
if(M.stat == DEAD || M.sdisabilities & BLIND) //mob is dead or fully blind
user << "<span class='notice'>[M] pupils does not react to the light!</span>"
else if(XRAY in M.mutations) //mob has X-RAY vision
flick("flash", M.flash) //Yes, you can still get flashed wit X-Ray.
user << "<span class='notice'>[M] pupils give an eerie glow!</span>"
else //they're okay!
if(!M.blinded)
flick("flash", M.flash) //flash the affected mob
user << "<span class='notice'>[M]'s pupils narrow.</span>"
var/list/pinpoint = list("oxycodone"=1,"tramadol"=5)
var/list/dilating = list("space_drugs"=5,"mindbreaker"=1)
if(M.reagents.has_any_reagent(pinpoint) || H.ingested.has_any_reagent(pinpoint))
user << "<span class='notice'>\The [M]'s pupils are already pinpoint and cannot narrow any more.</span>"
else if(M.reagents.has_any_reagent(dilating) || H.ingested.has_any_reagent(dilating))
user << "<span class='notice'>\The [M]'s pupils narrow slightly, but are still very dilated.</span>"
else
user << "<span class='notice'>\The [M]'s pupils narrow.</span>"
flick("flash", M.flash)
else
return ..()
@@ -67,14 +67,10 @@
user << "It has [uses] lights remaining."
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/card/emag) && emagged == 0)
Emag()
return
if(istype(W, /obj/item/stack/material/glass))
var/obj/item/stack/material/glass/G = W
if(uses >= max_uses)
user << "<span class='warning'>[src.name] is full."
user << "<span class='warning'>[src.name] is full.</span>"
return
else if(G.use(1))
AddUses(5)
@@ -173,14 +169,11 @@
U << "There is a working [target.fitting] already inserted."
return
/obj/item/device/lightreplacer/proc/Emag()
/obj/item/device/lightreplacer/emag_act(var/remaining_charges, var/mob/user)
emagged = !emagged
playsound(src.loc, "sparks", 100, 1)
if(emagged)
name = "Shortcircuited [initial(name)]"
else
name = initial(name)
update_icon()
return 1
//Can you use it?
+3 -4
View File
@@ -46,10 +46,9 @@
spamcheck = 0
return
/obj/item/device/megaphone/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
/obj/item/device/megaphone/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
user << "<span class='warning'>You overload \the [src]'s voice synthesizer.</span>"
emagged = 1
insults = rand(1, 3)//to prevent dickflooding
return
return
return 1
@@ -1,6 +1,6 @@
/obj/item/device/encryptionkey/
name = "standard encrpytion key"
name = "standard encryption key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
icon = 'icons/obj/radio.dmi'
icon_state = "cypherkey"
+3 -3
View File
@@ -173,14 +173,14 @@ REAGENT SCANNER
if (ID in virusDB)
var/datum/data/record/V = virusDB[ID]
user.show_message("<span class='warning'>Warning: Pathogen [V.fields["name"]] detected in subject's blood. Known antigen : [V.fields["antigen"]]</span>")
// user.show_message(text("<span class='warning'>Warning: Unknown pathogen detected in subject's blood."))
// user.show_message(text("<span class='warning'>Warning: Unknown pathogen detected in subject's blood.</span>"))
if (M.getCloneLoss())
user.show_message("<span class='warning'>Subject appears to have been imperfectly cloned.</span>")
for(var/datum/disease/D in M.viruses)
if(!D.hidden[SCANNER])
user.show_message(text("<span class='danger'>Warning: [D.form] Detected</span><span class='warning'>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]</span>"))
// if (M.reagents && M.reagents.get_reagent_amount("inaprovaline"))
// user.show_message("<span class='notice'>Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.")
// user.show_message("<span class='notice'>Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.</span>")
if (M.has_brain_worms())
user.show_message("<span class='warning'>Subject suffering from aberrant brain activity. Recommend further scanning.</span>")
else if (M.getBrainLoss() >= 100 || !M.has_brain())
@@ -221,7 +221,7 @@ REAGENT SCANNER
if(blood_volume <= 500 && blood_volume > 336)
user.show_message("<span class='danger'>Warning: Blood Level LOW: [blood_percent]% [blood_volume]cl.</span> <span class='notice'>Type: [blood_type]</span>")
else if(blood_volume <= 336)
user.show_message("<span class='danger'><i>Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl.</i></span> <span class='notice'>Type: [blood_type]")
user.show_message("<span class='danger'><i>Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl.</i></span> <span class='notice'>Type: [blood_type]</span>")
else
user.show_message("<span class='notice'>Blood Level Normal: [blood_percent]% [blood_volume]cl. Type: [blood_type]</span>")
user.show_message("<span class='notice'>Subject's pulse: <font color='[H.pulse == PULSE_THREADY || H.pulse == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font></span>")
@@ -48,16 +48,15 @@
timestamp += timerecorded
storedinfo += "*\[[time2text(timerecorded*10,"mm:ss")]\] *[strip_html_properly(recordedtext)]*" //"*" at front as a marker
/obj/item/device/taperecorder/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/card/emag))
if(emagged == 0)
emagged = 1
recording = 0
user << "<span class='warning'>PZZTTPFFFT</span>"
icon_state = "taperecorderidle"
else
user << "<span class='warning'>It is already emagged!</span>"
/obj/item/device/taperecorder/emag_act(var/remaining_charges, var/mob/user)
if(emagged == 0)
emagged = 1
recording = 0
user << "<span class='warning'>PZZTTPFFFT</span>"
icon_state = "taperecorderidle"
return 1
else
user << "<span class='warning'>It is already emagged!</span>"
/obj/item/device/taperecorder/proc/explode()
var/turf/T = get_turf(loc)
@@ -6,159 +6,26 @@ A list of items and costs is stored under the datum of every game mode, alongsid
*/
/datum/uplink_item/
var/name = ""
var/cost = 0
var/path = null
var/reference = ""
var/description = ""
datum/uplink_item/New(var/itemPath, var/itemCost, var/itemName, var/itemReference, var/itemDescription)
cost = itemCost
path = itemPath
name = itemName
reference = itemReference
description = itemDescription
datum/uplink_item/proc/description()
if(!description)
// Fallback description
var/obj/temp = src.path
description = replacetext(initial(temp.desc), "\n", "<br>")
return description
/datum/uplink_item/proc/generate_item(var/newloc)
var/list/L = list()
if(ispath(path))
L += new path(newloc)
else if(islist(path))
for(var/item_path in path)
L += new item_path(newloc)
return L
datum/nano_item_lists
var/list/items_nano
var/list/items_reference
/obj/item/device/uplink
var/welcome // Welcoming menu message
var/uses // Numbers of crystals
var/list/ItemsCategory // List of categories with lists of items
var/list/ItemsReference // List of references with an associated item
var/list/nanoui_items // List of items for NanoUI use
var/nanoui_menu = 0 // The current menu we are in
var/list/nanoui_data = new // Additional data for NanoUI use
var/list/purchase_log = new
var/uplink_owner = null//text-only
var/welcome = "Illegal Uplink Console" // Welcoming menu message
var/uses = DEFAULT_TELECRYSTAL_AMOUNT // Numbers of crystals
var/list/purchase_log
var/datum/mind/owner = null
var/used_TC = 0
/obj/item/device/uplink/nano_host()
return loc
/obj/item/device/uplink/New()
/obj/item/device/uplink/New(var/location, var/datum/mind/owner)
..()
welcome = ticker.mode.uplink_welcome
uses = ticker.mode.uplink_uses
ItemsCategory = ticker.mode.uplink_items
src.owner = owner
purchase_log = list()
world_uplinks += src
/obj/item/device/uplink/Destroy()
world_uplinks -= src
..()
/obj/item/device/uplink/proc/generate_items()
var/datum/nano_item_lists/IL = generate_item_lists()
nanoui_items = IL.items_nano
ItemsReference = IL.items_reference
// BS12 no longer use this menu but there are forks that do, hency why we keep it
/obj/item/device/uplink/proc/generate_menu()
var/dat = "<B>[src.welcome]</B><BR>"
dat += "Tele-Crystals left: [src.uses]<BR>"
dat += "<HR>"
dat += "<B>Request item:</B><BR>"
dat += "<I>Each item costs a number of tele-crystals as indicated by the number following their name.</I><br>"
var/category_items = 1
for(var/category in ItemsCategory)
if(category_items < 1)
dat += "<i>We apologize, as you could not afford anything from this category.</i><br>"
dat += "<br>"
dat += "<b>[category]</b><br>"
category_items = 0
for(var/datum/uplink_item/I in ItemsCategory[category])
if(I.cost > uses)
continue
dat += "<A href='byond://?src=\ref[src];buy_item=[I.reference];cost=[I.cost]'>[I.name]</A> ([I.cost])<BR>"
category_items++
dat += "<A href='byond://?src=\ref[src];buy_item=random'>Random Item (??)</A><br>"
dat += "<HR>"
return dat
/*
Built the item lists for use with NanoUI
*/
/obj/item/device/uplink/proc/generate_item_lists()
var/list/nano = new
var/list/reference = new
for(var/category in ItemsCategory)
nano[++nano.len] = list("Category" = category, "items" = list())
for(var/datum/uplink_item/I in ItemsCategory[category])
nano[nano.len]["items"] += list(list("Name" = I.name, "Description" = I.description(),"Cost" = I.cost, "obj_path" = I.reference))
reference[I.reference] = I
var/datum/nano_item_lists/result = new
result.items_nano = nano
result.items_reference = reference
return result
//If 'random' was selected
/obj/item/device/uplink/proc/chooseRandomItem()
if(uses <= 0)
return
var/list/random_items = new
for(var/IR in ItemsReference)
var/datum/uplink_item/UI = ItemsReference[IR]
if(UI.cost <= uses)
random_items += UI
return pick(random_items)
/obj/item/device/uplink/Topic(href, href_list)
if(..())
return 1
if(href_list["buy_item"] == "random")
var/datum/uplink_item/UI = chooseRandomItem()
href_list["buy_item"] = UI.reference
return buy(UI, "RN")
else
var/datum/uplink_item/UI = ItemsReference[href_list["buy_item"]]
return buy(UI, UI ? UI.reference : "")
return 0
/obj/item/device/uplink/proc/buy(var/datum/uplink_item/UI, var/reference)
if(UI && UI.cost <= uses)
uses -= UI.cost
used_TC += UI.cost
feedback_add_details("traitor_uplink_items_bought", reference)
var/list/L = UI.generate_item(get_turf(usr))
if(ishuman(usr))
var/mob/living/carbon/human/A = usr
for(var/obj/I in L)
A.put_in_any_hand_if_possible(I)
purchase_log[UI] = purchase_log[UI] + 1
return 1
return 0
// HIDDEN UPLINK - Can be stored in anything but the host item has to have a trigger for it.
/* How to create an uplink in 3 easy steps!
@@ -175,6 +42,11 @@ datum/nano_item_lists
name = "hidden uplink"
desc = "There is something wrong if you're examining this."
var/active = 0
var/nanoui_menu = 0 // The current menu we are in
var/datum/uplink_category/category = 0 // The current category we are in
var/exploit_id // Id of the current exploit record we are viewing
var/list/nanoui_data // Data for NanoUI use
// The hidden uplink MUST be inside an obj/item's contents.
/obj/item/device/uplink/hidden/New()
@@ -182,6 +54,8 @@ datum/nano_item_lists
if(!istype(src.loc, /obj/item))
qdel(src)
..()
nanoui_data = list()
update_nano_data()
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
/obj/item/device/uplink/hidden/proc/toggle()
@@ -212,20 +86,13 @@ datum/nano_item_lists
data["welcome"] = welcome
data["crystals"] = uses
data["menu"] = nanoui_menu
if(!nanoui_items)
generate_items()
data["nano_items"] = nanoui_items
data += nanoui_data
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
if (!ui) // No auto-refresh
ui = new(user, src, ui_key, "uplink.tmpl", title, 450, 600, state = inventory_state)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
@@ -235,43 +102,54 @@ datum/nano_item_lists
// The purchasing code.
/obj/item/device/uplink/hidden/Topic(href, href_list)
if (usr.stat || usr.restrained())
if(..())
return 1
if (!( istype(usr, /mob/living/carbon/human)))
return 1
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
usr.set_machine(src)
if(..(href, href_list))
return 1
else if(href_list["lock"])
toggle()
ui.close()
return 1
if(href_list["return"])
nanoui_menu = round(nanoui_menu/10)
update_nano_data()
if(href_list["menu"])
nanoui_menu = text2num(href_list["menu"])
update_nano_data(href_list["id"])
if(href_list["buy_item"])
var/datum/uplink_item/UI = (locate(href_list["buy_item"]) in uplink.items)
UI.buy(src, usr)
else if(href_list["lock"])
toggle()
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
ui.close()
else if(href_list["return"])
nanoui_menu = round(nanoui_menu/10)
else if(href_list["menu"])
nanoui_menu = text2num(href_list["menu"])
if(href_list["id"])
exploit_id = href_list["id"]
if(href_list["category"])
category = locate(href_list["category"]) in uplink.categories
interact(usr)
update_nano_data()
return 1
/obj/item/device/uplink/hidden/proc/update_nano_data(var/id)
if(nanoui_menu == 1)
/obj/item/device/uplink/hidden/proc/update_nano_data()
if(nanoui_menu == 0)
var/categories[0]
for(var/datum/uplink_category/category in uplink.categories)
if(category.can_view(src))
categories[++categories.len] = list("name" = category.name, "ref" = "\ref[category]")
nanoui_data["categories"] = categories
else if(nanoui_menu == 1)
var/items[0]
for(var/datum/uplink_item/item in category.items)
if(item.can_view(src))
var/cost = item.cost(uses)
if(!cost) cost = "???"
items[++items.len] = list("name" = item.name, "description" = replacetext(item.description(), "\n", "<br>"), "can_buy" = item.can_buy(src), "cost" = cost, "ref" = "\ref[item]")
nanoui_data["items"] = items
else if(nanoui_menu == 2)
var/permanentData[0]
for(var/datum/data/record/L in sortRecord(data_core.locked))
permanentData[++permanentData.len] = list(Name = L.fields["name"],"id" = L.fields["id"])
nanoui_data["exploit_records"] = permanentData
if(nanoui_menu == 11)
else if(nanoui_menu == 21)
nanoui_data["exploit_exists"] = 0
for(var/datum/data/record/L in data_core.locked)
if(L.fields["id"] == id)
if(L.fields["id"] == exploit_id)
nanoui_data["exploit"] = list() // Setting this to equal L.fields passes it's variables that are lists as reference instead of value.
// We trade off being able to automatically add shit for more control over what gets passed to json
// and if it's sanitized for html.
@@ -0,0 +1,40 @@
/datum/uplink_category
var/name = ""
var/list/datum/uplink_item/items
/datum/uplink_category/New()
..()
items = list()
/datum/uplink_category/proc/can_view(obj/item/device/uplink/U)
for(var/datum/uplink_item/item in items)
if(item.can_view(U))
return 1
return 0
/datum/uplink_category/ammunition
name = "Ammunition"
/datum/uplink_category/visible_weapons
name = "Highly Visible and Dangerous Weapons"
/datum/uplink_category/stealthy_weapons
name = "Stealthy and Inconspicuous Weapons"
/datum/uplink_category/stealth_items
name = "Stealth and Camouflage Items"
/datum/uplink_category/tools
name = "Devices and Tools"
/datum/uplink_category/implants
name = "Implants"
/datum/uplink_category/medical
name = "Medical"
/datum/uplink_category/hardsuit_modules
name = "Hardsuit Modules"
/datum/uplink_category/badassery
name = "Badassery"
@@ -0,0 +1,527 @@
var/datum/uplink/uplink = new()
/datum/uplink
var/list/items_assoc
var/list/datum/uplink_item/items
var/list/datum/uplink_category/categories
/datum/uplink/New()
items_assoc = list()
items = init_subtypes(/datum/uplink_item)
categories = init_subtypes(/datum/uplink_category)
for(var/datum/uplink_item/item in items)
if(!item.name)
items -= item
continue
items_assoc[item.type] = item
for(var/datum/uplink_category/category in categories)
if(item.category == category.type)
category.items += item
for(var/datum/uplink_category/category in categories)
category.items = dd_sortedObjectList(category.items)
/datum/uplink_item
var/name
var/desc
var/item_cost = 0
var/datum/uplink_category/category // Item category
var/list/datum/antagonist/antag_roles // Antag roles this item is displayed to. If empty, display to all.
/datum/uplink_item/item
var/path = null
/datum/uplink_item/New()
..()
antag_roles = list()
/datum/uplink_item/proc/buy(var/obj/item/device/uplink/U, var/mob/user)
purchase_log(U)
var/cost = cost(U.uses)
var/goods = get_goods(U, get_turf(user))
U.uses -= cost
U.used_TC += cost
return goods
/datum/uplink_item/proc/can_buy(obj/item/device/uplink/U)
if(cost(U.uses) > U.uses)
return 0
return can_view(U)
/datum/uplink_item/proc/can_view(obj/item/device/uplink/U)
// Making the assumption that if no uplink was supplied, then we don't care about antag roles
if(!U || !antag_roles.len)
return 1
// With no owner, there's no need to check antag status.
if(!U.owner)
return 0
for(var/antag_role in antag_roles)
var/datum/antagonist/antag = all_antag_types[antag_role]
if(antag.is_antagonist(U.owner))
return 1
return 0
/datum/uplink_item/proc/cost(var/telecrystals)
return item_cost
/datum/uplink_item/proc/description()
return desc
// get_goods does not necessarily return physical objects, it is simply a way to acquire the uplink item without paying
/datum/uplink_item/proc/get_goods(var/obj/item/device/uplink/U, var/loc)
return 0
/datum/uplink_item/proc/log_icon()
return
/datum/uplink_item/proc/purchase_log(obj/item/device/uplink/U)
feedback_add_details("traitor_uplink_items_bought", "[src]")
U.purchase_log[src] = U.purchase_log[src] + 1
datum/uplink_item/dd_SortValue()
return cost(INFINITY)
/********************************
* *
* Physical Uplink Entires *
* *
********************************/
/datum/uplink_item/item/buy(var/obj/item/device/uplink/U, var/mob/user)
var/obj/item/I = ..()
if(istype(I, /list))
var/list/L = I
if(L.len) I = L[1]
if(istype(I) && ishuman(user))
var/mob/living/carbon/human/A = user
A.put_in_any_hand_if_possible(I)
return I
/datum/uplink_item/item/get_goods(var/obj/item/device/uplink/U, var/loc)
var/obj/item/I = new path(loc)
return I
/datum/uplink_item/item/description()
if(!desc)
// Fallback description
var/obj/temp = src.path
desc = initial(temp.desc)
return ..()
/datum/uplink_item/item/log_icon()
var/obj/I = path
return "\icon[I]"
/*************
* Ammunition *
*************/
/datum/uplink_item/item/ammo
item_cost = 2
category = /datum/uplink_category/ammunition
/datum/uplink_item/item/ammo/a357
name = ".357"
path = /obj/item/ammo_magazine/a357
/datum/uplink_item/item/ammo/mc9mm
name = ".9mm"
path = /obj/item/ammo_magazine/mc9mm
/datum/uplink_item/item/ammo/darts
name = "Darts"
path = /obj/item/ammo_magazine/chemdart
/datum/uplink_item/item/ammo/sniperammo
name = "14.5mm"
path = /obj/item/weapon/storage/box/sniperammo
/***************************************
* Highly Visible and Dangerous Weapons *
***************************************/
/datum/uplink_item/item/visible_weapons
category = /datum/uplink_category/visible_weapons
/datum/uplink_item/item/visible_weapons/emp
name = "5xEMP Grenades"
item_cost = 3
path = /obj/item/weapon/storage/box/emps
/datum/uplink_item/item/visible_weapons/energy_sword
name = "Energy Sword"
item_cost = 4
path = /obj/item/weapon/melee/energy/sword
/datum/uplink_item/item/visible_weapons/dartgun
name = "Dart Gun"
item_cost = 5
path = /obj/item/weapon/gun/projectile/dartgun
/datum/uplink_item/item/visible_weapons/crossbow
name = "Energy Crossbow"
item_cost = 5
path = /obj/item/weapon/gun/energy/crossbow
/datum/uplink_item/item/visible_weapons/g9mm
name = "Silenced 9mm"
item_cost = 5
path = /obj/item/weapon/storage/box/syndie_kit/g9mm
/datum/uplink_item/item/visible_weapons/riggedlaser
name = "Exosuit Rigged Laser"
item_cost = 6
path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser
/datum/uplink_item/item/visible_weapons/revolver
name = "Revolver"
item_cost = 6
path = /obj/item/weapon/gun/projectile/revolver
/datum/uplink_item/item/visible_weapons/heavysniper
name = "Anti-materiel Rifle"
item_cost = DEFAULT_TELECRYSTAL_AMOUNT
path = /obj/item/weapon/gun/projectile/heavysniper
/*************************************
* Stealthy and Inconspicuous Weapons *
*************************************/
/datum/uplink_item/item/stealthy_weapons
category = /datum/uplink_category/stealthy_weapons
/datum/uplink_item/item/stealthy_weapons/soap
name = "Subversive Soap"
item_cost = 1
path = /obj/item/weapon/soap/syndie
/datum/uplink_item/item/stealthy_weapons/concealed_cane
name = "Concealed Cane Sword"
item_cost = 1
path = /obj/item/weapon/cane/concealed
/datum/uplink_item/item/stealthy_weapons/detomatix
name = "Detomatix PDA Cartridge"
item_cost = 3
path = /obj/item/weapon/cartridge/syndicate
/datum/uplink_item/item/stealthy_weapons/parapen
name = "Paralysis Pen"
item_cost = 3
path = /obj/item/weapon/pen/reagent/paralysis
/datum/uplink_item/item/stealthy_weapons/cigarette_kit
name = "Cigarette Kit"
item_cost = 3
path = /obj/item/weapon/storage/box/syndie_kit/cigarette
/datum/uplink_item/item/stealthy_weapons/random_toxin
name = "Random Toxin - Beaker"
item_cost = 3
path = /obj/item/weapon/storage/box/syndie_kit/toxin
/*******************************
* Stealth and Camouflage Items *
*******************************/
/datum/uplink_item/item/stealth_items
category = /datum/uplink_category/stealth_items
/datum/uplink_item/item/stealth_items/id
name = "Agent ID card"
item_cost = 2
path = /obj/item/weapon/card/id/syndicate
/datum/uplink_item/item/stealth_items/syndigaloshes
name = "No-Slip Shoes"
item_cost = 2
path = /obj/item/clothing/shoes/syndigaloshes
/datum/uplink_item/item/stealth_items/spy
name = "Bug Kit"
item_cost = 2
path = /obj/item/weapon/storage/box/syndie_kit/spy
/datum/uplink_item/item/stealth_items/chameleon_kit
name = "Chameleon Kit"
item_cost = 3
path = /obj/item/weapon/storage/box/syndie_kit/chameleon
/datum/uplink_item/item/stealth_items/chameleon_projector
name = "Chameleon-Projector"
item_cost = 4
path = /obj/item/device/chameleon
/datum/uplink_item/item/stealth_items/chameleon_projector
name = "Chameleon-Projector"
item_cost = 4
path = /obj/item/device/chameleon
/datum/uplink_item/item/stealth_items/voice
name = "Voice Changer"
item_cost = 4
path = /obj/item/clothing/mask/gas/voice
/datum/uplink_item/item/stealth_items/camera_floppy
name = "Camera Network Access - Floppy"
item_cost = 6
path = /obj/item/weapon/disk/file/cameras/syndicate
/********************
* Devices and Tools *
********************/
/datum/uplink_item/item/tools
category = /datum/uplink_category/tools
/datum/uplink_item/item/tools/toolbox
name = "Fully Loaded Toolbox"
item_cost = 1
path = /obj/item/weapon/storage/toolbox/syndicate
/datum/uplink_item/item/tools/plastique
name = "C-4 (Destroys walls)"
item_cost = 2
path = /obj/item/weapon/plastique
/datum/uplink_item/item/tools/encryptionkey_radio
name = "Encrypted Radio Channel Key"
item_cost = 2
path = /obj/item/device/encryptionkey/syndicate
/datum/uplink_item/item/tools/encryptionkey_binary
name = "Binary Translator Key"
item_cost = 3
path = /obj/item/device/encryptionkey/binary
/datum/uplink_item/item/tools/emag
name = "Cryptographic Sequencer"
item_cost = 3
path = /obj/item/weapon/card/emag
/datum/uplink_item/item/tools/clerical
name = "Morphic Clerical Kit"
item_cost = 3
path = /obj/item/weapon/storage/box/syndie_kit/clerical
/datum/uplink_item/item/tools/space_suit
name = "Space Suit"
item_cost = 3
path = /obj/item/weapon/storage/box/syndie_kit/space
/datum/uplink_item/item/tools/thermal
name = "Thermal Imaging Glasses"
item_cost = 3
path = /obj/item/clothing/glasses/thermal/syndi
/datum/uplink_item/item/tools/heavy_vest
name = "Heavy Armor Vest"
item_cost = 4
path = /obj/item/clothing/suit/storage/vest/heavy/merc
/datum/uplink_item/item/tools/powersink
name = "Powersink (DANGER!)"
item_cost = 5
path = /obj/item/device/powersink
/datum/uplink_item/item/tools/ai_module
name = "Hacked AI Upload Module"
item_cost = 7
path = /obj/item/weapon/aiModule/syndicate
/datum/uplink_item/item/tools/singularity_beacon
name = "Singularity Beacon (DANGER!)"
item_cost = 7
path = /obj/item/device/radio/beacon/syndicate
/datum/uplink_item/item/tools/teleporter
name = "Teleporter Circuit Board"
item_cost = 20
path = /obj/item/weapon/circuitboard/teleporter
/datum/uplink_item/item/tools/teleporter/New()
..()
antag_roles = list(MODE_MERCENARY)
/***********
* Implants *
***********/
/datum/uplink_item/item/implants
category = /datum/uplink_category/implants
/datum/uplink_item/item/implants/imp_freedom
name = "Freedom Implant"
item_cost = 3
path = /obj/item/weapon/storage/box/syndie_kit/imp_freedom
/datum/uplink_item/item/implants/imp_compress
name = "Compressed Matter Implant"
item_cost = 4
path = /obj/item/weapon/storage/box/syndie_kit/imp_compress
/datum/uplink_item/item/implants/imp_explosive
name = "Explosive Implant (DANGER!)"
item_cost = 6
path = /obj/item/weapon/storage/box/syndie_kit/imp_explosive
/datum/uplink_item/item/implants/imp_uplink
name = "Uplink Implant (Contains 5 Telecrystals)"
item_cost = 10
path = /obj/item/weapon/storage/box/syndie_kit/imp_uplink
/**********
* Medical *
**********/
/datum/uplink_item/item/medical
category = /datum/uplink_category/medical
/datum/uplink_item/item/medical/sinpockets
name = "Box of Sin-Pockets"
item_cost = 1
path = /obj/item/weapon/storage/box/sinpockets
/datum/uplink_item/item/medical/surgery
name = "Surgery kit"
item_cost = 6
path = /obj/item/weapon/storage/firstaid/surgery
/datum/uplink_item/item/medical/combat
name = "Combat medical kit"
item_cost = 6
path = /obj/item/weapon/storage/firstaid/combat
/*******************
* Hardsuit Modules *
*******************/
/datum/uplink_item/item/hardsuit_modules
category = /datum/uplink_category/hardsuit_modules
/datum/uplink_item/item/hardsuit_modules/thermal
name = "Thermal Scanner"
item_cost = 2
path = /obj/item/rig_module/vision/thermal
/datum/uplink_item/item/hardsuit_modules/energy_net
name = "Net Projector"
item_cost = 3
path = /obj/item/rig_module/fabricator/energy_net
/datum/uplink_item/item/ewar_voice
name = "Electrowarfare Suite and Voice Synthesiser"
item_cost = 4
path = /obj/item/weapon/storage/box/syndie_kit/ewar_voice
/datum/uplink_item/item/hardsuit_modules/maneuvering_jets
name = "Maneuvering Jets"
item_cost = 4
path = /obj/item/rig_module/maneuvering_jets
/datum/uplink_item/item/hardsuit_modules/egun
name = "Mounted Energy Gun"
item_cost = 6
path = /obj/item/rig_module/mounted/egun
/datum/uplink_item/item/hardsuit_modules/power_sink
name = "Power Sink"
item_cost = 6
path = /obj/item/rig_module/power_sink
/datum/uplink_item/item/hardsuit_modules/laser_canon
name = "Mounted Laser Cannon"
item_cost = 8
path = /obj/item/rig_module/mounted
/************
* Badassery *
************/
/datum/uplink_item/item/badassery
category = /datum/uplink_category/badassery
/datum/uplink_item/item/badassery/balloon
name = "For showing that You Are The BOSS (Useless Balloon)"
item_cost = DEFAULT_TELECRYSTAL_AMOUNT
path = /obj/item/toy/syndicateballoon
/datum/uplink_item/item/badassery/balloon/NT
name = "For showing that you love NT SOO much (Useless Balloon)"
path = /obj/item/toy/nanotrasenballoon
/**************
* Random Item *
**************/
/datum/uplink_item/item/badassery/random_one
name = "Random Item"
desc = "Buys you one random item."
/datum/uplink_item/item/badassery/random_one/buy(var/obj/item/device/uplink/U, var/mob/user)
var/datum/uplink_item/item = default_uplink_selection.get_random_item(U.uses)
return item.buy(U, user)
/datum/uplink_item/item/badassery/random_one/can_buy(obj/item/device/uplink/U)
return default_uplink_selection.get_random_item(U.uses, U) != null
/datum/uplink_item/item/badassery/random_many
name = "Random Items"
desc = "Buys you as many random items you can afford. Convenient packaging NOT included."
/datum/uplink_item/item/badassery/random_many/cost(var/telecrystals)
return max(1, telecrystals)
/datum/uplink_item/item/badassery/random_many/get_goods(var/obj/item/device/uplink/U, var/loc)
var/list/bought_items = list()
for(var/datum/uplink_item/UI in get_random_uplink_items(U, U.uses, loc))
UI.purchase_log(U)
var/obj/item/I = UI.get_goods(U, loc)
if(istype(I))
bought_items += I
return bought_items
/datum/uplink_item/item/badassery/random_many/purchase_log(obj/item/device/uplink/U)
feedback_add_details("traitor_uplink_items_bought", "[src]")
/****************
* Surplus Crate *
****************/
/datum/uplink_item/item/badassery/surplus
name = "Surplus Crate"
item_cost = 40
var/item_worth = 60
var/icon
/datum/uplink_item/item/badassery/surplus/New()
..()
antag_roles = list(MODE_MERCENARY)
desc = "A crate containing [item_worth] telecrystal\s worth of surplus leftovers."
/datum/uplink_item/item/badassery/surplus/get_goods(var/obj/item/device/uplink/U, var/loc)
var/obj/structure/largecrate/C = new(loc)
var/random_items = get_random_uplink_items(null, item_worth, C)
for(var/datum/uplink_item/I in random_items)
I.purchase_log(U)
I.get_goods(U, C)
return C
/datum/uplink_item/item/badassery/surplus/log_icon()
if(!icon)
var/obj/structure/largecrate/C = /obj/structure/largecrate
icon = image(initial(C.icon), initial(C.icon_state))
return "\icon[icon]"
/****************
* Support procs *
****************/
/proc/get_random_uplink_items(var/obj/item/device/uplink/U, var/remaining_TC, var/loc)
var/list/bought_items = list()
while(remaining_TC)
var/datum/uplink_item/I = default_uplink_selection.get_random_item(remaining_TC, U, bought_items)
if(!I)
break
bought_items += I
remaining_TC -= I.cost(remaining_TC)
return bought_items
@@ -0,0 +1,102 @@
var/datum/uplink_random_selection/default_uplink_selection = new/datum/uplink_random_selection/default()
/datum/uplink_random_item
var/uplink_item // The uplink item
var/keep_probability // The probability we'll decide to keep this item if selected
var/reselect_probability // Probability that we'll decide to keep this item if previously selected.
// Is done together with the keep_probability check. Being selected more than once does not affect this probability.
/datum/uplink_random_item/New(var/uplink_item, var/keep_probability = 100, var/reselect_propbability = 33)
..()
src.uplink_item = uplink_item
src.keep_probability = keep_probability
src.reselect_probability = reselect_probability
/datum/uplink_random_selection
var/list/datum/uplink_random_item/items
/datum/uplink_random_selection/New()
..()
items = list()
/datum/uplink_random_selection/proc/get_random_item(var/telecrystals, obj/item/device/uplink/U, var/list/bought_items)
var/const/attempts = 50
for(var/i = 0; i < attempts; i++)
var/datum/uplink_random_item/RI = pick(items)
if(!prob(RI.keep_probability))
continue
var/datum/uplink_item/I = uplink.items_assoc[RI.uplink_item]
if(I.cost(telecrystals) > telecrystals)
continue
if(bought_items && (I in bought_items) && !prob(RI.reselect_probability))
continue
if(U && !I.can_buy(U))
continue
return I
/datum/uplink_random_selection/default/New()
..()
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/g9mm)
items += new/datum/uplink_random_item(/datum/uplink_item/item/ammo/mc9mm)
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/revolver)
items += new/datum/uplink_random_item(/datum/uplink_item/item/ammo/a357)
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/heavysniper, 15, 0)
items += new/datum/uplink_random_item(/datum/uplink_item/item/ammo/sniperammo, 15, 0)
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/emp, 50)
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/crossbow, 33)
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/energy_sword, 75)
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealthy_weapons/soap, 5, 100)
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealthy_weapons/concealed_cane, 50, 10)
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealthy_weapons/detomatix, 20, 10)
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealthy_weapons/parapen)
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealthy_weapons/cigarette_kit)
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealth_items/id)
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealth_items/spy)
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealth_items/chameleon_kit)
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealth_items/chameleon_projector)
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealth_items/voice)
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealth_items/camera_floppy, 10, 0)
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/toolbox, reselect_propbability = 10)
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/plastique)
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/encryptionkey_radio)
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/encryptionkey_binary)
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/emag, 100, 50)
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/clerical)
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/space_suit, 50, 10)
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/thermal)
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/heavy_vest)
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/powersink, 10, 10)
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/ai_module, 25, 0)
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/teleporter, 10, 0)
items += new/datum/uplink_random_item(/datum/uplink_item/item/implants/imp_freedom)
items += new/datum/uplink_random_item(/datum/uplink_item/item/implants/imp_compress)
items += new/datum/uplink_random_item(/datum/uplink_item/item/implants/imp_explosive)
items += new/datum/uplink_random_item(/datum/uplink_item/item/medical/sinpockets, reselect_propbability = 20)
items += new/datum/uplink_random_item(/datum/uplink_item/item/medical/surgery, reselect_propbability = 10)
items += new/datum/uplink_random_item(/datum/uplink_item/item/medical/combat, reselect_propbability = 10)
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/thermal, reselect_propbability = 15)
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/energy_net, reselect_propbability = 15)
items += new/datum/uplink_random_item(/datum/uplink_item/item/ewar_voice, reselect_propbability = 15)
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/maneuvering_jets, reselect_propbability = 15)
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/egun, reselect_propbability = 15)
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/power_sink, reselect_propbability = 15)
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/laser_canon, reselect_propbability = 5)
#ifdef DEBUG
/proc/debug_uplink_purchage_log()
for(var/antag_type in all_antag_types)
var/datum/antagonist/A = all_antag_types[antag_type]
A.print_player_summary()
/proc/debug_uplink_item_assoc_list()
for(var/key in uplink.items_assoc)
world << "[key] - [uplink.items_assoc[key]]"
#endif
+6 -8
View File
@@ -47,12 +47,10 @@ obj/item/device/hailer/attack_self(mob/living/carbon/user as mob)
spawn(20)
spamcheck = 0
/obj/item/device/hailer/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/card/emag))
if(isnull(insults))
user << "<span class='danger'>You overload \the [src]'s voice synthesizer.</span>"
insults = rand(1, 3)//to prevent dickflooding
else
user << "The hailer is fried. You can't even fit the sequencer into the input slot."
/obj/item/device/hailer/emag_act(var/remaining_charges, var/mob/user)
if(isnull(insults))
user << "<span class='danger'>You overload \the [src]'s voice synthesizer.</span>"
insults = rand(1, 3)//to prevent dickflooding
return 1
else
return .. ()
user << "The hailer is fried. You can't even fit the sequencer into the input slot."
+7 -9
View File
@@ -326,12 +326,10 @@
user << "<span class='notice'>You insert the flash into the eye socket!</span>"
/obj/item/robot_parts/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/card/emag))
if(sabotaged)
user << "<span class='warning'>[src] is already sabotaged!</span>"
else
user << "<span class='warning'>You slide [W] into the dataport on [src] and short out the safeties.</span>"
sabotaged = 1
return
..()
/obj/item/robot_parts/emag_act(var/remaining_charges, var/mob/user)
if(sabotaged)
user << "<span class='warning'>[src] is already sabotaged!</span>"
else
user << "<span class='warning'>You short out the safeties.</span>"
sabotaged = 1
return 1
+2 -2
View File
@@ -61,7 +61,7 @@
else if(O.reagents.total_volume >= 1)
if(O.reagents.has_reagent("pacid", 1))
user << "The acid chews through the balloon!"
O.reagents.splash_mob(user, reagents.total_volume)
O.reagents.splash(user, reagents.total_volume)
qdel(src)
else
src.desc = "A translucent balloon with some form of liquid sloshing around in it."
@@ -398,7 +398,7 @@
if((ishuman(H))) //i guess carp and shit shouldn't set them off
var/mob/living/carbon/M = H
if(M.m_intent == "run")
M << "<span class='warning'>You step on the snap pop!"
M << "<span class='warning'>You step on the snap pop!</span>"
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 0, src)
+9 -44
View File
@@ -69,59 +69,24 @@
item_state = "card-id"
origin_tech = list(TECH_MAGNET = 2, TECH_ILLEGAL = 2)
var/uses = 10
// List of devices that cost a use to emag.
var/list/devices = list(
/obj/item/robot_parts,
/obj/item/weapon/storage/lockbox,
/obj/item/weapon/storage/secure,
/obj/item/weapon/circuitboard,
/obj/item/weapon/rig,
/obj/item/device/eftpos,
/obj/item/device/lightreplacer,
/obj/item/device/taperecorder,
/obj/item/device/hailer,
/obj/item/device/megaphone,
/obj/item/clothing/accessory/badge/holo,
/obj/structure/closet/crate/secure,
/obj/structure/closet/secure_closet,
/obj/machinery/librarycomp,
/obj/machinery/computer,
/obj/machinery/power,
/obj/machinery/suspension_gen,
/obj/machinery/shield_capacitor,
/obj/machinery/shield_gen,
/obj/machinery/clonepod,
/obj/machinery/deployable,
/obj/machinery/button/remote,
/obj/machinery/porta_turret,
/obj/machinery/shieldgen,
/obj/machinery/turretid,
/obj/machinery/vending,
/mob/living/bot,
/obj/machinery/door,
/obj/machinery/telecomms,
/obj/machinery/mecha_part_fabricator,
/obj/machinery/gibber,
/obj/vehicle
)
/obj/item/weapon/card/emag/resolve_attackby(atom/A, mob/user)
var/used_uses = A.emag_act(uses, user)
if(used_uses < 0)
return ..(A, user)
/obj/item/weapon/card/emag/afterattack(var/obj/item/weapon/O as obj, mob/user as mob)
for(var/type in devices)
if(istype(O,type))
uses--
break
uses -= used_uses
A.add_fingerprint(user)
log_and_message_admins("emagged \an [A].")
if(uses<1)
user.visible_message("[src] fizzles and sparks - it seems it's been used once too often, and is now broken.")
user.visible_message("<span class='warning'>\The [src] fizzles and sparks - it seems it's been used once too often, and is now spent.</span>")
user.drop_item()
var/obj/item/weapon/card/emag_broken/junk = new(user.loc)
junk.add_fingerprint(user)
qdel(src)
return
..()
return 1
/obj/item/weapon/card/id
name = "identification card"
@@ -55,8 +55,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM
return
/obj/item/weapon/flame/match/dropped(mob/user as mob)
//If dropped, put ourselves out
//not before lighting up the turf we land on, though.
if(lit)
burn_out()
spawn(0)
var/turf/location = src.loc
if(istype(location))
location.hotspot_expose(700, 5)
burn_out()
return ..()
/obj/item/weapon/flame/match/proc/burn_out()
@@ -457,9 +463,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
icon_state = "[base_state]"
item_state = "[base_state]"
if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.")
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.</span>")
else
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].")
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].</span>")
set_light(0)
processing_objects.Remove(src)
@@ -36,16 +36,18 @@
/obj/item/weapon/circuitboard/security/deconstruct(var/obj/machinery/computer/security/C)
if (..(C))
network = C.network
/obj/item/weapon/circuitboard/security/emag_act(var/remaining_charges, var/mob/user)
if(emagged)
user << "Circuit lock is already removed."
return
user << "<span class='notice'>You override the circuit lock and open controls.</span>"
emagged = 1
locked = 0
return 1
/obj/item/weapon/circuitboard/security/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I,/obj/item/weapon/card/emag))
if(emagged)
user << "Circuit lock is already removed."
return
user << "<span class='notice'>You override the circuit lock and open controls.</span>"
emagged = 1
locked = 0
else if(istype(I,/obj/item/weapon/card/id))
if(istype(I,/obj/item/weapon/card/id))
if(emagged)
user << "<span class='warning'>Circuit lock does not respond.</span>"
return
@@ -78,7 +78,7 @@
user << "<span class='notice'>You lock the assembly.</span>"
name = "grenade"
else
// user << "<span class='warning'>You need to add at least one beaker before locking the assembly."
// user << "<span class='warning'>You need to add at least one beaker before locking the assembly.</span>"
user << "<span class='notice'>You lock the empty assembly.</span>"
name = "fake grenade"
playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, -3)
@@ -34,23 +34,13 @@
return
else
user << "<span class='warning'>Access Denied</span>"
else if((istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
if(istype(W, /obj/item/weapon/melee/energy/blade))
else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, "The locker has been sliced open by [user] with an energy blade!", "You hear metal being sliced and sparks flying."))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 3))
O.show_message(text("<span class='warning'>The locker has been sliced open by [] with an energy blade!</span>", user), 1, text("<span class='warning'>You hear metal being sliced and sparks flying.</span>"), 2)
else
for(var/mob/O in viewers(user, 3))
O.show_message(text("<span class='warning'>The locker has been broken by [] with an electromagnetic card!</span>", user), 1, text("You hear a faint electrical spark."), 2)
if(!locked)
..()
else
@@ -65,6 +55,23 @@
..()
return
/obj/item/weapon/storage/lockbox/emag_act(var/remaining_charges, var/mob/user, var/visual_feedback = "", var/audible_feedback = "")
if(!broken)
if(visual_feedback)
visual_feedback = "<span class='warning'>[visual_feedback]</span>"
else
visual_feedback = "<span class='warning'>The locker has been sliced open by [user] with an electromagnetic card!</span>"
if(audible_feedback)
audible_feedback = "<span class='warning'>[audible_feedback]</span>"
else
audible_feedback = "<span class='warning'>You hear a faint electrical spark.</span>"
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
visible_message(visual_feedback, audible_feedback)
return 1
/obj/item/weapon/storage/lockbox/loyalty
name = "lockbox of loyalty implants"
@@ -33,22 +33,12 @@
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(locked)
if ( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged))
emagged = 1
src.overlays += image('icons/obj/storage.dmi', icon_sparking)
sleep(6)
src.overlays = null
overlays += image('icons/obj/storage.dmi', icon_locking)
locked = 0
if(istype(W, /obj/item/weapon/melee/energy/blade))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
user << "You slice through the lock on [src]."
else
user << "You short out the lock on [src]."
if (emag_act(INFINITY, user, "You slice through the lock of \the [src]"))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
return
if (istype(W, /obj/item/weapon/screwdriver))
@@ -136,6 +126,17 @@
return
return
/obj/item/weapon/storage/secure/emag_act(var/remaining_charges, var/mob/user, var/feedback)
if(!emagged)
emagged = 1
src.overlays += image('icons/obj/storage.dmi', icon_sparking)
sleep(6)
src.overlays = null
overlays += image('icons/obj/storage.dmi', icon_locking)
locked = 0
user << (feedback ? feedback : "You short out the lock of \the [src].")
return 1
// -----------------------------
// Secure Briefcase
// -----------------------------
@@ -157,7 +158,7 @@
attack_hand(mob/user as mob)
if ((src.loc == user) && (src.locked == 1))
usr << "<span class='warning'>[src] is locked and cannot be opened!"
usr << "<span class='warning'>[src] is locked and cannot be opened!</span>"
else if ((src.loc == user) && (!src.locked))
src.open(usr)
else
+2 -2
View File
@@ -100,7 +100,7 @@
/obj/item/weapon/melee/baton/attack(mob/M, mob/user)
if(status && (CLUMSY in user.mutations) && prob(50))
user << "span class='danger'>You accidentally hit yourself with the [src]!</span>"
user << "<span class='danger'>You accidentally hit yourself with the [src]!</span>"
user.Weaken(30)
deductcharge(hitcost)
return
@@ -130,7 +130,7 @@
target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, L)
if(!target_zone)
L.visible_message(">span class='danger'>\The [user] misses [L] with \the [src]!</span>")
L.visible_message("<span class='danger'>\The [user] misses [L] with \the [src]!</span>")
return 0
var/mob/living/carbon/human/H = L
+3 -1
View File
@@ -262,6 +262,8 @@
//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use()
/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/M = null)
if(!welding)
return 0
if(get_fuel() >= amount)
reagents.remove_reagent("fuel", amount)
if(M)
@@ -292,7 +294,7 @@
var/turf/T = get_turf(src)
//If we're turning it on
if(set_welding && !welding)
if (remove_fuel(1))
if (get_fuel() > 0)
if(M)
M << "<span class='notice'>You switch the [src] on.</span>"
else if(T)
@@ -220,8 +220,11 @@
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0,user))
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
if(!WT.isOn())
return
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
new /obj/item/stack/material/steel(src.loc)
for(var/mob/M in viewers(src))
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 3, "You hear welding.", 2)
@@ -239,8 +242,11 @@
else if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0,user))
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
if(!WT.isOn())
return
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
src.welded = !src.welded
src.update_icon()
for(var/mob/M in viewers(src))
@@ -83,22 +83,26 @@
src.desc = "Owned by [I.registered_name]."
else
user << "<span class='warning'>Access Denied</span>"
else if( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
if(istype(W, /obj/item/weapon/melee/energy/blade))
else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, "The locker has been sliced open by [user] with \an [W]!", "You hear metal being sliced and sparks flying."))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 3))
O.show_message("<span class='warning'>The locker has been sliced open by [user] with an energy blade!</span>", 1, "<span class='warning'>You hear metal being sliced and sparks flying.</span>", 2)
else
user << "<span class='warning'>Access Denied</span>"
return
/obj/structure/closet/secure_closet/personal/emag_act(var/remaining_charges, var/mob/user, var/visual_feedback, var/audible_feedback)
if(!broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
if(visual_feedback)
visible_message("<span class='warning'>[visual_feedback]</span>", "<span class='warning'>[audible_feedback]</span>")
return 1
/obj/structure/closet/secure_closet/personal/verb/reset()
set src in oview(1) // One square distance
@@ -78,28 +78,31 @@
user.drop_item()
if(W)
W.loc = src.loc
else if((istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = icon_off
flick(icon_broken, src)
if(istype(W, /obj/item/weapon/melee/energy/blade))
else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 3))
O.show_message("<span class='warning'>The locker has been sliced open by [user] with an energy blade!</span>", 1, "You hear metal being sliced and sparks flying.", 2)
else
for(var/mob/O in viewers(user, 3))
O.show_message("<span class='warning'>The locker has been broken by [user] with an electromagnetic card!</span>", 1, "You hear a faint electrical spark.", 2)
else if(istype(W,/obj/item/weapon/packageWrap) || istype(W,/obj/item/weapon/weldingtool))
return ..(W,user)
else
togglelock(user)
/obj/structure/closet/secure_closet/attack_hand(var/remaining_charges, var/mob/user, var/visual_feedback, var/audible_feedback)
if(!broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = icon_off
flick(icon_broken, src)
if(visual_feedback)
visible_message(visual_feedback, audible_feedback)
else
visible_message("<span class='warning'>The locker has been broken by [user] with an electromagnetic card!</span>", "You hear a faint electrical spark.")
/obj/structure/closet/secure_closet/attack_hand(mob/user as mob)
src.add_fingerprint(user)
if(src.locked)

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