mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Merge remote-tracking branch 'upstream/master' into Cargo
This commit is contained in:
@@ -313,7 +313,8 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
return M
|
||||
return null
|
||||
|
||||
/proc/get_candidates(be_special_flag=0, afk_bracket=3000, jobban=0, department_jobban=0, override_age=0)
|
||||
/proc/get_candidates(be_special_flag=0, afk_bracket=3000, override_age=0, override_jobban=0)
|
||||
var/roletext = get_roletext(be_special_flag)
|
||||
var/list/candidates = list()
|
||||
// Keep looping until we find a non-afk candidate within the time bracket (we limit the bracket to 10 minutes (6000))
|
||||
while(!candidates.len && afk_bracket < 6000)
|
||||
@@ -321,7 +322,7 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
if(G.client != null)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
if(!G.client.is_afk(afk_bracket) && (G.client.prefs.be_special & be_special_flag))
|
||||
if(!jobban && !department_jobban || !jobban_isbanned(G, jobban) && !jobban_isbanned(G,department_jobban))
|
||||
if(!override_jobban || (!jobban_isbanned(G, roletext) && !jobban_isbanned(G,"Syndicate")))
|
||||
if(override_age || player_old_enough_antag(G.client,be_special_flag))
|
||||
candidates += G.client
|
||||
afk_bracket += 600 // Add a minute to the bracket, for every attempt
|
||||
|
||||
@@ -94,7 +94,7 @@ datum/light_source
|
||||
if(owner.loc && owner.luminosity > 0)
|
||||
readrgb(owner.l_color)
|
||||
effect = list()
|
||||
for(var/turf/T in view(owner.get_light_range(),owner))
|
||||
for(var/turf/T in view(owner.get_light_range(),get_turf(owner)))
|
||||
var/delta_lumen = lum(T)
|
||||
if(delta_lumen > 0)
|
||||
effect[T] = delta_lumen
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
/obj/item/clothing/mask/facehugger) // NOT CLOTHING AT ALLLLL
|
||||
whitelist = list(/obj/item/clothing,/obj/item/weapon/storage/belt,/obj/item/weapon/storage/backpack,
|
||||
/obj/item/device/radio/headset,/obj/item/device/pda,/obj/item/weapon/card/id,/obj/item/weapon/tank,
|
||||
/obj/item/weapon/handcuffs, /obj/item/weapon/legcuffs)
|
||||
/obj/item/weapon/restraints/handcuffs, /obj/item/weapon/restraints/legcuffs)
|
||||
|
||||
/datum/cargoprofile/trash
|
||||
name = "Trash"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
/datum/crafting_recipe/table/stunprod
|
||||
name = "Stunprod"
|
||||
result_path = /obj/item/weapon/melee/baton/cattleprod
|
||||
reqs = list(/obj/item/weapon/handcuffs/cable = 1,
|
||||
reqs = list(/obj/item/weapon/restraints/handcuffs/cable = 1,
|
||||
/obj/item/stack/rods = 1,
|
||||
/obj/item/weapon/wirecutters = 1,
|
||||
/obj/item/weapon/stock_parts/cell = 1)
|
||||
|
||||
Executable → Regular
+28
@@ -730,9 +730,37 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
|
||||
containername = "transfer valves crate"
|
||||
access = access_rd
|
||||
|
||||
<<<<<<< HEAD
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////// Organic /////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
=======
|
||||
/datum/supply_packs/riot
|
||||
name = "Riot gear crate"
|
||||
contains = list(/obj/item/weapon/melee/baton/loaded,
|
||||
/obj/item/weapon/melee/baton/loaded,
|
||||
/obj/item/weapon/melee/baton/loaded,
|
||||
/obj/item/weapon/shield/riot,
|
||||
/obj/item/weapon/shield/riot,
|
||||
/obj/item/weapon/shield/riot,
|
||||
/obj/item/weapon/storage/box/flashbangs,
|
||||
/obj/item/weapon/storage/box/flashbangs,
|
||||
/obj/item/weapon/storage/box/flashbangs,
|
||||
/obj/item/weapon/restraints/handcuffs,
|
||||
/obj/item/weapon/restraints/handcuffs,
|
||||
/obj/item/weapon/restraints/handcuffs,
|
||||
/obj/item/clothing/head/helmet/riot,
|
||||
/obj/item/clothing/suit/armor/riot,
|
||||
/obj/item/clothing/head/helmet/riot,
|
||||
/obj/item/clothing/suit/armor/riot,
|
||||
/obj/item/clothing/head/helmet/riot,
|
||||
/obj/item/clothing/suit/armor/riot)
|
||||
cost = 60
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "Riot gear crate"
|
||||
access = access_armory
|
||||
group = "Security"
|
||||
>>>>>>> upstream/master
|
||||
|
||||
/datum/supply_packs/organic
|
||||
name = "HEADER"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define CAT_HIDDEN 2 // Also in code/game/machinery/vending.dm
|
||||
|
||||
/datum/wires/vending
|
||||
holder_type = /obj/machinery/vending
|
||||
wire_count = 4
|
||||
@@ -17,17 +19,12 @@ var/const/VENDING_WIRE_IDSCAN = 8
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/wires/vending/Interact(var/mob/living/user)
|
||||
if(CanUse(user))
|
||||
var/obj/machinery/vending/V = holder
|
||||
V.attack_hand(user)
|
||||
|
||||
/datum/wires/vending/GetInteractWindow()
|
||||
var/obj/machinery/vending/V = holder
|
||||
. += ..()
|
||||
. += "<BR>The orange light is [V.seconds_electrified ? "on" : "off"].<BR>"
|
||||
. += "The red light is [V.shoot_inventory ? "off" : "blinking"].<BR>"
|
||||
. += "The green light is [V.extended_inventory ? "on" : "off"].<BR>"
|
||||
. += "The green light is [(V.categories & CAT_HIDDEN) ? "on" : "off"].<BR>"
|
||||
. += "A [V.scan_id ? "purple" : "yellow"] light is on.<BR>"
|
||||
|
||||
/datum/wires/vending/UpdatePulsed(var/index)
|
||||
@@ -36,7 +33,7 @@ var/const/VENDING_WIRE_IDSCAN = 8
|
||||
if(VENDING_WIRE_THROW)
|
||||
V.shoot_inventory = !V.shoot_inventory
|
||||
if(VENDING_WIRE_CONTRABAND)
|
||||
V.extended_inventory = !V.extended_inventory
|
||||
V.categories ^= CAT_HIDDEN
|
||||
if(VENDING_WIRE_ELECTRIFY)
|
||||
V.seconds_electrified = 30
|
||||
if(VENDING_WIRE_IDSCAN)
|
||||
@@ -48,7 +45,7 @@ var/const/VENDING_WIRE_IDSCAN = 8
|
||||
if(VENDING_WIRE_THROW)
|
||||
V.shoot_inventory = !mended
|
||||
if(VENDING_WIRE_CONTRABAND)
|
||||
V.extended_inventory = 0
|
||||
V.categories &= ~CAT_HIDDEN
|
||||
if(VENDING_WIRE_ELECTRIFY)
|
||||
if(mended)
|
||||
V.seconds_electrified = 0
|
||||
|
||||
@@ -72,8 +72,11 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
|
||||
html = GetInteractWindow()
|
||||
if(html)
|
||||
user.set_machine(holder)
|
||||
//user << browse(html, "window=wires;size=[window_x]x[window_y]")
|
||||
//onclose(user, "wires")
|
||||
else
|
||||
user.unset_machine()
|
||||
// No content means no window.
|
||||
user << browse(null, "window=wires")
|
||||
return
|
||||
var/datum/browser/popup = new(user, "wires", holder.name, window_x, window_y)
|
||||
popup.set_content(html)
|
||||
popup.set_title_image(user.browse_rsc_icon(holder.icon, holder.icon_state))
|
||||
|
||||
@@ -154,65 +154,6 @@
|
||||
item_state = "gift"
|
||||
w_class = 4.0
|
||||
|
||||
/obj/item/weapon/legcuffs
|
||||
name = "legcuffs"
|
||||
desc = "Use this to keep prisoners in line."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "handcuff"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
throwforce = 0
|
||||
w_class = 3.0
|
||||
origin_tech = "materials=1"
|
||||
var/breakouttime = 300 //Deciseconds = 30s = 0.5 minute
|
||||
|
||||
/obj/item/weapon/legcuffs/beartrap
|
||||
name = "bear trap"
|
||||
throw_speed = 1
|
||||
throw_range = 1
|
||||
icon_state = "beartrap0"
|
||||
desc = "A trap used to catch bears and other legged creatures."
|
||||
var/armed = 0
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "<span class='suicide'>[user] is putting the [src.name] on \his head! It looks like \he's trying to commit suicide.</span>"
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/legcuffs/beartrap/attack_self(mob/user as mob)
|
||||
..()
|
||||
if(ishuman(user) && !user.stat && !user.restrained())
|
||||
armed = !armed
|
||||
icon_state = "beartrap[armed]"
|
||||
user << "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>"
|
||||
|
||||
|
||||
/obj/item/weapon/legcuffs/beartrap/Crossed(AM as mob|obj)
|
||||
if(armed && isturf(src.loc))
|
||||
if( (iscarbon(AM) || isanimal(AM)) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator))
|
||||
var/mob/living/L = AM
|
||||
armed = 0
|
||||
icon_state = "beartrap0"
|
||||
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
L.visible_message("<span class='danger'>[L] triggers \the [src].</span>", \
|
||||
"<span class='userdanger'>You trigger \the [src]!</span>")
|
||||
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.lying)
|
||||
H.apply_damage(20,BRUTE,"chest")
|
||||
else
|
||||
H.apply_damage(20,BRUTE,(pick("l_leg", "r_leg")))
|
||||
if(!H.legcuffed) //beartrap can't cuff you leg if there's already a beartrap or legcuffs.
|
||||
H.legcuffed = src
|
||||
src.loc = H
|
||||
H.update_inv_legcuffed(0)
|
||||
feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
|
||||
|
||||
else
|
||||
L.apply_damage(20,BRUTE)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/holosign_creator
|
||||
name = "holographic sign projector"
|
||||
desc = "A handy-dandy hologaphic projector that displays a janitorial sign."
|
||||
|
||||
@@ -242,6 +242,8 @@ its easier to just keep the beam vertical.
|
||||
/atom/proc/blob_act()
|
||||
return
|
||||
|
||||
/atom/proc/emag_act()
|
||||
return
|
||||
|
||||
/atom/proc/hitby(atom/movable/AM as mob|obj)
|
||||
if (density)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
if(!checking)
|
||||
checking = 1
|
||||
user << "<span class='notice'>The device is now checking for possible candidates.</span>"
|
||||
get_candidate_answer(user, get_candidates(BE_OPERATIVE,,"operative","Syndicate"))
|
||||
get_candidate_answer(user, get_candidates(BE_OPERATIVE))
|
||||
else
|
||||
user << "<span class='notice'>The device is already checking for possible candidates.</span>"
|
||||
return
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
var/list/candidates = list()
|
||||
|
||||
if(!new_overmind)
|
||||
candidates = get_candidates(BE_BLOB,,"blob","Syndicate")
|
||||
candidates = get_candidates(BE_BLOB)
|
||||
if(candidates.len)
|
||||
C = pick(candidates)
|
||||
else
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
|
||||
vents += temp_vent
|
||||
|
||||
var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,"alien","Syndicate")
|
||||
var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET)
|
||||
|
||||
if(prob(40)) spawncount++ //sometimes, have two larvae spawn instead of one
|
||||
while((spawncount >= 1) && vents.len && candidates.len)
|
||||
|
||||
@@ -153,7 +153,7 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
|
||||
else
|
||||
|
||||
var/list/candidates = list() //list of candidate keys
|
||||
candidates = get_candidates(BE_NINJA,,"ninja","Syndicate")
|
||||
candidates = get_candidates(BE_NINJA)
|
||||
if(!candidates.len) return
|
||||
while(!ninja_key && candidates.len)
|
||||
candidate_mob = pick(candidates)
|
||||
|
||||
@@ -337,20 +337,7 @@ Implants;
|
||||
//var/list/drafted = list()
|
||||
//var/datum/mind/applicant = null
|
||||
|
||||
var/roletext
|
||||
switch(role)
|
||||
if(BE_CHANGELING) roletext="changeling"
|
||||
if(BE_TRAITOR) roletext="traitor"
|
||||
if(BE_OPERATIVE) roletext="operative"
|
||||
if(BE_WIZARD) roletext="wizard"
|
||||
if(BE_REV) roletext="revolutionary"
|
||||
if(BE_CULTIST) roletext="cultist"
|
||||
if(BE_NINJA) roletext="ninja"
|
||||
if(BE_RAIDER) roletext="raider"
|
||||
if(BE_VAMPIRE) roletext="vampire"
|
||||
if(BE_ALIEN) roletext="alien"
|
||||
if(BE_MUTINEER) roletext="mutineer"
|
||||
if(BE_BLOB) roletext="blob"
|
||||
var/roletext = get_roletext(role)
|
||||
|
||||
// Assemble a list of active players without jobbans.
|
||||
for(var/mob/new_player/player in player_list)
|
||||
@@ -577,3 +564,20 @@ proc/get_nt_opposed()
|
||||
for(var/datum/objective/objective in player.objectives)
|
||||
player.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
||||
obj_count++
|
||||
|
||||
/proc/get_roletext(var/role)
|
||||
var/roletext
|
||||
switch(role)
|
||||
if(BE_CHANGELING) roletext="changeling"
|
||||
if(BE_TRAITOR) roletext="traitor"
|
||||
if(BE_OPERATIVE) roletext="operative"
|
||||
if(BE_WIZARD) roletext="wizard"
|
||||
if(BE_REV) roletext="revolutionary"
|
||||
if(BE_CULTIST) roletext="cultist"
|
||||
if(BE_NINJA) roletext="ninja"
|
||||
if(BE_RAIDER) roletext="raider"
|
||||
if(BE_VAMPIRE) roletext="vampire"
|
||||
if(BE_ALIEN) roletext="alien"
|
||||
if(BE_MUTINEER) roletext="mutineer"
|
||||
if(BE_BLOB) roletext="blob"
|
||||
return roletext
|
||||
@@ -50,7 +50,7 @@
|
||||
if (used)
|
||||
H << "You already used this contract!"
|
||||
return
|
||||
var/list/candidates = get_candidates(BE_WIZARD,,"wizard","Syndicate")
|
||||
var/list/candidates = get_candidates(BE_WIZARD)
|
||||
if(candidates.len)
|
||||
src.used = 1
|
||||
var/client/C = pick(candidates)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
var/mob/dead/observer/theghost = null
|
||||
spawn(rand(200, 600))
|
||||
message_admins("SWF is still pissed, sending another wizard - [max_mages - mages_made] left.")
|
||||
candidates = get_candidates(BE_WIZARD,,"wizard","Syndicate")
|
||||
candidates = get_candidates(BE_WIZARD)
|
||||
if(!candidates.len)
|
||||
message_admins("No applicable ghosts for the next ragin' mage, asking ghosts instead.")
|
||||
var/time_passed = world.time
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/gun(H), slot_s_store)
|
||||
if(H.backbag == 1)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_store)
|
||||
H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_l_store)
|
||||
else
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/melee/telebaton(H.back), slot_in_backpack)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
@@ -81,10 +81,10 @@
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_s_store)
|
||||
if(H.backbag == 1)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_hand)
|
||||
H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_l_hand)
|
||||
else
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_in_backpack)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
@@ -180,10 +180,10 @@
|
||||
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
|
||||
if(H.backbag == 1)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_hand)
|
||||
H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_l_hand)
|
||||
else
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_in_backpack)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
@@ -255,10 +255,10 @@
|
||||
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
|
||||
if(H.backbag == 1)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_hand)
|
||||
H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_l_hand)
|
||||
else
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_in_backpack)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
|
||||
@@ -5,55 +5,24 @@
|
||||
density = 1
|
||||
var/health = 100.0
|
||||
flags = FPRINT | CONDUCT
|
||||
|
||||
|
||||
var/menu = 0
|
||||
//used by nanoui: 0 = main menu, 1 = relabel
|
||||
|
||||
var/valve_open = 0
|
||||
var/release_pressure = ONE_ATMOSPHERE
|
||||
|
||||
var/list/_color = list("yellow", null, null, null)//variable that stores colours
|
||||
var/list/decals = list() // var that stores the decals, NOTE: Not the actual POSSIBLE decals, but the ones currently used
|
||||
var/list/oldcolor = list()//lists for check_change()
|
||||
var/list/olddecals = list()
|
||||
var/list/possibledecals = list( //var that stores all possible decals, here for adminbus I guess? NOTE: LEAVE "done" IN HERE
|
||||
"Low temperature canister" = "cold",
|
||||
"High temperature canister" = "hot",
|
||||
"Plasma containing canister" = "plasma",
|
||||
"Done" = "DONE"
|
||||
)
|
||||
var/list/possiblemaincolor = list( //these lists contain the possible colors of a canister, here for adminbus
|
||||
"\[N2O\]" = "redws",
|
||||
"\[N2\]" = "red",
|
||||
"\[O2\]" = "blue",
|
||||
"\[Toxin (Bio)\]" = "orange",
|
||||
"\[CO2\]" = "black",
|
||||
"\[Air\]" = "grey",
|
||||
"\[CAUTION\]" = "yellow",
|
||||
"\[SPECIAL\]" = "whiters"
|
||||
)
|
||||
var/list/possibleseccolor = list( // no point in having the N2O and "whiters" ones in these lists
|
||||
"\[N2\]" = "red-c",
|
||||
"\[O2\]" = "blue-c",
|
||||
"\[Toxin (Bio)\]" = "orange-c",
|
||||
"\[CO2\]" = "black-c",
|
||||
"\[Air\]" = "grey-c",
|
||||
"\[CAUTION\]" = "yellow-c"
|
||||
)
|
||||
var/list/possibletertcolor = list(
|
||||
"\[N2\]" = "red-c-1",
|
||||
"\[O2\]" = "blue-c-1",
|
||||
"\[Toxin (Bio)\]" = "orange-c-1",
|
||||
"\[CO2\]" = "black-c-1",
|
||||
"\[Air\]" = "grey-c-1",
|
||||
"\[CAUTION\]" = "yellow-c-1"
|
||||
)
|
||||
var/list/possiblequartcolor = list(
|
||||
"\[N2\]" = "red-c-2",
|
||||
"\[O2\]" = "blue-c-2",
|
||||
"\[Toxin (Bio)\]" = "orange-c-2",
|
||||
"\[CO2\]" = "black-c-2",
|
||||
"\[Air\]" = "grey-c-2",
|
||||
"\[CAUTION\]" = "yellow-c-2"
|
||||
)
|
||||
|
||||
|
||||
var/list/_color //variable that stores colours
|
||||
var/list/decals // list that stores the decals
|
||||
var/list/possibledecals
|
||||
var/list/oldcolor//lists for check_change()
|
||||
var/list/olddecals
|
||||
var/list/possiblemaincolor //these lists contain the possible colors of a canister
|
||||
var/list/possibleseccolor
|
||||
var/list/possibletertcolor
|
||||
var/list/possiblequartcolor
|
||||
var/list/colorcontainer //passed to the ui to render the color lists
|
||||
|
||||
var/can_label = 1
|
||||
var/filled = 0.5
|
||||
pressure_resistance = 7*ONE_ATMOSPHERE
|
||||
@@ -63,43 +32,79 @@
|
||||
var/release_log = ""
|
||||
var/busy = 0
|
||||
var/update_flag = 0
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/sleeping_agent
|
||||
name = "Canister: \[N2O\]"
|
||||
icon_state = "redws"
|
||||
_color = list("redws", null, null, null)
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/nitrogen
|
||||
name = "Canister: \[N2\]"
|
||||
icon_state = "red"
|
||||
_color = list("red", null, null, null)
|
||||
decals = list("plasma")
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/oxygen
|
||||
name = "Canister: \[O2\]"
|
||||
icon_state = "blue"
|
||||
_color = list("blue", null, null, null)
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/toxins
|
||||
name = "Canister \[Toxin (Plasma)\]"
|
||||
icon_state = "orange"
|
||||
_color = list("orange", null, null, null)
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/carbon_dioxide
|
||||
name = "Canister \[CO2\]"
|
||||
icon_state = "black"
|
||||
_color = list("black", null, null, null)
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/air
|
||||
name = "Canister \[Air\]"
|
||||
icon_state = "grey"
|
||||
_color = list("grey", null, null, null)
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/custom_mix
|
||||
name = "Canister \[Custom\]"
|
||||
icon_state = "whiters"
|
||||
_color = list("whiters", null, null, null)
|
||||
can_label = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
_color = list(
|
||||
"prim" = "yellow",
|
||||
"sec" = null,
|
||||
"ter" = null,
|
||||
"quart" = null)
|
||||
oldcolor = list()
|
||||
decals = list()
|
||||
olddecals = list()
|
||||
possibledecals = list( //var that stores all possible decals, used by ui
|
||||
list("name" = "Low temperature canister", "icon" = "cold", "active" = 0),
|
||||
list("name" = "High temperature canister", "icon" = "hot", "active" = 0),
|
||||
list("name" = "Plasma containing canister", "icon" = "plasma", "active" = 0)
|
||||
)
|
||||
possiblemaincolor = list( //these lists contain the possible colors of a canister
|
||||
list("name" = "\[N2O\]", "icon" = "redws"),
|
||||
list("name" = "\[N2\]", "icon" = "red"),
|
||||
list("name" = "\[O2\]", "icon" = "blue"),
|
||||
list("name" = "\[Toxin (Bio)\]", "icon" = "orange"),
|
||||
list("name" = "\[CO2\]", "icon" = "black"),
|
||||
list("name" = "\[Air\]", "icon" = "grey"),
|
||||
list("name" = "\[CAUTION\]", "icon" = "yellow"),
|
||||
list("name" = "\[SPECIAL\]", "icon" = "whiters")
|
||||
)
|
||||
possibleseccolor = list( // no point in having the N2O and "whiters" ones in these lists
|
||||
list("name" = "\[N2\]", "icon" = "red-c"),
|
||||
list("name" = "\[O2\]", "icon" = "blue-c"),
|
||||
list("name" = "\[Toxin (Bio)\]", "icon" = "orange-c"),
|
||||
list("name" = "\[CO2\]", "icon" = "black-c"),
|
||||
list("name" = "\[Air\]", "icon" = "grey-c"),
|
||||
list("name" = "\[CAUTION\]", "icon" = "yellow-c")
|
||||
)
|
||||
possibletertcolor = list(
|
||||
list("name" = "\[N2\]", "icon" = "red-c-1"),
|
||||
list("name" = "\[O2\]", "icon" = "blue-c-1"),
|
||||
list("name" = "\[Toxin (Bio)\]", "icon" = "orange-c-1"),
|
||||
list("name" = "\[CO2\]", "icon" = "black-c-1"),
|
||||
list("name" = "\[Air\]", "icon" = "grey-c-1"),
|
||||
list("name" = "\[CAUTION\]", "icon" = "yellow-c-1")
|
||||
)
|
||||
possiblequartcolor = list(
|
||||
list("name" = "\[N2\]", "icon" = "red-c-2"),
|
||||
list("name" = "\[O2\]", "icon" = "blue-c-2"),
|
||||
list("name" = "\[Toxin (Bio)\]", "icon" = "orange-c-2"),
|
||||
list("name" = "\[CO2\]", "icon" = "black-c-2"),
|
||||
list("name" = "\[Air\]", "icon" = "grey-c-2"),
|
||||
list("name" = "\[CAUTION\]", "icon" = "yellow-c-2")
|
||||
)
|
||||
colorcontainer = list(//passed to the ui to render the color lists
|
||||
"prim" = list(
|
||||
"options" = possiblemaincolor,
|
||||
"name" = "Primary color",
|
||||
"anycolor" = -1,//0: no color applied. 1: color selected. Not used for primary color.
|
||||
),
|
||||
"sec" = list(
|
||||
"options" = possibleseccolor,
|
||||
"name" = "Secondary color",
|
||||
"anycolor" = 0,
|
||||
),
|
||||
"ter" = list(
|
||||
"options" = possibletertcolor,
|
||||
"name" = "Tertiary color",
|
||||
"anycolor" = 0,
|
||||
),
|
||||
"quart" = list(
|
||||
"options" = possiblequartcolor,
|
||||
"name" = "Quaternary color",
|
||||
"anycolor" = 0,
|
||||
)
|
||||
)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/proc/check_change()
|
||||
var/old_flag = update_flag
|
||||
@@ -119,16 +124,14 @@
|
||||
else
|
||||
update_flag |= 32
|
||||
|
||||
if(list2params(oldcolor) == list2params(_color))
|
||||
if(list2params(oldcolor) != list2params(_color))
|
||||
update_flag |= 64
|
||||
else
|
||||
oldcolor = _color
|
||||
|
||||
if(list2params(olddecals) == list2params(decals))
|
||||
oldcolor = _color.Copy()
|
||||
|
||||
if(list2params(olddecals) != list2params(decals))
|
||||
update_flag |= 128
|
||||
else
|
||||
olddecals = decals
|
||||
|
||||
olddecals = decals.Copy()
|
||||
|
||||
if(update_flag == old_flag)
|
||||
return 1
|
||||
else
|
||||
@@ -145,29 +148,30 @@ update_flag
|
||||
32 = tank_pressure go boom.
|
||||
64 = colors
|
||||
128 = decals
|
||||
(note: colors and decals has to be applied every icon update)
|
||||
*/
|
||||
|
||||
if (src.destroyed)
|
||||
src.overlays = 0
|
||||
src.icon_state = text("[]-1", src._color[1])//yes, I KNOW the colours don't reflect when the can's borked, whatever.
|
||||
src.icon_state = text("[]-1", src._color["prim"])//yes, I KNOW the colours don't reflect when the can's borked, whatever.
|
||||
|
||||
if(icon_state != src._color[1])
|
||||
icon_state = src._color[1]
|
||||
if(icon_state != src._color["prim"])
|
||||
icon_state = src._color["prim"]
|
||||
|
||||
if(check_change()) //Returns 1 if no change needed to icons.
|
||||
return
|
||||
|
||||
src.overlays = 0
|
||||
|
||||
if (_color["sec"])//COLORS!
|
||||
overlays.Add(_color["sec"])
|
||||
|
||||
if (_color[2])//COLORS!
|
||||
overlays.Add(_color[2])
|
||||
|
||||
if (_color[3])
|
||||
overlays.Add(_color[3])
|
||||
|
||||
if (_color[4])
|
||||
overlays.Add(_color[4])
|
||||
if (_color["ter"])
|
||||
overlays.Add(_color["ter"])
|
||||
|
||||
if (_color["quart"])
|
||||
overlays.Add(_color["quart"])
|
||||
|
||||
for(var/D in decals)
|
||||
overlays.Add("decal-" + D)
|
||||
|
||||
@@ -183,9 +187,36 @@ update_flag
|
||||
overlays += "can-o2"
|
||||
else if(update_flag & 32)
|
||||
overlays += "can-o3"
|
||||
check_change()//call this here to update the bitflag, incase the canister gets relabeled instantly after again
|
||||
|
||||
update_flag &= ~196 //the flags 128 and 64 represent change, not states. As such, we have to reset them to be able to detect a change on the next go.
|
||||
return
|
||||
|
||||
//template modification exploit prevention, used in Topic()
|
||||
/obj/machinery/portable_atmospherics/canister/proc/is_a_color(var/inputVar, var/checkColor = "all")
|
||||
if (checkColor == "prim" || checkColor == "all")
|
||||
for(var/list/L in possiblemaincolor)
|
||||
if (L["icon"] == inputVar)
|
||||
return 1
|
||||
if (checkColor == "sec" || checkColor == "all")
|
||||
for(var/list/L in possibleseccolor)
|
||||
if (L["icon"] == inputVar)
|
||||
return 1
|
||||
if (checkColor == "ter" || checkColor == "all")
|
||||
for(var/list/L in possibletertcolor)
|
||||
if (L["icon"] == inputVar)
|
||||
return 1
|
||||
if (checkColor == "quart" || checkColor == "all")
|
||||
for(var/list/L in possiblequartcolor)
|
||||
if (L["icon"] == inputVar)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/proc/is_a_decal(var/inputVar)
|
||||
for(var/list/L in possibledecals)
|
||||
if (L["icon"] == inputVar)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > temperature_resistance)
|
||||
health -= 5
|
||||
@@ -337,7 +368,11 @@ update_flag
|
||||
// this is the data which will be sent to the ui
|
||||
var/data[0]
|
||||
data["name"] = name
|
||||
data["menu"] = menu ? 1 : 0
|
||||
data["canLabel"] = can_label ? 1 : 0
|
||||
data["_color"] = _color
|
||||
data["colorContainer"] = colorcontainer
|
||||
data["possibleDecals"] = possibledecals
|
||||
data["portConnected"] = connected_port ? 1 : 0
|
||||
data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
|
||||
data["releasePressure"] = round(release_pressure ? release_pressure : 0)
|
||||
@@ -372,6 +407,9 @@ update_flag
|
||||
usr << browse(null, "window=canister")
|
||||
onclose(usr, "canister")
|
||||
return
|
||||
|
||||
if (href_list["choice"] == "menu")
|
||||
menu = text2num(href_list["mode_target"])
|
||||
|
||||
if(href_list["toggle"])
|
||||
if (valve_open)
|
||||
@@ -400,54 +438,97 @@ update_flag
|
||||
release_pressure = min(10*ONE_ATMOSPHERE, release_pressure+diff)
|
||||
else
|
||||
release_pressure = max(ONE_ATMOSPHERE/10, release_pressure+diff)
|
||||
|
||||
if (href_list["relabel"])
|
||||
|
||||
if (href_list["rename"])
|
||||
if (can_label)
|
||||
var/T = copytext(sanitize(input("Choose canister label", "Name", name) as text|null),1,MAX_NAME_LEN)
|
||||
if (can_label) //Exploit prevention
|
||||
if (T)
|
||||
name = T
|
||||
else
|
||||
name = "canister"
|
||||
else
|
||||
usr << "\red As you attempted to rename it the pressure rose!"
|
||||
|
||||
var/label1 = input("Choose canister label", "Primary color") as null|anything in possiblemaincolor
|
||||
|
||||
var/label2 = input("Choose canister label", "Secondary color") as null|anything in possibleseccolor
|
||||
|
||||
var/label3 = input("Choose canister label", "Tertiary color") as null|anything in possibletertcolor
|
||||
|
||||
var/label4 = input("Choose canister label", "Quaternary color") as null|anything in possiblequartcolor
|
||||
|
||||
decals = list()
|
||||
|
||||
_color = list(
|
||||
(label1 ? possiblemaincolor[label1] : color[1]),//if the user didn't specify a primary colour, keep the current one.
|
||||
possibleseccolor[label2],
|
||||
possibletertcolor[label3],
|
||||
possiblequartcolor[label4]
|
||||
)
|
||||
|
||||
decals = list()
|
||||
|
||||
var/list/tempposdecals = list()
|
||||
|
||||
for(var/d in possibledecals)//populate the temp list
|
||||
tempposdecals.Add(d)
|
||||
tempposdecals[d] = possibledecals[d]
|
||||
|
||||
while (src && !src.gc_destroyed && usr)//allow the user to select (theoretically) INFINITE DECALS!!!
|
||||
var/newdecal = input("Choose canister label", "Decal") as anything in tempposdecals
|
||||
if (newdecal == "Done")
|
||||
if (href_list["choice"] == "Primary color")
|
||||
if (is_a_color(href_list["icon"],"prim"))
|
||||
_color["prim"] = href_list["icon"]
|
||||
if (href_list["choice"] == "Secondary color")
|
||||
if (href_list["icon"] == "none")
|
||||
_color["sec"] = ""
|
||||
colorcontainer["sec"]["anycolor"] = 0
|
||||
else if (is_a_color(href_list["icon"],"sec"))
|
||||
_color["sec"] = href_list["icon"]
|
||||
colorcontainer["sec"]["anycolor"] = 1
|
||||
if (href_list["choice"] == "Tertiary color")
|
||||
if (href_list["icon"] == "none")
|
||||
_color["ter"] = ""
|
||||
colorcontainer["ter"]["anycolor"] = 0
|
||||
else if (is_a_color(href_list["icon"],"ter"))
|
||||
_color["ter"] = href_list["icon"]
|
||||
colorcontainer["ter"]["anycolor"] = 1
|
||||
if (href_list["choice"] == "Quaternary color")
|
||||
if (href_list["icon"] == "none")
|
||||
_color["quart"] = ""
|
||||
colorcontainer["quart"]["anycolor"] = 0
|
||||
else if (is_a_color(href_list["icon"],"quart"))
|
||||
_color["quart"] = href_list["icon"]
|
||||
colorcontainer["quart"]["anycolor"] = 1
|
||||
|
||||
if (href_list["choice"] == "decals")
|
||||
if (is_a_decal(href_list["icon"]))
|
||||
for (var/list/L in possibledecals)
|
||||
if (L["icon"] == href_list["icon"])
|
||||
L["active"] = (L["active"] == 0)
|
||||
break
|
||||
decals.Add(tempposdecals[newdecal])
|
||||
tempposdecals.Remove(newdecal)
|
||||
|
||||
src.name = (input("Choose canister label", "Name") as text) + " canister"
|
||||
|
||||
|
||||
|
||||
decals = list()
|
||||
|
||||
for (var/list/L in possibledecals)
|
||||
if (L["active"])
|
||||
if (!(L["icon"] in decals))
|
||||
decals.Add(L["icon"])
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
update_icon()
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/toxins
|
||||
name = "Canister \[Toxin (Plasma)\]"
|
||||
icon_state = "orange" //See New()
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/oxygen
|
||||
name = "Canister: \[O2\]"
|
||||
icon_state = "blue" //See New()
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/sleeping_agent
|
||||
name = "Canister: \[N2O\]"
|
||||
icon_state = "redws" //See New()
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/nitrogen
|
||||
name = "Canister: \[N2\]"
|
||||
icon_state = "red" //See New()
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/carbon_dioxide
|
||||
name = "Canister \[CO2\]"
|
||||
icon_state = "black" //See New()
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/air
|
||||
name = "Canister \[Air\]"
|
||||
icon_state = "grey" //See New()
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/custom_mix
|
||||
name = "Canister \[Custom\]"
|
||||
icon_state = "whiters" //See New()
|
||||
can_label = 0
|
||||
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/toxins/New()
|
||||
|
||||
..()
|
||||
|
||||
|
||||
_color["prim"] = "orange"
|
||||
src.air_contents.toxins = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
|
||||
@@ -455,18 +536,18 @@ update_flag
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/oxygen/New()
|
||||
|
||||
..()
|
||||
|
||||
_color["prim"] = "blue"
|
||||
src.air_contents.oxygen = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
src.update_icon()
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/sleeping_agent/New()
|
||||
|
||||
..()
|
||||
|
||||
|
||||
_color["prim"] = "redws"
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
air_contents.trace_gases += trace_gas
|
||||
trace_gas.moles = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
@@ -492,9 +573,11 @@ update_flag
|
||||
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/nitrogen/New()
|
||||
|
||||
..()
|
||||
|
||||
_color["prim"] = "red"
|
||||
decals = list("plasma")
|
||||
possibledecals[3]["active"] = 1
|
||||
src.air_contents.nitrogen = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
|
||||
@@ -502,8 +585,9 @@ update_flag
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/carbon_dioxide/New()
|
||||
|
||||
..()
|
||||
|
||||
_color["prim"] = "black"
|
||||
src.air_contents.carbon_dioxide = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
|
||||
@@ -512,8 +596,9 @@ update_flag
|
||||
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/air/New()
|
||||
|
||||
..()
|
||||
|
||||
_color["prim"] = "grey"
|
||||
src.air_contents.oxygen = (O2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
src.air_contents.nitrogen = (N2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
@@ -524,6 +609,7 @@ update_flag
|
||||
/obj/machinery/portable_atmospherics/canister/custom_mix/New()
|
||||
..()
|
||||
|
||||
_color["prim"] = "whiters"
|
||||
src.update_icon() // Otherwise new canisters do not have their icon updated with the pressure light, likely want to add this to the canister class constructor, avoiding at current time to refrain from screwing up code for other canisters. --DZD
|
||||
return 1
|
||||
|
||||
|
||||
@@ -24,23 +24,15 @@
|
||||
/obj/machinery/meter/process()
|
||||
if(!target)
|
||||
icon_state = "meterX"
|
||||
// Pop the meter off when the pipe we're attached to croaks.
|
||||
new /obj/item/pipe_meter(src.loc)
|
||||
spawn(0) del(src)
|
||||
return 0
|
||||
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
icon_state = "meter0"
|
||||
return 0
|
||||
|
||||
//use_power(5)
|
||||
|
||||
var/datum/gas_mixture/environment = target.return_air()
|
||||
if(!environment)
|
||||
icon_state = "meterX"
|
||||
// Pop the meter off when the environment we're attached to croaks.
|
||||
new /obj/item/pipe_meter(src.loc)
|
||||
spawn(0) del(src)
|
||||
return 0
|
||||
|
||||
var/env_pressure = environment.return_pressure()
|
||||
@@ -87,28 +79,31 @@
|
||||
return t
|
||||
|
||||
/obj/machinery/meter/examine()
|
||||
set src in view(3)
|
||||
|
||||
var/t = "A gas flow meter. "
|
||||
t += status()
|
||||
|
||||
if(get_dist(usr, src) > 3 && !(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/dead)))
|
||||
t += "\blue <B>You are too far away to read it.</B>"
|
||||
|
||||
else if(stat & (NOPOWER|BROKEN))
|
||||
t += "\red <B>The display is off.</B>"
|
||||
|
||||
else if(src.target)
|
||||
var/datum/gas_mixture/environment = target.return_air()
|
||||
if(environment)
|
||||
t += "The pressure gauge reads [round(environment.return_pressure(), 0.01)] kPa; [round(environment.temperature,0.01)]K ([round(environment.temperature-T0C,0.01)]°C)"
|
||||
else
|
||||
t += "The sensor error light is blinking."
|
||||
else
|
||||
t += "The connect error light is blinking."
|
||||
|
||||
usr << t
|
||||
|
||||
|
||||
|
||||
/obj/machinery/meter/Click()
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(istype(usr, /mob/living/silicon/ai)) // ghosts can call ..() for examine
|
||||
usr.examine(src)
|
||||
return 1
|
||||
|
||||
var/t = null
|
||||
if (get_dist(usr, src) <= 3 || istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/dead))
|
||||
t += status()
|
||||
else
|
||||
usr << "\blue <B>You are too far away.</B>"
|
||||
return 1
|
||||
|
||||
usr << t
|
||||
return 1
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
|
||||
@@ -237,8 +237,6 @@
|
||||
user << "<span class='notice'>Maintenance panel is now [open ? "opened" : "closed"].</span>"
|
||||
else
|
||||
user << "<span class='warning'>Maintenance panel is locked.</span>"
|
||||
else if (istype(W, /obj/item/weapon/card/emag) && emagged < 2)
|
||||
Emag(user)
|
||||
else
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm")
|
||||
if(health >= maxhealth)
|
||||
@@ -267,7 +265,10 @@
|
||||
..()
|
||||
healthcheck()
|
||||
|
||||
|
||||
/obj/machinery/bot/emag_act(user as mob)
|
||||
if (emagged < 2)
|
||||
Emag(user)
|
||||
|
||||
/obj/machinery/bot/bullet_act(var/obj/item/projectile/Proj)
|
||||
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
health -= Proj.damage
|
||||
|
||||
@@ -299,16 +299,15 @@ Auto Patrol[]"},
|
||||
if(!arrest_type)
|
||||
if(!target.handcuffed) //he's not cuffed? Try to cuff him!
|
||||
mode = BOT_ARREST
|
||||
playsound(loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
|
||||
target.visible_message("<span class='danger'>[src] is trying to put handcuffs on [target]!</span>",\
|
||||
"<span class='userdanger'>[src] is trying to put handcuffs on [target]!</span>")
|
||||
|
||||
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
|
||||
target.visible_message("<span class='danger'>[src] is trying to put zipties on [target]!</span>",\
|
||||
"<span class='userdanger'>[src] is trying to put zipties on [target]!</span>")
|
||||
spawn(30)
|
||||
if( !Adjacent(target) || !isturf(target.loc) ) //if he's in a closet or not adjacent, we cancel cuffing.
|
||||
return
|
||||
if(!target.handcuffed)
|
||||
target.handcuffed = new /obj/item/weapon/handcuffs(target)
|
||||
target.update_inv_handcuffed(0) //update the handcuffs overlay
|
||||
target.handcuffed = new /obj/item/weapon/restraints/handcuffs/cable/zipties/used(target)
|
||||
target.update_inv_handcuffed(1) //update the handcuffs overlay
|
||||
back_to_idle()
|
||||
else
|
||||
back_to_idle()
|
||||
|
||||
@@ -87,12 +87,7 @@ var/global/mulebot_count = 0
|
||||
// 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(loc, 'sound/effects/sparks1.ogg', 100, 0)
|
||||
else if(istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda))
|
||||
if(istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda))
|
||||
if(toggle_lock(user))
|
||||
user << "<span class='notice'>Controls [(locked ? "locked" : "unlocked")].</span>"
|
||||
updateUsrDialog()
|
||||
@@ -139,7 +134,12 @@ var/global/mulebot_count = 0
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/bot/mulebot/emag_act(user as mob)
|
||||
locked = !locked
|
||||
user << "<span class='notice'>You [locked ? "lock" : "unlock"] the mulebot's controls!</span>"
|
||||
flick("mulebot-emagged", src)
|
||||
playsound(loc, 'sound/effects/sparks1.ogg', 100, 0)
|
||||
|
||||
/obj/machinery/bot/mulebot/ex_act(var/severity)
|
||||
unload(0)
|
||||
switch(severity)
|
||||
|
||||
@@ -286,15 +286,15 @@ Auto Patrol: []"},
|
||||
if(!arrest_type)
|
||||
if(!target.handcuffed) //he's not cuffed? Try to cuff him!
|
||||
mode = BOT_ARREST
|
||||
playsound(loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
|
||||
target.visible_message("<span class='danger'>[src] is trying to put handcuffs on [target]!</span>",\
|
||||
"<span class='userdanger'>[src] is trying to put handcuffs on [target]!</span>")
|
||||
spawn(60)
|
||||
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
|
||||
target.visible_message("<span class='danger'>[src] is trying to put zipties on [target]!</span>",\
|
||||
"<span class='userdanger'>[src] is trying to put zipties on [target]!</span>")
|
||||
spawn(30)
|
||||
if( !Adjacent(target) || !isturf(target.loc) ) //if he's in a closet or not adjacent, we cancel cuffing.
|
||||
return
|
||||
if(!target.handcuffed)
|
||||
target.handcuffed = new /obj/item/weapon/handcuffs(target)
|
||||
target.update_inv_handcuffed(0) //update the handcuffs overlay
|
||||
target.handcuffed = new /obj/item/weapon/restraints/handcuffs/cable/zipties/used(target)
|
||||
target.update_inv_handcuffed(1) //update the handcuffs overlay
|
||||
playsound(loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
|
||||
back_to_idle()
|
||||
else
|
||||
|
||||
@@ -162,44 +162,16 @@
|
||||
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
|
||||
//Warning, uncommenting this can have concequences. For example, deconstructing the computer may cause holographic eswords to never derez
|
||||
|
||||
/* if(istype(D, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
A.state = 3
|
||||
A.icon_state = "3"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
A.state = 4
|
||||
A.icon_state = "4"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
|
||||
*/
|
||||
if(istype(D, /obj/item/weapon/card/emag) && !emagged)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
emagged = 1
|
||||
user << "\blue You vastly increase projector power and override the safety and security protocols."
|
||||
user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator."
|
||||
log_game("[key_name(usr)] emagged the Holodeck Control Computer")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/New()
|
||||
..()
|
||||
|
||||
@@ -145,6 +145,9 @@
|
||||
/obj/machinery/computer/arcade/battle/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(usr.machine != src)
|
||||
return 0
|
||||
|
||||
if (!src.blocked && !src.gameover)
|
||||
if (href_list["attack"])
|
||||
@@ -269,8 +272,8 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/arcade/battle/attackby(I as obj, user as mob)
|
||||
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
|
||||
/obj/machinery/computer/arcade/battle/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
temp = "If you die in the game, you die for real!"
|
||||
player_hp = 30
|
||||
player_mp = 10
|
||||
@@ -284,14 +287,7 @@
|
||||
enemy_name = "Cuban Pete"
|
||||
name = "Outbomb Cuban Pete"
|
||||
|
||||
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
|
||||
..()
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/arcade/orion_trail
|
||||
name = "The Orion Trail"
|
||||
@@ -406,6 +402,8 @@
|
||||
/obj/machinery/computer/arcade/orion_trail/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if(usr.machine != src)
|
||||
return 0
|
||||
if(href_list["close"])
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=arcade")
|
||||
@@ -566,4 +564,5 @@
|
||||
|
||||
/obj/machinery/computer/arcade/orion_trail/proc/win()
|
||||
playing = 0
|
||||
turns = 0
|
||||
prizevend()
|
||||
|
||||
@@ -37,15 +37,16 @@
|
||||
return 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("\red \The [user] swipes \a [I] through \the [src], causing the screen to flash!",\
|
||||
"\red You swipe your [I] through \the [src], the screen flashing as you gain full control.",\
|
||||
/obj/machinery/computer/atmoscontrol/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.visible_message("\red \The [user] swipes \a card through \the [src], causing the screen to flash!",\
|
||||
"\red You swipe your card through \the [src], the screen flashing as you gain full control.",\
|
||||
"You hear the swipe of a card through a reader, and an electronic warble.")
|
||||
emagged = 1
|
||||
overridden = 1
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
if(user.stat && !isobserver(user))
|
||||
|
||||
@@ -55,25 +55,21 @@
|
||||
// Network configuration
|
||||
attackby(I as obj, user as mob)
|
||||
access = list()
|
||||
if(istype(I,/obj/item/weapon/card/emag)) // If hit by an emag.
|
||||
var/obj/item/weapon/card/emag/E = I
|
||||
if(!emagged)
|
||||
if(E.uses)
|
||||
E.uses--
|
||||
emagged = 1
|
||||
user << "\blue You have authorized full network access!"
|
||||
ui_interact(user)
|
||||
else
|
||||
ui_interact(user)
|
||||
else
|
||||
ui_interact(user)
|
||||
else if(istype(I,/obj/item/weapon/card/id)) // If hit by a regular ID card.
|
||||
if(istype(I,/obj/item/weapon/card/id)) // If hit by a regular ID card.
|
||||
var/obj/item/weapon/card/id/E = I
|
||||
access = E.access
|
||||
ui_interact(user)
|
||||
else
|
||||
..()
|
||||
|
||||
emag_act(user as mob)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
user << "\blue You have authorized full network access!"
|
||||
ui_interact(user)
|
||||
else
|
||||
ui_interact(user)
|
||||
|
||||
ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(src.z > 6) return
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
@@ -126,9 +122,6 @@
|
||||
break
|
||||
data["networks"] = tempnets
|
||||
|
||||
if(ui)
|
||||
ui.load_cached_data(camera_cache)
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800)
|
||||
|
||||
@@ -240,12 +240,11 @@ var/shuttle_call/shuttle_calls[0]
|
||||
|
||||
return 1
|
||||
|
||||
/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(user as mob)
|
||||
if(!emagged)
|
||||
src.emagged = 1
|
||||
user << "You scramble the communication routing circuits!"
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/computer/communications/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
@@ -57,12 +57,10 @@
|
||||
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/HONKputer/attackby(var/obj/I as obj, var/mob/user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag/))
|
||||
/obj/machinery/computer/HONKputer/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
src.emagged = 1
|
||||
user << "You scramble the login circuits, allowing anyone to use the console!"
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/computer/HONKputer/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
|
||||
@@ -41,24 +41,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>"
|
||||
@@ -66,6 +48,25 @@
|
||||
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/message_monitor/emag_act(user as mob)
|
||||
// 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>"
|
||||
|
||||
/obj/machinery/computer/message_monitor/update_icon()
|
||||
..()
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
if (istype(I))
|
||||
if(src.check_access(I))
|
||||
if (!status)
|
||||
message_admins("\blue [key_name_admin(usr)] has initiated the global cyborg killswitch!")
|
||||
msg_admin_attack("\blue [key_name_admin(usr)] has initiated the global cyborg killswitch!")
|
||||
log_game("\blue [key_name(usr)] has initiated the global cyborg killswitch!")
|
||||
use_log += text("\[[time_stamp()]\] <font color='red'>[usr.name] ([usr.ckey]) has initiated the global cyborg killswitch!</font>")
|
||||
src.status = 1
|
||||
@@ -169,7 +169,7 @@
|
||||
R.ResetSecurityCodes()
|
||||
|
||||
else
|
||||
message_admins("\blue [key_name_admin(usr)] detonated [R.name]!")
|
||||
msg_admin_attack("\blue [key_name_admin(usr)] detonated [R.name]!")
|
||||
log_game("\blue [key_name_admin(usr)] detonated [R.name]!")
|
||||
use_log += text("\[[time_stamp()]\] <font color='red'>[usr.name] ([usr.ckey]) detonated [R.name] ([R.ckey])!</font>")
|
||||
R.self_destruct()
|
||||
@@ -183,7 +183,7 @@
|
||||
var/choice = input("Are you certain you wish to [R.canmove ? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort")
|
||||
if(choice == "Confirm")
|
||||
if(R && istype(R))
|
||||
message_admins("\blue [key_name_admin(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
|
||||
msg_admin_attack("\blue [key_name_admin(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
|
||||
log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
|
||||
R.canmove = !R.canmove
|
||||
if (R.lockcharge)
|
||||
@@ -208,7 +208,7 @@
|
||||
var/choice = input("Are you certain you wish to hack [R.name]?") in list("Confirm", "Abort")
|
||||
if(choice == "Confirm")
|
||||
if(R && istype(R))
|
||||
// message_admins("\blue [key_name_admin(usr)] emagged [R.name] using robotic console!")
|
||||
msg_admin_attack("\blue [key_name_admin(usr)] emagged [R.name] using robotic console!")
|
||||
log_game("[key_name(usr)] emagged [R.name] using robotic console!")
|
||||
R.emagged = 1
|
||||
if(R.hud_used)
|
||||
|
||||
@@ -56,11 +56,13 @@
|
||||
world << "\blue <B>All authorizations to shortening time for shuttle launch have been revoked!</B>"
|
||||
src.authorized.len = 0
|
||||
src.authorized = list( )
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
return
|
||||
|
||||
emag_act(user as mob)
|
||||
if (!emagged)
|
||||
var/choice = alert(user, "Would you like to launch the shuttle?","Shuttle control", "Launch", "Cancel")
|
||||
|
||||
if(!emagged && !emergency_shuttle.location() && user.get_active_hand() == W)
|
||||
if(!emagged && !emergency_shuttle.location())
|
||||
switch(choice)
|
||||
if("Launch")
|
||||
world << "\blue <B>Alert: Shuttle launch time shortened to 10 seconds!</B>"
|
||||
@@ -68,4 +70,3 @@
|
||||
emagged = 1
|
||||
if("Cancel")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -221,12 +221,14 @@
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
data["beakerVolume"] += R.volume
|
||||
|
||||
data["autoeject"] = autoeject
|
||||
|
||||
// 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
|
||||
ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 410)
|
||||
ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 420)
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
|
||||
@@ -158,7 +158,7 @@ for reference:
|
||||
src.icon_state = "barrier[src.locked]"
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/card/id/))
|
||||
if (istype(W, /obj/item/weapon/card/id))
|
||||
if (src.allowed(user))
|
||||
if (src.emagged < 2.0)
|
||||
src.locked = !src.locked
|
||||
@@ -177,24 +177,6 @@ for reference:
|
||||
visible_message("\red BZZzZZzZZzZT")
|
||||
return
|
||||
return
|
||||
else if (istype(W, /obj/item/weapon/card/emag))
|
||||
if (src.emagged == 0)
|
||||
src.emagged = 1
|
||||
src.req_access = null
|
||||
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("\red BZZzZZzZZzZT")
|
||||
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("\red BZZzZZzZZzZT")
|
||||
return
|
||||
else if (istype(W, /obj/item/weapon/wrench))
|
||||
if (src.health < src.maxhealth)
|
||||
src.health = src.maxhealth
|
||||
@@ -218,6 +200,23 @@ for reference:
|
||||
if (src.health <= 0)
|
||||
src.explode()
|
||||
..()
|
||||
|
||||
emag_act(user as mob)
|
||||
if (!emagged)
|
||||
emagged = 1
|
||||
req_access = null
|
||||
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("\red BZZzZZzZZzZT")
|
||||
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("\red BZZzZZzZZzZT")
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
|
||||
@@ -57,11 +57,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/door_control/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
req_access = list()
|
||||
req_one_access = list()
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/door_control/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
@@ -153,10 +153,7 @@
|
||||
if(!src.requiresID())
|
||||
user = null
|
||||
if(src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade)))
|
||||
flick("door_spark", src)
|
||||
sleep(6)
|
||||
open()
|
||||
operating = -1
|
||||
emag_act(user)
|
||||
return 1
|
||||
if(src.allowed(user) || src.emergency == 1)
|
||||
if(src.density)
|
||||
@@ -168,6 +165,13 @@
|
||||
flick("door_deny", src)
|
||||
return
|
||||
|
||||
/obj/machinery/door/emag_act(user as mob)
|
||||
if(density)
|
||||
flick("door_spark", src)
|
||||
sleep(6)
|
||||
open()
|
||||
operating = -1
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/blob_act()
|
||||
if(prob(40))
|
||||
|
||||
@@ -225,21 +225,13 @@
|
||||
/obj/machinery/door/window/attack_hand(mob/user as mob)
|
||||
return src.attackby(user, user)
|
||||
|
||||
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/living/user as mob)
|
||||
|
||||
//If it's in the process of opening/closing, ignore the click
|
||||
if (src.operating)
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
//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)))
|
||||
/obj/machinery/door/window/emag_act(user as mob, weapon as obj)
|
||||
if(density)
|
||||
src.operating = -1
|
||||
flick("[src.base_state]spark", src)
|
||||
sleep(6)
|
||||
desc += "<BR><span class='warning'>Its access panel is smoking slightly.</span>"
|
||||
if(istype(I, /obj/item/weapon/melee/energy/blade))
|
||||
if(istype(weapon, /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()
|
||||
@@ -252,6 +244,19 @@
|
||||
open()
|
||||
emagged = 1
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/living/user as mob)
|
||||
|
||||
//If it's in the process of opening/closing, ignore the click
|
||||
if (src.operating)
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
//Ninja swords? You may pass.
|
||||
if (src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade)))
|
||||
emag_act(user,I)
|
||||
return 1
|
||||
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(src.density || src.operating)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
name = "Emergency Floodlight"
|
||||
icon = 'icons/obj/machines/floodlight.dmi'
|
||||
icon_state = "flood00"
|
||||
anchored = 0
|
||||
density = 1
|
||||
var/on = 0
|
||||
var/obj/item/weapon/stock_parts/cell/high/cell = null
|
||||
@@ -63,6 +64,21 @@
|
||||
|
||||
|
||||
/obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if (!anchored && !isinspace())
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user.visible_message( \
|
||||
"[user] tightens \the [src]'s casters.", \
|
||||
"<span class='notice'> You have tightened \the [src]'s casters.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = 1
|
||||
else if(anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user.visible_message( \
|
||||
"[user] loosens \the [src]'s casters.", \
|
||||
"<span class='notice'> You have loosened \the [src]'s casters.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = 0
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
if (!open)
|
||||
if(unlocked)
|
||||
|
||||
@@ -37,6 +37,13 @@
|
||||
|
||||
/obj/machinery/iv_drip/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
|
||||
if(!ishuman(usr) && !isrobot(usr))
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(!usr in range(1, T))
|
||||
return
|
||||
|
||||
if(attached)
|
||||
visible_message("[src.attached] is detached from \the [src]")
|
||||
@@ -133,6 +140,7 @@
|
||||
|
||||
/obj/machinery/iv_drip/verb/toggle_mode()
|
||||
set name = "Toggle Mode"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(!istype(usr, /mob/living))
|
||||
|
||||
@@ -27,11 +27,6 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/metaldetector/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/card/emag))
|
||||
if(!src.emagged)
|
||||
src.emagged = 1
|
||||
user << "\blue You short out the circuitry."
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/card))
|
||||
for(var/ID in list(user.equipped(), user:wear_id, user:belt))
|
||||
if(src.check_access(ID,list("20")))
|
||||
@@ -46,6 +41,12 @@
|
||||
else
|
||||
user << "\red You lack access to the control panel!"
|
||||
return
|
||||
|
||||
/obj/machinery/metaldetector/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
user << "\blue You short out the circuitry."
|
||||
return
|
||||
|
||||
/obj/machinery/metaldetector/Crossed(AM as mob|obj)
|
||||
if(emagged)
|
||||
|
||||
@@ -307,20 +307,7 @@ Status: []<BR>"},
|
||||
del(src)
|
||||
|
||||
|
||||
if ((istype(W, /obj/item/weapon/card/emag)) && (!src.emagged))
|
||||
// Emagging the turret makes it go bonkers and stun everyone. It also makes
|
||||
// the turret shoot much, much faster.
|
||||
|
||||
user << "\red You short out [src]'s threat assessment circuits."
|
||||
spawn(0)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\red [src] hums oddly...", 1)
|
||||
emagged = 1
|
||||
src.on = 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
|
||||
on = 1 // turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here
|
||||
|
||||
else if((istype(W, /obj/item/weapon/wrench)) && (!on))
|
||||
if((istype(W, /obj/item/weapon/wrench)) && (!on))
|
||||
if(raised) return
|
||||
// This code handles moving the turret around. After all, it's a portable turret!
|
||||
|
||||
@@ -359,7 +346,19 @@ Status: []<BR>"},
|
||||
attacked = 0
|
||||
..()
|
||||
|
||||
/obj/machinery/porta_turret/emag_act(user as mob)
|
||||
if(!src.emagged)
|
||||
// Emagging the turret makes it go bonkers and stun everyone. It also makes
|
||||
// the turret shoot much, much faster.
|
||||
|
||||
user << "\red You short out [src]'s threat assessment circuits."
|
||||
spawn(0)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\red [src] hums oddly...", 1)
|
||||
emagged = 1
|
||||
src.on = 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
|
||||
on = 1 // turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here
|
||||
|
||||
/obj/machinery/porta_turret/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(on)
|
||||
|
||||
@@ -196,19 +196,6 @@
|
||||
return
|
||||
|
||||
/obj/machinery/programmable/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
if(emagged)
|
||||
return
|
||||
user << "You swipe the unloader with your card. After a moment's grinding, it beeps in a sinister fashion."
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
|
||||
emagged = 1
|
||||
overrides += emag_overrides
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
|
||||
return
|
||||
if(istype(I,/obj/item/weapon/wrench)) // code borrowed from pipe dispenser
|
||||
if (unwrenched==0)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
@@ -281,7 +268,18 @@
|
||||
I.loc = src
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/programmable/emag_act(user as mob)
|
||||
if(emagged)
|
||||
return
|
||||
user << "You swipe the unloader with your card. After a moment's grinding, it beeps in a sinister fashion."
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
|
||||
emagged = 1
|
||||
overrides += emag_overrides
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
return
|
||||
|
||||
/obj/machinery/programmable/process()
|
||||
if (!output || !input)
|
||||
|
||||
@@ -32,13 +32,7 @@ var/const/SAFETY_COOLDOWN = 100
|
||||
|
||||
|
||||
/obj/machinery/recycler/attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
|
||||
emagged = 1
|
||||
if(safety_mode)
|
||||
safety_mode = 0
|
||||
update_icon()
|
||||
playsound(src.loc, "sparks", 75, 1, -1)
|
||||
else if(istype(I, /obj/item/weapon/screwdriver) && emagged)
|
||||
if(istype(I, /obj/item/weapon/screwdriver) && emagged)
|
||||
emagged = 0
|
||||
update_icon()
|
||||
user << "<span class='notice'>You reset the crusher to its default factory settings.</span>"
|
||||
@@ -46,6 +40,14 @@ var/const/SAFETY_COOLDOWN = 100
|
||||
..()
|
||||
return
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/machinery/recycler/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
if(safety_mode)
|
||||
safety_mode = 0
|
||||
update_icon()
|
||||
playsound(src.loc, "sparks", 75, 1, -1)
|
||||
|
||||
/obj/machinery/recycler/update_icon()
|
||||
..()
|
||||
|
||||
@@ -681,24 +681,6 @@
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
else if(istype(I,/obj/item/weapon/card/emag))
|
||||
|
||||
if(emagged)
|
||||
user << "\red The cycler has already been subverted."
|
||||
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 << "\red You run the sequencer across the interface, corrupting the operating protocols."
|
||||
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))
|
||||
|
||||
if(locked)
|
||||
@@ -748,6 +730,19 @@
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/suit_cycler/emag_act(user as mob)
|
||||
if(emagged)
|
||||
user << "\red The cycler has already been subverted."
|
||||
return
|
||||
|
||||
//Clear the access reqs, disable the safeties, and open up all paintjobs.
|
||||
user << "\red You run the sequencer across the interface, corrupting the operating protocols."
|
||||
departments = list("Engineering","Mining","Medical","Security","Atmos","^%###^%$")
|
||||
emagged = 1
|
||||
safeties = 0
|
||||
req_access = list()
|
||||
return
|
||||
|
||||
/obj/machinery/suit_cycler/attack_hand(mob/user as mob)
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
if(payload && !istype(payload, /obj/item/weapon/bombcore/training))
|
||||
message_admins("[key_name(user)]<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A> has primed a [name] ([payload]) for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
msg_admin_attack("[key_name(user)]<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A> has primed a [name] ([payload]) for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
log_game("[key_name(user)] has primed a [name] ([payload]) for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])")
|
||||
payload.adminlog = "The [src.name] that [key_name(user)] had primed detonated!"
|
||||
|
||||
|
||||
@@ -244,9 +244,11 @@
|
||||
A.icon_state = "4"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
emag_act(user as mob)
|
||||
if(!emagged)
|
||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
emagged = 1
|
||||
user << "\blue You you disable the security protocols"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -153,9 +153,11 @@
|
||||
A.icon_state = "4"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
|
||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
emagged = 1
|
||||
user << "\blue You you disable the security protocols"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
emag_act(user as mob)
|
||||
if(!emagged)
|
||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
emagged = 1
|
||||
user << "\blue You you disable the security protocols"
|
||||
@@ -233,12 +233,14 @@
|
||||
A.icon_state = "4"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/telecomms/traffic/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
playsound(get_turf(src), 'sound/effects/sparks4.ogg', 75, 1)
|
||||
emagged = 1
|
||||
user << "\blue You you disable the security protocols"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/telecomms/traffic/proc/canAccess(var/mob/user)
|
||||
if(issilicon(user) || in_range(user, src))
|
||||
|
||||
@@ -31,16 +31,7 @@
|
||||
return power_station
|
||||
|
||||
/obj/machinery/computer/teleporter/attackby(I as obj, mob/living/user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag)) // If hit by an emag.
|
||||
var/obj/item/weapon/card/emag/E = I
|
||||
if(!emagged)
|
||||
if(E.uses)
|
||||
E.uses--
|
||||
emagged = 1
|
||||
user << "\blue The teleporter can now lock on to Syndicate beacons!"
|
||||
else
|
||||
ui_interact(user)
|
||||
else if(istype(I, /obj/item/device/gps))
|
||||
if(istype(I, /obj/item/device/gps))
|
||||
var/obj/item/device/gps/L = I
|
||||
if(L.locked_location && !(stat & (NOPOWER|BROKEN)))
|
||||
user.before_take_item(L)
|
||||
@@ -53,6 +44,13 @@
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/teleporter/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
user << "\blue The teleporter can now lock on to Syndicate beacons!"
|
||||
else
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/teleporter/attack_paw(mob/user)
|
||||
usr << "You are too primitive to use this computer."
|
||||
@@ -80,7 +78,8 @@
|
||||
data["calibrated"] = null
|
||||
data["accurate"] = null
|
||||
data["regime"] = regime_set
|
||||
data["target"] = (!target) ? "None" : get_area(target)
|
||||
var/area/targetarea = get_area(target)
|
||||
data["target"] = (!target) ? "None" : sanitize(targetarea.name)
|
||||
data["calibrating"] = calibrating
|
||||
data["locked"] = locked
|
||||
|
||||
|
||||
@@ -364,15 +364,6 @@
|
||||
if (istype(user, /mob/living/silicon))
|
||||
return src.attack_hand(user)
|
||||
|
||||
if (istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
user << "\red You short out the turret controls' access analysis module."
|
||||
emagged = 1
|
||||
locked = 0
|
||||
if(user.machine==src)
|
||||
src.attack_hand(user)
|
||||
|
||||
return
|
||||
|
||||
else if( get_dist(src, user) == 0 ) // trying to unlock the interface
|
||||
if (src.allowed(usr))
|
||||
if(emagged)
|
||||
@@ -390,6 +381,17 @@
|
||||
src.attack_hand(user)
|
||||
else
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
|
||||
/obj/machinery/turretid/emag_act(user as mob)
|
||||
if (!emagged)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
user << "\red You short out the turret controls' access analysis module."
|
||||
emagged = 1
|
||||
locked = 0
|
||||
if(H.machine==src)
|
||||
src.attack_hand(user)
|
||||
|
||||
/obj/machinery/turretid/attack_ai(mob/user as mob)
|
||||
if(!ailock)
|
||||
|
||||
+357
-275
@@ -1,17 +1,39 @@
|
||||
#define CAT_NORMAL 0
|
||||
#define CAT_HIDDEN 1
|
||||
#define CAT_COIN 2
|
||||
#define CAT_NORMAL 1
|
||||
#define CAT_HIDDEN 2 // also used in corresponding wires/vending.dm
|
||||
#define CAT_COIN 4
|
||||
|
||||
/**
|
||||
* Datum used to hold information about a product in a vending machine
|
||||
*/
|
||||
/datum/data/vending_product
|
||||
var/product_name = "generic"
|
||||
var/product_name = "generic" // Display name for the product
|
||||
var/product_path = null
|
||||
var/amount = 0
|
||||
var/amount = 0 // Amount held in the vending machine
|
||||
var/max_amount = 0
|
||||
var/price = 0
|
||||
var/display_color = "blue"
|
||||
var/category = CAT_NORMAL
|
||||
|
||||
var/price = 0 // Price to buy one
|
||||
var/display_color = null // Display color for vending machine listing
|
||||
var/category = CAT_NORMAL // CAT_HIDDEN for contraband, CAT_COIN for premium
|
||||
|
||||
/datum/data/vending_product/New(var/path, var/name = null, var/amount = 1, var/price = 0, var/color = null, var/category = CAT_NORMAL)
|
||||
..()
|
||||
|
||||
src.product_path = path
|
||||
|
||||
if(!name)
|
||||
var/atom/tmp = new path
|
||||
src.product_name = initial(tmp.name)
|
||||
del(tmp)
|
||||
else
|
||||
src.product_name = name
|
||||
|
||||
src.amount = amount
|
||||
src.price = price
|
||||
src.display_color = color
|
||||
src.category = category
|
||||
|
||||
/**
|
||||
* A vending machine
|
||||
*/
|
||||
/obj/machinery/vending
|
||||
name = "Vendomat"
|
||||
desc = "A generic vending machine."
|
||||
@@ -20,39 +42,57 @@
|
||||
layer = 2.9
|
||||
anchored = 1
|
||||
density = 1
|
||||
|
||||
var/icon_vend //Icon_state when vending
|
||||
var/icon_deny //Icon_state when denying access
|
||||
|
||||
// Power
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
var/vend_power_usage = 150
|
||||
|
||||
// Vending-related
|
||||
var/active = 1 //No sales pitches if off!
|
||||
var/delay_product_spawn // If set, uses sleep() in product spawn proc (mostly for seeds to retrieve correct names).
|
||||
var/vend_ready = 1 //Are we ready to vend?? Is it time??
|
||||
var/vend_delay = 10 //How long does it take to vend?
|
||||
var/datum/data/vending_product/currently_vending = null // A /datum/data/vending_product instance of what we're paying for right now.
|
||||
var/categories = CAT_NORMAL // Bitmask of cats we're currently showing
|
||||
var/datum/data/vending_product/currently_vending = null // What we're requesting payment for right now
|
||||
var/status_message = "" // Status screen messages like "insufficient funds", displayed in NanoUI
|
||||
var/status_error = 0 // Set to 1 if status_message is an error
|
||||
|
||||
// To be filled out at compile time
|
||||
var/list/products = list() // For each, use the following pattern:
|
||||
var/list/contraband = list() // list(/type/path = amount,/type/path2 = amount2)
|
||||
var/list/premium = list() // No specified amount = only one in stock
|
||||
var/list/prices = list() // Prices for each item, list(/type/path = price), items not in the list don't have a price.
|
||||
|
||||
var/product_slogans = "" //String of slogans separated by semicolons, optional
|
||||
var/product_ads = "" //String of small ad messages in the vending screen - random chance
|
||||
|
||||
// List of vending_product items available.
|
||||
var/list/product_records = list()
|
||||
var/list/hidden_records = list()
|
||||
var/list/coin_records = list()
|
||||
|
||||
// // Variables used to initialize advertising
|
||||
var/product_slogans = "" //String of slogans separated by semicolons, optional
|
||||
var/product_ads = "" //String of small ad messages in the vending screen - random chance
|
||||
|
||||
var/list/ads_list = list()
|
||||
|
||||
// Stuff relating vocalizations
|
||||
var/list/slogan_list = list()
|
||||
var/list/small_ads = list() //Small ad messages in the vending screen - random chance of popping up whenever you open it
|
||||
var/vend_reply //Thank you for shopping!
|
||||
var/shut_up = 0 //Stop spouting those godawful pitches!
|
||||
var/last_reply = 0
|
||||
var/obj/item/weapon/vending_refill/refill_canister = null //The type of refill canisters used by this machine.
|
||||
var/last_slogan = 0 //When did we last pitch?
|
||||
var/slogan_delay = 6000 //How long until we can pitch again?
|
||||
var/icon_vend //Icon_state when vending!
|
||||
var/icon_deny //Icon_state when vending!
|
||||
//var/emagged = 0 //Ignores if somebody doesn't have card access to that machine.
|
||||
|
||||
var/obj/item/weapon/vending_refill/refill_canister = null //The type of refill canisters used by this machine.
|
||||
|
||||
// Things that can go wrong
|
||||
emagged = 0 //Ignores if somebody doesn't have card access to that machine.
|
||||
var/seconds_electrified = 0 //Shock customers like an airlock.
|
||||
var/shoot_inventory = 0 //Fire items at customers! We're broken!
|
||||
var/shoot_speed = 3 //How hard are we firing the items?
|
||||
var/shoot_chance = 2 //How often are we firing the items?
|
||||
var/shut_up = 0 //Stop spouting those godawful pitches!
|
||||
var/extended_inventory = 0 //can we access the hidden inventory?
|
||||
|
||||
var/scan_id = 1
|
||||
var/obj/item/weapon/coin/coin
|
||||
var/datum/wires/vending/wires = null
|
||||
@@ -60,32 +100,57 @@
|
||||
/obj/machinery/vending/New()
|
||||
..()
|
||||
wires = new(src)
|
||||
spawn(4)
|
||||
src.slogan_list = text2list(src.product_slogans, ";")
|
||||
spawn(50)
|
||||
if(src.product_slogans)
|
||||
src.slogan_list += text2list(src.product_slogans, ";")
|
||||
|
||||
// So not all machines speak at the exact same time.
|
||||
// The first time this machine says something will be at slogantime + this random value,
|
||||
// so if slogantime is 10 minutes, it will say it at somewhere between 10 and 20 minutes after the machine is crated.
|
||||
src.last_slogan = world.time + rand(0, slogan_delay)
|
||||
// So not all machines speak at the exact same time.
|
||||
// The first time this machine says something will be at slogantime + this random value,
|
||||
// so if slogantime is 10 minutes, it will say it at somewhere between 10 and 20 minutes after the machine is crated.
|
||||
src.last_slogan = world.time + rand(0, slogan_delay)
|
||||
|
||||
src.build_inventory(products)
|
||||
//Add hidden inventory
|
||||
src.build_inventory(contraband, 1)
|
||||
src.build_inventory(premium, 0, 1)
|
||||
if(src.product_ads)
|
||||
src.ads_list += text2list(src.product_ads, ";")
|
||||
|
||||
src.build_inventory()
|
||||
power_change()
|
||||
|
||||
|
||||
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
/**
|
||||
* Build src.produdct_records from the products lists
|
||||
*
|
||||
* src.products, src.contraband, src.premium, and src.prices allow specifying
|
||||
* products that the vending machine is to carry without manually populating
|
||||
* src.product_records.
|
||||
*/
|
||||
/obj/machinery/vending/proc/build_inventory()
|
||||
var/list/all_products = list(
|
||||
list(src.products, CAT_NORMAL),
|
||||
list(src.contraband, CAT_HIDDEN),
|
||||
list(src.premium, CAT_COIN))
|
||||
|
||||
for(var/current_list in all_products)
|
||||
var/category = current_list[2]
|
||||
|
||||
for(var/entry in current_list[1])
|
||||
var/datum/data/vending_product/product = new/datum/data/vending_product(entry)
|
||||
|
||||
product.price = (entry in src.prices) ? src.prices[entry] : 0
|
||||
product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
|
||||
product.max_amount = product.amount
|
||||
product.category = category
|
||||
|
||||
src.product_records.Add(product)
|
||||
|
||||
/obj/machinery/vending/Destroy()
|
||||
del(wires)
|
||||
del(wires) // qdel
|
||||
wires = null
|
||||
del(coin)
|
||||
coin = null
|
||||
if(coin)
|
||||
del(coin) // qdel
|
||||
coin = null
|
||||
..()
|
||||
|
||||
/obj/machinery/vending/ex_act(severity)
|
||||
@@ -115,41 +180,6 @@
|
||||
else
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/machinery/vending/proc/build_inventory(var/list/productlist,hidden=0,req_coin=0,start_empty = null)
|
||||
for(var/typepath in productlist)
|
||||
var/amount = productlist[typepath]
|
||||
var/price = prices[typepath]
|
||||
if(isnull(amount)) amount = 1
|
||||
|
||||
var/atom/temp = new typepath(null)
|
||||
var/datum/data/vending_product/R = new /datum/data/vending_product()
|
||||
|
||||
R.product_path = typepath
|
||||
if(!start_empty)
|
||||
R.amount = amount
|
||||
R.max_amount = amount
|
||||
R.price = price
|
||||
R.display_color = pick("red","blue","green")
|
||||
if(hidden)
|
||||
R.category=CAT_HIDDEN
|
||||
hidden_records += R
|
||||
else if(req_coin)
|
||||
R.category=CAT_COIN
|
||||
coin_records += R
|
||||
else
|
||||
R.category=CAT_NORMAL
|
||||
product_records += R
|
||||
|
||||
if(delay_product_spawn)
|
||||
sleep(3)
|
||||
R.product_name = temp.name
|
||||
else
|
||||
R.product_name = temp.name
|
||||
|
||||
// world << "Added: [R.product_name]] - [R.amount] - [R.product_path]"
|
||||
|
||||
|
||||
/obj/machinery/vending/proc/refill_inventory(obj/item/weapon/vending_refill/refill, datum/data/vending_product/machine, mob/user)
|
||||
var/total = 0
|
||||
|
||||
@@ -180,10 +210,29 @@
|
||||
return total
|
||||
|
||||
/obj/machinery/vending/attackby(obj/item/weapon/W, mob/user)
|
||||
if(panel_open)
|
||||
if(default_unfasten_wrench(user, W, time = 60))
|
||||
return
|
||||
if (currently_vending && vendor_account && !vendor_account.suspended)
|
||||
var/paid = 0
|
||||
var/handled = 0
|
||||
if(istype(W, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = W
|
||||
paid = pay_with_card(C)
|
||||
handled = 1
|
||||
else if (istype(W, /obj/item/weapon/spacecash))
|
||||
var/obj/item/weapon/spacecash/C = W
|
||||
paid = pay_with_cash(C, user)
|
||||
handled = 1
|
||||
|
||||
if(paid)
|
||||
src.vend(currently_vending, usr)
|
||||
return
|
||||
else if(handled)
|
||||
nanomanager.update_uis(src)
|
||||
return // don't smack that machine with your 2 thalers
|
||||
|
||||
if(default_unfasten_wrench(user, W, time = 60))
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
if(component_parts && istype(W, /obj/item/weapon/crowbar))
|
||||
var/datum/data/vending_product/machine = product_records
|
||||
for(var/datum/data/vending_product/machine_content in machine)
|
||||
@@ -195,10 +244,6 @@
|
||||
break
|
||||
default_deconstruction_crowbar(W)
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/emag))
|
||||
emagged = 1
|
||||
user << "You short out the product lock on [src]"
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && anchored)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
panel_open = !panel_open
|
||||
@@ -206,20 +251,19 @@
|
||||
overlays.Cut()
|
||||
if(panel_open)
|
||||
overlays += image(icon, "[initial(icon_state)]-panel")
|
||||
updateUsrDialog()
|
||||
nanomanager.update_uis(src) // Speaker switch is on the main UI, not wires UI
|
||||
return
|
||||
else if(istype(W, /obj/item/device/multitool)||istype(W, /obj/item/weapon/wirecutters))
|
||||
if(panel_open)
|
||||
attack_hand(user)
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/card) && currently_vending)
|
||||
var/obj/item/weapon/card/I = W
|
||||
scan_card(I)
|
||||
else if(istype(W, /obj/item/weapon/coin) && premium.len > 0)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
coin = W
|
||||
user << "<span class='notice'>You insert [W] into [src].</span>"
|
||||
categories |= CAT_COIN
|
||||
user << "\blue You insert the [W] into the [src]"
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
else if(istype(W, refill_canister) && refill_canister != null)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
@@ -240,176 +284,189 @@
|
||||
user << "<span class='notice'>You should probably unscrew the service panel first.</span>"
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/vending/emag_act(user as mob)
|
||||
emagged = 1
|
||||
user << "You short out the product lock on [src]"
|
||||
return
|
||||
|
||||
/**
|
||||
* Receive payment with cashmoney.
|
||||
*
|
||||
* usr is the mob who gets the change.
|
||||
*/
|
||||
/obj/machinery/vending/proc/pay_with_cash(var/obj/item/weapon/spacecash/cashmoney, mob/user)
|
||||
if(currently_vending.price > cashmoney.worth)
|
||||
// This is not a status display message, since it's something the character
|
||||
// themselves is meant to see BEFORE putting the money in
|
||||
usr << "\icon[cashmoney] <span class='warning'>That is not enough money.</span>"
|
||||
return 0
|
||||
|
||||
// Bills (banknotes) cannot really have worth different than face value,
|
||||
// so we have to eat the bill and spit out change in a bundle
|
||||
// This is really dirty, but there's no superclass for all bills, so we
|
||||
// just assume that all spacecash that's not something else is a bill
|
||||
|
||||
visible_message("<span class='info'>[usr] inserts a credit chip into [src].</span>")
|
||||
var/left = cashmoney.worth - currently_vending.price
|
||||
usr.drop_from_inventory(cashmoney)
|
||||
del(cashmoney)
|
||||
|
||||
/obj/machinery/vending/proc/scan_card(var/obj/item/weapon/card/I)
|
||||
if(!currently_vending) return
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
|
||||
if(vendor_account)
|
||||
var/datum/money_account/D = attempt_account_access_nosec(C.associated_account_number)
|
||||
if(D)
|
||||
var/transaction_amount = currently_vending.price
|
||||
if(transaction_amount <= D.money)
|
||||
if(left)
|
||||
dispense_cash(left, src.loc, user)
|
||||
|
||||
//transfer the money
|
||||
D.money -= transaction_amount
|
||||
vendor_account.money += transaction_amount
|
||||
// Vending machines have no idea who paid with cash
|
||||
credit_purchase("(cash)")
|
||||
return 1
|
||||
|
||||
//create entries in the two account transaction logs
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "[vendor_account.owner_name] (via [src.name])"
|
||||
T.purpose = "Purchase of [currently_vending.product_name]"
|
||||
if(transaction_amount > 0)
|
||||
T.amount = "([transaction_amount])"
|
||||
else
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
D.transaction_log.Add(T)
|
||||
//
|
||||
T = new()
|
||||
T.target_name = D.owner_name
|
||||
T.purpose = "Purchase of [currently_vending.product_name]"
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
/**
|
||||
* Scan a card and attempt to transfer payment from associated account.
|
||||
*
|
||||
* Takes payment for whatever is the currently_vending item. Returns 1 if
|
||||
* successful, 0 if failed
|
||||
*/
|
||||
/obj/machinery/vending/proc/pay_with_card(var/obj/item/weapon/card/id/I)
|
||||
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
|
||||
var/datum/money_account/customer_account = attempt_account_access_nosec(I.associated_account_number)
|
||||
if (!customer_account)
|
||||
src.status_message = "Error: Unable to access account. Please contact technical support if problem persists."
|
||||
src.status_error = 1
|
||||
return 0
|
||||
|
||||
// Vend the item
|
||||
src.vend(src.currently_vending, usr)
|
||||
currently_vending = null
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>You don't have that much money!</span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
if(customer_account.suspended)
|
||||
src.status_message = "Unable to access account: account suspended."
|
||||
src.status_error = 1
|
||||
return 0
|
||||
|
||||
// Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is
|
||||
// empty at high security levels
|
||||
if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
|
||||
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
|
||||
customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2)
|
||||
|
||||
if(!customer_account)
|
||||
src.status_message = "Unable to access account: incorrect credentials."
|
||||
src.status_error = 1
|
||||
return 0
|
||||
|
||||
if(currently_vending.price > customer_account.money)
|
||||
src.status_message = "Insufficient funds in account."
|
||||
src.status_error = 1
|
||||
return 0
|
||||
else
|
||||
// Okay to move the money at this point
|
||||
|
||||
// debit money from the purchaser's account
|
||||
customer_account.money -= currently_vending.price
|
||||
|
||||
// create entry in the purchaser's account log
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "[vendor_account.owner_name] (via [src.name])"
|
||||
T.purpose = "Purchase of [currently_vending.product_name]"
|
||||
if(currently_vending.price > 0)
|
||||
T.amount = "([currently_vending.price])"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
|
||||
T.amount = "[currently_vending.price]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
customer_account.transaction_log.Add(T)
|
||||
|
||||
/obj/machinery/vending/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
// Give the vendor the money. We use the account owner name, which means
|
||||
// that purchases made with stolen/borrowed card will look like the card
|
||||
// owner made them
|
||||
credit_purchase(customer_account.owner_name)
|
||||
return 1
|
||||
|
||||
/**
|
||||
* Add money for current purchase to the vendor account.
|
||||
*
|
||||
* Called after the money has already been taken from the customer.
|
||||
*/
|
||||
/obj/machinery/vending/proc/credit_purchase(var/target as text)
|
||||
vendor_account.money += currently_vending.price
|
||||
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = target
|
||||
T.purpose = "Purchase of [currently_vending.product_name]"
|
||||
T.amount = "[currently_vending.price]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
|
||||
/obj/machinery/vending/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/vending/proc/GetProductIndex(var/datum/data/vending_product/P)
|
||||
var/list/plist
|
||||
switch(P.category)
|
||||
if(CAT_NORMAL)
|
||||
plist=product_records
|
||||
if(CAT_HIDDEN)
|
||||
plist=hidden_records
|
||||
if(CAT_COIN)
|
||||
plist=coin_records
|
||||
else
|
||||
warning("UNKNOWN CATEGORY [P.category] IN TYPE [P.product_path] INSIDE [type]!")
|
||||
return plist.Find(P)
|
||||
|
||||
/obj/machinery/vending/proc/GetProductByID(var/pid, var/category)
|
||||
switch(category)
|
||||
if(CAT_NORMAL)
|
||||
return product_records[pid]
|
||||
if(CAT_HIDDEN)
|
||||
return hidden_records[pid]
|
||||
if(CAT_COIN)
|
||||
return coin_records[pid]
|
||||
else
|
||||
warning("UNKNOWN PRODUCT: PID: [pid], CAT: [category] INSIDE [type]!")
|
||||
return null
|
||||
|
||||
/obj/machinery/vending/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/vending/attack_hand(mob/user as mob)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
user.set_machine(src)
|
||||
|
||||
if(seconds_electrified != 0)
|
||||
if(shock(user, 100))
|
||||
if(src.seconds_electrified != 0)
|
||||
if(src.shock(user, 100))
|
||||
return
|
||||
|
||||
var/vendorname = (src.name) //import the machine's name
|
||||
wires.Interact(user)
|
||||
ui_interact(user)
|
||||
|
||||
if(src.currently_vending)
|
||||
var/dat = "<TT><center><b>[vendorname]</b></center><hr /><br>" //display the name, and added a horizontal rule
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\game\machinery\vending.dm:260: dat += "<b>You have selected [currently_vending.product_name].<br>Please ensure your ID is in your ID holder or hand.</b><br>"
|
||||
dat += {"<b>You have selected [currently_vending.product_name].<br>Please ensure your ID is in your ID holder or hand.</b><br>
|
||||
<a href='byond://?src=\ref[src];buy=1'>Pay</a> |
|
||||
<a href='byond://?src=\ref[src];cancel_buying=1'>Cancel</a>"}
|
||||
// END AUTOFIX
|
||||
user << browse(dat, "window=vending")
|
||||
onclose(user, "")
|
||||
return
|
||||
|
||||
var/dat = "<TT><center><b>[vendorname]</b></center><hr /><br>" //display the name, and added a horizontal rule
|
||||
dat += "<b>Select an item: </b><br><br>" //the rest is just general spacing and bolding
|
||||
|
||||
if (premium.len > 0)
|
||||
dat += "<b>Coin slot:</b> [coin ? coin : "No coin inserted"] (<a href='byond://?src=\ref[src];remove_coin=1'>Remove</A>)<br><br>"
|
||||
|
||||
if (src.product_records.len == 0)
|
||||
dat += "<font color = 'red'>No product loaded!</font>"
|
||||
/**
|
||||
* Display the NanoUI window for the vending machine.
|
||||
*
|
||||
* See NanoUI documentation for details.
|
||||
*/
|
||||
/obj/machinery/vending/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
var/list/data = list()
|
||||
if(currently_vending)
|
||||
data["mode"] = 1
|
||||
data["product"] = currently_vending.product_name
|
||||
data["price"] = currently_vending.price
|
||||
data["message_err"] = 0
|
||||
data["message"] = src.status_message
|
||||
data["message_err"] = src.status_error
|
||||
else
|
||||
var/list/display_records = list()
|
||||
display_records += src.product_records
|
||||
data["mode"] = 0
|
||||
var/list/listed_products = list()
|
||||
|
||||
if(src.extended_inventory)
|
||||
display_records += src.hidden_records
|
||||
if(src.coin)
|
||||
display_records += src.coin_records
|
||||
|
||||
for (var/datum/data/vending_product/R in display_records)
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\game\machinery\vending.dm:285: dat += "<FONT color = '[R.display_color]'><B>[R.product_name]</B>:"
|
||||
dat += {"<FONT color = '[R.display_color]'><B>[R.product_name]</B>:
|
||||
<b>[R.amount]</b> </font>"}
|
||||
// END AUTOFIX
|
||||
if(R.price)
|
||||
dat += " <b>(Price: [R.price])</b>"
|
||||
if (R.amount > 0)
|
||||
var/idx=GetProductIndex(R)
|
||||
dat += " <a href='byond://?src=\ref[src];vend=[idx];cat=[R.category]'>(Vend)</A>"
|
||||
else
|
||||
dat += " <font color = 'red'>SOLD OUT</font>"
|
||||
dat += "<br>"
|
||||
|
||||
dat += "</TT>"
|
||||
|
||||
if(panel_open)
|
||||
dat += wires()
|
||||
|
||||
if(product_slogans != "")
|
||||
dat += "The speaker switch is [shut_up ? "off" : "on"]. <a href='?src=\ref[src];togglevoice=[1]'>Toggle</a>"
|
||||
|
||||
user << browse(dat, "window=vending")
|
||||
onclose(user, "")
|
||||
return
|
||||
|
||||
// returns the wire panel text
|
||||
/obj/machinery/vending/proc/wires()
|
||||
return wires.GetInteractWindow()
|
||||
for(var/key = 1 to src.product_records.len)
|
||||
var/datum/data/vending_product/I = src.product_records[key]
|
||||
|
||||
if(!(I.category & src.categories))
|
||||
continue
|
||||
|
||||
listed_products.Add(list(list(
|
||||
"key" = key,
|
||||
"name" = sanitize(I.product_name),
|
||||
"price" = I.price,
|
||||
"color" = I.display_color,
|
||||
"amount" = I.amount)))
|
||||
|
||||
data["products"] = listed_products
|
||||
|
||||
if(src.coin)
|
||||
data["coin"] = src.coin.name
|
||||
|
||||
if(src.panel_open)
|
||||
data["panel"] = 1
|
||||
data["speaker"] = src.shut_up ? 0 : 1
|
||||
else
|
||||
data["panel"] = 0
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "vending_machine.tmpl", src.name, 440, 600)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/vending/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(istype(usr,/mob/living/silicon))
|
||||
if(istype(usr,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
if(!(R.module && istype(R.module,/obj/item/weapon/robot_module/butler) ) )
|
||||
usr << "\red The vending machine refuses to interface with you, as you are not in its target demographic!"
|
||||
return
|
||||
else
|
||||
usr << "\red The vending machine refuses to interface with you, as you are not in its target demographic!"
|
||||
return
|
||||
|
||||
if(href_list["remove_coin"])
|
||||
if(href_list["remove_coin"] && !istype(usr,/mob/living/silicon))
|
||||
if(!coin)
|
||||
usr << "There is no coin in this machine."
|
||||
return
|
||||
@@ -419,67 +476,64 @@
|
||||
usr.put_in_hands(coin)
|
||||
usr << "\blue You remove the [coin] from the [src]"
|
||||
coin = null
|
||||
usr.set_machine(src)
|
||||
|
||||
categories &= ~CAT_COIN
|
||||
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
|
||||
if ((href_list["vend"]) && (src.vend_ready) && (!currently_vending))
|
||||
|
||||
if (!allowed(usr) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
|
||||
usr << "\red Access denied." //Unless emagged of course
|
||||
flick(src.icon_deny,src)
|
||||
if(istype(usr,/mob/living/silicon))
|
||||
if(istype(usr,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
if(!(R.module && istype(R.module,/obj/item/weapon/robot_module/butler) ))
|
||||
usr << "\red The vending machine refuses to interface with you, as you are not in its target demographic!"
|
||||
return
|
||||
else
|
||||
usr << "\red The vending machine refuses to interface with you, as you are not in its target demographic!"
|
||||
return
|
||||
|
||||
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
|
||||
usr << "<span class='warning'>Access denied.</span>" //Unless emagged of course
|
||||
flick(icon_deny,src)
|
||||
return
|
||||
|
||||
var/idx=text2num(href_list["vend"])
|
||||
var/cat=text2num(href_list["cat"])
|
||||
|
||||
var/datum/data/vending_product/R = GetProductByID(idx,cat)
|
||||
if (!R || !istype(R) || !R.product_path || R.amount <= 0)
|
||||
var/key = text2num(href_list["vend"])
|
||||
var/datum/data/vending_product/R = product_records[key]
|
||||
|
||||
// This should not happen unless the request from NanoUI was bad
|
||||
if(!(R.category & src.categories))
|
||||
return
|
||||
|
||||
if(R.price == null)
|
||||
|
||||
if(R.price <= 0)
|
||||
src.vend(R, usr)
|
||||
else
|
||||
src.currently_vending = R
|
||||
src.updateUsrDialog()
|
||||
if(!vendor_account || vendor_account.suspended)
|
||||
src.status_message = "This machine is currently unable to process payments due to problems with the associated account."
|
||||
src.status_error = 1
|
||||
else
|
||||
src.status_message = "Please swipe a card or insert cash to pay for the item."
|
||||
src.status_error = 0
|
||||
|
||||
return
|
||||
|
||||
else if (href_list["cancel_buying"])
|
||||
else if (href_list["cancelpurchase"])
|
||||
src.currently_vending = null
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
else if (href_list["buy"])
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H=usr
|
||||
var/obj/item/weapon/card/card = null
|
||||
if(istype(H.wear_id,/obj/item/weapon/card))
|
||||
card=H.wear_id
|
||||
else if(istype(H.get_active_hand(),/obj/item/weapon/card))
|
||||
card=H.get_active_hand()
|
||||
if(card)
|
||||
scan_card(card)
|
||||
return
|
||||
|
||||
else if ((href_list["togglevoice"]) && (src.panel_open))
|
||||
src.shut_up = !src.shut_up
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
usr << browse(null, "window=vending")
|
||||
return
|
||||
return
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/vending/proc/vend(datum/data/vending_product/R, mob/user)
|
||||
if (!allowed(user) && !emagged && wires.IsIndexCut(VENDING_WIRE_IDSCAN)) //For SECURE VENDING MACHINES YEAH
|
||||
user << "\red Access denied." //Unless emagged of course
|
||||
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
|
||||
usr << "<span class='warning'>Access denied.</span>" //Unless emagged of course
|
||||
flick(src.icon_deny,src)
|
||||
return
|
||||
src.vend_ready = 0 //One thing at a time!!
|
||||
|
||||
if (R in coin_records)
|
||||
src.status_message = "Vending..."
|
||||
src.status_error = 0
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
if (R.category & CAT_COIN)
|
||||
if(!coin)
|
||||
user << "\blue You need to insert a coin to get this item."
|
||||
return
|
||||
@@ -489,8 +543,10 @@
|
||||
else
|
||||
user << "\blue You weren't able to pull the coin out fast enough, the machine ate it, string and all."
|
||||
del(coin)
|
||||
categories &= ~CAT_COIN
|
||||
else
|
||||
del(coin)
|
||||
categories &= ~CAT_COIN
|
||||
|
||||
R.amount--
|
||||
|
||||
@@ -499,16 +555,16 @@
|
||||
src.speak(src.vend_reply)
|
||||
src.last_reply = world.time
|
||||
|
||||
use_power(5)
|
||||
use_power(vend_power_usage) //actuators and stuff
|
||||
if (src.icon_vend) //Show the vending animation if needed
|
||||
flick(src.icon_vend,src)
|
||||
spawn(src.vend_delay)
|
||||
new R.product_path(get_turf(src))
|
||||
src.status_message = ""
|
||||
src.status_error = 0
|
||||
src.vend_ready = 1
|
||||
return
|
||||
|
||||
src.updateUsrDialog()
|
||||
|
||||
currently_vending = null
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/vending/proc/stock(var/datum/data/vending_product/R, var/mob/user)
|
||||
if(src.panel_open)
|
||||
@@ -860,7 +916,7 @@
|
||||
icon_state = "sec"
|
||||
icon_deny = "sec-deny"
|
||||
req_access_txt = "1"
|
||||
products = list(/obj/item/weapon/handcuffs = 8,/obj/item/weapon/grenade/flashbang = 4,/obj/item/device/flash = 5,
|
||||
products = list(/obj/item/weapon/restraints/handcuffs = 8,/obj/item/weapon/grenade/flashbang = 4,/obj/item/device/flash = 5,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/donut/normal = 12,/obj/item/weapon/storage/box/evidence = 6,/obj/item/device/flashlight/seclite = 4)
|
||||
contraband = list(/obj/item/clothing/glasses/sunglasses = 2,/obj/item/weapon/storage/fancy/donut_box = 2,/obj/item/device/hailer = 5)
|
||||
|
||||
@@ -883,19 +939,45 @@
|
||||
product_slogans = "THIS'S WHERE TH' SEEDS LIVE! GIT YOU SOME!;Hands down the best seed selection on the station!;Also certain mushroom varieties available, more for experts! Get certified today!"
|
||||
product_ads = "We like plants!;Grow some crops!;Grow, baby, growww!;Aw h'yeah son!"
|
||||
icon_state = "seeds"
|
||||
delay_product_spawn = 1
|
||||
|
||||
products = list(/obj/item/seeds/bananaseed = 3,/obj/item/seeds/berryseed = 3,/obj/item/seeds/carrotseed = 3,/obj/item/seeds/chantermycelium = 3,/obj/item/seeds/chiliseed = 3,
|
||||
/obj/item/seeds/cornseed = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/replicapod = 3,/obj/item/seeds/soyaseed = 3,
|
||||
/obj/item/seeds/sunflowerseed = 3,/obj/item/seeds/tomatoseed = 3,/obj/item/seeds/towermycelium = 3,/obj/item/seeds/wheatseed = 3,/obj/item/seeds/appleseed = 3,
|
||||
/obj/item/seeds/poppyseed = 3,/obj/item/seeds/ambrosiavulgarisseed = 3,/obj/item/seeds/whitebeetseed = 3,/obj/item/seeds/watermelonseed = 3,/obj/item/seeds/limeseed = 3,
|
||||
/obj/item/seeds/lemonseed = 3,/obj/item/seeds/orangeseed = 3,/obj/item/seeds/grassseed = 3,/obj/item/seeds/cocoapodseed = 3,
|
||||
/obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3)
|
||||
/obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3,
|
||||
/obj/item/seeds/tobaccoseed = 3, /obj/item/seeds/coffeeaseed = 3, /obj/item/seeds/teaasperaseed = 3)
|
||||
|
||||
contraband = list(/obj/item/seeds/amanitamycelium = 2,/obj/item/seeds/glowshroom = 2,/obj/item/seeds/libertymycelium = 2,/obj/item/seeds/nettleseed = 2,
|
||||
/obj/item/seeds/plumpmycelium = 2,/obj/item/seeds/reishimycelium = 2)
|
||||
premium = list(/obj/item/weapon/reagent_containers/spray/waterflower = 1)
|
||||
|
||||
/**
|
||||
* Populate hydroseeds product_records
|
||||
*
|
||||
* This needs to be customized to fetch the actual names of the seeds, otherwise
|
||||
* the machine would simply list "packet of seeds" times 20
|
||||
*/
|
||||
/obj/machinery/vending/hydroseeds/build_inventory()
|
||||
var/list/all_products = list(
|
||||
list(src.products, CAT_NORMAL),
|
||||
list(src.contraband, CAT_HIDDEN),
|
||||
list(src.premium, CAT_COIN))
|
||||
|
||||
for(var/current_list in all_products)
|
||||
var/category = current_list[2]
|
||||
|
||||
for(var/entry in current_list[1])
|
||||
var/obj/item/seeds/S = new entry(src)
|
||||
var/name = S.name
|
||||
var/datum/data/vending_product/product = new/datum/data/vending_product(entry, name)
|
||||
|
||||
product.price = (entry in src.prices) ? src.prices[entry] : 0
|
||||
product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
|
||||
product.max_amount = product.amount
|
||||
product.category = category
|
||||
|
||||
src.product_records.Add(product)
|
||||
|
||||
/obj/machinery/vending/magivend
|
||||
name = "MagiVend"
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
if (S.chained == 1)
|
||||
S.chained = 0
|
||||
S.slowdown = SHOES_SLOWDOWN
|
||||
new /obj/item/weapon/handcuffs( src )
|
||||
new /obj/item/weapon/restraints/handcuffs( src )
|
||||
S.icon_state = new_shoe_icon_state
|
||||
S._color = _color
|
||||
S.name = new_shoe_name
|
||||
|
||||
@@ -513,10 +513,7 @@
|
||||
return 1
|
||||
else
|
||||
user << "<span class='danger'>You can't load \the [name] while it's opened.</span>"
|
||||
return 1
|
||||
|
||||
if(istype(W,/obj/item/weapon/card/emag))
|
||||
emag()
|
||||
return 1
|
||||
|
||||
if(istype(W, /obj/item/stack))
|
||||
var/material
|
||||
@@ -561,6 +558,9 @@
|
||||
else
|
||||
user << "\The [src] cannot hold any more [sname] sheet\s."
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/emag_act(user as mob)
|
||||
emag()
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/material2name(var/ID)
|
||||
return copytext(ID,2)
|
||||
@@ -697,17 +697,6 @@
|
||||
|
||||
/obj/mecha/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/emag))
|
||||
if(istype(src, /obj/mecha/working/ripley) && emagged == 0)
|
||||
emagged = 1
|
||||
usr << "\blue You slide the [W] through the [src]'s ID slot."
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
src.desc += "</br><b>\red The mech's equiptment slots spark dangerously!</b>"
|
||||
else
|
||||
usr <<"\red The [src]'s ID slot rejects the [W]."
|
||||
return
|
||||
|
||||
|
||||
if(istype(W, /obj/item/device/mmi) || istype(W, /obj/item/device/mmi/posibrain))
|
||||
if(mmi_move_inside(W,user))
|
||||
user << "[src]-MMI interface initialized successfuly"
|
||||
@@ -862,6 +851,15 @@
|
||||
*/
|
||||
return
|
||||
|
||||
/obj/mecha/emag_act(user as mob)
|
||||
if(istype(src, /obj/mecha/working/ripley) && emagged == 0)
|
||||
emagged = 1
|
||||
usr << "\blue You slide the card through the [src]'s ID slot."
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
src.desc += "</br><b>\red The mech's equiptment slots spark dangerously!</b>"
|
||||
else
|
||||
usr <<"\red The [src]'s ID slot rejects the card."
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -469,10 +469,10 @@ steam.start() -- spawns the effect
|
||||
var/more = ""
|
||||
if(M)
|
||||
more = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</a>)"
|
||||
message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
|
||||
msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
|
||||
else
|
||||
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
|
||||
msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
|
||||
|
||||
start()
|
||||
|
||||
@@ -465,13 +465,13 @@
|
||||
if(slot_handcuffed)
|
||||
if(H.handcuffed)
|
||||
return 0
|
||||
if(!istype(src, /obj/item/weapon/handcuffs))
|
||||
if(!istype(src, /obj/item/weapon/restraints/handcuffs))
|
||||
return 0
|
||||
return 1
|
||||
if(slot_legcuffed)
|
||||
if(H.legcuffed)
|
||||
return 0
|
||||
if(!istype(src, /obj/item/weapon/legcuffs))
|
||||
if(!istype(src, /obj/item/weapon/restraints/legcuffs))
|
||||
return 0
|
||||
return 1
|
||||
if(slot_in_backpack)
|
||||
|
||||
@@ -72,10 +72,6 @@
|
||||
usr << "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/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = W
|
||||
if(G.amount - decrement >= 0 && uses < max_uses)
|
||||
@@ -104,7 +100,10 @@
|
||||
user << "You need a working light."
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/lightreplacer/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
Emag()
|
||||
|
||||
/obj/item/device/lightreplacer/attack_self(mob/user)
|
||||
/* // This would probably be a bit OP. If you want it though, uncomment the code.
|
||||
if(isrobot(user))
|
||||
|
||||
@@ -47,10 +47,8 @@
|
||||
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(user as mob)
|
||||
if(!emagged)
|
||||
user << "\red You overload \the [src]'s voice synthesizer."
|
||||
emagged = 1
|
||||
insults = rand(1, 3)//to prevent dickflooding
|
||||
return
|
||||
return
|
||||
@@ -8,15 +8,11 @@
|
||||
var/emagged = 0
|
||||
var/syndicate = 0
|
||||
|
||||
/obj/item/device/radio/beacon/attackby(I as obj, mob/living/user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag)) // If hit by an emag.
|
||||
var/obj/item/weapon/card/emag/E = I
|
||||
if(!emagged)
|
||||
if(E.uses)
|
||||
E.uses--
|
||||
emagged = 1
|
||||
syndicate = 1
|
||||
user << "\blue The This beacon now only be locked on to by emagged teleporters!"
|
||||
/obj/item/device/radio/beacon/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
syndicate = 1
|
||||
user << "\blue The This beacon now only be locked on to by emagged teleporters!"
|
||||
|
||||
/obj/item/device/radio/beacon/hear_talk()
|
||||
return
|
||||
|
||||
@@ -38,17 +38,15 @@
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] says, \"[msg]\""
|
||||
return
|
||||
|
||||
/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(user as mob)
|
||||
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/proc/explode()
|
||||
var/turf/T = get_turf(loc)
|
||||
if(ismob(loc))
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
|
||||
|
||||
bombers += "[key_name(user)] attached a [item] to a transfer valve."
|
||||
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve.")
|
||||
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
|
||||
msg_admin_attack("[key_name_admin(user)] attached [item] to a transfer valve.")
|
||||
log_game("[key_name_admin(user)] attached [item] to a transfer valve.")
|
||||
attacher = user
|
||||
nanomanager.update_uis(src) // update all UIs attached to src
|
||||
return
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
|
||||
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
|
||||
// this is the data which will be sent to the ui
|
||||
@@ -77,13 +77,13 @@
|
||||
data["valveOpen"] = valve_open ? 1 : 0
|
||||
|
||||
// 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)
|
||||
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
|
||||
ui = new(user, src, ui_key, "transfer_valve.tmpl", "Tank Transfer Valve", 460, 280)
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
// auto update every Master Controller tick
|
||||
@@ -190,7 +190,7 @@
|
||||
|
||||
log_str += " Last touched by: [src.fingerprintslast][last_touch_info]"
|
||||
bombers += log_str
|
||||
message_admins(log_str, 0, 1)
|
||||
msg_admin_attack(log_str, 0, 1)
|
||||
log_game(log_str)
|
||||
merge_gases()
|
||||
spawn(20) // In case one tank bursts
|
||||
|
||||
@@ -24,9 +24,8 @@
|
||||
spawn(20)
|
||||
spamcheck = 0
|
||||
|
||||
/obj/item/device/hailer/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
|
||||
/obj/item/device/hailer/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
user << "\red You overload \the [src]'s voice synthesizer."
|
||||
emagged = 1
|
||||
return
|
||||
return
|
||||
|
||||
@@ -69,58 +69,15 @@
|
||||
item_state = "card-id"
|
||||
origin_tech = "magnets=2;syndicate=2"
|
||||
flags = NOBLUDGEON
|
||||
var/uses = 1000000
|
||||
// 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/device/eftpos,
|
||||
/obj/item/device/lightreplacer,
|
||||
/obj/item/device/taperecorder,
|
||||
/obj/item/device/hailer,
|
||||
/obj/item/clothing/accessory/holobadge,
|
||||
/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/zero_point_emitter,
|
||||
/obj/machinery/clonepod,
|
||||
/obj/machinery/deployable,
|
||||
/obj/machinery/door_control,
|
||||
/obj/machinery/porta_turret,
|
||||
/obj/machinery/shieldgen,
|
||||
/obj/machinery/turretid,
|
||||
/obj/machinery/vending,
|
||||
/obj/machinery/bot,
|
||||
/obj/machinery/door,
|
||||
/obj/machinery/telecomms,
|
||||
/obj/machinery/mecha_part_fabricator,
|
||||
/obj/vehicle
|
||||
)
|
||||
|
||||
/obj/item/weapon/card/emag/attack()
|
||||
return
|
||||
|
||||
/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
|
||||
|
||||
if(uses<1)
|
||||
user.visible_message("[src] fizzles and sparks - it seems it's been used once too often, and is now broken.")
|
||||
user.drop_item()
|
||||
var/obj/item/weapon/card/emag_broken/junk = new(user.loc)
|
||||
junk.add_fingerprint(user)
|
||||
del(src)
|
||||
/obj/item/weapon/card/emag/afterattack(atom/target, mob/user, proximity)
|
||||
var/atom/A = target
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
..()
|
||||
A.emag_act(user)
|
||||
|
||||
/obj/item/weapon/card/id
|
||||
name = "identification card"
|
||||
@@ -444,4 +401,4 @@
|
||||
decal_name = "cryptographic sequencer"
|
||||
decal_desc = "It's a card with a magnetic strip attached to some circuitry."
|
||||
decal_icon_state = "emag"
|
||||
override_name = 1
|
||||
override_name = 1
|
||||
|
||||
@@ -92,14 +92,6 @@
|
||||
bcell = W
|
||||
user << "<span class='notice'>You install a cell in [src].</span>"
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/emag))
|
||||
if(safety)
|
||||
safety = 0
|
||||
user << "<span class='warning'>You silently disable [src]'s safety protocols with the [W]."
|
||||
else
|
||||
safety = 1
|
||||
user << "<span class='notice'>You silently enable [src]'s safety protocols with the [W]."
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(bcell)
|
||||
bcell.updateicon()
|
||||
@@ -110,7 +102,13 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/defibrillator/emag_act(user as mob)
|
||||
if(safety)
|
||||
safety = 0
|
||||
user << "<span class='warning'>You silently disable [src]'s safety protocols with the card."
|
||||
else
|
||||
safety = 1
|
||||
user << "<span class='notice'>You silently enable [src]'s safety protocols with the card."
|
||||
|
||||
/obj/item/weapon/defibrillator/emp_act(severity)
|
||||
if(bcell)
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
else if(clown_check(user))
|
||||
// This used to go before the assembly check, but that has absolutely zero to do with priming the damn thing. You could spam the admins with it.
|
||||
var/log_str = "[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>."
|
||||
message_admins(log_str)
|
||||
msg_admin_attack(log_str)
|
||||
log_game(log_str)
|
||||
bombers += "[log_str]"
|
||||
user << "<span class='warning'>You prime the [name]! [det_time / 10] second\s!</span>"
|
||||
@@ -144,7 +144,7 @@
|
||||
var/turf/bombturf = get_turf(loc)
|
||||
var/area/A = bombturf.loc
|
||||
var/log_str = "[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has completed [name] at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a> [contained]."
|
||||
message_admins(log_str)
|
||||
msg_admin_attack(log_str)
|
||||
log_game(log_str)
|
||||
else
|
||||
user << "<span class='notice'>You need to add at least one beaker before locking the assembly.</span>"
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
var/log_str = "[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>."
|
||||
message_admins(log_str)
|
||||
msg_admin_attack(log_str)
|
||||
log_game(log_str)
|
||||
bombers += "[log_str]"
|
||||
if(iscarbon(user))
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
var/log_str = "[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>."
|
||||
message_admins(log_str)
|
||||
msg_admin_attack(log_str)
|
||||
log_game(log_str)
|
||||
bombers += "[log_str]"
|
||||
if(iscarbon(user))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/handcuffs
|
||||
/obj/item/weapon/restraints/handcuffs
|
||||
name = "handcuffs"
|
||||
desc = "Use this to keep prisoners in line."
|
||||
gender = PLURAL
|
||||
@@ -12,132 +12,117 @@
|
||||
throw_range = 5
|
||||
m_amt = 500
|
||||
origin_tech = "materials=1"
|
||||
var/dispenser = 0
|
||||
var/breakouttime = 600 //Deciseconds = 60s = 1 minutes
|
||||
var/cuffsound = 'sound/weapons/handcuffs.ogg'
|
||||
var/trashtype = null //For disposable cuffs
|
||||
|
||||
/obj/item/weapon/handcuffs/attack(mob/living/carbon/C, mob/user)
|
||||
/obj/item/weapon/restraints/handcuffs/attack(mob/living/carbon/C, mob/user)
|
||||
if(M_CLUMSY in user.mutations && prob(50))
|
||||
user << "<span class='warning'>Uh... how do those things work?!</span>"
|
||||
if(!C.handcuffed)
|
||||
user.drop_item()
|
||||
loc = C
|
||||
C.handcuffed = src
|
||||
C.update_inv_handcuffed()
|
||||
return
|
||||
|
||||
var/cable = 0
|
||||
if(istype(src, /obj/item/weapon/handcuffs/cable))
|
||||
cable = 1
|
||||
apply_cuffs(user,user)
|
||||
|
||||
if(!C.handcuffed)
|
||||
C.visible_message("<span class='danger'>[user] is trying to put handcuffs on [C]!</span>", \
|
||||
"<span class='danger'>[user] is trying to put handcuffs on [C]!</span>")
|
||||
|
||||
if(cable)
|
||||
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
|
||||
C.visible_message("<span class='danger'>[user] is trying to put [src.name] on [C]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to put [src.name] on [C]!</span>")
|
||||
|
||||
playsound(loc, cuffsound, 30, 1, -2)
|
||||
if(do_mob(user, C, 30))
|
||||
if(C.handcuffed)
|
||||
return
|
||||
user.drop_item()
|
||||
loc = C
|
||||
C.handcuffed = src
|
||||
C.update_inv_handcuffed()
|
||||
if(cable)
|
||||
apply_cuffs(C,user)
|
||||
user << "<span class='notice'>You handcuff [C].</span>"
|
||||
if(istype(src, /obj/item/weapon/restraints/handcuffs/cable))
|
||||
feedback_add_details("handcuffs","C")
|
||||
else
|
||||
feedback_add_details("handcuffs","H")
|
||||
|
||||
add_logs(C, user, "handcuffed")
|
||||
add_logs(user, C, "handcuffed")
|
||||
else
|
||||
user << "<span class='warning'>You fail to handcuff [C].</span>"
|
||||
|
||||
/obj/item/weapon/restraints/handcuffs/proc/apply_cuffs(mob/living/carbon/target, mob/user)
|
||||
if(!target.handcuffed)
|
||||
user.drop_item()
|
||||
if(trashtype)
|
||||
target.handcuffed = new trashtype(target)
|
||||
qdel(src)
|
||||
else
|
||||
loc = target
|
||||
target.handcuffed = src
|
||||
target.update_inv_handcuffed(1)
|
||||
return
|
||||
|
||||
var/last_chew = 0
|
||||
/mob/living/carbon/human/RestrainedClickOn(var/atom/A)
|
||||
if (A != src) return ..()
|
||||
if (last_chew + 26 > world.time) return
|
||||
if (A != src)
|
||||
return ..()
|
||||
if (last_chew + 26 > world.time)
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = A
|
||||
if (!H.handcuffed) return
|
||||
if (H.a_intent != "harm") return
|
||||
if (H.zone_sel.selecting != "mouth") return
|
||||
if (H.wear_mask) return
|
||||
if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket)) return
|
||||
if (!H.handcuffed)
|
||||
return
|
||||
if (H.a_intent != "harm")
|
||||
return
|
||||
if (H.zone_sel.selecting != "mouth")
|
||||
return
|
||||
if (H.wear_mask)
|
||||
return
|
||||
if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket))
|
||||
return
|
||||
|
||||
var/datum/organ/external/O = H.organs_by_name[H.hand?"l_hand":"r_hand"]
|
||||
if (!O) return
|
||||
var/datum/organ/external/O = H.organs_by_name[H.hand ? "l_hand" : "r_hand"]
|
||||
if (!O)
|
||||
return
|
||||
|
||||
var/s = "\red [H.name] chews on \his [O.display_name]!"
|
||||
H.visible_message(s, "\red You chew on your [O.display_name]!")
|
||||
var/s = "<span class='danger'>[H.name] chews on \his [O.display_name]!</span>"
|
||||
H.visible_message(s, "<span class='userdanger'>You chew on your [O.display_name]!</span>")
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='red'>[s] ([H.ckey])</font>")
|
||||
log_attack("[s] ([H.ckey])")
|
||||
|
||||
if(O.take_damage(3,0,1,1,"teeth marks"))
|
||||
H:UpdateDamageIcon()
|
||||
H.UpdateDamageIcon()
|
||||
if(prob(10))
|
||||
O.droplimb()
|
||||
|
||||
last_chew = world.time
|
||||
|
||||
/obj/item/weapon/handcuffs/cable
|
||||
/obj/item/weapon/restraints/handcuffs/cable
|
||||
name = "cable restraints"
|
||||
desc = "Looks like some cables tied together. Could be used to tie something up."
|
||||
icon_state = "cuff_red"
|
||||
item_state = "coil_red"
|
||||
breakouttime = 300 //Deciseconds = 30s
|
||||
cuffsound = 'sound/weapons/cablecuff.ogg'
|
||||
|
||||
/obj/item/weapon/handcuffs/cable/red
|
||||
/obj/item/weapon/restraints/handcuffs/cable/red
|
||||
icon_state = "cuff_red"
|
||||
|
||||
/obj/item/weapon/handcuffs/cable/yellow
|
||||
/obj/item/weapon/restraints/handcuffs/cable/yellow
|
||||
icon_state = "cuff_yellow"
|
||||
|
||||
/obj/item/weapon/handcuffs/cable/blue
|
||||
/obj/item/weapon/restraints/handcuffs/cable/blue
|
||||
icon_state = "cuff_blue"
|
||||
|
||||
/obj/item/weapon/handcuffs/cable/green
|
||||
/obj/item/weapon/restraints/handcuffs/cable/green
|
||||
icon_state = "cuff_green"
|
||||
|
||||
/obj/item/weapon/handcuffs/cable/pink
|
||||
/obj/item/weapon/restraints/handcuffs/cable/pink
|
||||
icon_state = "cuff_pink"
|
||||
|
||||
/obj/item/weapon/handcuffs/cable/orange
|
||||
/obj/item/weapon/restraints/handcuffs/cable/orange
|
||||
icon_state = "cuff_orange"
|
||||
|
||||
/obj/item/weapon/handcuffs/cable/cyan
|
||||
/obj/item/weapon/restraints/handcuffs/cable/cyan
|
||||
icon_state = "cuff_cyan"
|
||||
|
||||
/obj/item/weapon/handcuffs/cable/white
|
||||
/obj/item/weapon/restraints/handcuffs/cable/white
|
||||
icon_state = "cuff_white"
|
||||
|
||||
|
||||
/obj/item/weapon/handcuffs/cyborg
|
||||
dispenser = 1
|
||||
|
||||
/obj/item/weapon/handcuffs/cyborg/attack(mob/living/carbon/C as mob, mob/user as mob)
|
||||
if(!C.handcuffed)
|
||||
var/turf/p_loc = user.loc
|
||||
var/turf/p_loc_m = C.loc
|
||||
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
|
||||
user.visible_message("\red <B>[user] is trying to put handcuffs on [C]!</B>")
|
||||
|
||||
if (ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if (!H.has_organ_for_slot(slot_handcuffed))
|
||||
user << "\red \The [H] needs at least two wrists before you can cuff them together!"
|
||||
return
|
||||
|
||||
spawn(30)
|
||||
if(!C) return
|
||||
if(p_loc == user.loc && p_loc_m == C.loc)
|
||||
C.handcuffed = new /obj/item/weapon/handcuffs(C)
|
||||
C.update_inv_handcuffed()
|
||||
|
||||
/obj/item/weapon/handcuffs/pinkcuffs
|
||||
/obj/item/weapon/restraints/handcuffs/pinkcuffs
|
||||
name = "fluffy pink handcuffs"
|
||||
desc = "Use this to keep prisoners in line. Or you know, your significant other."
|
||||
icon_state = "pinkcuffs"
|
||||
|
||||
/obj/item/weapon/handcuffs/cable/attackby(var/obj/item/I, mob/user as mob)
|
||||
/obj/item/weapon/restraints/handcuffs/cable/attackby(var/obj/item/I, mob/user as mob)
|
||||
..()
|
||||
if(istype(I, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = I
|
||||
@@ -146,7 +131,92 @@ var/last_chew = 0
|
||||
user.u_equip(src)
|
||||
user.put_in_hands(W)
|
||||
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
|
||||
del(src)
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='warning'>You need one rod to make a wired rod.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/restraints/handcuffs/cable/zipties
|
||||
name = "zipties"
|
||||
desc = "Plastic, disposable zipties that can be used to restrain temporarily but are destroyed after use."
|
||||
icon_state = "cuff_white"
|
||||
breakouttime = 450 //Deciseconds = 45s
|
||||
trashtype = /obj/item/weapon/restraints/handcuffs/cable/zipties/used
|
||||
|
||||
/obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user)
|
||||
if(isrobot(user))
|
||||
if(!C.handcuffed)
|
||||
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
|
||||
C.visible_message("<span class='danger'>[user] is trying to put zipties on [C]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to put zipties on [C]!</span>")
|
||||
if(do_mob(user, C, 30))
|
||||
if(!C.handcuffed)
|
||||
C.handcuffed = new /obj/item/weapon/restraints/handcuffs/cable/zipties/used(C)
|
||||
C.update_inv_handcuffed(1)
|
||||
user << "<span class='notice'>You handcuff [C].</span>"
|
||||
add_logs(user, C, "handcuffed")
|
||||
else
|
||||
user << "<span class='warning'>You fail to handcuff [C].</span>"
|
||||
|
||||
/obj/item/weapon/restraints/handcuffs/cable/zipties/used/attack()
|
||||
return
|
||||
|
||||
//Legcuffs
|
||||
/obj/item/weapon/restraints/legcuffs
|
||||
name = "leg cuffs"
|
||||
desc = "Use this to keep prisoners in line."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "handcuff"
|
||||
flags = CONDUCT
|
||||
throwforce = 0
|
||||
w_class = 3.0
|
||||
origin_tech = "materials=1"
|
||||
slowdown = 7
|
||||
var/breakouttime = 300 //Deciseconds = 30s = 0.5 minute
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap
|
||||
name = "bear trap"
|
||||
throw_speed = 1
|
||||
throw_range = 1
|
||||
icon_state = "beartrap0"
|
||||
desc = "A trap used to catch bears and other legged creatures."
|
||||
var/armed = 0
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is sticking \his head in the [src.name]! It looks like \he's trying to commit suicide.</span>")
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap/attack_self(mob/user as mob)
|
||||
..()
|
||||
if(ishuman(user) && !user.stat && !user.restrained())
|
||||
armed = !armed
|
||||
icon_state = "beartrap[armed]"
|
||||
user << "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>"
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap/Crossed(AM as mob|obj)
|
||||
if(armed && isturf(src.loc))
|
||||
if( (iscarbon(AM) || isanimal(AM)) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator))
|
||||
var/mob/living/L = AM
|
||||
armed = 0
|
||||
icon_state = "beartrap0"
|
||||
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
L.visible_message("<span class='danger'>[L] triggers \the [src].</span>", \
|
||||
"<span class='userdanger'>You trigger \the [src]!</span>")
|
||||
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.lying)
|
||||
H.apply_damage(20,BRUTE,"chest")
|
||||
else
|
||||
H.apply_damage(20,BRUTE,(pick("l_leg", "r_leg")))
|
||||
if(!H.legcuffed) //beartrap can't cuff you leg if there's already a beartrap or legcuffs.
|
||||
H.legcuffed = src
|
||||
src.loc = H
|
||||
H.update_inv_legcuffed(0)
|
||||
feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
|
||||
|
||||
else
|
||||
L.apply_damage(20,BRUTE)
|
||||
..()
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
"/obj/item/weapon/grenade/flashbang",
|
||||
"/obj/item/weapon/grenade/chem_grenade/teargas",
|
||||
"/obj/item/weapon/reagent_containers/spray/pepper",
|
||||
"/obj/item/weapon/handcuffs",
|
||||
"/obj/item/weapon/restraints/handcuffs",
|
||||
"/obj/item/device/flash",
|
||||
"/obj/item/clothing/glasses",
|
||||
"/obj/item/ammo_casing/shotgun",
|
||||
@@ -413,7 +413,7 @@
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/stack/cable_coil(src)
|
||||
|
||||
new /obj/item/weapon/handcuffs(src)
|
||||
new /obj/item/weapon/restraints/handcuffs(src)
|
||||
new /obj/item/weapon/dnainjector/xraymut(src)
|
||||
new /obj/item/weapon/dnainjector/firemut(src)
|
||||
new /obj/item/weapon/dnainjector/telemut(src)
|
||||
|
||||
@@ -451,7 +451,7 @@
|
||||
new /obj/item/weapon/card/id/prisoner/seven(src)
|
||||
|
||||
/obj/item/weapon/storage/box/seccarts
|
||||
name = "Spare R.O.B.U.S.T. Cartridges"
|
||||
name = "spare R.O.B.U.S.T. Cartridges"
|
||||
desc = "A box full of R.O.B.U.S.T. Cartridges, used by Security."
|
||||
icon_state = "pda"
|
||||
|
||||
@@ -473,13 +473,28 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/handcuffs(src)
|
||||
new /obj/item/weapon/handcuffs(src)
|
||||
new /obj/item/weapon/handcuffs(src)
|
||||
new /obj/item/weapon/handcuffs(src)
|
||||
new /obj/item/weapon/handcuffs(src)
|
||||
new /obj/item/weapon/handcuffs(src)
|
||||
new /obj/item/weapon/handcuffs(src)
|
||||
new /obj/item/weapon/restraints/handcuffs(src)
|
||||
new /obj/item/weapon/restraints/handcuffs(src)
|
||||
new /obj/item/weapon/restraints/handcuffs(src)
|
||||
new /obj/item/weapon/restraints/handcuffs(src)
|
||||
new /obj/item/weapon/restraints/handcuffs(src)
|
||||
new /obj/item/weapon/restraints/handcuffs(src)
|
||||
new /obj/item/weapon/restraints/handcuffs(src)
|
||||
|
||||
/obj/item/weapon/storage/box/zipties
|
||||
name = "box of spare zipties"
|
||||
desc = "A box full of zipties."
|
||||
icon_state = "handcuff"
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/restraints/handcuffs/cable/zipties(src)
|
||||
new /obj/item/weapon/restraints/handcuffs/cable/zipties(src)
|
||||
new /obj/item/weapon/restraints/handcuffs/cable/zipties(src)
|
||||
new /obj/item/weapon/restraints/handcuffs/cable/zipties(src)
|
||||
new /obj/item/weapon/restraints/handcuffs/cable/zipties(src)
|
||||
new /obj/item/weapon/restraints/handcuffs/cable/zipties(src)
|
||||
new /obj/item/weapon/restraints/handcuffs/cable/zipties(src)
|
||||
|
||||
/obj/item/weapon/storage/box/fakesyndiesuit
|
||||
name = "boxed space suit and helmet"
|
||||
|
||||
@@ -34,23 +34,8 @@
|
||||
|
||||
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]."
|
||||
return
|
||||
if ((istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged))
|
||||
emag_act(user, W)
|
||||
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
if (do_after(user, 20))
|
||||
@@ -79,6 +64,25 @@
|
||||
|
||||
// -> storage/attackby() what with handle insertion, etc
|
||||
..()
|
||||
|
||||
emag_act(user as mob, weapon as obj)
|
||||
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
|
||||
if(istype(weapon, /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]."
|
||||
return
|
||||
|
||||
|
||||
MouseDrop(over_object, src_location, over_location)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
item_state = "cutters_yellow"
|
||||
|
||||
/obj/item/weapon/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob)
|
||||
if((C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/handcuffs/cable)))
|
||||
if((C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/restraints/handcuffs/cable)))
|
||||
usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\
|
||||
"You cut \the [C]'s restraints with \the [src]!",\
|
||||
"You hear cable being cut.")
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
new /obj/item/weapon/storage/belt/security(src)
|
||||
new /obj/item/weapon/grenade/flashbang(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/weapon/handcuffs(src)
|
||||
new /obj/item/weapon/restraints/handcuffs(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/glasses/hud/health_advanced
|
||||
|
||||
@@ -6,6 +6,15 @@
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/dresser/proc/convUnM(mund)
|
||||
return underwear_m.Find(mund)
|
||||
|
||||
/obj/structure/dresser/proc/convUnF(fund)
|
||||
return underwear_f.Find(fund)
|
||||
|
||||
/obj/structure/dresser/proc/convUs(us)
|
||||
return undershirt_list.Find(us)
|
||||
|
||||
/obj/structure/dresser/attack_hand(mob/user as mob)
|
||||
if(!Adjacent(user))//no tele-grooming
|
||||
return
|
||||
@@ -18,14 +27,26 @@
|
||||
return
|
||||
switch(choice)
|
||||
if("Underwear")
|
||||
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_list
|
||||
if(new_undies)
|
||||
H.underwear = new_undies
|
||||
if(H.gender == FEMALE)
|
||||
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_f
|
||||
if(new_undies)
|
||||
H << "\red You selected [new_undies]."
|
||||
var/freturn = convUnF(new_undies)
|
||||
H.underwear = freturn
|
||||
|
||||
else
|
||||
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_m
|
||||
if(new_undies)
|
||||
H << "\red You selected [new_undies]."
|
||||
var/mreturn = convUnM(new_undies)
|
||||
H.underwear = mreturn
|
||||
|
||||
if("Undershirt")
|
||||
var/new_undershirt = input(user, "Select your undershirt", "Changing") as null|anything in undershirt_list
|
||||
if(new_undershirt)
|
||||
H.undershirt = new_undershirt
|
||||
H << "\red You selected [new_undershirt]"
|
||||
var/usreturn = convUs(new_undershirt)
|
||||
H.undershirt = usreturn
|
||||
|
||||
add_fingerprint(H)
|
||||
H.update_body()
|
||||
@@ -75,11 +75,14 @@
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
var/mineral = "metal"
|
||||
var/walltype = "metal"
|
||||
var/walltype2 = "rwall" // So it also connects with rwalls, like regular walls do
|
||||
var/opening = 0
|
||||
density = 1
|
||||
opacity = 1
|
||||
|
||||
/obj/structure/falsewall/New()
|
||||
if(!walltype2)
|
||||
walltype2 = walltype
|
||||
relativewall_neighbours()
|
||||
..()
|
||||
|
||||
@@ -105,11 +108,11 @@
|
||||
|
||||
for(var/turf/simulated/wall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(walltype == W.walltype)//Only 'like' walls connect -Sieve
|
||||
if(walltype == W.walltype || walltype2 == W.walltype)//Only 'like' walls connect -Sieve
|
||||
junction |= get_dir(src,W)
|
||||
for(var/obj/structure/falsewall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(walltype == W.walltype)
|
||||
if(walltype == W.walltype || walltype2 == W.walltype)
|
||||
junction |= get_dir(src,W)
|
||||
icon_state = "[walltype][junction]"
|
||||
return
|
||||
@@ -213,6 +216,8 @@
|
||||
name = "reinforced wall"
|
||||
desc = "A huge chunk of reinforced metal used to seperate rooms."
|
||||
icon_state = "r_wall"
|
||||
walltype = "rwall"
|
||||
walltype2 = "metal"
|
||||
|
||||
/obj/structure/falsewall/reinforced/ChangeToWall(delete = 1)
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -244,11 +249,11 @@
|
||||
|
||||
for(var/turf/simulated/wall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.walltype == W.walltype)//Only 'like' walls connect -Sieve
|
||||
if(src.walltype == W.walltype || walltype2 == W.walltype)//Only 'like' walls connect -Sieve
|
||||
junction |= get_dir(src,W)
|
||||
for(var/obj/structure/falsewall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.walltype == W.walltype)
|
||||
if(src.walltype == W.walltype || src.walltype2 == W.walltype)
|
||||
junction |= get_dir(src,W)
|
||||
icon_state = "rwall[junction]"
|
||||
return
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
//Alium nests. Essentially beds with an unbuckle delay that only aliums can buckle mobs to.
|
||||
#define NEST_RESIST_TIME 1200
|
||||
|
||||
/obj/structure/stool/bed/nest
|
||||
name = "alien nest"
|
||||
@@ -18,12 +19,15 @@
|
||||
buckled_mob.pixel_y = 0
|
||||
unbuckle()
|
||||
else
|
||||
if(world.time <= buckled_mob.last_special+NEST_RESIST_TIME)
|
||||
return
|
||||
buckled_mob.visible_message(\
|
||||
"<span class='warning'>[buckled_mob.name] struggles to break free of the gelatinous resin...</span>",\
|
||||
"<span class='warning'>You struggle to break free from the gelatinous resin...</span>",\
|
||||
"<span class='notice'>You hear squelching...</span>")
|
||||
spawn(600)
|
||||
spawn(NEST_RESIST_TIME)
|
||||
if(user && buckled_mob && user.buckled == src)
|
||||
buckled_mob.last_special = world.time
|
||||
buckled_mob.pixel_y = 0
|
||||
unbuckle()
|
||||
src.add_fingerprint(user)
|
||||
@@ -70,8 +74,7 @@
|
||||
var/aforce = W.force
|
||||
health = max(0, health - aforce)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
for(var/mob/M in viewers(src, 7))
|
||||
M.show_message("<span class='warning'>[user] hits [src] with [W]!</span>", 1)
|
||||
visible_message("<span class='warning'>[user] hits [src] with [W]!</span>", 1)
|
||||
healthcheck()
|
||||
|
||||
/obj/structure/stool/bed/nest/proc/healthcheck()
|
||||
|
||||
@@ -65,7 +65,7 @@ var/global/wcColored
|
||||
if(health <= 0)
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
message_admins("Window destroyed by [Proj.firer.name] ([formatPlayerPanel(Proj.firer,Proj.firer.ckey)]) via \an [Proj]! pdiff = [pdiff] at [formatJumpTo(loc)]!")
|
||||
msg_admin_attack("Window destroyed by [Proj.firer.name] ([formatPlayerPanel(Proj.firer,Proj.firer.ckey)]) via \an [Proj]! pdiff = [pdiff] at [formatJumpTo(loc)]!")
|
||||
log_admin("Window destroyed by ([Proj.firer.ckey]) via \an [Proj]! pdiff = [pdiff] at [loc]!")
|
||||
destroy()
|
||||
return
|
||||
@@ -135,19 +135,19 @@ var/global/wcColored
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
if(M)
|
||||
message_admins("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [M.real_name] ([formatPlayerPanel(M,M.ckey)])!")
|
||||
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [M.real_name] ([formatPlayerPanel(M,M.ckey)])!")
|
||||
log_admin("Window with pdiff [pdiff] at [loc] deanchored by [M.real_name] ([M.ckey])!")
|
||||
else
|
||||
message_admins("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [AM]!")
|
||||
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [AM]!")
|
||||
log_admin("Window with pdiff [pdiff] at [loc] deanchored by [AM]!")
|
||||
if(health <= 0)
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
if(M)
|
||||
message_admins("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [M.real_name] ([formatPlayerPanel(M,M.ckey)])!")
|
||||
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [M.real_name] ([formatPlayerPanel(M,M.ckey)])!")
|
||||
log_admin("Window with pdiff [pdiff] at [loc] destroyed by [M.real_name] ([M.ckey])!")
|
||||
else
|
||||
message_admins("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [AM]!")
|
||||
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [AM]!")
|
||||
log_admin("Window with pdiff [pdiff] at [loc] destroyed by [AM]!")
|
||||
destroy()
|
||||
|
||||
@@ -158,7 +158,7 @@ var/global/wcColored
|
||||
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
message_admins("Window destroyed by hulk [user.real_name] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!")
|
||||
msg_admin_attack("Window destroyed by hulk [user.real_name] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!")
|
||||
log_admin("Window destroyed by hulk [user.real_name] ([user.ckey]) with pdiff [pdiff] at [loc]!")
|
||||
destroy()
|
||||
else if (usr.a_intent == "harm")
|
||||
@@ -183,7 +183,7 @@ var/global/wcColored
|
||||
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
message_admins("Window destroyed by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!")
|
||||
msg_admin_attack("Window destroyed by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!")
|
||||
destroy()
|
||||
else //for nicer text~
|
||||
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
|
||||
@@ -240,7 +240,7 @@ var/global/wcColored
|
||||
return
|
||||
|
||||
if(W.flags & NOBLUDGEON) return
|
||||
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(reinf && state >= 1)
|
||||
state = 3 - state
|
||||
@@ -254,7 +254,7 @@ var/global/wcColored
|
||||
if(!anchored)
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
message_admins("Window with pdiff [pdiff] deanchored by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
|
||||
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
|
||||
log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!")
|
||||
else if(!reinf)
|
||||
anchored = !anchored
|
||||
@@ -264,7 +264,7 @@ var/global/wcColored
|
||||
if(!anchored)
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
message_admins("Window with pdiff [pdiff] deanchored by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
|
||||
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
|
||||
log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!")
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <= 1)
|
||||
state = 1 - state
|
||||
@@ -305,7 +305,7 @@ var/global/wcColored
|
||||
step(src, get_dir(user, src))
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
message_admins("Window with pdiff [pdiff] deanchored by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
|
||||
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
|
||||
log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!")
|
||||
else
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
@@ -325,7 +325,7 @@ var/global/wcColored
|
||||
if(health <= 0)
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
message_admins("Window with pdiff [pdiff] broken at [formatJumpTo(loc)]!")
|
||||
msg_admin_attack("Window with pdiff [pdiff] broken at [formatJumpTo(loc)]!")
|
||||
destroy()
|
||||
return
|
||||
|
||||
|
||||
@@ -65,7 +65,8 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/global_man_up,
|
||||
/client/proc/delbook,
|
||||
/client/proc/event_manager_panel,
|
||||
/client/proc/empty_ai_core_toggle_latejoin
|
||||
/client/proc/empty_ai_core_toggle_latejoin,
|
||||
/client/proc/fax_panel
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
/client/proc/unban_panel,
|
||||
|
||||
+150
-41
@@ -37,18 +37,10 @@
|
||||
if(!src.makeWizard())
|
||||
usr << "\red Unfortunately there weren't enough candidates available."
|
||||
if("7")
|
||||
log_admin("[key_name(usr)] has spawned a nuke team.")
|
||||
if(!src.makeNukeTeam())
|
||||
log_admin("[key_name(usr)] has spawned vampires.")
|
||||
if(!src.makeVampires())
|
||||
usr << "\red Unfortunately there weren't enough candidates available."
|
||||
if("8")
|
||||
log_admin("[key_name(usr)] has spawned a ninja.")
|
||||
src.makeSpaceNinja()
|
||||
if("9")
|
||||
log_admin("[key_name(usr)] has spawned aliens.")
|
||||
src.makeAliens()
|
||||
if("10")
|
||||
log_admin("[key_name(usr)] has spawned a death squad.")
|
||||
if("11")
|
||||
log_admin("[key_name(usr)] has spawned vox raiders.")
|
||||
if(!src.makeVoxRaiders())
|
||||
usr << "\red Unfortunately there weren't enough candidates available."
|
||||
@@ -1569,11 +1561,11 @@
|
||||
usr << "This can only be used on instances of type /mob/living"
|
||||
return
|
||||
|
||||
if(alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Blue Space Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes")
|
||||
if(alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Bluespace Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes")
|
||||
return
|
||||
|
||||
if(BSACooldown)
|
||||
src.owner << "Standby! Reload cycle in progress! Gunnary crews ready in five seconds!"
|
||||
src.owner << "Standby. Reload cycle in progress. Gunnery crews ready in five seconds!"
|
||||
return
|
||||
|
||||
BSACooldown = 1
|
||||
@@ -1605,6 +1597,9 @@
|
||||
M.stuttering = 20
|
||||
|
||||
else if(href_list["CentcommReply"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["CentcommReply"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
@@ -1622,10 +1617,16 @@
|
||||
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\""
|
||||
|
||||
else if(href_list["SyndicateReply"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
if(H.stat != 0)
|
||||
usr << "The person you are trying to contact is not conscious."
|
||||
return
|
||||
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
|
||||
usr << "The person you are trying to contact is not wearing a headset"
|
||||
return
|
||||
@@ -1654,6 +1655,9 @@
|
||||
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your HONKbrothers. Message as follows, HONK. [input]. Message ends, HONK.\""
|
||||
|
||||
else if(href_list["AdminFaxView"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/obj/item/fax = locate(href_list["AdminFaxView"])
|
||||
if (istype(fax, /obj/item/weapon/paper))
|
||||
var/obj/item/weapon/paper/P = fax
|
||||
@@ -1676,6 +1680,9 @@
|
||||
usr << "\red The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]"
|
||||
|
||||
else if (href_list["AdminFaxViewPage"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/page = text2num(href_list["AdminFaxViewPage"])
|
||||
var/obj/item/weapon/paper_bundle/bundle = locate(href_list["paper_bundle"])
|
||||
|
||||
@@ -1689,50 +1696,152 @@
|
||||
H.show(src.owner)
|
||||
return
|
||||
|
||||
else if(href_list["CentcommFaxReply"])
|
||||
var/mob/sender = locate(href_list["CentcommFaxReply"])
|
||||
else if(href_list["AdminFaxCreate"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/sender = locate(href_list["AdminFaxCreate"])
|
||||
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"])
|
||||
var/faxtype = href_list["faxtype"]
|
||||
var/reply_to = locate(href_list["replyto"])
|
||||
var/destination
|
||||
var/notify
|
||||
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(sender)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use <br> for line breaks.", "Outgoing message from Centcomm", "") as message|null
|
||||
if(!input) return
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(null) //hopefully the null loc won't cause trouble for us
|
||||
|
||||
if(!fax)
|
||||
var/list/departmentoptions = alldepartments + "All Departments"
|
||||
destination = input(usr, "To which department?", "Choose a department", "") as null|anything in departmentoptions
|
||||
if(!destination)
|
||||
del(P)
|
||||
return
|
||||
|
||||
var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
|
||||
for(var/obj/machinery/photocopier/faxmachine/F in allfaxes)
|
||||
if(destination != "All Departments" && F.department == destination)
|
||||
fax = F
|
||||
|
||||
var/input = input(src.owner, "Please enter a message to send a fax via secure connection. Use <br> for line breaks. Both pencode and HTML work.", "Outgoing message from Centcomm", "") as message|null
|
||||
if(!input)
|
||||
del(P)
|
||||
return
|
||||
input = P.parsepencode(input) // Encode everything from pencode to html
|
||||
|
||||
var/customname = input(src.owner, "Pick a title for the fax.", "Fax Title") as text|null
|
||||
|
||||
var/stampname
|
||||
var/stamptype
|
||||
var/stampvalue
|
||||
var/sendername
|
||||
switch(faxtype)
|
||||
if("Central Command")
|
||||
stamptype = "icon"
|
||||
stampvalue = "cent"
|
||||
sendername = command_name()
|
||||
if("Syndicate")
|
||||
sendername = "UNKNOWN"
|
||||
if("Administrator")
|
||||
stamptype = input(src.owner, "Pick a stamp type.", "Stamp Type") as null|anything in list("icon","text","none")
|
||||
if(stamptype == "icon")
|
||||
stampname = input(src.owner, "Pick a stamp icon.", "Stamp Icon") as null|anything in list("centcom","granted","denied","clown")
|
||||
switch(stampname)
|
||||
if("centcom")
|
||||
stampvalue = "cent"
|
||||
if("granted")
|
||||
stampvalue = "ok"
|
||||
if("denied")
|
||||
stampvalue = "deny"
|
||||
if("clown")
|
||||
stampvalue = "clown"
|
||||
else if(stamptype == "text")
|
||||
stampvalue = input(src.owner, "What should the stamp say?", "Stamp Text") as text|null
|
||||
else if(stamptype == "none")
|
||||
stamptype = ""
|
||||
else
|
||||
del(P)
|
||||
return
|
||||
|
||||
sendername = input(src.owner, "What organization does the fax come from? This determines the prefix of the paper (i.e. Central Command- Title). This is optional.", "Organization") as text|null
|
||||
|
||||
if(sender)
|
||||
notify = alert(src.owner, "Would you like to inform the original sender that a fax has arrived?","Notify Sender","Yes","No")
|
||||
|
||||
// Create the reply message
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( null ) //hopefully the null loc won't cause trouble for us
|
||||
P.name = "[command_name()]- [customname]"
|
||||
if(sendername)
|
||||
P.name = "[sendername]- [customname]"
|
||||
else
|
||||
P.name = "[customname]"
|
||||
P.info = input
|
||||
P.update_icon()
|
||||
P.stamps += "<HR><img src=large_stamp-cent.png>"
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
P.x = rand(-2, 0)
|
||||
P.y = rand(-1, 2)
|
||||
P.offset_x += P.x
|
||||
P.offset_y += P.y
|
||||
stampoverlay.pixel_x = P.x
|
||||
stampoverlay.pixel_y = P.y
|
||||
|
||||
if(stamptype)
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
stampoverlay.pixel_x = P.x
|
||||
stampoverlay.pixel_y = P.y
|
||||
|
||||
if(!P.ico)
|
||||
P.ico = new
|
||||
P.ico += "paper_stamp-cent"
|
||||
stampoverlay.icon_state = "paper_stamp-cent"
|
||||
|
||||
// Stamps
|
||||
if(!P.stamped)
|
||||
P.stamped = new
|
||||
P.stamped += /obj/item/weapon/stamp/centcom
|
||||
P.overlays += stampoverlay
|
||||
if(!P.ico)
|
||||
P.ico = new
|
||||
P.ico += "paper_stamp-[stampvalue]"
|
||||
stampoverlay.icon_state = "paper_stamp-[stampvalue]"
|
||||
|
||||
if(fax.recievefax(P))
|
||||
src.owner << "\blue Message reply to transmitted successfully."
|
||||
log_admin("[key_name(src.owner)] replied to a fax message from [key_name(sender)]: [input]")
|
||||
message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(sender)]", 1)
|
||||
if(stamptype == "icon")
|
||||
if(!P.stamped)
|
||||
P.stamped = new
|
||||
P.stamped += /obj/item/weapon/stamp/centcom
|
||||
P.overlays += stampoverlay
|
||||
P.stamps += "<HR><img src=large_stamp-[stampvalue].png>"
|
||||
|
||||
else if(stamptype == "text")
|
||||
if(!P.stamped)
|
||||
P.stamped = new
|
||||
P.stamped += /obj/item/weapon/stamp
|
||||
P.overlays += stampoverlay
|
||||
P.stamps += "<HR><i>[stampvalue]</i>"
|
||||
|
||||
if(destination != "All Departments")
|
||||
if(!fax.receivefax(P))
|
||||
src.owner << "\red Message transmission failed."
|
||||
return
|
||||
else
|
||||
src.owner << "\red Message reply failed."
|
||||
|
||||
spawn(100)
|
||||
del(P)
|
||||
for(var/obj/machinery/photocopier/faxmachine/F in allfaxes)
|
||||
if(F.z == 1)
|
||||
if(!F.receivefax(P))
|
||||
src.owner << "\red Message transmission to [F.department] failed."
|
||||
|
||||
var/datum/fax/admin/A = new /datum/fax/admin()
|
||||
A.name = P.name
|
||||
A.from_department = faxtype
|
||||
if(destination != "All Departments")
|
||||
A.to_department = fax.department
|
||||
else
|
||||
A.to_department = "All Departments"
|
||||
A.origin = "Administrator"
|
||||
A.message = P
|
||||
A.reply_to = reply_to
|
||||
A.sent_by = usr
|
||||
A.sent_at = world.time
|
||||
|
||||
src.owner << "\blue Message transmitted successfully."
|
||||
if(notify == "Yes")
|
||||
var/mob/living/carbon/human/H = sender
|
||||
if(istype(H) && H.stat == 1 && (istype(H.l_ear, /obj/item/device/radio/headset) || istype(H.r_ear, /obj/item/device/radio/headset)))
|
||||
sender << "Your headset pings, notifying you that a reply to your fax has arrived."
|
||||
if(sender)
|
||||
log_admin("[key_name(src.owner)] replied to a fax message from [key_name(sender)]: [input]")
|
||||
message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(sender)] (<a href='?_src_=holder;AdminFaxView=\ref[P]'>VIEW</a>).", 1)
|
||||
else
|
||||
log_admin("[key_name(src.owner)] sent a fax message to [destination]: [input]")
|
||||
message_admins("[key_name_admin(src.owner)] sent a fax message to [destination] (<a href='?_src_=holder;AdminFaxView=\ref[P]'>VIEW</a>).", 1)
|
||||
return
|
||||
|
||||
else if(href_list["refreshfaxpanel"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
fax_panel(usr)
|
||||
|
||||
else if(href_list["jumpto"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
@@ -14,23 +14,14 @@ client/proc/one_click_antag()
|
||||
|
||||
var/dat = {"<B>One-click Antagonist</B><br>
|
||||
<a href='?src=\ref[src];makeAntag=1'>Make Traitors</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=2'>Make Changlings</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=3'>Make Revs</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=2'>Make Changelings</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=3'>Make Revolutionaries</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=4'>Make Cult</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=5'>Make Malf AI</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=6'>Make Wizard (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=11'>Make Vox Raiders (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=7'>Make Vampires</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=8'>Make Vox Raiders (Requires Ghosts)</a><br>
|
||||
"}
|
||||
/* These dont work just yet
|
||||
Ninja, aliens and deathsquad I have not looked into yet
|
||||
Nuke team is getting a null mob returned from makebody() (runtime error: null.mind. Line 272)
|
||||
|
||||
<a href='?src=\ref[src];makeAntag=7'>Make Nuke Team (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=8'>Make Space Ninja (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=9'>Make Aliens (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=10'>Make Deathsquad (Syndicate) (Requires Ghosts)</a><br>
|
||||
"}
|
||||
*/
|
||||
usr << browse(dat, "window=oneclickantag;size=400x400")
|
||||
return
|
||||
|
||||
@@ -42,7 +33,7 @@ client/proc/one_click_antag()
|
||||
var/datum/mind/themind = null
|
||||
|
||||
for(var/mob/living/silicon/ai/ai in player_list)
|
||||
if(ai.client)
|
||||
if(ai.client && ai.client.prefs.be_special & BE_MALF)
|
||||
AIs += ai
|
||||
|
||||
if(AIs.len)
|
||||
@@ -67,12 +58,14 @@ client/proc/one_click_antag()
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
if(applicant.client.prefs.be_special & BE_TRAITOR)
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
if(player_old_enough_antag(applicant.client,BE_TRAITOR))
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.mind.assigned_role in temp.restricted_jobs))
|
||||
if(!(applicant.client.prefs.species in temp.protected_species))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numTratiors = min(candidates.len, 3)
|
||||
@@ -99,12 +92,14 @@ client/proc/one_click_antag()
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
if(applicant.client.prefs.be_special & BE_CHANGELING)
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "changeling") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
if(player_old_enough_antag(applicant.client,BE_CHANGELING))
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "changeling") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.mind.assigned_role in temp.restricted_jobs))
|
||||
if(!(applicant.client.prefs.species in temp.protected_species))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numChanglings = min(candidates.len, 3)
|
||||
@@ -129,12 +124,14 @@ client/proc/one_click_antag()
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
if(applicant.client.prefs.be_special & BE_REV)
|
||||
if(applicant.stat == CONSCIOUS)
|
||||
if(applicant.mind)
|
||||
if(!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "revolutionary") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
if(player_old_enough_antag(applicant.client,BE_REV))
|
||||
if(applicant.stat == CONSCIOUS)
|
||||
if(applicant.mind)
|
||||
if(!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "revolutionary") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.mind.assigned_role in temp.restricted_jobs))
|
||||
if(!(applicant.client.prefs.species in temp.protected_species))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numRevs = min(candidates.len, 3)
|
||||
@@ -153,17 +150,19 @@ client/proc/one_click_antag()
|
||||
var/time_passed = world.time
|
||||
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
|
||||
spawn(0)
|
||||
switch(G.timed_alert("Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","No",300,"Yes","No"))//alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
else
|
||||
return
|
||||
if(G.client.prefs.be_special & BE_WIZARD)
|
||||
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
|
||||
if(player_old_enough_antag(G.client,BE_WIZARD))
|
||||
spawn(0)
|
||||
switch(G.timed_alert("Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","No",300,"Yes","No"))//alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
sleep(300)
|
||||
|
||||
@@ -194,12 +193,14 @@ client/proc/one_click_antag()
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
if(applicant.client.prefs.be_special & BE_CULTIST)
|
||||
if(applicant.stat == CONSCIOUS)
|
||||
if(applicant.mind)
|
||||
if(!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
if(player_old_enough_antag(applicant.client,BE_CULTIST))
|
||||
if(applicant.stat == CONSCIOUS)
|
||||
if(applicant.mind)
|
||||
if(!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.mind.assigned_role in temp.restricted_jobs))
|
||||
if(!(applicant.client.prefs.species in temp.protected_species))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numCultists = min(candidates.len, 4)
|
||||
@@ -223,17 +224,19 @@ client/proc/one_click_antag()
|
||||
var/time_passed = world.time
|
||||
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate"))
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for a nuke team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
else
|
||||
return
|
||||
if(G.client.prefs.be_special & BE_OPERATIVE)
|
||||
if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate"))
|
||||
if(player_old_enough_antag(G.client,BE_OPERATIVE))
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for a nuke team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
sleep(300)
|
||||
|
||||
@@ -328,16 +331,17 @@ client/proc/one_click_antag()
|
||||
|
||||
//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
|
||||
for(var/mob/G in respawnable_list)
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
if(!jobban_isbanned(G, "Syndicate"))
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
else
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
else
|
||||
return
|
||||
sleep(300)
|
||||
|
||||
for(var/mob/dead/observer/G in candidates)
|
||||
@@ -445,16 +449,19 @@ client/proc/one_click_antag()
|
||||
|
||||
//Generates a list of candidates from active ghosts.
|
||||
for(var/mob/G in respawnable_list)
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for a vox raiding party arriving on the station?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
else
|
||||
return
|
||||
if(G.client.prefs.be_special & BE_RAIDER)
|
||||
if(player_old_enough_antag(G.client,BE_RAIDER))
|
||||
if(!jobban_isbanned(G, "raider") && !jobban_isbanned(G, "Syndicate"))
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for a vox raiding party arriving on the station?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
sleep(300) //Debug.
|
||||
|
||||
@@ -532,4 +539,36 @@ client/proc/one_click_antag()
|
||||
ticker.mode.traitors += new_vox.mind
|
||||
new_vox.equip_vox_raider()
|
||||
|
||||
return new_vox
|
||||
return new_vox
|
||||
|
||||
/datum/admins/proc/makeVampires()
|
||||
|
||||
var/datum/game_mode/vampire/temp = new
|
||||
if(config.protect_roles_from_antagonist)
|
||||
temp.restricted_jobs += temp.protected_jobs
|
||||
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
if(applicant.client.prefs.be_special & BE_VAMPIRE)
|
||||
if(player_old_enough_antag(applicant.client,BE_VAMPIRE))
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "vampire") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
if(!(applicant.client.prefs.species in temp.protected_species))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numVampires = min(candidates.len, 3)
|
||||
|
||||
for(var/i = 0, i<numVampires, i++)
|
||||
H = pick(candidates)
|
||||
H.make_vampire()
|
||||
candidates.Remove(H)
|
||||
|
||||
return 1
|
||||
|
||||
return 0
|
||||
@@ -71,8 +71,8 @@
|
||||
..()
|
||||
if((ishuman(hit_atom)))
|
||||
var/mob/living/carbon/human/H = hit_atom
|
||||
if(src in H.r_hand) return
|
||||
if(src in H.l_hand) return
|
||||
if(H.r_hand == src) return
|
||||
if(H.l_hand == src) return
|
||||
var/mob/A = H.LAssailant
|
||||
if((H in team_alpha) && (A in team_alpha))
|
||||
A << "\red He's on your team!"
|
||||
@@ -85,6 +85,6 @@
|
||||
return
|
||||
else
|
||||
playsound(src, 'sound/items/dodgeball.ogg', 50, 1)
|
||||
visible_message("\red [H] HAS BEEN ELIMINATED!!", 3)
|
||||
visible_message("\red [H] HAS BEEN ELIMINATED!", 3)
|
||||
H.melt()
|
||||
return
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
/proc/Syndicate_announce(var/text , var/mob/Sender)
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
msg = "\blue <b><font color=crimson>SYNDICATE:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
msg = "\blue <b><font color='#DC143C'>SYNDICATE:</font> [key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>REPLY</A>):</b> [msg]"
|
||||
|
||||
var/list/eventholders = list()
|
||||
var/list/banholders = list()
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
if(!status)
|
||||
status = 1
|
||||
bombers += "[key_name(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]"
|
||||
message_admins("[key_name_admin(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]")
|
||||
msg_admin_attack("[key_name_admin(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]")
|
||||
user << "<span class='notice'>A pressure hole has been bored to [bombtank] valve. \The [bombtank] can now be ignited.</span>"
|
||||
else
|
||||
status = 0
|
||||
|
||||
@@ -20,20 +20,20 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
|
||||
"malf AI" = IS_MODE_COMPILED("malfunction") // 13
|
||||
)
|
||||
var/global/list/special_role_times = list( //minimum age (in days) for accounts to play these roles
|
||||
num2text(BE_TRAITOR) = 14,
|
||||
num2text(BE_OPERATIVE) = 21,
|
||||
num2text(BE_PAI) = 0,
|
||||
num2text(BE_TRAITOR) = 7,
|
||||
num2text(BE_CHANGELING) = 14,
|
||||
num2text(BE_WIZARD) = 21,
|
||||
num2text(BE_MALF) = 30,
|
||||
num2text(BE_WIZARD) = 14,
|
||||
num2text(BE_REV) = 14,
|
||||
num2text(BE_ALIEN) = 21,
|
||||
num2text(BE_PAI) = 0,
|
||||
num2text(BE_CULTIST) = 21,
|
||||
num2text(BE_NINJA) = 21,
|
||||
num2text(BE_RAIDER) = 21,
|
||||
num2text(BE_VAMPIRE) = 14,
|
||||
num2text(BE_BLOB) = 14,
|
||||
num2text(BE_OPERATIVE) = 21,
|
||||
num2text(BE_CULTIST) = 21,
|
||||
num2text(BE_RAIDER) = 21,
|
||||
num2text(BE_ALIEN) = 21,
|
||||
num2text(BE_NINJA) = 21,
|
||||
num2text(BE_MUTINEER) = 21,
|
||||
num2text(BE_BLOB) = 14
|
||||
num2text(BE_MALF) = 30
|
||||
)
|
||||
|
||||
/proc/player_old_enough_antag(client/C, role)
|
||||
|
||||
@@ -93,13 +93,13 @@
|
||||
if (src.chained)
|
||||
src.chained = null
|
||||
src.slowdown = SHOES_SLOWDOWN
|
||||
new /obj/item/weapon/handcuffs( user.loc )
|
||||
new /obj/item/weapon/restraints/handcuffs( user.loc )
|
||||
src.icon_state = "orange"
|
||||
return
|
||||
|
||||
/obj/item/clothing/shoes/orange/attackby(H as obj, loc)
|
||||
..()
|
||||
if ((istype(H, /obj/item/weapon/handcuffs) && !( src.chained )))
|
||||
if ((istype(H, /obj/item/weapon/restraints/handcuffs) && !( src.chained )))
|
||||
//H = null
|
||||
if (src.icon_state != "orange") return
|
||||
del(H)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
// Can't be equipped by any other species due to bone structure and vox cybernetics.
|
||||
/obj/item/clothing/suit/space/vox
|
||||
w_class = 3
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank)
|
||||
slowdown = 2
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
siemens_coefficient = 0.6
|
||||
@@ -259,7 +259,7 @@
|
||||
|
||||
/obj/item/clothing/suit/space/plasmaman
|
||||
w_class = 3
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box/magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box/magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank)
|
||||
slowdown = 2
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 0)
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
permeability_coefficient = 0.02
|
||||
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | ONESIZEFITSALL
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs)
|
||||
slowdown = 1.5
|
||||
armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50)
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT||HIDETAIL
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
icon_state = "ert_commander"
|
||||
item_state = "suit-command"
|
||||
w_class = 3
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank)
|
||||
slowdown = 1
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 60)
|
||||
allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, \
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
icon_state = "caparmor"
|
||||
item_state = "capspacesuit"
|
||||
w_class = 4
|
||||
allowed = list(/obj/item/weapon/tank, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
|
||||
allowed = list(/obj/item/weapon/tank, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs)
|
||||
slowdown = 1
|
||||
armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50)
|
||||
siemens_coefficient = 0.7
|
||||
@@ -35,7 +35,7 @@
|
||||
desc = "A heavily armored, advanced space suit that protects against most forms of damage."
|
||||
icon_state = "deathsquad"
|
||||
item_state = "swat_suit"
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank)
|
||||
armor = list(melee = 80, bullet = 80, laser = 50,energy = 50, bomb = 100, bio = 100, rad = 100)
|
||||
slowdown = 1
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
@@ -92,7 +92,7 @@
|
||||
icon_state = "pirate"
|
||||
item_state = "pirate"
|
||||
w_class = 3
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank)
|
||||
slowdown = 0
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
siemens_coefficient = 0.9
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
desc = "A unique, vaccum-proof suit of nano-enhanced armor designed specifically for Spider Clan assassins."
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja_suit"
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank,/obj/item/weapon/stock_parts/cell,/obj/item/device/suit_cooling_unit)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank,/obj/item/weapon/stock_parts/cell,/obj/item/device/suit_cooling_unit)
|
||||
slowdown = 0
|
||||
unacidable = 1
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
|
||||
@@ -398,7 +398,7 @@
|
||||
slowdown = 1
|
||||
w_class = 3
|
||||
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 50)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box/magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box/magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank)
|
||||
siemens_coefficient = 0.6
|
||||
species_restricted = list("exclude","Unathi","Tajaran","Skrell","Vox")
|
||||
sprite_sheets = null
|
||||
@@ -469,7 +469,7 @@
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has an additional layer of armor."
|
||||
item_state = "sec_hardsuit"
|
||||
armor = list(melee = 30, bullet = 15, laser = 30, energy = 10, bomb = 10, bio = 100, rad = 50)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/handcuffs)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/restraints/handcuffs)
|
||||
siemens_coefficient = 0.7
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
item_state = "space_suit_syndicate"
|
||||
desc = "Has a tag on it: Totally not property of of a hostile corporation, honest!"
|
||||
w_class = 3
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank)
|
||||
slowdown = 1
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
siemens_coefficient = 0.8
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
/obj/item/clothing/suit/armor
|
||||
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/device/flashlight/seclite,/obj/item/weapon/melee/telebaton)
|
||||
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/flashlight/seclite,/obj/item/weapon/melee/telebaton)
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
flags = FPRINT | TABLEPASS
|
||||
cold_protection = UPPER_TORSO|LOWER_TORSO
|
||||
@@ -147,7 +147,7 @@
|
||||
item_state = "armor"
|
||||
blood_overlay_type = "armor"
|
||||
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/device/flashlight,/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder)
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/device/flashlight,/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder)
|
||||
|
||||
|
||||
//Reactive armor
|
||||
@@ -199,7 +199,7 @@
|
||||
item_state = "centcom"
|
||||
w_class = 4//bulky item
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
|
||||
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
|
||||
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
item_state = "det_suit"
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/device/flashlight,/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder)
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/device/flashlight,/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder)
|
||||
armor = list(melee = 50, bullet = 10, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0)
|
||||
cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
@@ -148,7 +148,7 @@
|
||||
desc = "A forensics technician jacket."
|
||||
item_state = "det_suit"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/device/detective_scanner,/obj/item/device/taperecorder)
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/detective_scanner,/obj/item/device/taperecorder)
|
||||
armor = list(melee = 10, bullet = 10, laser = 15, energy = 10, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
/obj/item/clothing/suit/storage/forensics/red
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
/obj/item/clothing/suit/bomb_suit/security
|
||||
icon_state = "bombsuitsec"
|
||||
item_state = "bombsuitsec"
|
||||
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
|
||||
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs)
|
||||
|
||||
/*
|
||||
* Radiation protection
|
||||
|
||||
@@ -189,17 +189,7 @@
|
||||
user.visible_message("\red [user] displays their NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.","\red You display your NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.")
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
|
||||
if (istype(O, /obj/item/weapon/card/emag))
|
||||
if (emagged)
|
||||
user << "\red [src] is already cracked."
|
||||
return
|
||||
else
|
||||
emagged = 1
|
||||
user << "\red You swipe [O] and crack the holobadge security checks."
|
||||
return
|
||||
|
||||
else if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda))
|
||||
if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda))
|
||||
|
||||
var/obj/item/weapon/card/id/id_card = null
|
||||
|
||||
@@ -218,6 +208,15 @@
|
||||
user << "[src] rejects your insufficient access rights."
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/emag_act(user as mob)
|
||||
if (emagged)
|
||||
user << "\red [src] is already cracked."
|
||||
return
|
||||
else
|
||||
emagged = 1
|
||||
user << "\red You swipe the card and crack the holobadge security checks."
|
||||
return
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/attack(mob/living/carbon/human/M, mob/living/user)
|
||||
if(isliving(user))
|
||||
|
||||
@@ -85,6 +85,15 @@
|
||||
var/dualslot = 0 // faster than typechecking
|
||||
attackby_types = list(/obj/item/weapon/card)
|
||||
|
||||
emag_act(user as mob)
|
||||
if(!writer)
|
||||
usr << "You insert \the card, and the computer grinds, sparks, and beeps. After a moment, the card ejects itself."
|
||||
computer.emagged = 1
|
||||
return 1
|
||||
else
|
||||
usr << "You are unable to insert \the card, as the reader slot is occupied"
|
||||
return 0
|
||||
|
||||
attackby(var/obj/item/I as obj, var/mob/user as mob)
|
||||
if(istype(I,/obj/item/weapon/card))
|
||||
insert(I)
|
||||
@@ -102,14 +111,6 @@
|
||||
usr << "This device has only one card slot"
|
||||
return 0
|
||||
|
||||
if(istype(card,/obj/item/weapon/card/emag)) // emag reader slot
|
||||
if(!writer)
|
||||
usr << "You insert \the [card], and the computer grinds, sparks, and beeps. After a moment, the card ejects itself."
|
||||
computer.emagged = 1
|
||||
return 1
|
||||
else
|
||||
usr << "You are unable to insert \the [card], as the reader slot is occupied"
|
||||
|
||||
var/mob/living/L = usr
|
||||
switch(slot)
|
||||
if(1)
|
||||
@@ -132,7 +133,6 @@
|
||||
else
|
||||
usr << "There is already something in the reader slot."
|
||||
|
||||
|
||||
// Usage of insert() preferred, as it also tells result to the user.
|
||||
proc/equip_to_reader(var/obj/item/weapon/card/card, var/mob/living/L)
|
||||
if(!reader)
|
||||
|
||||
@@ -68,9 +68,7 @@
|
||||
authenticated = 1
|
||||
if(access_captain in I.GetAccess())
|
||||
authenticated = 2
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
authenticated = 2
|
||||
computer.emagged = 1
|
||||
|
||||
if("logout" in href_list)
|
||||
authenticated = 0
|
||||
|
||||
|
||||
@@ -60,11 +60,13 @@
|
||||
world << "\blue <B>All authorizations to shorting time for shuttle launch have been revoked!</B>"
|
||||
src.authorized.len = 0
|
||||
src.authorized = list( )
|
||||
|
||||
else if (istype(W, /obj/item/card/emag) && !emagged)
|
||||
return
|
||||
|
||||
emag_act(user as mob)
|
||||
if (!emagged)
|
||||
var/choice = alert(user, "Would you like to launch the shuttle?","Shuttle control", "Launch", "Cancel")
|
||||
|
||||
if(!emagged && emergency_shuttle.location == 1 && user.get_active_hand() == W)
|
||||
if(!emagged && emergency_shuttle.location == 1)
|
||||
switch(choice)
|
||||
if("Launch")
|
||||
world << "\blue <B>Alert: Shuttle launch time shortened to 10 seconds!</B>"
|
||||
@@ -72,4 +74,3 @@
|
||||
emagged = 1
|
||||
if("Cancel")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -125,13 +125,13 @@ var/global/list/all_money_accounts = list()
|
||||
var/money = 0
|
||||
var/suspended = 0
|
||||
var/list/transaction_log = list()
|
||||
var/security_level = 1 //0 - auto-identify from worn ID, require only account number
|
||||
var/security_level = 0 //0 - auto-identify from worn ID, require only account number
|
||||
//1 - require manual login / account number and pin
|
||||
//2 - require card and manual login
|
||||
|
||||
/datum/money_account/New()
|
||||
..()
|
||||
security_level = pick (0,1) //Stealing is now slightly viable
|
||||
//security_level = pick (0,1) //Stealing is now slightly viable
|
||||
|
||||
/datum/transaction
|
||||
var/target_name = ""
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user