This commit is contained in:
RavingManiac
2014-09-05 00:27:58 +08:00
76 changed files with 2255 additions and 1942 deletions

View File

@@ -102,20 +102,20 @@
if(L)
return
var/obj/item/stack/rods/R = C
user << "\blue Constructing support lattice ..."
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1)
ReplaceWithLattice()
R.use(1)
if (R.use(1))
user << "\blue Constructing support lattice ..."
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1)
ReplaceWithLattice()
return
if (istype(C, /obj/item/stack/tile/plasteel))
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
if(L)
var/obj/item/stack/tile/plasteel/S = C
del(L)
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1)
S.build(src)
S.use(1)
if (S.use(1))
del(L)
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1)
S.build(src)
return
else
user << "\red The plating is going to need some support."

View File

@@ -14,7 +14,8 @@
name = "tape"
icon = 'icons/policetape.dmi'
anchored = 1
density = 1
var/lifted = 0
var/crumpled = 0
var/icon_base
/obj/item/taperoll/police
@@ -97,8 +98,8 @@
//is_blocked_turf(var/turf/T)
usr << "\blue You finish placing the [src]." //Git Test
/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob, proximity)
if (proximity && istype(A, /obj/machinery/door/airlock))
/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob)
if (istype(A, /obj/machinery/door/airlock))
var/turf/T = get_turf(A)
var/obj/item/tape/P = new tape_type(T.x,T.y,T.z)
P.loc = locate(T.x,T.y,T.z)
@@ -106,19 +107,20 @@
P.layer = 3.2
user << "\blue You finish placing the [src]."
/obj/item/tape/Bumped(M as mob)
if(src.allowed(M))
var/turf/T = get_turf(src)
M:loc = T
/obj/item/tape/proc/crumple()
if(!crumpled)
crumpled = 1
icon_state = "[icon_state]_c"
name = "crumpled [name]"
/obj/item/tape/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(!density) return 1
if(air_group || (height==0)) return 1
if ((mover.flags & 2 || istype(mover, /obj/effect/meteor) || mover.throwing == 1) )
return 1
else
return 0
if(!lifted && ismob(mover))
var/mob/M = mover
add_fingerprint(M)
if (!allowed(M)) //only select few learn art of not crumpling the tape
M << "<span class='warning'>You are not supposed to go past [src]...</span>"
crumple()
return ..(mover)
/obj/item/tape/attackby(obj/item/weapon/W as obj, mob/user as mob)
breaktape(W, user)
@@ -126,9 +128,10 @@
/obj/item/tape/attack_hand(mob/user as mob)
if (user.a_intent == "help" && src.allowed(user))
user.show_viewers("\blue [user] lifts [src], allowing passage.")
src.density = 0
crumple()
lifted = 1
spawn(200)
src.density = 1
lifted = 0
else
breaktape(null, user)

View File

@@ -66,6 +66,10 @@
G.fields["m_stat"] = "Stable"
G.fields["sex"] = H.gender
G.fields["species"] = H.get_species()
G.fields["home_system"] = H.home_system
G.fields["citizenship"] = H.citizenship
G.fields["faction"] = H.personal_faction
G.fields["religion"] = H.religion
G.fields["photo_front"] = front
G.fields["photo_side"] = side
if(H.gen_record && !jobban_isbanned(H, "Records"))
@@ -116,12 +120,22 @@
L.fields["name"] = H.real_name
L.fields["rank"] = H.mind.assigned_role
L.fields["age"] = H.age
L.fields["fingerprint"] = md5(H.dna.uni_identity)
L.fields["sex"] = H.gender
L.fields["b_type"] = H.b_type
L.fields["b_dna"] = H.dna.unique_enzymes
L.fields["enzymes"] = H.dna.SE // Used in respawning
L.fields["identity"] = H.dna.UI // "
L.fields["species"] = H.get_species()
L.fields["home_system"] = H.home_system
L.fields["citizenship"] = H.citizenship
L.fields["faction"] = H.personal_faction
L.fields["religion"] = H.religion
L.fields["image"] = getFlatIcon(H) //This is god-awful
if(H.exploit_record && !jobban_isbanned(H, "Records"))
L.fields["exploit_record"] = H.exploit_record
else
L.fields["exploit_record"] = "No additional information acquired."
locked += L
return

View File

@@ -303,7 +303,7 @@ var/global/list/PDA_Manifest = list()
throw_speed = 1
throw_range = 20
flags = FPRINT | TABLEPASS | CONDUCT
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
user.drop_item()
src.throw_at(target, throw_range, throw_speed, user)

View File

@@ -14,6 +14,10 @@
G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable"
G.fields["species"] = "Human"
G.fields["home_system"] = "Unknown"
G.fields["citizenship"] = "Unknown"
G.fields["faction"] = "Unknown"
G.fields["religion"] = "Unknown"
G.fields["photo_front"] = front
G.fields["photo_side"] = side
data_core.general += G

View File

@@ -624,37 +624,53 @@ var/list/ghostteleportlocs = list()
//Maintenance
/area/maintenance/aft
name = "Aft Maintenance"
icon_state = "amaint"
/area/maintenance/fore
name = "Fore Maintenance"
icon_state = "fmaint"
/area/maintenance/starboard
name = "Starboard Maintenance"
icon_state = "smaint"
/area/maintenance/port
name = "Port Maintenance"
icon_state = "pmaint"
/area/maintenance/atmos_control
name = "Atmospherics Maintenance"
icon_state = "fpmaint"
/area/maintenance/fpmaint
name = "EVA Maintenance"
name = "Fore Port Maintenance - 1"
icon_state = "fpmaint"
/area/maintenance/fpmaint2
name = "Arrivals North Maintenance"
name = "Fore Port Maintenance - 2"
icon_state = "fpmaint"
/area/maintenance/fsmaint
name = "Dormitory Maintenance"
name = "Fore Starboard Maintenance - 1"
icon_state = "fsmaint"
/area/maintenance/fsmaint2
name = "Bar Maintenance"
name = "Fore Starboard Maintenance - 2"
icon_state = "fsmaint"
/area/maintenance/asmaint
name = "Medbay Maintenance"
name = "Aft Starboard Maintenance"
icon_state = "asmaint"
/area/maintenance/engi_shuttle
name = "Engineering Shuttle Access"
icon_state = "asmaint"
icon_state = "maint_e_shuttle"
/area/maintenance/engi_engine
name = "Engine Maintenance"
icon_state = "asmaint"
icon_state = "maint_engine"
/area/maintenance/asmaint2
name = "Science Maintenance"
@@ -668,37 +684,69 @@ var/list/ghostteleportlocs = list()
name = "Bridge Maintenance"
icon_state = "maintcentral"
/area/maintenance/fore
name = "Fore Maintenance"
icon_state = "fmaint"
/area/maintenance/arrivals
name = "Arrivals Maintenance"
icon_state = "maint_arrivals"
/area/maintenance/starboard
name = "Starboard Maintenance"
icon_state = "smaint"
/area/maintenance/bar
name = "Bar Maintenance"
icon_state = "maint_bar"
/area/maintenance/port
name = "Locker Room Maintenance"
icon_state = "pmaint"
/area/maintenance/aft
name = "Engineering Maintenance"
icon_state = "amaint"
/area/maintenance/storage
name = "Atmospherics"
icon_state = "green"
/area/maintenance/incinerator
name = "\improper Incinerator"
icon_state = "disposal"
/area/maintenance/cargo
name = "Cargo Maintenance"
icon_state = "maint_cargo"
/area/maintenance/disposal
name = "Waste Disposal"
icon_state = "disposal"
/area/maintenance/engineering
name = "Engineering Maintenance"
icon_state = "maint_engineering"
/area/maintenance/evahallway
name = "\improper EVA Hallway"
icon_state = "eva"
name = "\improper EVA Maintenance"
icon_state = "maint_eva"
/area/maintenance/incinerator
name = "\improper Incinerator"
icon_state = "disposal"
/area/maintenance/locker
name = "Locker Room Maintenance"
icon_state = "maint_locker"
/area/maintenance/medbay
name = "Medbay Maintenance"
icon_state = "maint_medbay"
/area/maintenance/misc_research
name = "Misc. Research Maintenance"
icon_state = "maint_misc_research"
/area/maintenance/research_shuttle
name = "Research Shuttle Dock Maintenance"
icon_state = "maint_r_shuttle"
/area/maintenance/security_port
name = "Port Security Maintenance"
icon_state = "maint_security_port"
/area/maintenance/security_starboard
name = "Starboard Security Maintenance"
icon_state = "maint_security_starboard"
/area/maintenance/storage
name = "Atmospherics"
icon_state = "green"
/area/maintenance/virology
name = "Virology Maintenance"
icon_state = "maint_viro"
/area/maintenance/xeno
name = "Xeno Maintenance"
icon_state = "maint_xeno"
// SUBSTATIONS (Subtype of maint, that should let them serve as shielded area during radstorm)
@@ -801,22 +849,6 @@ var/list/ghostteleportlocs = list()
name = "\improper Courtroom"
icon_state = "courtroom"
/area/crew_quarters/heads
name = "\improper Head of Personnel's Office"
icon_state = "head_quarters"
/area/crew_quarters/hor
name = "\improper Research Director's Office"
icon_state = "head_quarters"
/area/crew_quarters/hos
name = "\improper Head of Security's Office"
icon_state = "head_quarters"
/area/crew_quarters/chief
name = "\improper Chief Engineer's Office"
icon_state = "head_quarters"
/area/mint
name = "\improper Mint"
icon_state = "green"
@@ -1043,10 +1075,6 @@ var/list/ghostteleportlocs = list()
name = "\improper Engineering Break Room"
icon_state = "engine"
chiefs_office
name = "\improper Chief Engineer's office"
icon_state = "engine_control"
hallway
name = "\improper Engineering Hallway"
icon_state = "engine_hallway"
@@ -1119,6 +1147,9 @@ var/list/ghostteleportlocs = list()
name = "Fore Starboard Solar Maintenance"
icon_state = "SolarcontrolA"
/area/maintenance/foresolar
name = "Fore Solar Maintenance"
icon_state = "SolarcontrolA"
/area/assembly/chargebay
name = "\improper Mech Bay"
@@ -1190,7 +1221,7 @@ var/list/ghostteleportlocs = list()
icon_state = "medbay3"
music = 'sound/ambience/signal.ogg'
/area/medical/medbreak
/area/crew_quarters/medbreak
name = "\improper Break Room"
icon_state = "medbay3"
music = 'sound/ambience/signal.ogg'
@@ -1310,10 +1341,6 @@ var/list/ghostteleportlocs = list()
name = "\improper Armory"
icon_state = "Warden"
/area/security/hos
name = "\improper Head of Security's Office"
icon_state = "sec_hos"
/area/security/detectives_office
name = "\improper Detective's Office"
icon_state = "detective"

View File

@@ -74,6 +74,6 @@ datum/directive/research_to_ripleys/get_remaining_orders()
for(var/atom/A in sold)
if(istype(A, /obj/item/stack/sheet/mineral) || istype(A, /obj/item/stack/sheet/metal))
var/obj/item/stack/S = A
D.materials_shipped += S.amount
D.materials_shipped += S.get_amount()
return 1

View File

@@ -928,8 +928,10 @@ datum
var/target_amount = 10
var/found_amount = 0.0//Always starts as zero.
for(var/obj/item/I in owner.current.get_contents())
if(!istype(I, steal_target)) continue//If it's not actually that item.
found_amount += I:amount
if(!istype(I, steal_target))
continue//If it's not actually that item.
var/obj/item/stack/sheet/diamond/D = I
found_amount += D.get_amount()
return found_amount>=target_amount
gold
@@ -957,8 +959,10 @@ datum
var/target_amount = 50
var/found_amount = 0.0//Always starts as zero.
for(var/obj/item/I in owner.current.get_contents())
if(!istype(I, steal_target)) continue//If it's not actually that item.
found_amount += I:amount
if(!istype(I, steal_target))
continue//If it's not actually that item.
var/obj/item/stack/sheet/gold/G = I
found_amount += G.get_amount()
return found_amount>=target_amount
uranium
@@ -986,8 +990,10 @@ datum
var/target_amount = 25
var/found_amount = 0.0//Always starts as zero.
for(var/obj/item/I in owner.current.get_contents())
if(!istype(I, steal_target)) continue//If it's not actually that item.
found_amount += I:amount
if(!istype(I, steal_target))
continue//If it's not actually that item.
var/obj/item/stack/sheet/uranium/U = I
found_amount += U.get_amount()
return found_amount>=target_amount

View File

@@ -894,12 +894,12 @@ datum/objective/heist/salvage
if(istype(O,/obj/item/stack/sheet))
if(O.name == target)
S = O
total_amount += S.amount
total_amount += S.get_amount()
for(var/obj/I in O.contents)
if(istype(I,/obj/item/stack/sheet))
if(I.name == target)
S = I
total_amount += S.amount
total_amount += S.get_amount()
var/datum/game_mode/heist/H = ticker.mode
for(var/datum/mind/raider in H.raiders)
@@ -908,7 +908,7 @@ datum/objective/heist/salvage
if(istype(O,/obj/item/stack/sheet))
if(O.name == target)
var/obj/item/stack/sheet/S = O
total_amount += S.amount
total_amount += S.get_amount()
if(total_amount >= target_amount) return 1
return 0

View File

@@ -1125,20 +1125,16 @@ table tr:first-child th:first-child { border: none;}
if(1)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/coil = W
if(coil.amount < 5)
user << "You need more cable for this!"
var/obj/item/stack/cable_coil/C = W
if (C.use(5))
user << "<span class='notice'>You wire \the [src].</span>"
buildstage = 2
update_icon()
first_run()
return
else
user << "<span class='warning'>You need 5 pieces of cable to do wire \the [src].</span>"
return
user << "You wire \the [src]!"
coil.amount -= 5
if(!coil.amount)
del(coil)
buildstage = 2
update_icon()
first_run()
return
else if(istype(W, /obj/item/weapon/crowbar))
user << "You start prying out the circuit."
@@ -1316,19 +1312,14 @@ FIRE ALARM
user.visible_message("\red [user] has disconnected [src]'s detecting unit!", "You have disconnected [src]'s detecting unit.")
if(1)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/coil = W
if(coil.amount < 5)
user << "You need more cable for this!"
var/obj/item/stack/cable_coil/C = W
if (C.use(5))
user << "<span class='notice'>You wire \the [src].</span>"
buildstage = 2
return
else
user << "<span class='warning'>You need 5 pieces of cable to do wire \the [src].</span>"
return
coil.amount -= 5
if(!coil.amount)
del(coil)
buildstage = 2
user << "You wire \the [src]!"
update_icon()
else if(istype(W, /obj/item/weapon/crowbar))
user << "You pry out the circuit!"
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)

View File

@@ -152,7 +152,7 @@
//If it's a stack, we eat multiple sheets.
if(istype(eating,/obj/item/stack))
var/obj/item/stack/stack = eating
total_material *= stack.amount
total_material *= stack.get_amount()
if(stored_material[material] + total_material > storage_capacity[material])
total_material = storage_capacity[material] - stored_material[material]

View File

@@ -30,6 +30,7 @@
var/idcheck = 1 //If false, all station IDs are authorized for weapons.
var/check_records = 1 //Does it check security records?
var/arrest_type = 0 //If true, don't handcuff
var/declare_arrests = 0 //When making an arrest, should it notify everyone wearing sechuds?
var/projectile = null//Holder for projectile type, to avoid so many else if chains
var/mode = 0
@@ -131,11 +132,13 @@ Maintenance panel panel is [src.open ? "opened" : "closed"]"},
Check for Weapon Authorization: []<BR>
Check Security Records: []<BR>
Operating Mode: []<BR>
Report Arrests: []<BR>
Auto Patrol: []"},
"<A href='?src=\ref[src];operation=idcheck'>[src.idcheck ? "Yes" : "No"]</A>",
"<A href='?src=\ref[src];operation=ignorerec'>[src.check_records ? "Yes" : "No"]</A>",
"<A href='?src=\ref[src];operation=switchmode'>[src.arrest_type ? "Detain" : "Arrest"]</A>",
"<A href='?src=\ref[src];operation=declarearrests'>[src.declare_arrests ? "Yes" : "No"]</A>",
"<A href='?src=\ref[src];operation=patrol'>[auto_patrol ? "On" : "Off"]</A>" )
else
dat += text({"<BR>
@@ -180,6 +183,9 @@ Auto Patrol: []"},
auto_patrol = !auto_patrol
mode = SECBOT_IDLE
updateUsrDialog()
if("declarearrests")
src.declare_arrests = !src.declare_arrests
src.updateUsrDialog()
/obj/machinery/bot/ed209/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
@@ -288,6 +294,10 @@ Auto Patrol: []"},
maxstuns--
if (maxstuns <= 0)
target = null
if(declare_arrests)
var/area/location = get_area(src)
broadcast_security_hud_message("[src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] suspect <b>[target]</b> in <b>[location]</b>", src)
visible_message("\red <B>[src.target] has been stunned by [src]!</B>")
mode = SECBOT_PREP_ARREST
@@ -959,16 +969,18 @@ Auto Patrol: []"},
icon_state = "[lasercolor]ed209_prox"
if(6)
if( istype(W, /obj/item/stack/cable_coil) )
var/obj/item/stack/cable_coil/coil = W
var/turf/T = get_turf(user)
user << "<span class='notice'>You start to wire [src]...</span>"
sleep(40)
if(get_turf(user) == T && build_step == 6)
coil.use(1)
build_step++
user << "<span class='notice'>You wire the ED-209 assembly.</span>"
name = "wired ED-209 assembly"
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 1)
user << "<span class='warning'>You need one coil of wire to do wire [src].</span>"
return
user << "<span class='notice'>You start to wire [src].</span>"
if (do_after(user, 40) && build_step == 6)
if (C.use(1))
build_step++
user << "<span class='notice'>You wire the ED-209 assembly.</span>"
name = "wired ED-209 assembly"
return
if(7)
switch(lasercolor)

View File

@@ -103,7 +103,7 @@
var/obj/item/stack/tile/plasteel/T = W
if(src.amount >= 50)
return
var/loaded = min(50-src.amount, T.amount)
var/loaded = min(50-src.amount, T.get_amount())
T.use(loaded)
src.amount += loaded
user << "<span class='notice'>You load [loaded] tiles into the floorbot. He now contains [src.amount] tiles.</span>"
@@ -325,12 +325,12 @@
src.target = null
src.repairing = 0
return
if(src.amount + T.amount > 50)
if(src.amount + T.get_amount() > 50)
var/i = 50 - src.amount
src.amount += i
T.amount -= i
T.use(i)
else
src.amount += T.amount
src.amount += T.get_amount()
del(T)
src.updateicon()
src.target = null
@@ -339,7 +339,7 @@
/obj/machinery/bot/floorbot/proc/maketile(var/obj/item/stack/sheet/metal/M)
if(!istype(M, /obj/item/stack/sheet/metal))
return
if(M.amount > 1)
if(M.get_amount() > 1)
return
visible_message("\red [src] begins to create tiles.")
src.repairing = 1
@@ -400,12 +400,15 @@
return
if(user.s_active)
user.s_active.close(user)
del(T)
var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles
user.put_in_hands(B)
user << "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>"
user.drop_from_inventory(src)
del(src)
if (T.use(10))
var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles
user.put_in_hands(B)
user << "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>"
user.drop_from_inventory(src)
del(src)
else
user << "<span class='warning'>You need 10 floortiles for a floorbot.</span>"
return
/obj/item/weapon/toolbox_tiles/attackby(var/obj/item/W, mob/user as mob)
..()

View File

@@ -36,6 +36,7 @@
var/treatment_fire = "tricordrazine"
var/treatment_tox = "tricordrazine"
var/treatment_virus = "spaceacillin"
var/declare_treatment = 0 //When attempting to treat a patient, should it notify everyone wearing medhuds?
var/shut_up = 0 //self explanatory :)
/obj/machinery/bot/medbot/mysterious
@@ -130,7 +131,9 @@
dat += "Reagent Source: "
dat += "<a href='?src=\ref[src];use_beaker=1'>[src.use_beaker ? "Loaded Beaker (When available)" : "Internal Synthesizer"]</a><br>"
dat += "The speaker switch is [src.shut_up ? "off" : "on"]. <a href='?src=\ref[src];togglevoice=[1]'>Toggle</a>"
dat += "Treatment report is [src.declare_treatment ? "on" : "off"]. <a href='?src=\ref[src];declaretreatment=[1]'>Toggle</a><br>"
dat += "The speaker switch is [src.shut_up ? "off" : "on"]. <a href='?src=\ref[src];togglevoice=[1]'>Toggle</a><br>"
user << browse("<HEAD><TITLE>Medibot v1.0 controls</TITLE></HEAD>[dat]", "window=automed")
onclose(user, "automed")
@@ -176,6 +179,9 @@
else if ((href_list["togglevoice"]) && (!src.locked || issilicon(usr)))
src.shut_up = !src.shut_up
else if ((href_list["declaretreatment"]) && (!src.locked || issilicon(usr)))
src.declare_treatment = !src.declare_treatment
src.updateUsrDialog()
return
@@ -278,6 +284,9 @@
var/message = pick("Hey, you! Hold on, I'm coming.","Wait! I want to help!","You appear to be injured!")
src.speak(message)
src.last_newpatient_speak = world.time
if(declare_treatment)
var/area/location = get_area(src)
broadcast_medical_hud_message("[src.name] is treating <b>[C]</b> in <b>[location]</b>", src)
src.visible_message("<b>[src]</b> points at [C.name]!")
break
else

View File

@@ -22,6 +22,7 @@
var/idcheck = 0 //If false, all station IDs are authorized for weapons.
var/check_records = 1 //Does it check security records?
var/arrest_type = 0 //If true, don't handcuff
var/declare_arrests = 0 //When making an arrest, should it notify everyone wearing sechuds?
var/next_harm_time = 0
var/mode = 0
@@ -120,11 +121,13 @@ Maintenance panel panel is [src.open ? "opened" : "closed"]"},
Check for Weapon Authorization: []<BR>
Check Security Records: []<BR>
Operating Mode: []<BR>
Report Arrests: []<BR>
Auto Patrol: []"},
"<A href='?src=\ref[src];operation=idcheck'>[src.idcheck ? "Yes" : "No"]</A>",
"<A href='?src=\ref[src];operation=ignorerec'>[src.check_records ? "Yes" : "No"]</A>",
"<A href='?src=\ref[src];operation=switchmode'>[src.arrest_type ? "Detain" : "Arrest"]</A>",
"<A href='?src=\ref[src];operation=declarearrests'>[src.declare_arrests ? "Yes" : "No"]</A>",
"<A href='?src=\ref[src];operation=patrol'>[auto_patrol ? "On" : "Off"]</A>" )
@@ -156,6 +159,9 @@ Auto Patrol: []"},
auto_patrol = !auto_patrol
mode = SECBOT_IDLE
updateUsrDialog()
if("declarearrests")
src.declare_arrests = !src.declare_arrests
src.updateUsrDialog()
/obj/machinery/bot/secbot/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
@@ -239,6 +245,10 @@ Auto Patrol: []"},
maxstuns--
if(maxstuns <= 0)
target = null
if(declare_arrests)
var/area/location = get_area(src)
broadcast_security_hud_message("[src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] suspect <b>[target]</b> in <b>[location]</b>", src)
visible_message("\red <B>[src.target] has been stunned by [src]!</B>")
mode = SECBOT_PREP_ARREST

View File

@@ -58,8 +58,10 @@
if(iscoil(W))
var/obj/item/stack/cable_coil/C = W
if(C.use(2))
user << "You add wires to the assembly."
user << "<span class='notice'>You add wires to the assembly.</span>"
state = 3
else
user << "<span class='warning'>You need 2 coils of wire to wire the assembly.</span>"
return
else if(iswelder(W))

View File

@@ -63,14 +63,18 @@
state = 1
icon_state = "1"
if(istype(P, /obj/item/stack/cable_coil))
if(P:amount >= 5)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
P:amount -= 5
if(!P:amount) del(P)
user << "\blue You add cables to the frame."
var/obj/item/stack/cable_coil/C = P
if (C.get_amount() < 5)
user << "<span class='warning'>You need five coils of wire to add them to the frame.</span>"
return
user << "<span class='notice'>You start to add cables to the frame.</span>"
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
if (do_after(user, 20) && state == 2)
if (C.use(5))
state = 3
icon_state = "3"
user << "<span class='notice'>You add cables to the frame.</span>"
return
if(3)
if(istype(P, /obj/item/weapon/wirecutters))
if (brain)
@@ -84,15 +88,17 @@
A.amount = 5
if(istype(P, /obj/item/stack/sheet/rglass))
if(P:amount >= 2)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
if (P)
P:amount -= 2
if(!P:amount) del(P)
user << "\blue You put in the glass panel."
state = 4
icon_state = "4"
var/obj/item/stack/sheet/rglass/RG = P
if (RG.get_amount() < 2)
user << "<span class='warning'>You need two sheets of glass to put in the glass panel.</span>"
return
user << "<span class='notice'>You start to put in the glass panel.</span>"
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
if (do_after(user, 20) && state == 3)
if(RG.use(2))
user << "<span class='notice'>You put in the glass panel.</span>"
state = 4
icon_state = "4"
if(istype(P, /obj/item/weapon/aiModule/asimov))
laws.add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.")

View File

@@ -403,15 +403,17 @@
src.state = 1
src.icon_state = "1"
if(istype(P, /obj/item/stack/cable_coil))
if(P:amount >= 5)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
if(P)
P:amount -= 5
if(!P:amount) del(P)
user << "\blue You add cables to the frame."
src.state = 3
src.icon_state = "3"
var/obj/item/stack/cable_coil/C = P
if (C.get_amount() < 5)
user << "<span class='warning'>You need five coils of wire to add them to the frame.</span>"
return
user << "<span class='notice'>You start to add cables to the frame.</span>"
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20) && state == 2)
if (C.use(5))
user << "<span class='notice'>You add cables to the frame.</span>"
state = 3
icon_state = "3"
if(3)
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
@@ -422,14 +424,17 @@
A.amount = 5
if(istype(P, /obj/item/stack/sheet/glass))
if(P:amount >= 2)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
if(P)
P:use(2)
user << "\blue You put in the glass panel."
src.state = 4
src.icon_state = "4"
var/obj/item/stack/sheet/glass/G = P
if (G.get_amount() < 2)
user << "<span class='warning'>You need two sheets of glass to put in the glass panel.</span>"
return
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "<span class='notice'>You start to put in the glass panel.</span>"
if(do_after(user, 20) && state == 3)
if (G.use(2))
user << "<span class='notice'>You put in the glass panel.</span>"
src.state = 4
src.icon_state = "4"
if(4)
if(istype(P, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)

View File

@@ -36,16 +36,16 @@
if(1)
if(istype(P, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = P
if(C.amount >= 5)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "\blue You start to add cables to the frame."
if(do_after(user, 20))
if(C)
C.amount -= 5
if(!C.amount) del(C)
user << "\blue You add cables to the frame."
state = 2
icon_state = "box_1"
if (C.get_amount() < 5)
user << "<span class='warning'>You need five lengths of cable to add them to the frame.</span>"
return
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "<span class='notice'>You start to add cables to the frame.</span>"
if(do_after(user, 20) && state == 1)
if(C.use(5))
user << "<span class='notice'>You add cables to the frame.</span>"
state = 2
icon_state = "box_1"
else
if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
@@ -134,7 +134,7 @@
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(istype(P, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/CP = P
if(CP.amount > 1)
if(CP.get_amount() > 1)
var/camt = min(CP.amount, req_components[I]) // amount of cable to take, idealy amount required, but limited by amount provided
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src)
CC.amount = camt

View File

@@ -67,15 +67,17 @@ for reference:
attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/stack/sheet/wood))
if (src.health < src.maxhealth)
visible_message("\red [user] begins to repair \the [src]!")
if(do_after(user,20))
src.health = src.maxhealth
W:use(1)
visible_message("\red [user] repairs \the [src]!")
var/obj/item/stack/sheet/wood/D = W
if (health < maxhealth)
if (D.get_amount() < 1)
user << "<span class='warning'>You need one plank of wood to repair \the [src].</span>"
return
visible_message("<span class='notice'>[user] begins to repair \the [src].</span>")
if(do_after(user,20) && health < maxhealth)
if (D.use(1))
health = maxhealth
visible_message("<span class='notice'>[user] repairs \the [src].</span>")
return
else
return
return
else
switch(W.damtype)

View File

@@ -104,9 +104,10 @@
if (contents.len>=max_n_of_items)
user << "\red This [src] is full of ingredients, you cannot put more."
return 1
if (istype(O,/obj/item/stack) && O:amount>1)
if(istype(O, /obj/item/stack) && O:get_amount() > 1) // This is bad, but I can't think of how to change it
var/obj/item/stack/S = O
new O.type (src)
O:use(1)
S.use(1)
user.visible_message( \
"\blue [user] has added one of [O] to \the [src].", \
"\blue You add one of [O] to \the [src].")

View File

@@ -707,14 +707,14 @@ Status: []<BR>"},
if(1)
if(istype(W, /obj/item/stack/sheet/metal))
if(W:amount>=2) // requires 2 metal sheets
user << "\blue You add some metal armor to the interior frame."
var/obj/item/stack/sheet/metal/M = W
if (M.use(2))
user << "<span class='notice'>You add some metal armor to the interior frame.</span>"
build_step = 2
W:amount -= 2
icon_state = "turret_frame2"
if(W:amount <= 0)
del(W)
return
else
user << "<span class='warning'>You need two sheets of metal to add armor ot the frame.</span>"
return
else if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
@@ -784,13 +784,13 @@ Status: []<BR>"},
if(6)
if(istype(W, /obj/item/stack/sheet/metal))
if(W:amount>=2)
user << "\blue You add some metal armor to the exterior frame."
var/obj/item/stack/sheet/metal/M = W
if (M.use(2))
user << "<span class='notice'>You add some metal armor to the exterior frame.</span>"
build_step = 7
W:amount -= 2
if(W:amount <= 0)
del(W)
return
else
user << "<span class='warning'>You need two sheets of metal to add armor to the frame.</span>"
return
else if(istype(W, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)

View File

@@ -13,21 +13,19 @@
/obj/machinery/robotic_fabricator/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (istype(O, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = O
if (src.metal_amount < 150000.0)
var/count = 0
src.overlays += "fab-load-metal"
spawn(15)
if(O)
if(!O:amount)
if(M)
if(!M.get_amount())
return
while(metal_amount < 150000 && O:amount)
while(metal_amount < 150000 && M.amount)
src.metal_amount += O.matter["metal"] /*O:height * O:width * O:length * 100000.0*/
O:amount--
M.use(1)
count++
if (O:amount < 1)
del(O)
user << "You insert [count] metal sheet\s into the fabricator."
src.overlays -= "fab-load-metal"
updateDialog()

View File

@@ -36,8 +36,8 @@ obj/machinery/seed_extractor/attackby(var/obj/item/O as obj, var/mob/user as mob
//Grass.
else if(istype(O, /obj/item/stack/tile/grass))
var/obj/item/stack/tile/grass/S = O
user << "<span class='notice'>You extract some seeds from the [S.name].</span>"
S.use(1)
new /obj/item/seeds/grassseed(loc)
if (S.use(1))
user << "<span class='notice'>You extract some seeds from the [S.name].</span>"
new /obj/item/seeds/grassseed(loc)
return

View File

@@ -26,9 +26,9 @@
if(istype(P, /obj/item/stack/nanopaste))
var/obj/item/stack/nanopaste/T = P
if (integrity < 100) //Damaged, let's repair!
integrity = between(0, integrity + rand(10,20), 100)
T.use(1)
usr << "You apply the Nanopaste to [src], repairing some of the damage."
if (T.use(1))
integrity = between(0, integrity + rand(10,20), 100)
usr << "You apply the Nanopaste to [src], repairing some of the damage."
else
usr << "This machine is already in perfect condition."
return
@@ -64,14 +64,12 @@
if(3)
if(istype(P, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/A = P
if(A.amount >= 5)
user << "You insert the cables."
A.amount -= 5
if(A.amount <= 0)
user.drop_item()
del(A)
construct_op --
if (A.use(5))
user << "<span class='notice'>You insert the cables.</span>"
construct_op--
stat &= ~BROKEN // the machine's not borked anymore!
else
user << "<span class='warning'>You need five coils of wire for this.</span>"
if(istype(P, /obj/item/weapon/crowbar))
user << "You begin prying out the circuit board other components..."
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)

View File

@@ -700,8 +700,7 @@
else if(istype(W, /obj/item/stack/cable_coil))
if(state == 3 && hasInternalDamage(MECHA_INT_SHORT_CIRCUIT))
var/obj/item/stack/cable_coil/CC = W
if(CC.amount > 1)
CC.use(2)
if(CC.use(2))
clearInternalDamage(MECHA_INT_SHORT_CIRCUIT)
user << "You replace the fused wires."
else

View File

@@ -20,15 +20,14 @@
else if(istype(used_atom, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = used_atom
if(C.amount<4)
if(C.use(4))
playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1)
else
user << ("There's not enough cable to finish the task.")
return 0
else
C.use(4)
playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1)
else if(istype(used_atom, /obj/item/stack))
var/obj/item/stack/S = used_atom
if(S.amount < 5)
if(S.get_amount() < 5)
user << ("There's not enough material in this stack.")
return 0
else
@@ -53,15 +52,14 @@
else if(istype(used_atom, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = used_atom
if(C.amount<4)
if(C.use(4))
playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1)
else
user << ("There's not enough cable to finish the task.")
return 0
else
C.use(4)
playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1)
else if(istype(used_atom, /obj/item/stack))
var/obj/item/stack/S = used_atom
if(S.amount < 5)
if(S.get_amount() < 5)
user << ("There's not enough material in this stack.")
return 0
else

View File

@@ -37,7 +37,7 @@
icon_opened = "bodybag_open"
var/item_path = /obj/item/bodybag
density = 0
storage_capacity = (mob_size * 2) - 1
attackby(W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/pen))
@@ -108,20 +108,22 @@
item_path = /obj/item/bodybag/cryobag
open_sound = 'sound/items/zip.ogg'
close_sound = 'sound/items/zip.ogg'
store_misc = 0
store_items = 0
var/used = 0
open()
. = ..()
if(used)
var/obj/item/O = new/obj/item(src.loc)
O.name = "used stasis bag"
O.icon = src.icon
O.icon_state = "bodybag_used"
O.desc = "Pretty useless now.."
del(src)
/obj/structure/closet/body_bag/cryobag/open()
. = ..()
if(used)
var/obj/item/O = new/obj/item(src.loc)
O.name = "used stasis bag"
O.icon = src.icon
O.icon_state = "bodybag_used"
O.desc = "Pretty useless now.."
del(src)
MouseDrop(over_object, src_location, over_location)
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if(!ishuman(usr)) return
usr << "\red You can't fold that up anymore.."
..()
/obj/structure/closet/body_bag/cryobag/MouseDrop(over_object, src_location, over_location)
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if(!ishuman(usr)) return
usr << "\red You can't fold that up anymore.."
..()

View File

@@ -245,12 +245,12 @@
/* Signaler (Mode: 40) */
if(istype(radio,/obj/item/radio/integrated/signal) && (mode==40))
var/obj/item/radio/integrated/signal/R = radio
values["signal_freq"] = format_frequency(R.frequency)
values["signal_code"] = R.code
/* Station Display (Mode: 42) */
@@ -266,9 +266,11 @@
var/apcData[0]
for(var/obj/machinery/power/monitor/pMon in world)
if(!(pMon.stat & (NOPOWER|BROKEN)) )
pMonData[++pMonData.len] = list ("Name" = pMon.name, "ref" = "\ref[pMon]")
if(isnull(powmonitor)) powmonitor = pMon
var/turf/monitorturf = locate(pMon.x,pMon.y,pMon.z)
var/area/monitorarea = monitorturf.loc
pMonData[++pMonData.len] = list ("Name" = html_encode(monitorarea ? pMon.name + " in " + monitorarea.name : pMon.name), "ref" = "\ref[pMon]")
if(isnull(powmonitor)) powmonitor = pMon
values["powermonitors"] = pMonData
if (!isnull(powmonitor.powernet))
@@ -285,25 +287,25 @@
var/list/chg = list(0,1,1) // Charging: nope, charging, full
for(var/obj/machinery/power/apc/A in L)
apcData[++apcData.len] = list("Name" = html_encode(A.area.name), "Equipment" = Status[A.equipment+1], "Lights" = Status[A.lighting+1], "Environment" = Status[A.environ+1], "CellPct" = A.cell ? round(A.cell.percent(),1) : -1, "CellStatus" = A.cell ? chg[A.charging+1] : 0)
values["apcs"] = apcData
else
values["powerconnected"] = 0
/* General Records (Mode: 44 / 441 / 45 / 451) */
if(mode == 44 || mode == 441 || mode == 45 || mode ==451)
if(istype(active1, /datum/data/record) && (active1 in data_core.general))
values["general"] = active1.fields
values["general_exists"] = 1
else
values["general_exists"] = 0
/* Medical Records (Mode: 44 / 441) */
@@ -320,7 +322,7 @@
else
values["medical_exists"] = 0
/* Security Records (Mode:45 / 451) */
/* Security Records (Mode:45 / 451) */
if(mode == 45 || mode == 451)
var/secData[0]
@@ -352,15 +354,15 @@
if(SC.botlist && SC.botlist.len)
for(var/obj/machinery/bot/B in SC.botlist)
botsCount++
if(B.loc)
if(B.loc)
botsData[++botsData.len] = list("Name" = sanitize(B.name), "Location" = sanitize(B.loc.loc.name), "ref" = "\ref[B]")
if(!botsData.len)
botsData[++botsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
beepskyData["bots"] = botsData
beepskyData["count"] = botsCount
else
beepskyData["active"] = 0
botsData[++botsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
@@ -383,10 +385,10 @@
var/area/loca = QC.botstatus["loca"]
var/loca_name = sanitize(loca.name)
muleData["botstatus"] = list("loca" = loca_name, "mode" = QC.botstatus["mode"],"home"=QC.botstatus["home"],"powr" = QC.botstatus["powr"],"retn" =QC.botstatus["retn"], "pick"=QC.botstatus["pick"], "load" = QC.botstatus["load"], "dest" = sanitize(QC.botstatus["dest"]))
else
muleData["botstatus"] = list("loca" = null, "mode" = -1,"home"=null,"powr" = null,"retn" =null, "pick"=null, "load" = null, "dest" = null)
var/mulebotsCount=0
for(var/obj/machinery/bot/B in QC.botlist)
@@ -401,7 +403,7 @@
muleData["count"] = mulebotsCount
else
muleData["botstatus"] = list("loca" = null, "mode" = -1,"home"=null,"powr" = null,"retn" =null, "pick"=null, "load" = null, "dest" = null)
muleData["botstatus"] = list("loca" = null, "mode" = -1,"home"=null,"powr" = null,"retn" =null, "pick"=null, "load" = null, "dest" = null)
muleData["active"] = 0
mulebotsData[++mulebotsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
muleData["bots"] = mulebotsData
@@ -424,13 +426,13 @@
var/supplyOrderData[0]
for(var/S in supply_controller.shoppinglist)
var/datum/supply_order/SO = S
supplyOrderData[++supplyOrderData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "ApprovedBy" = SO.orderedby, "Comment" = html_encode(SO.comment))
if(!supplyOrderData.len)
supplyOrderData[++supplyOrderData.len] = list("Number" = null, "Name" = null, "OrderedBy"=null)
supplyData["approved"] = supplyOrderData
supplyData["approved_count"] = supplyOrderCount
supplyData["approved_count"] = supplyOrderCount
var/requestCount = 0
var/requestData[0]
@@ -440,20 +442,20 @@
requestData[++requestData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "OrderedBy" = SO.orderedby, "Comment" = html_encode(SO.comment))
if(!requestData.len)
requestData[++requestData.len] = list("Number" = null, "Name" = null, "orderedBy" = null, "Comment" = null)
supplyData["requests"] = requestData
supplyData["requests_count"] = requestCount
values["supply"] = supplyData
/* Janitor Supplies Locator (Mode: 49) */
if(mode==49)
var/JaniData[0]
var/turf/cl = get_turf(src)
if(cl)
JaniData["user_loc"] = list("x" = cl.x, "y" = cl.y)
else
@@ -466,14 +468,14 @@
continue
var/direction = get_dir(src, M)
MopData[++MopData.len] = list ("x" = ml.x, "y" = ml.y, "dir" = uppertext(dir2text(direction)), "status" = M.reagents.total_volume ? "Wet" : "Dry")
if(!MopData.len)
MopData[++MopData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
var/BucketData[0]
for(var/obj/structure/mopbucket/B in world)
var/turf/bl = get_turf(B)
var/turf/bl = get_turf(B)
if(bl)
if(bl.z != cl.z)
continue
@@ -491,8 +493,8 @@
continue
var/direction = get_dir(src,B)
CbotData[++CbotData.len] = list("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "status" = B.on ? "Online" : "Offline")
if(!CbotData.len)
CbotData[++CbotData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
var/CartData[0]
@@ -505,7 +507,7 @@
CartData[++CartData.len] = list("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "status" = B.reagents.total_volume/100)
if(!CartData.len)
CartData[++CartData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
@@ -516,7 +518,7 @@
values["janitor"] = JaniData
return values
@@ -529,8 +531,8 @@
usr << browse(null, "window=pda")
return
switch(href_list["choice"])
if("Medical Records")

View File

@@ -55,10 +55,6 @@
var/uses = 0
var/emagged = 0
var/failmsg = ""
// How much to increase per each glass?
var/increment = 5
// How much to take from the glass?
var/decrement = 1
var/charge = 1
/obj/item/device/lightreplacer/New()
@@ -78,18 +74,15 @@
if(istype(W, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/G = W
if(G.amount - decrement >= 0 && uses < max_uses)
var/remaining = max(G.amount - decrement, 0)
if(!remaining && !(G.amount - decrement) == 0)
user << "There isn't enough glass."
return
G.amount = remaining
if(!G.amount)
user.drop_item()
del(G)
AddUses(increment)
user << "You insert a piece of glass into the [src.name]. You have [uses] lights remaining."
if(uses >= max_uses)
user << "<span class='warning'>[src.name] is full."
return
else if(G.use(1))
AddUses(5)
user << "<span class='notice'>You insert a piece of glass into the [src.name]. You have [uses] lights remaining.</span>"
return
else
user << "<span class='warning'>You need one sheet of glass to replace lights.</span>"
if(istype(W, /obj/item/weapon/light))
var/obj/item/weapon/light/L = W

View File

@@ -28,6 +28,8 @@ datum/nano_item_lists
var/list/ItemsCategory // List of categories with lists of items
var/list/ItemsReference // List of references with an associated item
var/list/nanoui_items // List of items for NanoUI use
var/nanoui_menu = 0 // The current menu we are in
var/list/nanoui_data = new // Additional data for NanoUI use
/obj/item/device/uplink/New()
welcome = ticker.mode.uplink_welcome
@@ -161,9 +163,11 @@ datum/nano_item_lists
var/title = "Syndicate Uplink"
var/data[0]
data["crystals"] = uses
data["nano_items"] = nanoui_items
data["welcome"] = welcome
data["crystals"] = uses
data["menu"] = nanoui_menu
data["nano_items"] = nanoui_items
data += nanoui_data
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
@@ -195,8 +199,13 @@ datum/nano_item_lists
toggle()
ui.close()
return 1
if(..(href, href_list) == 1)
if(href_list["return"])
nanoui_menu = round(nanoui_menu/10)
update_nano_data()
if(href_list["menu"])
nanoui_menu = text2num(href_list["menu"])
update_nano_data(href_list["id"])
else if(..(href, href_list) == 1)
var/datum/uplink_item/UI = ItemsReference[href_list["buy_item"]]
if(!UI)
return
@@ -209,6 +218,23 @@ datum/nano_item_lists
interact(usr)
return 1
/obj/item/device/uplink/hidden/proc/update_nano_data(var/id)
if(nanoui_menu == 1)
var/permanentData[0]
for(var/datum/data/record/L in sortRecord(data_core.locked))
permanentData[++permanentData.len] = list(Name = L.fields["name"],"id" = L.fields["id"])
nanoui_data["exploit_records"] = permanentData
if(nanoui_menu == 11)
nanoui_data["exploit_exists"] = 0
for(var/datum/data/record/L in data_core.locked)
if(L.fields["id"] == id)
nanoui_data["exploit"] = L.fields
nanoui_data["exploit"]["nanoui_exploit_record"] = replacetext(nanoui_data["exploit"]["exploit_record"], "\n", "<br>")
nanoui_data["exploit_exists"] = 1
break
// I placed this here because of how relevant it is.
// You place this in your uplinkable item to check if an uplink is active or not.
// If it is, it will display the uplink menu and return 1, else it'll return false.

View File

@@ -104,14 +104,17 @@
/obj/item/robot_parts/robot_suit/attackby(obj/item/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/stack/sheet/metal) && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
B.loc = get_turf(src)
user << "You armed the robot frame"
W:use(1)
if (user.get_inactive_hand()==src)
user.before_take_item(src)
user.put_in_inactive_hand(B)
del(src)
var/obj/item/stack/sheet/metal/M = W
if (M.use(1))
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
B.loc = get_turf(src)
user << "<span class='notice'>You armed the robot frame.</span>"
if (user.get_inactive_hand()==src)
user.before_take_item(src)
user.put_in_inactive_hand(B)
del(src)
else
user << "<span class='warning'>You need one sheet of metal to arm the robot frame.</span>"
if(istype(W, /obj/item/robot_parts/l_leg))
if(src.l_leg) return
user.drop_item()

View File

@@ -34,25 +34,29 @@
..()
if(istype(W,/obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/CC = W
if(CC.amount < 5)
user << "\b There is not enough wire in this coil. You need 5 lengths."
if (get_amount() < 1 || CC.get_amount() < 5)
user << "<span class='warning>You need five lengths of coil and one sheet of glass to make wired glass.</span>"
return
CC.use(5)
user << "\blue You attach wire to the [name]."
use(1)
user << "<span class='notice'>You attach wire to the [name].</span>"
new /obj/item/stack/light_w(user.loc)
src.use(1)
else if( istype(W, /obj/item/stack/rods) )
else if(istype(W, /obj/item/stack/rods))
var/obj/item/stack/rods/V = W
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
RG.add_fingerprint(user)
RG.add_to_stacks(user)
V.use(1)
var/obj/item/stack/sheet/glass/G = src
src = null
var/replace = (user.get_inactive_hand()==G)
G.use(1)
if (!G && !RG && replace)
user.put_in_hands(RG)
if (V.get_amount() >= 1 && get_amount() >= 1)
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
RG.add_fingerprint(user)
RG.add_to_stacks(user)
var/obj/item/stack/sheet/glass/G = src
src = null
var/replace = (user.get_inactive_hand()==G)
V.use(1)
G.use(1)
if (!G && replace)
user.put_in_hands(RG)
else
user << "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass.</span>"
return
else
return ..()

View File

@@ -24,12 +24,10 @@
if(istype(O,/obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = O
M.amount--
if(M.amount <= 0)
user.drop_from_inventory(M)
del(M)
amount--
new/obj/item/stack/tile/light(user.loc)
if(amount <= 0)
user.drop_from_inventory(src)
del(src)
if (M.use(1))
use(1)
new/obj/item/stack/tile/light(user.loc)
user << "<span class='notice'>You make a light tile.</span>"
else
user << "<span class='warning'>You need one metal sheet to finish the light tile.</span>"
return

View File

@@ -8,6 +8,7 @@
/*
* Stacks
*/
/obj/item/stack
gender = PLURAL
origin_tech = "materials=1"
@@ -19,11 +20,11 @@
/obj/item/stack/New(var/loc, var/amount=null)
..()
if (amount)
src.amount=amount
src.amount = amount
return
/obj/item/stack/Del()
if (src && usr && usr.machine==src)
if (src && usr && usr.machine == src)
usr << browse(null, "window=stack")
..()
@@ -69,12 +70,6 @@
var/title as text
var/can_build = 1
can_build = can_build && (max_multiplier>0)
/*
if (R.one_per_turf)
can_build = can_build && !(locate(R.result_type) in usr.loc)
if (R.on_floor)
can_build = can_build && istype(usr.loc, /turf/simulated/floor)
*/
if (R.res_amount>1)
title+= "[R.res_amount]x [R.title]\s"
else
@@ -181,6 +176,9 @@
amount += extra
return 1
/obj/item/stack/proc/get_amount()
return amount
/obj/item/stack/proc/add_to_stacks(mob/usr as mob)
var/obj/item/stack/oldsrc = src
src = null

View File

@@ -132,13 +132,13 @@ var/last_chew = 0
..()
if(istype(I, /obj/item/stack/rods))
var/obj/item/stack/rods/R = I
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
R.use(1)
if (R.use(1))
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
user.put_in_hands(W)
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
del(src)
update_icon(user)
user.put_in_hands(W)
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
del(src)
update_icon(user)
/obj/item/weapon/handcuffs/cyborg

View File

@@ -18,13 +18,13 @@
//SN src = null
del(src)
if (istype(W, /obj/item/stack/rods))
if (W:amount >= 4)
new /obj/item/weapon/table_parts/reinforced( user.loc )
user << "\blue You reinforce the [name]."
W:use(4)
var/obj/item/stack/rods/R = W
if (R.use(4))
new /obj/item/weapon/table_parts/reinforced(user.loc)
user << "<span class='notice'>You reinforce the [name].</span>"
del(src)
else if (W:amount < 4)
user << "\red You need at least four rods to do this."
else
user << "<span class='warning'>You need at least four rods to reinforce the [name].</span>"
/obj/item/weapon/table_parts/attack_self(mob/user as mob)
new /obj/structure/table( user.loc )

View File

@@ -17,6 +17,12 @@
var/open_sound = 'sound/machines/click.ogg'
var/close_sound = 'sound/machines/click.ogg'
var/store_misc = 1
var/store_items = 1
var/store_mobs = 1
var/const/mob_size = 15
/obj/structure/closet/New()
..()
spawn(1)
@@ -79,23 +85,41 @@
return 0
var/stored_units = 0
var/mob_size = 15
//Cham Projector Exception
if(store_misc)
stored_units = store_misc(stored_units)
if(store_items)
stored_units = store_items(stored_units)
if(store_mobs)
stored_units = store_mobs(stored_units)
src.icon_state = src.icon_closed
src.opened = 0
playsound(src.loc, close_sound, 15, 1, -3)
density = 1
return 1
//Cham Projector Exception
/obj/structure/closet/proc/store_misc(var/stored_units)
for(var/obj/effect/dummy/chameleon/AD in src.loc)
if(stored_units >= storage_capacity)
if(stored_units > storage_capacity)
break
AD.loc = src
stored_units++
return stored_units
/obj/structure/closet/proc/store_items(var/stored_units)
for(var/obj/item/I in src.loc)
var/item_size = Ceiling(I.w_class / 2)
if(stored_units + item_size >= storage_capacity)
if(stored_units + item_size > storage_capacity)
continue
if(!I.anchored)
I.loc = src
stored_units += item_size
return stored_units
/obj/structure/closet/proc/store_mobs(var/stored_units)
for(var/mob/M in src.loc)
if(stored_units + mob_size > storage_capacity)
break
@@ -110,13 +134,7 @@
M.loc = src
stored_units += mob_size
src.icon_state = src.icon_closed
src.opened = 0
playsound(src.loc, close_sound, 15, 1, -3)
density = 1
return 1
return stored_units
/obj/structure/closet/proc/toggle(mob/user as mob)
if(!(src.opened ? src.close() : src.open()))

View File

@@ -76,14 +76,14 @@
else if(istype(W, /obj/item/weapon/packageWrap))
return
else if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(rigged)
user << "<span class='notice'>[src] is already rigged!</span>"
return
user << "<span class='notice'>You rig [src].</span>"
user.drop_item()
del(W)
rigged = 1
return
if (C.use(1))
user << "<span class='notice'>You rig [src].</span>"
rigged = 1
return
else if(istype(W, /obj/item/device/radio/electropack))
if(rigged)
user << "<span class='notice'>You attach [W] to [src].</span>"

View File

@@ -184,14 +184,16 @@ obj/structure/door_assembly
user << "\blue You [anchored? "un" : ""]secured the airlock assembly!"
anchored = !anchored
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored )
var/obj/item/stack/cable_coil/coil = W
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored)
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 1)
user << "<span class='warning'>You need one length of coil to wire the airlock assembly.</span>"
return
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
if(do_after(user, 40))
if(!src) return
coil.use(1)
src.state = 1
user << "\blue You wire the Airlock!"
if(do_after(user, 40) && state == 0 && anchored)
if (C.use(1))
src.state = 1
user << "<span class='notice'>You wire the airlock.</span>"
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
@@ -236,23 +238,23 @@ obj/structure/door_assembly
else if(istype(W, /obj/item/stack/sheet) && !glass)
var/obj/item/stack/sheet/S = W
if (S)
if (S.amount>=1)
if (S.get_amount() >= 1)
if(istype(S, /obj/item/stack/sheet/rglass))
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40))
user << "\blue You installed reinforced glass windows into the airlock assembly!"
S.use(1)
glass = 1
if(do_after(user, 40) && !glass)
if (S.use(1))
user << "<span class='notice'>You installed reinforced glass windows into the airlock assembly.</span>"
glass = 1
else if(istype(S, /obj/item/stack/sheet/mineral) && S.sheettype)
var/M = S.sheettype
if(S.amount>=2)
if(S.get_amount() >= 2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40))
user << "\blue You installed [M] plating into the airlock assembly!"
S.use(2)
glass = "[M]"
if(do_after(user, 40) && !glass)
if (S.use(2))
user << "<span class='notice'>You installed [M] plating into the airlock assembly.</span>"
glass = "[M]"
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)

View File

@@ -81,55 +81,50 @@
if(/obj/item/stack/sheet/metal, /obj/item/stack/sheet/metal/cyborg)
if(!anchored)
if(S.amount < 2) return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall (src.loc)
del(src)
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
if (do_after(user,40))
if(!src || !S || S.amount < 2) return
S.use(2)
user << "\blue You added the plating!"
var/turf/Tsrc = get_turf(src)
Tsrc.ChangeTurf(/turf/simulated/wall)
for(var/turf/simulated/wall/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
if(S.use(2))
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
new /obj/structure/falsewall (src.loc)
del(src)
else
if(S.get_amount() < 2) return ..()
user << "<span class='notice'>Now adding plating...</span>"
if (do_after(user,40))
if (S.use(2))
user << "<span class='notice'>You added the plating!</span>"
var/turf/Tsrc = get_turf(src)
Tsrc.ChangeTurf(/turf/simulated/wall)
for(var/turf/simulated/wall/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
del(src)
return
if(/obj/item/stack/sheet/plasteel)
if(!anchored)
if(S.amount < 2) return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falserwall (src.loc)
del(src)
if(S.use(2))
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falserwall (src.loc)
del(src)
else
if (src.icon_state == "reinforced") //I cant believe someone would actually write this line of code...
if(S.amount < 1) return ..()
user << "\blue Now finalising reinforced wall."
if(S.get_amount() < 1) return ..()
user << "<span class='notice'>Now finalising reinforced wall.</span>"
if(do_after(user, 50))
if(!src || !S || S.amount < 1) return
S.use(1)
user << "\blue Wall fully reinforced!"
var/turf/Tsrc = get_turf(src)
Tsrc.ChangeTurf(/turf/simulated/wall/r_wall)
for(var/turf/simulated/wall/r_wall/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
del(src)
if (S.use(1))
user << "<span class='notice'>Wall fully reinforced!</span>"
var/turf/Tsrc = get_turf(src)
Tsrc.ChangeTurf(/turf/simulated/wall/r_wall)
for(var/turf/simulated/wall/r_wall/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
del(src)
return
else
if(S.amount < 1) return ..()
user << "\blue Now reinforcing girders"
if(S.get_amount() < 1) return ..()
user << "<span class='notice'>Now reinforcing girders...</span>"
if (do_after(user,60))
if(!src || !S || S.amount < 1) return
S.use(1)
user << "\blue Girders reinforced!"
new/obj/structure/girder/reinforced( src.loc )
del(src)
if(S.use(1))
user << "<span class='notice'>Girders reinforced!</span>"
new/obj/structure/girder/reinforced( src.loc )
del(src)
return
if(S.sheettype)

View File

@@ -121,7 +121,8 @@
return
//window placing begin
else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) )
else if(istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/ST = W
var/dir_to_set = 1
if(loc == user.loc)
dir_to_set = user.dir
@@ -146,24 +147,22 @@
return
user << "<span class='notice'>You start placing the window.</span>"
if(do_after(user,20))
if(!src) return //Grille destroyed while waiting
for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
user << "<span class='notice'>There is already a window facing this way there.</span>"
return
var/obj/structure/window/WD
if(istype(W,/obj/item/stack/sheet/rglass))
WD = new/obj/structure/window/reinforced(loc) //reinforced window
else
WD = new/obj/structure/window/basic(loc) //normal window
WD.dir = dir_to_set
WD.ini_dir = dir_to_set
WD.anchored = 0
WD.state = 0
var/obj/item/stack/ST = W
ST.use(1)
user << "<span class='notice'>You place the [WD] on [src].</span>"
WD.update_icon()
if (ST.use(1))
var/obj/structure/window/WD
if(istype(W, /obj/item/stack/sheet/rglass))
WD = new/obj/structure/window/reinforced(loc) //reinforced window
else
WD = new/obj/structure/window/basic(loc) //normal window
WD.dir = dir_to_set
WD.ini_dir = dir_to_set
WD.anchored = 0
WD.state = 0
user << "<span class='notice'>You place the [WD] on [src].</span>"
WD.update_icon()
return
//window placing end

View File

@@ -109,36 +109,33 @@ obj/structure/windoor_assembly/Del()
//Adding plasteel makes the assembly a secure windoor assembly. Step 2 (optional) complete.
else if(istype(W, /obj/item/stack/rods) && !secure)
var/obj/item/stack/rods/R = W
if(R.amount < 4)
user << "\red You need more rods to do this."
if(R.get_amount() < 4)
user << "<span class='warning'>You need more rods to do this.</span>"
return
user << "\blue You start to reinforce the windoor with rods."
user << "<span class='notice'>You start to reinforce the windoor with rods.</span>"
if(do_after(user,40))
if(!src) return
R.use(4)
user << "\blue You reinforce the windoor."
src.secure = "secure_"
if(src.anchored)
src.name = "Secure Anchored Windoor Assembly"
else
src.name = "Secure Windoor Assembly"
if(do_after(user,40) && !secure)
if (R.use(4))
user << "<span class='notice'>You reinforce the windoor.</span>"
src.secure = "secure_"
if(src.anchored)
src.name = "Secure Anchored Windoor Assembly"
else
src.name = "Secure Windoor Assembly"
//Adding cable to the assembly. Step 5 complete.
else if(istype(W, /obj/item/stack/cable_coil) && anchored)
user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly.")
var/obj/item/stack/cable_coil/CC = W
if(do_after(user, 40))
if(!src) return
var/obj/item/stack/cable_coil/CC = W
CC.use(1)
user << "\blue You wire the windoor!"
src.state = "02"
if(src.secure)
src.name = "Secure Wired Windoor Assembly"
else
src.name = "Wired Windoor Assembly"
if (CC.use(1))
user << "<span class='notice'>You wire the windoor!</span>"
src.state = "02"
if(src.secure)
src.name = "Secure Wired Windoor Assembly"
else
src.name = "Wired Windoor Assembly"
else
..()

View File

@@ -213,12 +213,12 @@ var/list/mechtoys = list(
// Sell phoron
if(istype(A, /obj/item/stack/sheet/mineral/phoron))
var/obj/item/stack/sheet/mineral/phoron/P = A
phoron_count += P.amount
phoron_count += P.get_amount()
// Sell platinum
if(istype(A, /obj/item/stack/sheet/mineral/platinum))
var/obj/item/stack/sheet/mineral/platinum/P = A
plat_count += P.amount
plat_count += P.get_amount()
del(MA)

View File

@@ -490,15 +490,16 @@ turf/simulated/floor/proc/update_icon()
if(istype(C, /obj/item/stack/rods))
var/obj/item/stack/rods/R = C
if (is_plating())
if (R.amount >= 2)
user << "\blue Reinforcing the floor..."
if(do_after(user, 30) && R && R.amount >= 2 && is_plating())
if (R.get_amount() < 2)
user << "<span class='warning'>You need more rods.</span>"
return
user << "\blue Reinforcing the floor..."
if(do_after(user, 30) && is_plating())
if (R.use(2))
ChangeTurf(/turf/simulated/floor/engine)
playsound(src, 'sound/items/Deconstruct.ogg', 80, 1)
R.use(2)
return
return
else
user << "\red You need more rods."
else
user << "\red You must remove the plating first."
return
@@ -507,27 +508,27 @@ turf/simulated/floor/proc/update_icon()
if(is_plating())
if(!broken && !burnt)
var/obj/item/stack/tile/T = C
floor_tile = new T.type
intact = 1
if(istype(T,/obj/item/stack/tile/light))
var/obj/item/stack/tile/light/L = T
var/obj/item/stack/tile/light/F = floor_tile
F.state = L.state
F.on = L.on
if(istype(T,/obj/item/stack/tile/grass))
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding gets updated properly
else if(istype(T,/obj/item/stack/tile/carpet))
for(var/direction in list(1,2,4,8,5,6,9,10))
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding gets updated properly
T.use(1)
update_icon()
levelupdate()
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
if (T.use(1))
floor_tile = new T.type
intact = 1
if(istype(T,/obj/item/stack/tile/light))
var/obj/item/stack/tile/light/L = T
var/obj/item/stack/tile/light/F = floor_tile
F.state = L.state
F.on = L.on
if(istype(T,/obj/item/stack/tile/grass))
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding gets updated properly
else if(istype(T,/obj/item/stack/tile/carpet))
for(var/direction in list(1,2,4,8,5,6,9,10))
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding gets updated properly
update_icon()
levelupdate()
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
else
user << "\blue This section is too damaged to support a tile. Use a welder to fix the damage."

View File

@@ -38,20 +38,20 @@
if(L)
return
var/obj/item/stack/rods/R = C
user << "\blue Constructing support lattice ..."
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
ReplaceWithLattice()
R.use(1)
if (R.use(1))
user << "\blue Constructing support lattice ..."
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
ReplaceWithLattice()
return
if (istype(C, /obj/item/stack/tile/plasteel))
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
if(L)
var/obj/item/stack/tile/plasteel/S = C
del(L)
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
S.build(src)
S.use(1)
if (S.use(1))
del(L)
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
S.build(src)
return
else
user << "\red The plating is going to need some support."

View File

@@ -118,6 +118,7 @@ datum/preferences
var/med_record = ""
var/sec_record = ""
var/gen_record = ""
var/exploit_record = ""
var/disabilities = 0
var/nanotrasen_relation = "Neutral"
@@ -397,7 +398,7 @@ datum/preferences
dat += "<a href='byond://?src=\ref[user];preference=flavor_text;task=open'><b>Set Flavor Text</b></a><br>"
dat += "<a href='byond://?src=\ref[user];preference=pAI><b>pAI Configuration</b></a><br>"
dat += "<a href='byond://?src=\ref[user];preference=pAI'><b>pAI Configuration</b></a><br>"
dat += "<br>"
dat += "<br><b>Hair</b><br>"
@@ -596,6 +597,13 @@ datum/preferences
HTML += "<br>"
HTML +="Uplink Type : <b><a href='?src=\ref[user];preference=antagoptions;antagtask=uplinktype;active=1'>[uplinklocation]</a></b>"
HTML +="<br>"
HTML +="Exploitable information about you : "
HTML += "<br>"
if(jobban_isbanned(user, "Records"))
HTML += "<b>You are banned from using character records.</b><br>"
else
HTML +="<b><a href=\"byond://?src=\ref[user];preference=records;task=exploitable_record\">[TextPreview(exploit_record,40)]</a></b>"
HTML +="<br>"
HTML +="<hr />"
HTML +="<a href='?src=\ref[user];preference=antagoptions;antagtask=done;active=1'>\[Done\]</a>"
@@ -949,6 +957,16 @@ datum/preferences
gen_record = genmsg
SetRecords(user)
if(href_list["task"] == "exploitable_record")
var/exploitmsg = input(usr,"Set exploitable information about you here.","Exploitable Information",html_decode(exploit_record)) as message
if(exploitmsg != null)
exploitmsg = copytext(exploitmsg, 1, MAX_PAPER_MESSAGE_LEN)
exploitmsg = html_encode(exploitmsg)
exploit_record = exploitmsg
SetAntagoptions(user)
else if (href_list["preference"] == "antagoptions")
if(text2num(href_list["active"]) == 0)
SetAntagoptions(user)
@@ -1001,16 +1019,16 @@ datum/preferences
user << "\red That item will exceed the maximum loadout cost of [MAX_GEAR_COST] points."
else if(href_list["task"] == "remove")
if(isnull(gear) || !islist(gear))
gear = list()
if(!gear.len)
return
var/choice = input(user, "Select gear to remove: ") as null|anything in gear
if(!choice)
return
for(var/gear_name in gear)
if(gear_name == choice)
gear -= gear_name
@@ -1519,6 +1537,7 @@ datum/preferences
character.med_record = med_record
character.sec_record = sec_record
character.gen_record = gen_record
character.exploit_record = exploit_record
character.gender = gender
character.age = age
@@ -1545,6 +1564,10 @@ datum/preferences
character.h_style = h_style
character.f_style = f_style
character.home_system = home_system
character.citizenship = citizenship
character.personal_faction = faction
character.religion = religion
character.skills = skills
character.used_skillpoints = used_skillpoints

View File

@@ -160,7 +160,7 @@
S["gen_record"] >> gen_record
S["be_special"] >> be_special
S["disabilities"] >> disabilities
S["player_alt_titles"] >> player_alt_titles
S["player_alt_titles"] >> player_alt_titles
S["used_skillpoints"] >> used_skillpoints
S["skills"] >> skills
S["skill_specialization"] >> skill_specialization
@@ -175,6 +175,7 @@
//S["skin_style"] >> skin_style
S["uplinklocation"] >> uplinklocation
S["exploit_record"] >> exploit_record
S["UI_style_color"] << UI_style_color
S["UI_style_alpha"] << UI_style_alpha
@@ -315,6 +316,7 @@
//S["skin_style"] << skin_style
S["uplinklocation"] << uplinklocation
S["exploit_record"] << exploit_record
S["UI_style_color"] << UI_style_color
S["UI_style_alpha"] << UI_style_alpha

View File

@@ -15,7 +15,7 @@
user << "<span class='notice'>The [src] are already wired.</span>"
return
if(C.amount < 2)
if(C.get_amount() < 2)
user << "<span class='notice'>There is not enough wire to cover the [src].</span>"
return

View File

@@ -186,9 +186,9 @@ var/global/list/breach_burn_descriptors = list(
return
var/obj/item/stack/sheet/P = W
if(P.amount < 3)
P.use(P.amount)
repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/mineral/plastic) ? P.amount : (P.amount*2) ), user)
if(P.get_amount() < 3)
P.use(P.get_amount())
repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/mineral/plastic) ? P.get_amount() : (P.get_amount()*2) ), user)
else
P.use(3)
repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/mineral/plastic) ? 3 : 5), user)

View File

@@ -44,22 +44,19 @@
icon_state = "coin_adamantine"
/obj/item/weapon/coin/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/stack/cable_coil) )
if(istype(W,/obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/CC = W
if(string_attached)
user << "\blue There already is a string attached to this coin."
user << "<span class='notice'>There already is a string attached to this coin.</span>"
return
if(CC.amount <= 0)
user << "\blue This cable coil appears to be empty."
del(CC)
return
overlays += image('icons/obj/items.dmi',"coin_string_overlay")
string_attached = 1
user << "\blue You attach a string to the coin."
CC.use(1)
else if(istype(W,/obj/item/weapon/wirecutters) )
if (CC.use(1))
overlays += image('icons/obj/items.dmi',"coin_string_overlay")
string_attached = 1
user << "<span class='notice'>You attach a string to the coin.</span>"
else
user << "<span class='notice'>This cable coil appears to be empty.</span>"
return
else if(istype(W,/obj/item/weapon/wirecutters))
if(!string_attached)
..()
return

View File

@@ -41,22 +41,22 @@
O = locate(/obj/item/stack/sheet, input.loc)
if(O)
if (istype(O,/obj/item/stack/sheet/mineral/gold))
amt_gold += 100 * O.amount
amt_gold += 100 * O.get_amount()
del(O)
if (istype(O,/obj/item/stack/sheet/mineral/silver))
amt_silver += 100 * O.amount
amt_silver += 100 * O.get_amount()
del(O)
if (istype(O,/obj/item/stack/sheet/mineral/diamond))
amt_diamond += 100 * O.amount
amt_diamond += 100 * O.get_amount()
del(O)
if (istype(O,/obj/item/stack/sheet/mineral/phoron))
amt_phoron += 100 * O.amount
amt_phoron += 100 * O.get_amount()
del(O)
if (istype(O,/obj/item/stack/sheet/mineral/uranium))
amt_uranium += 100 * O.amount
amt_uranium += 100 * O.get_amount()
del(O)
if (istype(O,/obj/item/stack/sheet/metal))
amt_iron += 100 * O.amount
amt_iron += 100 * O.get_amount()
del(O)
/obj/machinery/mineral/mint/attack_hand(user as mob)

View File

@@ -32,6 +32,12 @@
var/undershirt = 0 //Which undershirt the player wants.
var/backbag = 2 //Which backpack type the player has chosen. Nothing, Satchel or Backpack.
// General information
var/home_system = ""
var/citizenship = ""
var/personal_faction = ""
var/religion = ""
//Equipment slots
var/obj/item/wear_suit = null
var/obj/item/w_uniform = null

View File

@@ -498,12 +498,12 @@
if(inhale_pp < safe_pressure_min)
if(prob(20))
spawn(0) emote("gasp")
var/ratio = inhale_pp/safe_pressure_min
// Don't fuck them up too fast (space only does HUMAN_MAX_OXYLOSS after all!)
adjustOxyLoss(max(HUMAN_MAX_OXYLOSS*(1-ratio), 0))
failed_inhale = 1
oxygen_alert = max(oxygen_alert, 1)
else
// We're in safe limits
@@ -629,8 +629,8 @@
if (temp_adj < BODYTEMP_COOLING_MAX) temp_adj = BODYTEMP_COOLING_MAX
//world << "Breath: [breath.temperature], [src]: [bodytemperature], Adjusting: [temp_adj]"
bodytemperature += temp_adj
breath.update_values()
return 1
@@ -724,6 +724,8 @@
else
if( !(COLD_RESISTANCE in mutations))
take_overall_damage(brute=LOW_PRESSURE_DAMAGE, used_weapon = "Low Pressure")
if(getOxyLoss() < 55) // 11 OxyLoss per 4 ticks when wearing internals; unconsciousness in 16 ticks, roughly half a minute
adjustOxyLoss(4) // 16 OxyLoss per 4 ticks when no internals present; unconsciousness in 13 ticks, roughly twenty seconds
pressure_alert = -2
else
pressure_alert = -1

View File

@@ -624,11 +624,11 @@ var/list/robot_verbs_default = list(
user << "Nothing to fix here!"
return
var/obj/item/stack/cable_coil/coil = W
adjustFireLoss(-30)
updatehealth()
coil.use(1)
for(var/mob/O in viewers(user, null))
O.show_message(text("\red [user] has fixed some of the burnt wires on [src]!"), 1)
if (coil.use(1))
adjustFireLoss(-30)
updatehealth()
for(var/mob/O in viewers(user, null))
O.show_message(text("\red [user] has fixed some of the burnt wires on [src]!"), 1)
else if (istype(W, /obj/item/weapon/crowbar)) // crowbar means open or close the cover
if(opened)

View File

@@ -190,8 +190,6 @@
return
/mob/living/silicon/proc/toggle_sensor_mode()
set name = "Set Sensor Augmentation"
set desc = "Augment visual feed with internal sensor overlays."
var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security", "Medical","Disable")
switch(sensor_type)
if ("Security")

View File

@@ -351,11 +351,9 @@
if(stat != DEAD)
var/obj/item/stack/medical/MED = O
if(health < maxHealth)
if(MED.amount >= 1)
if(MED.get_amount() >= 1)
adjustBruteLoss(-MED.heal_brute)
MED.amount -= 1
if(MED.amount <= 0)
del(MED)
MED.use(1)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\blue [user] applies the [MED] on [src]")

View File

@@ -178,7 +178,7 @@
if(istype(stomachContent,/obj/item/stack)) //converts to plasma, keeping the stack value
if(!istype(stomachContent,/obj/item/stack/sheet/mineral/phoron))
var/obj/item/stack/oldStack = stomachContent
new /obj/item/stack/sheet/mineral/phoron(src, oldStack.amount)
new /obj/item/stack/sheet/mineral/phoron(src, oldStack.get_amount())
del(oldStack)
continue
else if(istype(stomachContent,/obj/item)) //converts to plasma, keeping the w_class

View File

@@ -69,6 +69,7 @@
var/med_record = ""
var/sec_record = ""
var/gen_record = ""
var/exploit_record = ""
var/blinded = null
var/bhunger = 0 //Carbon
var/ajourn = 0

View File

@@ -405,3 +405,16 @@ var/list/intents = list("help","disarm","grab","hurt")
hud_used.action_intent.icon_state = "harm"
else
hud_used.action_intent.icon_state = "help"
/proc/broadcast_security_hud_message(var/message, var/broadcast_source)
broadcast_hud_message(message, broadcast_source, sec_hud_users, /obj/item/clothing/glasses/hud/security)
/proc/broadcast_medical_hud_message(var/message, var/broadcast_source)
broadcast_hud_message(message, broadcast_source, med_hud_users, /obj/item/clothing/glasses/hud/health)
/proc/broadcast_hud_message(var/message, var/broadcast_source, var/list/targets, var/icon)
var/turf/sourceturf = get_turf(broadcast_source)
for(var/mob/M in targets)
var/turf/targetturf = get_turf(M)
if((targetturf.z == sourceturf.z))
M.show_message("<span class='info'>\icon[icon] [message]</span>", 1)

View File

@@ -200,7 +200,14 @@
t = replacetext(t, "\[/large\]", "</font>")
t = replacetext(t, "\[sign\]", "<font face=\"[signfont]\"><i>[user.real_name]</i></font>")
t = replacetext(t, "\[field\]", "<span class=\"paper_field\"></span>")
t = replacetext(t, "\[h1\]", "<H1>")
t = replacetext(t, "\[/h1\]", "</H1>")
t = replacetext(t, "\[h2\]", "<H2>")
t = replacetext(t, "\[/h2\]", "</H2>")
t = replacetext(t, "\[h3\]", "<H3>")
t = replacetext(t, "\[/h3\]", "</H3>")
if(!iscrayon)
t = replacetext(t, "\[*\]", "<li>")
t = replacetext(t, "\[hr\]", "<HR>")
@@ -253,6 +260,9 @@
<br>
\[br\] : Creates a linebreak.<br>
\[center\] - \[/center\] : Centers the text.<br>
\[h1\] - \[/h1\] : Makes the text a first level heading<br>
\[h2\] - \[/h2\] : Makes the text a second level heading<br>
\[h3\] - \[/h3\] : Makes the text a third level heading<br>
\[b\] - \[/b\] : Makes the text <b>bold</b>.<br>
\[i\] - \[/i\] : Makes the text <i>italic</i>.<br>
\[u\] - \[/u\] : Makes the text <u>underlined</u>.<br>

View File

@@ -496,17 +496,17 @@
update_icon()
else
user << "You fail to [ locked ? "unlock" : "lock"] the APC interface."
else if (istype(W, /obj/item/stack/cable_coil) && !terminal && opened && has_electronics!=2)
else if (istype(W, /obj/item/stack/cable_coil) && !terminal && opened && has_electronics != 2)
if (src.loc:intact)
user << "\red You must remove the floor plating in front of the APC first."
return
var/obj/item/stack/cable_coil/C = W
if(C.amount < 10)
user << "\red You need more wires."
if(C.get_amount() < 10)
user << "<span class='warning'>You need more wires.</span>"
return
user << "You start adding cables to the APC frame..."
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20) && C.amount >= 10)
if(do_after(user, 20) && !terminal && opened && has_electronics != 2)
var/turf/T = get_turf(src)
var/obj/structure/cable/N = T.get_cable_node()
if (prob(50) && electrocute_mob(usr, N, N))
@@ -514,12 +514,12 @@
s.set_up(5, 1, src)
s.start()
return
C.use(10)
user.visible_message(\
"\red [user.name] has added cables to the APC frame!",\
"You add cables to the APC frame.")
make_terminal()
terminal.connect_to_network()
if (C.use(10))
user.visible_message(\
"\red [user.name] has added cables to the APC frame!",\
"You add cables to the APC frame.")
make_terminal()
terminal.connect_to_network()
else if (istype(W, /obj/item/weapon/wirecutters) && terminal && opened && has_electronics!=2)
if (src.loc:intact)
user << "\red You must remove the floor plating in front of the APC first."
@@ -1199,7 +1199,7 @@
if(cell && !shorted)
//var/cell_charge = cell.charge
var/cell_maxcharge = cell.maxcharge
// Calculate how much power the APC will try to get from the grid.
var/target_draw = lastused_total
if (src.attempt_charging())
@@ -1210,14 +1210,14 @@
var/power_drawn = 0
if (src.avail())
power_drawn = add_load(target_draw) //get some power from the powernet
//figure out how much power is left over after meeting demand
power_excess = power_drawn - lastused_total
if (power_excess < 0) //couldn't get enough power from the grid, we will need to take from the power cell.
charging = 0
var/required_power = -power_excess
if(cell.charge >= required_power*CELLRATE) // can we draw enough from cell to cover what's left over?
cell.use(required_power*CELLRATE)
@@ -1229,7 +1229,7 @@
lighting = autoset(lighting, 0)
environ = autoset(environ, 0)
autoflag = 0
//Set external power status
if (!power_drawn)
main_status = 0

View File

@@ -137,15 +137,15 @@
if(istype(W, /obj/item/stack/cable_coil))
if (src.stage != 1) return
var/obj/item/stack/cable_coil/coil = W
coil.use(1)
switch(fixture_type)
if ("tube")
src.icon_state = "tube-construct-stage2"
if("bulb")
src.icon_state = "bulb-construct-stage2"
src.stage = 2
user.visible_message("[user.name] adds wires to [src].", \
"You add wires to [src].")
if (coil.use(1))
switch(fixture_type)
if ("tube")
src.icon_state = "tube-construct-stage2"
if("bulb")
src.icon_state = "bulb-construct-stage2"
src.stage = 2
user.visible_message("[user.name] adds wires to [src].", \
"You add wires to [src].")
return
if(istype(W, /obj/item/weapon/screwdriver))

View File

@@ -255,7 +255,7 @@
if(istype(W, /obj/item/stack/cable_coil) && !terminal && !building_terminal)
building_terminal = 1
var/obj/item/stack/cable_coil/CC = W
if (CC.amount < 10)
if (CC.get_amount() < 10)
user << "<span class='warning'>You need more cables.</span>"
building_terminal = 0
return

View File

@@ -232,15 +232,16 @@ var/list/solars_list = list()
if(istype(W, /obj/item/stack/sheet/glass) || istype(W, /obj/item/stack/sheet/rglass))
var/obj/item/stack/sheet/S = W
if(S.amount >= 2)
if(S.use(2))
glass_type = W.type
S.use(2)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] places the glass on the solar assembly.</span>")
if(tracker)
new /obj/machinery/power/tracker(get_turf(src), src)
else
new /obj/machinery/power/solar(get_turf(src), src)
else
user << "<span class='warning'>You need two sheets of glass to put them on the solar assembly.</span>"
return 1
if(!tracker)

View File

@@ -141,13 +141,13 @@
return
else if(istype(W,/obj/item/stack/rods))
var/obj/item/stack/rods/R = W
R.use(1)
in_chamber = new /obj/item/weapon/arrow/rod(src)
in_chamber.fingerprintslast = src.fingerprintslast
in_chamber.loc = src
icon_state = "crossbow-nocked"
user.visible_message("[user] jams [in_chamber] into [src].","You jam [in_chamber] into [src].")
superheat_rod(user)
if (R.use(1))
in_chamber = new /obj/item/weapon/arrow/rod(src)
in_chamber.fingerprintslast = src.fingerprintslast
in_chamber.loc = src
icon_state = "crossbow-nocked"
user.visible_message("[user] jams [in_chamber] into [src].","You jam [in_chamber] into [src].")
superheat_rod(user)
return
if(istype(W, /obj/item/weapon/cell))
@@ -210,8 +210,7 @@
if(istype(W,/obj/item/stack/rods))
if(buildstate == 0)
var/obj/item/stack/rods/R = W
if(R.amount >= 3)
R.use(3)
if(R.use(3))
user << "\blue You assemble a backbone of rods around the wooden stock."
buildstate++
update_icon()
@@ -231,8 +230,7 @@
else if(istype(W,/obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(buildstate == 2)
if(C.amount >= 5)
C.use(5)
if(C.use(5))
user << "\blue You wire a crude cell mount into the top of the crossbow."
buildstate++
update_icon()
@@ -240,8 +238,7 @@
user << "\blue You need at least five segments of cable coil to complete this task."
return
else if(buildstate == 4)
if(C.amount >= 5)
C.use(5)
if(C.use(5))
user << "\blue You string a steel cable across the crossbow's lath."
buildstate++
update_icon()
@@ -251,8 +248,7 @@
else if(istype(W,/obj/item/stack/sheet/mineral/plastic))
if(buildstate == 3)
var/obj/item/stack/sheet/mineral/plastic/P = W
if(P.amount >= 3)
P.use(3)
if(P.use(3))
user << "\blue You assemble and install a heavy plastic lath onto the crossbow."
buildstate++
update_icon()

View File

@@ -166,8 +166,7 @@
else if(istype(W,/obj/item/stack/sheet/metal))
if(buildstate == 2)
var/obj/item/stack/sheet/metal/M = W
if(M.amount >= 5)
M.use(5)
if(M.use(5))
user << "\blue You assemble a chassis around the cannon frame."
buildstate++
update_icon()

View File

@@ -85,9 +85,8 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/potato/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/stack/cable_coil))
if(W:amount >= 5)
W:amount -= 5
if(!W:amount) del(W)
var/obj/item/stack/cable_coil/C = W
if(C.use(5))
user << "<span class='notice'>You add some cable to the potato and slide it inside the battery encasing.</span>"
var/obj/item/weapon/cell/potato/pocell = new /obj/item/weapon/cell/potato(user.loc)
pocell.maxcharge = src.potency * 10

View File

@@ -135,8 +135,8 @@ Note: Must be placed west/left of and R&D console to function.
amount = 0
if(amount == 0)
return
if(amount > stack.amount)
amount = stack.amount
if(amount > stack.get_amount())
amount = stack.get_amount()
if(max_material_storage - TotalMaterials() < (amount*stack.perunit))//Can't overfill
amount = min(stack.amount, round((max_material_storage-TotalMaterials())/stack.perunit))

View File

@@ -270,8 +270,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
M.death()
if(istype(I,/obj/item/stack/sheet))//Only deconsturcts one sheet at a time instead of the entire stack
var/obj/item/stack/sheet/S = I
if(S.amount > 1)
S.amount--
if(S.get_amount() > 1)
S.use(1)
linked_destroy.loaded_item = S
else
del(S)

View File

@@ -71,7 +71,7 @@
var/choice = alert("What do you want to do with the nanopaste?","Radiometric Scanner","Scan nanopaste","Fix seal integrity")
if(choice == "Fix seal integrity")
var/obj/item/stack/nanopaste/N = I
var/amount_used = min(N.amount, 10 - scanner_seal_integrity / 10)
var/amount_used = min(N.get_amount(), 10 - scanner_seal_integrity / 10)
N.use(amount_used)
scanner_seal_integrity = round(scanner_seal_integrity + amount_used * 10)
return

View File

@@ -301,15 +301,14 @@
else if(istype(W, /obj/item/stack/cable_coil) && malfunction && is_open)
var/obj/item/stack/cable_coil/coil = W
user << "\blue You begin to replace the wires."
user << "<span class='notice'>You begin to replace the wires.</span>"
//if(do_after(user, min(60, round( ((maxhealth/health)*10)+(malfunction*10) ))) //Take longer to repair heavier damage
if(do_after(user, 30))
if(!src || !coil) return
coil.use(1)
health = max_health
malfunction = 0
user << "\blue You repair the [src]!"
update_icon()
if (coil.use(1))
health = max_health
malfunction = 0
user << "<span class='notice'>You repair the [src]!</span>"
update_icon()
else if(istype(W, /obj/item/weapon/wrench))
if(locked)