Merge pull request #272 from Markolie/master

[FEATURE][REFACTOR] Accessory changes, R&D search function
This commit is contained in:
Fox-McCloud
2015-02-09 18:14:58 -05:00
177 changed files with 1770 additions and 1285 deletions
+3 -3
View File
@@ -50,14 +50,14 @@
..(severity)
/obj/machinery/space_heater/air_conditioner/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/cell))
if(istype(I, /obj/item/weapon/stock_parts/cell))
if(open)
if(cell)
user << "There is already a power cell inside."
return
else
// insert cell
var/obj/item/weapon/cell/C = usr.get_active_hand()
var/obj/item/weapon/stock_parts/cell/C = usr.get_active_hand()
if(istype(C))
user.drop_item()
cell = C
@@ -138,7 +138,7 @@
if("cellinstall")
if(open && !cell)
var/obj/item/weapon/cell/C = usr.get_active_hand()
var/obj/item/weapon/stock_parts/cell/C = usr.get_active_hand()
if(istype(C))
usr.drop_item()
cell = C
+6 -4
View File
@@ -98,8 +98,9 @@
return
// operate two levels deep here (item in backpack in src; NOT item in box in backpack in src)
if(A == loc || (A in loc) || (A in contents) || (A.loc in contents))
// operate two STORAGE levels deep here (item in backpack in src; NOT item in box in backpack in src)
var/sdepth = A.storage_depth(src)
if(A == loc || (A in loc) || (sdepth != -1 && sdepth <= 1))
// faster access to objects already on you
if(A in contents)
@@ -116,14 +117,15 @@
if(!resolved && A && W)
W.afterattack(A,src,1,params) // 1 indicates adjacency
else
UnarmedAttack(A)
UnarmedAttack(A, 1)
return
if(!isturf(loc)) // This is going to stop you from telekinesing from inside a closet, but I don't shed many tears for that
return
// Allows you to click on a box's contents, if that box is on the ground, but no deeper than that
if(isturf(A) || isturf(A.loc) || (A.loc && isturf(A.loc.loc)))
sdepth = A.storage_depth_turf()
if(isturf(A) || isturf(A.loc) || (sdepth != -1 && sdepth <= 1))
next_move = world.time + 10
if(A.Adjacent(src)) // see adjacent.dm
+39 -31
View File
@@ -507,6 +507,7 @@
/mob/living/carbon/human/update_action_buttons()
var/num = 1
var/list/to_update = list()
if(!hud_used) return
if(!client) return
@@ -519,37 +520,44 @@
for(var/obj/item/I in src)
if(istype(I,/obj/item/clothing/under))
var/obj/item/clothing/under/U = I
if(U.hastie)
I = U.hastie
if(U.accessories)
for(var/obj/item/clothing/accessory/AC in U.accessories)
if(AC.icon_action_button)
to_update += AC
continue
if(I.icon_action_button)
var/obj/screen/item_action/A = new(hud_used)
//A.icon = 'icons/mob/screen1_action.dmi'
//A.icon_state = I.icon_action_button
A.icon = ui_style2icon(client.prefs.UI_style)
A.icon_state = "template"
var/image/img = image(I.icon, A, I.icon_state)
img.pixel_x = 0
img.pixel_y = 0
A.overlays += img
to_update += I
continue
for(var/obj/item/I in to_update)
var/obj/screen/item_action/A = new(hud_used)
//A.icon = 'icons/mob/screen1_action.dmi'
//A.icon_state = I.icon_action_button
A.icon = ui_style2icon(client.prefs.UI_style)
A.icon_state = "template"
var/image/img = image(I.icon, A, I.icon_state)
img.pixel_x = 0
img.pixel_y = 0
A.overlays += img
if(I.action_button_name)
A.name = I.action_button_name
else
A.name = "Use [I.name]"
A.owner = I
hud_used.item_action_list += A
switch(num)
if(1)
A.screen_loc = ui_action_slot1
if(2)
A.screen_loc = ui_action_slot2
if(3)
A.screen_loc = ui_action_slot3
if(4)
A.screen_loc = ui_action_slot4
if(5)
A.screen_loc = ui_action_slot5
break //5 slots available, so no more can be added.
num++
if(I.action_button_name)
A.name = I.action_button_name
else
A.name = "Use [I.name]"
A.owner = I
hud_used.item_action_list += A
switch(num)
if(1)
A.screen_loc = ui_action_slot1
if(2)
A.screen_loc = ui_action_slot2
if(3)
A.screen_loc = ui_action_slot3
if(4)
A.screen_loc = ui_action_slot4
if(5)
A.screen_loc = ui_action_slot5
break //5 slots available, so no more can be added.
num++
src.client.screen += src.hud_used.item_action_list
-3
View File
@@ -36,9 +36,6 @@
if(istype(master, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = master
S.close(usr)
else if(istype(master,/obj/item/clothing/suit/storage))
var/obj/item/clothing/suit/storage/S = master
S.close(usr)
return 1
/obj/screen/power_action
+1 -1
View File
@@ -264,7 +264,7 @@
name = "Devices & Tools"
id = "tools"
blacklist = null
whitelist = list(/obj/item/device,/obj/item/weapon/card,/obj/item/weapon/cartridge,/obj/item/weapon/cautery,/obj/item/weapon/cell,/obj/item/weapon/circuitboard,
whitelist = list(/obj/item/device,/obj/item/weapon/card,/obj/item/weapon/cartridge,/obj/item/weapon/cautery,/obj/item/weapon/stock_parts/cell,/obj/item/weapon/circuitboard,
/obj/item/weapon/aiModule,/obj/item/weapon/airalarm_electronics,/obj/item/weapon/airlock_electronics,/obj/item/weapon/circular_saw,
/obj/item/weapon/cloaking_device,/obj/item/weapon/crowbar,/obj/item/weapon/disk,/obj/item/weapon/firealarm_electronics,/obj/item/weapon/hand_tele,
/obj/item/weapon/hand_labeler,/obj/item/weapon/hemostat,/obj/item/weapon/mop,/obj/item/weapon/locator,/obj/item/weapon/minihoe,
+3 -3
View File
@@ -38,9 +38,9 @@
reqs = list(/obj/item/weapon/handcuffs/cable = 1,
/obj/item/stack/rods = 1,
/obj/item/weapon/wirecutters = 1,
/obj/item/weapon/cell = 1)
/obj/item/weapon/stock_parts/cell = 1)
time = 80
parts = list(/obj/item/weapon/cell = 1)
parts = list(/obj/item/weapon/stock_parts/cell = 1)
/datum/crafting_recipe/table/flamethrower
name = "Flamethrower"
@@ -90,7 +90,7 @@
/obj/item/stack/sheet/metal = 5,
/obj/item/stack/cable_coil = 5,
/obj/item/weapon/gun/energy/advtaser = 1,
/obj/item/weapon/cell = 1,
/obj/item/weapon/stock_parts/cell = 1,
/obj/item/device/assembly/prox_sensor = 1,
/obj/item/robot_parts/r_arm = 1)
tools = list(/obj/item/weapon/weldingtool, /obj/item/weapon/screwdriver)
+4 -4
View File
@@ -53,8 +53,8 @@
W.icon_state = initial(W.icon_state)
charged_item = I
break
else if(istype(item, /obj/item/weapon/cell/))
var/obj/item/weapon/cell/C = item
else if(istype(item, /obj/item/weapon/stock_parts/cell/))
var/obj/item/weapon/stock_parts/cell/C = item
if(prob(80))
C.maxcharge -= 200
if(C.maxcharge <= 1) //Div by 0 protection
@@ -66,8 +66,8 @@
else if(item.contents)
var/obj/I = null
for(I in item.contents)
if(istype(I, /obj/item/weapon/cell/))
var/obj/item/weapon/cell/C = I
if(istype(I, /obj/item/weapon/stock_parts/cell/))
var/obj/item/weapon/stock_parts/cell/C = I
if(prob(80))
C.maxcharge -= 200
if(C.maxcharge <= 1) //Div by 0 protection
+6 -6
View File
@@ -464,10 +464,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/storage/toolbox/electrical,
/obj/item/clothing/gloves/yellow,
/obj/item/clothing/gloves/yellow,
/obj/item/weapon/cell,
/obj/item/weapon/cell,
/obj/item/weapon/cell/high,
/obj/item/weapon/cell/high)
/obj/item/weapon/stock_parts/cell,
/obj/item/weapon/stock_parts/cell,
/obj/item/weapon/stock_parts/cell/high,
/obj/item/weapon/stock_parts/cell/high)
cost = 15
containertype = /obj/structure/closet/crate
containername = "Electrical maintenance crate"
@@ -627,8 +627,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/device/flash,
/obj/item/device/flash,
/obj/item/device/flash,
/obj/item/weapon/cell/high,
/obj/item/weapon/cell/high)
/obj/item/weapon/stock_parts/cell/high,
/obj/item/weapon/stock_parts/cell/high)
cost = 10
containertype = /obj/structure/closet/crate/secure/gear
containername = "Robotics Assembly"
+1 -1
View File
@@ -480,7 +480,7 @@ var/list/uplink_items = list()
/datum/uplink_item/device_tools/medkit
name = "Syndicate Medical Supply Kit"
name = "Syndicate Combat Medic Kit"
desc = "The syndicate medkit is a suspicious black and red. Included is a combat stimulant injector for rapid healing, a medical hud for quick identification of injured comrades, \
and other medical supplies helpful for a medical field operative."
item = /obj/item/weapon/storage/firstaid/tactical
+1 -1
View File
@@ -596,7 +596,7 @@
item_state = "RPED"
icon_override = 'icons/mob/in-hand/tools.dmi'
w_class = 5
can_hold = list("/obj/item/weapon/stock_parts","/obj/item/weapon/cell")
can_hold = list("/obj/item/weapon/stock_parts")
storage_slots = 50
use_to_pickup = 1
allow_quick_gather = 1
+1
View File
@@ -45,6 +45,7 @@
use_power = 1
idle_power_usage = 50
active_power_usage = 300
interact_offline = 1
var/locked = 0
var/mob/living/carbon/occupant = null
var/obj/item/weapon/reagent_containers/glass/beaker = null
+1 -1
View File
@@ -335,7 +335,7 @@
if(L)
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>[usr.real_name] ([usr.ckey]) cast the spell [name] on [L.real_name] ([L.ckey]).</font>")
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast the spell [name] on [L.real_name] ([L.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>)")
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast the spell [name] on [L.real_name] ([L.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
L.adjust_fire_stacks(0.5)
L.visible_message("\red <b>[L.name]</b> suddenly bursts into flames!")
+3 -3
View File
@@ -162,12 +162,12 @@
H.visible_message("\red [usr] sprays a cloud of fine ice crystals, engulfing [H]!",
"<span class='notice'>[usr] sprays a cloud of fine ice crystals over your [H.head]'s visor.</span>")
log_admin("[ckey(usr.key)] has used cryokinesis on [ckey(C.key)], internals yes, suit yes")
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast cryokinesis on [C.real_name] ([C.ckey]), (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>)")
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast cryokinesis on [C.real_name] ([C.ckey]), (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
else
H.visible_message("\red [usr] sprays a cloud of fine ice crystals engulfing, [H]!",
"<span class='warning'>[usr] sprays a cloud of fine ice crystals cover your [H.head]'s visor and make it into your air vents!.</span>")
log_admin("[usr.real_name] ([ckey(usr.key)]) has used cryokinesis on [C.real_name] ([ckey(C.key)]), (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>)")
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast cryokinesis on [C.real_name] ([C.ckey]), (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>)")
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast cryokinesis on [C.real_name] ([C.ckey]), (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
H.bodytemperature = max(0, H.bodytemperature - 50)
H.adjustFireLoss(5)
if(!handle_suit)
@@ -177,7 +177,7 @@
C.visible_message("\red [usr] sprays a cloud of fine ice crystals, engulfing [C]!")
log_admin("[ckey(usr.key)] has used cryokinesis on [ckey(C.key)], internals no, suit no")
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast cryokinesis on [C.real_name] ([C.ckey]), (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>)")
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast cryokinesis on [C.real_name] ([C.ckey]), (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
//playsound(usr.loc, 'bamf.ogg', 50, 0)
@@ -37,7 +37,7 @@ ________________________________________________________________________________
reagents.my_atom = src
for(var/reagent_id in reagent_list)
reagent_id == "uranium" ? reagents.add_reagent(reagent_id, r_maxamount+(a_boost*a_transfer)) : reagents.add_reagent(reagent_id, r_maxamount)//It will take into account uranium used for adrenaline boosting.
cell = new/obj/item/weapon/cell/high//The suit should *always* have a battery because so many things rely on it.
cell = new/obj/item/weapon/stock_parts/cell/high//The suit should *always* have a battery because so many things rely on it.
cell.charge = 9990//Starting charge should not be higher than maximum charge. It leads to problems with recharging.
cell.maxcharge = 10000 // Due to Ponies' overhaul Ninjas began starting with a 15000 energy cell. This should fix that issue.
@@ -880,14 +880,14 @@ ________________________________________________________________________________
U << "Replenished a total of [total_reagent_transfer ? total_reagent_transfer : "zero"] chemical units."//Let the player know how much total volume was added.
return
else if(istype(I, /obj/item/weapon/cell))
else if(istype(I, /obj/item/weapon/stock_parts/cell))
if(I:maxcharge>cell.maxcharge&&n_gloves&&n_gloves.candrain)
U << "\blue Higher maximum capacity detected.\nUpgrading..."
if (n_gloves&&n_gloves.candrain&&do_after(U,s_delay))
U.drop_item()
I.loc = src
I:charge = min(I:charge+cell.charge, I:maxcharge)
var/obj/item/weapon/cell/old_cell = cell
var/obj/item/weapon/stock_parts/cell/old_cell = cell
old_cell.charge = 0
U.put_in_hands(old_cell)
old_cell.add_fingerprint(U)
@@ -1116,7 +1116,7 @@ ________________________________________________________________________________
U << "\red This SMES cell has run dry of power. You must find another source."
if("CELL")
var/obj/item/weapon/cell/A = target
var/obj/item/weapon/stock_parts/cell/A = target
if(A.charge)
if (G.candrain&&do_after(U,30))
U << "\blue Gained <B>[A.charge]</B> energy from the cell."
+1 -1
View File
@@ -883,7 +883,7 @@ datum
return 2
hyper_cell
steal_target = /obj/item/weapon/cell/hyper
steal_target = /obj/item/weapon/stock_parts/cell/hyper
explanation_text = "Steal a hyper capacity power cell."
weight = 20
+1 -1
View File
@@ -133,7 +133,7 @@
// Check station's power levels
for (var/obj/machinery/power/apc/A in machines)
if (A.z != 1) continue
for (var/obj/item/weapon/cell/C in A.contents)
for (var/obj/item/weapon/stock_parts/cell/C in A.contents)
if (C.charge < 2300) score_powerloss += 1 // 200 charge leeway
// Check how much uncleaned mess is on the station
+10 -9
View File
@@ -36,16 +36,17 @@
/datum/theft_objective/hand_tele
name = "a hand teleporter"
typepath = /obj/item/weapon/hand_tele
protected_jobs = list("Captain")
protected_jobs = list("Captain", "Research Director")
/datum/theft_objective/rcd
name = "an RCD"
name = "a rapid-construction-device"
typepath = /obj/item/weapon/rcd
protected_jobs = list("Chief Engineer")
protected_jobs = list("Chief Engineer", "Quartermaster", "Cargo Technician", "Research Director", "Scientist", "Roboticist")
/datum/theft_objective/jetpack
name = "a jetpack"
typepath = /obj/item/weapon/tank/jetpack
protected_jobs = list("Chief Engineer")
/datum/theft_objective/cap_jumpsuit
name = "the captain's jumpsuit"
@@ -64,9 +65,9 @@ datum/theft_objective/ai/check_special_completion(var/obj/item/device/aicard/C)
return 0
/datum/theft_objective/defib
name = "a defibrillator"
typepath = /obj/item/weapon/defibrillator
protected_jobs = list("Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist", "Virologist", "Psychiatrist", "Paramedic", "Brig Physician")
name = "a compact defibrillator"
typepath = /obj/item/weapon/defibrillator/compact
protected_jobs = list("Chief Medical Officer")
/datum/theft_objective/magboots
name = "the chief engineer's advanced magnetic boots"
@@ -97,11 +98,11 @@ datum/theft_objective/ai/check_special_completion(var/obj/item/device/aicard/C)
/datum/theft_objective/corgi
name = "a piece of corgi meat"
typepath = /obj/item/weapon/reagent_containers/food/snacks/meat/corgi
protected_jobs = list("Head of Personnel")
protected_jobs = list("Head of Personnel", "Quartermaster", "Cargo Technician")
/datum/theft_objective/capmedal
name = "the medal of captaincy"
typepath = /obj/item/clothing/tie/medal/gold/captain
typepath = /obj/item/clothing/accessory/medal/gold/captain
protected_jobs = list("Captain")
/datum/theft_objective/nukedisc
@@ -254,7 +255,7 @@ datum/theft_objective/ai/check_special_completion(var/obj/item/device/aicard/C)
/datum/theft_objective/special/hyper_cell
name = "hyper-capacity cell"
typepath = /obj/item/weapon/cell/hyper
typepath = /obj/item/weapon/stock_parts/cell/hyper
/datum/theft_objective/number/special
flags = THEFT_FLAG_SPECIAL
+1 -1
View File
@@ -20,7 +20,7 @@
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U)
U.accessories += new /obj/item/clothing/accessory/medal/gold/captain(U)
H.equip_or_collect(U, slot_w_uniform)
H.equip_or_collect(new /obj/item/device/pda/captain(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/suit/armor/vest/capcarapace(H), slot_wear_suit)
+2
View File
@@ -110,6 +110,8 @@
ui.set_auto_update(1)
/obj/machinery/atmospherics/unary/cold_sink/freezer/Topic(href, href_list)
if(..())
return 1
if (href_list["toggleStatus"])
src.on = !src.on
update_icon()
+2 -1
View File
@@ -13,6 +13,7 @@
dir = 8
idle_power_usage = 250
active_power_usage = 500
interact_offline = 1
/obj/machinery/sleep_console/power_change()
if(stat & BROKEN)
@@ -506,7 +507,7 @@
return
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other
return
if(O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source
if(get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source
return
if(!ismob(O)) //humans only
return
+2 -2
View File
@@ -519,8 +519,8 @@
return
/obj/machinery/body_scanconsole/Topic(href, href_list)
if(stat & (BROKEN|NOPOWER)) return
if(usr.stat || usr.restrained()) return
if(..())
return 1
if (href_list["print_p"])
if (!(src.printing) && src.printing_text)
+2 -1
View File
@@ -83,7 +83,8 @@
return
/obj/machinery/ai_slipper/Topic(href, href_list)
..()
if(..())
return 1
if (src.locked)
if (!istype(usr, /mob/living/silicon))
usr << "Control panel is locked!"
+51 -1
View File
@@ -727,8 +727,40 @@
wires.Interact(user)
if(!shorted)
ui_interact(user)
/obj/machinery/alarm/proc/can_use(mob/user as mob)
if (user.stat && !isobserver(user))
user << "\red You must be conscious to use this [src]!"
return 0
if(stat & (NOPOWER|BROKEN))
return 0
if(buildstage != 2)
return 0
if((get_dist(src, user) > 1) && !istype(user, /mob/living/silicon))
return 0
if(istype(user, /mob/living/silicon) && aidisabled)
user << "AI control for this air alarm interface has been disabled."
return 0
return 1
/obj/machinery/alarm/proc/is_authenticated(mob/user as mob)
if(isAI(user) || isrobot(user))
return 1
else
return !locked
/obj/machinery/alarm/Topic(href, href_list)
if(..())
return 1
if(!can_use(usr))
return 1
var/changed=0
if(href_list["rcon"])
@@ -747,6 +779,9 @@
//testing(href)
if(href_list["command"])
if(!is_authenticated(usr))
return
var/device_id = href_list["id_tag"]
switch(href_list["command"])
if( "power",
@@ -832,11 +867,17 @@
return 1
if(href_list["screen"])
if(!is_authenticated(usr))
return
screen = text2num(href_list["screen"])
ui_interact(usr)
return 1
if(href_list["atmos_alarm"])
if(!is_authenticated(usr))
return
alarmActivated=1
alarm_area.updateDangerLevel()
update_icon()
@@ -844,6 +885,9 @@
return 1
if(href_list["atmos_reset"])
if(!is_authenticated(usr))
return
alarmActivated=0
alarm_area.updateDangerLevel()
update_icon()
@@ -851,12 +895,18 @@
return 1
if(href_list["mode"])
if(!is_authenticated(usr))
return
mode = text2num(href_list["mode"])
apply_mode()
ui_interact(usr)
return 1
if(href_list["preset"])
if(!is_authenticated(usr))
return
preset = text2num(href_list["preset"])
apply_preset()
ui_interact(usr)
@@ -968,7 +1018,7 @@
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
del(src)
return ..()
return 0
/obj/machinery/alarm/power_change()
if(powered(power_channel))
+59 -8
View File
@@ -1,3 +1,7 @@
#define AUTOLATHE_MAIN_MENU 1
#define AUTOLATHE_CATEGORY_MENU 2
#define AUTOLATHE_SEARCH_MENU 3
/obj/machinery/autolathe
name = "autolathe"
desc = "It produces items using metal and glass."
@@ -29,6 +33,7 @@
var/datum/design/being_built
var/datum/research/files
var/list/datum/design/matching_designs
var/selected_category
var/screen = 1
@@ -55,6 +60,7 @@
wires = new(src)
files = new /datum/research/autolathe(src)
matching_designs = list()
/obj/machinery/autolathe/upgraded/New()
..()
@@ -78,10 +84,13 @@
dat = wires.GetInteractWindow()
else
if(screen == 1)
dat = main_win(user)
else
dat += category_win(user,selected_category)
switch(screen)
if(AUTOLATHE_MAIN_MENU)
dat = main_win(user)
if(AUTOLATHE_CATEGORY_MENU)
dat = category_win(user,selected_category)
if(AUTOLATHE_SEARCH_MENU)
dat = search_win(user)
var/datum/browser/popup = new(user, "autolathe", name, 500, 500)
popup.set_content(dat)
@@ -166,7 +175,7 @@
/obj/machinery/autolathe/Topic(href, href_list)
if(..())
return
return 1
if (!busy)
if(href_list["menu"])
screen = text2num(href_list["menu"])
@@ -225,6 +234,14 @@
g_amount = 0
busy = 0
src.updateUsrDialog()
if(href_list["search"])
matching_designs.Cut()
for(var/datum/design/D in files.known_designs)
if(findtext(D.name,href_list["to_search"]))
matching_designs.Add(D)
else
usr << "<span class=\"alert\">The autolathe is busy. Please wait for completion of previous operation.</span>"
@@ -246,7 +263,15 @@
/obj/machinery/autolathe/proc/main_win(mob/user)
var/dat = "<div class='statusDisplay'><h3>Autolathe Menu:</h3><br>"
dat += "<b>Metal amount:</b> [src.m_amount] / [max_m_amount] cm<sup>3</sup><br>"
dat += "<b>Glass amount:</b> [src.g_amount] / [max_g_amount] cm<sup>3</sup><hr>"
dat += "<b>Glass amount:</b> [src.g_amount] / [max_g_amount] cm<sup>3</sup>"
dat += "<form name='search' action='?src=\ref[src]'> \
<input type='hidden' name='src' value='\ref[src]'> \
<input type='hidden' name='search' value='to_search'> \
<input type='hidden' name='menu' value='[AUTOLATHE_SEARCH_MENU]'> \
<input type='text' name='to_search'> \
<input type='submit' value='Search'> \
</form><hr>"
var/line_length = 1
dat += "<table style='width:100%' align='center'><tr>"
@@ -256,14 +281,14 @@
dat += "</tr><tr>"
line_length = 1
dat += "<td><A href='?src=\ref[src];category=[C];menu=2'>[C]</A></td>"
dat += "<td><A href='?src=\ref[src];category=[C];menu=[AUTOLATHE_CATEGORY_MENU]'>[C]</A></td>"
line_length++
dat += "</tr></table></div>"
return dat
/obj/machinery/autolathe/proc/category_win(mob/user,var/selected_category)
var/dat = "<A href='?src=\ref[src];menu=1'>Return to category screen</A>"
var/dat = "<A href='?src=\ref[src];menu=[AUTOLATHE_MAIN_MENU]'>Return to main menu</A>"
dat += "<div class='statusDisplay'><h3>Browsing [selected_category]:</h3><br>"
dat += "<b>Metal amount:</b> [src.m_amount] / [max_m_amount] cm<sup>3</sup><br>"
dat += "<b>Glass amount:</b> [src.g_amount] / [max_g_amount] cm<sup>3</sup><hr>"
@@ -290,6 +315,32 @@
dat += "</div>"
return dat
/obj/machinery/autolathe/proc/search_win(mob/user)
var/dat = "<A href='?src=\ref[src];menu=[AUTOLATHE_MAIN_MENU]'>Return to main menu</A>"
dat += "<div class='statusDisplay'><h3>Search results:</h3><br>"
dat += "<b>Metal amount:</b> [src.m_amount] / [max_m_amount] cm<sup>3</sup><br>"
dat += "<b>Glass amount:</b> [src.g_amount] / [max_g_amount] cm<sup>3</sup><hr>"
for(var/datum/design/D in matching_designs)
if(disabled || !can_build(D))
dat += "<span class='linkOff'>[D.name]</span>"
else
dat += "<a href='?src=\ref[src];make=[D.id];multiplier=1'>[D.name]</a>"
if(ispath(D.build_path, /obj/item/stack))
var/max_multiplier = min(50, D.materials["$metal"] ?round(m_amount/D.materials["$metal"]):INFINITY,D.materials["$glass"]?round(g_amount/D.materials["$glass"]):INFINITY)
if (max_multiplier>10 && !disabled)
dat += " <a href='?src=\ref[src];make=[D.id];multiplier=10'>x10</a>"
if (max_multiplier>25 && !disabled)
dat += " <a href='?src=\ref[src];make=[D.id];multiplier=25'>x25</a>"
if(max_multiplier > 0 && !disabled)
dat += " <a href='?src=\ref[src];make=[D.id];multiplier=[max_multiplier]'>x[max_multiplier]</a>"
dat += "[get_design_cost(D)]<br>"
dat += "</div>"
return dat
/obj/machinery/autolathe/proc/can_build(var/datum/design/D)
var/coeff = (ispath(D.build_path,/obj/item/stack) ? 1 : 2 ** prod_coeff)
+1 -1
View File
@@ -298,7 +298,7 @@
/obj/machinery/biogenerator/Topic(href, href_list)
if(..() || panel_open)
return
return 1
usr.set_machine(src)
+1 -1
View File
@@ -665,7 +665,7 @@ Auto Patrol[]"},
user << "<span class='notice'>Taser gun attached.</span>"
if(9)
if(istype(W, /obj/item/weapon/cell))
if(istype(W, /obj/item/weapon/stock_parts/cell))
build_step++
user << "<span class='notice'>You complete the ED-209.</span>"
var/turf/T = get_turf(src)
+4 -4
View File
@@ -43,7 +43,7 @@ var/global/mulebot_count = 0
var/auto_pickup = 1 // true if auto-pickup at beacon
var/report_delivery = 1 // true if bot will announce an arrival to a location.
var/obj/item/weapon/cell/cell
var/obj/item/weapon/stock_parts/cell/cell
var/datum/wires/mulebot/wires = null
// the installed power cell
@@ -96,8 +96,8 @@ var/global/mulebot_count = 0
if(toggle_lock(user))
user << "<span class='notice'>Controls [(locked ? "locked" : "unlocked")].</span>"
updateUsrDialog()
else if(istype(I,/obj/item/weapon/cell) && open && !cell)
var/obj/item/weapon/cell/C = I
else if(istype(I,/obj/item/weapon/stock_parts/cell) && open && !cell)
var/obj/item/weapon/stock_parts/cell/C = I
user.drop_item()
C.loc = src
cell = C
@@ -286,7 +286,7 @@ var/global/mulebot_count = 0
if("cellinsert")
if(open && !cell)
var/obj/item/weapon/cell/C = usr.get_active_hand()
var/obj/item/weapon/stock_parts/cell/C = usr.get_active_hand()
if(istype(C))
usr.drop_item()
cell = C
+2 -2
View File
@@ -8,7 +8,7 @@
idle_power_usage = 5
active_power_usage = 60
power_channel = EQUIP
var/obj/item/weapon/cell/charging = null
var/obj/item/weapon/stock_parts/cell/charging = null
var/chargelevel = -1
proc
updateicon()
@@ -38,7 +38,7 @@
if(stat & BROKEN)
return
if(istype(W, /obj/item/weapon/cell) && anchored)
if(istype(W, /obj/item/weapon/stock_parts/cell) && anchored)
if(charging)
user << "\red There is already a cell in the charger."
return
+1 -1
View File
@@ -73,7 +73,7 @@
/obj/machinery/computer/operating/Topic(href, href_list)
if(..())
return
return 1
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
return
+1 -1
View File
@@ -79,7 +79,7 @@
/obj/machinery/computer/aifixer/Topic(href, href_list)
if(..())
return
return 1
if (href_list["fix"])
src.active = 1
src.overlays += image('icons/obj/computer.dmi', "ai-fixer-on")
+2 -2
View File
@@ -144,7 +144,7 @@
/obj/machinery/computer/arcade/battle/Topic(href, href_list)
if(..())
return
return 1
if (!src.blocked && !src.gameover)
if (href_list["attack"])
@@ -405,7 +405,7 @@
/obj/machinery/computer/arcade/orion_trail/Topic(href, href_list)
if(..())
return
return 1
if(href_list["close"])
usr.unset_machine()
usr << browse(null, "window=arcade")
+1 -1
View File
@@ -98,7 +98,7 @@
/obj/machinery/computer/atmos_alert/Topic(href, href_list)
if(..())
return
return 1
if(href_list["priority_clear"])
var/removing_zone = href_list["priority_clear"]
@@ -115,7 +115,7 @@
//a bunch of this is copied from atmos alarms
/obj/machinery/computer/atmoscontrol/Topic(href, href_list)
if(..())
return
return 1
if(href_list["reset"])
current = null
+1 -1
View File
@@ -155,7 +155,7 @@
/obj/machinery/computer/cloning/Topic(href, href_list)
if(..())
return
return 1
if(loading)
return
@@ -60,7 +60,7 @@ var/shuttle_call/shuttle_calls[0]
/obj/machinery/computer/communications/Topic(href, href_list)
if(..(href, href_list))
return
return 1
if (!(src.z in list(STATION_Z,CENTCOMM_Z)))
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
+2 -1
View File
@@ -42,7 +42,8 @@
/obj/machinery/computer/crew/Topic(href, href_list)
if(..()) return
if(..())
return 1
if (src.z > 6)
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return 0
+1 -1
View File
@@ -57,7 +57,7 @@
/obj/machinery/computer/hologram_comp/Topic(href, href_list)
if(..())
return
return 1
if (in_range(src, usr))
flick("holo_console1", src)
if (href_list["power"])
+1 -1
View File
@@ -16,7 +16,7 @@
/obj/machinery/computer/HONKputer/Topic(href, href_list)
if(..())
return
return 1
if (src.z > 1)
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
+1 -1
View File
@@ -128,7 +128,7 @@
/obj/machinery/computer/med_data/Topic(href, href_list)
if(..())
return
return 1
if (!( data_core.general.Find(src.active1) ))
src.active1 = null
+1 -1
View File
@@ -274,7 +274,7 @@
/obj/machinery/computer/message_monitor/Topic(href, href_list)
if(..())
return
return 1
if(stat & (NOPOWER|BROKEN))
return
if(!istype(usr, /mob/living))
+1 -1
View File
@@ -163,7 +163,7 @@
/obj/machinery/computer/pod/Topic(href, href_list)
if(..())
return
return 1
if((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
if(href_list["power"])
+2 -1
View File
@@ -133,7 +133,8 @@
/obj/machinery/power/monitor/Topic(href, href_list)
..()
if(..())
return 1
if( href_list["close"] )
usr << browse(null, "window=powcomp")
usr.unset_machine()
+1 -1
View File
@@ -106,7 +106,7 @@
/obj/machinery/computer/robotics/Topic(href, href_list)
if(..())
return
return 1
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
@@ -75,6 +75,8 @@
/obj/machinery/computer/salvage_ship/Topic(href, href_list)
if(..())
return 1
if(!isliving(usr)) return
var/mob/living/user = usr
+1 -1
View File
@@ -208,7 +208,7 @@ I can't be bothered to look more of the actual code outside of switch but that p
What a mess.*/
/obj/machinery/computer/secure_data/Topic(href, href_list)
if(..())
return
return 1
if (!( data_core.general.Find(active1) ))
active1 = null
if (!( data_core.security.Find(active2) ))
+1 -1
View File
@@ -151,7 +151,7 @@ I can't be bothered to look more of the actual code outside of switch but that p
What a mess.*/
/obj/machinery/computer/skills/Topic(href, href_list)
if(..())
return
return 1
if (!( data_core.general.Find(active1) ))
active1 = null
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
@@ -287,7 +287,7 @@ var/specops_shuttle_timeleft = 0
/obj/machinery/computer/specops_shuttle/Topic(href, href_list)
if(..())
return
return 1
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
+1 -1
View File
@@ -128,7 +128,7 @@ td.cost.toomuch {
/obj/machinery/computer/merch/Topic(href, href_list)
if(..())
return
return 1
//testing(href)
@@ -220,7 +220,7 @@ var/syndicate_elite_shuttle_timeleft = 0
/obj/machinery/computer/syndicate_elite_shuttle/Topic(href, href_list)
if(..())
return
return 1
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
@@ -106,7 +106,7 @@ var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","F
/obj/machinery/computer/telecrystals/uplinker/Topic(href, href_list)
if(..())
return
return 1
if(href_list["donate1"])
donateTC(1)
@@ -123,6 +123,9 @@
/obj/machinery/computer/xenos_station/Topic(href, href_list)
if(..())
return 1
if(!isliving(usr)) return
var/mob/living/user = usr
+3 -3
View File
@@ -289,7 +289,7 @@ to destroy them and players will be able to make replacements.
frame_desc = "Requires 5 pieces of cable, 5 Power Cells and 1 Capacitor."
req_components = list(
/obj/item/stack/cable_coil = 5,
/obj/item/weapon/cell = 5,
/obj/item/weapon/stock_parts/cell = 5,
/obj/item/weapon/stock_parts/capacitor = 1)
@@ -361,7 +361,7 @@ to destroy them and players will be able to make replacements.
/obj/item/weapon/stock_parts/capacitor = 1,
/obj/item/weapon/stock_parts/manipulator = 1,
/obj/item/weapon/stock_parts/console_screen = 1,
/obj/item/weapon/cell = 1)
/obj/item/weapon/stock_parts/cell = 1)
/obj/item/weapon/circuitboard/destructive_analyzer
name = "Circuit board (Destructive Analyzer)"
@@ -583,7 +583,7 @@ obj/item/weapon/circuitboard/rdserver
frame_desc = "Requires 2 Capacitors, 1 Power Cell and 1 Manipulator."
req_components = list(
/obj/item/weapon/stock_parts/capacitor = 2,
/obj/item/weapon/cell = 1,
/obj/item/weapon/stock_parts/cell = 1,
/obj/item/weapon/stock_parts/manipulator = 1)
// Telecomms circuit boards:
+2 -1
View File
@@ -5,6 +5,7 @@
density = 1
anchored = 1.0
layer = 2.8
interact_offline = 1
var/on = 0
var/temperature_archived
@@ -77,7 +78,7 @@
return
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other
return
if(O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source
if(get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source
return
if(!ismob(O)) //humans only
return
+3 -4
View File
@@ -65,9 +65,8 @@
onclose(user, "cryopod_console")
/obj/machinery/computer/cryopod/Topic(href, href_list)
if(..())
return
return 1
var/mob/user = usr
@@ -200,7 +199,7 @@
/obj/item/clothing/shoes/magboots,
/obj/item/blueprints,
/obj/item/clothing/head/helmet/space,
/obj/item/weapon/tank
/obj/item/weapon/storage/internal
)
/obj/machinery/cryopod/right
@@ -469,7 +468,7 @@
return
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other
return
if(O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source
if(get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source
return
if(!ismob(O)) //humans only
return
+5 -8
View File
@@ -695,16 +695,13 @@ About the new airlock wires panel:
//AI
//aiDisable - 1 idscan, 2 disrupt main power, 3 disrupt backup power, 4 drop door bolts, 5 un-electrify door, 7 close door, 8 door safties, 9 door speed, 11 emergency access
//aiEnable - 1 idscan, 4 raise door bolts, 5 electrify door for 30 seconds, 6 electrify door indefinitely, 7 open door, 8 door safties, 9 door speed, 11 emergency access
if(!nowindow)
..()
if(usr.stat || usr.restrained()|| usr.small)
return
add_fingerprint(usr)
if(..())
return 1
if(href_list["close"])
usr << browse(null, "window=airlock")
if(usr.machine==src)
usr.unset_machine()
return
return 1
if((in_range(src, usr) && istype(src.loc, /turf)) && src.p_open)
usr.set_machine(src)
@@ -753,7 +750,7 @@ About the new airlock wires panel:
if(istype(usr, /mob/living/silicon))
if (!check_synth_access(usr))
return
return 1
//AI
//aiDisable - 1 idscan, 2 disrupt main power, 3 disrupt backup power, 4 drop door bolts, 5 un-electrify door, 7 close door, 8 door safties, 9 door speed
@@ -943,7 +940,7 @@ About the new airlock wires panel:
update_icon()
if(!nowindow)
updateUsrDialog()
return
return 0
/obj/machinery/door/airlock/attackby(C as obj, mob/user as mob)
//world << text("airlock attackby src [] obj [] mob []", src, C, user)
+2 -2
View File
@@ -6,7 +6,7 @@
icon_state = "flood00"
density = 1
var/on = 0
var/obj/item/weapon/cell/high/cell = null
var/obj/item/weapon/stock_parts/cell/high/cell = null
var/use = 5
var/unlocked = 0
var/open = 0
@@ -83,7 +83,7 @@
open = 1
user << "You remove the battery panel."
if (istype(W, /obj/item/weapon/cell))
if (istype(W, /obj/item/weapon/stock_parts/cell))
if(open)
if(cell)
user << "There is a power cell already installed."
+1 -1
View File
@@ -105,7 +105,7 @@
/obj/machinery/computer/guestpass/Topic(href, href_list)
if(..())
return
return 1
usr.set_machine(src)
if (href_list["mode"])
mode = text2num(href_list["mode"])
+55 -43
View File
@@ -184,37 +184,65 @@ Class Procs:
use_power(active_power_usage,power_channel, 1)
return 1
/obj/machinery/Topic(href, href_list)
..()
if(!interact_offline && stat & (NOPOWER|BROKEN))
/obj/machinery/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
if(..())
return 1
if(usr.restrained() || usr.lying || usr.stat)
if(!can_be_used_by(usr, be_close = checkrange))
return 1
if ( ! (istype(usr, /mob/living/carbon/human) || \
istype(usr, /mob/living/silicon) || \
istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
usr << "\red You don't have the dexterity to do this!"
return 1
var/norange = 0
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.l_hand, /obj/item/tk_grab))
norange = 1
else if(istype(H.r_hand, /obj/item/tk_grab))
norange = 1
if(!norange)
if ((!in_range(src, usr) || !istype(src.loc, /turf)) && !istype(usr, /mob/living/silicon))
return 1
src.add_fingerprint(usr)
var/area/A = get_area(src)
A.powerupdate = 1
add_fingerprint(usr)
return 0
/obj/machinery/proc/can_be_used_by(mob/user, be_close = 1)
if(!interact_offline && stat & (NOPOWER|BROKEN))
return 0
if(!user.canUseTopic(src, be_close))
return 0
return 1
////////////////////////////////////////////////////////////////////////////////////////////
/mob/proc/canUseTopic(atom/movable/M, be_close = 1)
return
/mob/dead/observer/canUseTopic(atom/movable/M, be_close = 1)
if(check_rights(R_ADMIN, 0))
return
/mob/living/canUseTopic(atom/movable/M, be_close = 1, no_dextery = 0)
if(no_dextery)
src << "<span class='notice'>You don't have the dexterity to do this!</span>"
return 0
return be_close && !in_range(M, src)
/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close = 1)
if(restrained() || lying || stat || stunned || weakened)
return
if(be_close && !in_range(M, src))
if(M_TK in mutations)
var/mob/living/carbon/human/H = M
if(istype(H.l_hand, /obj/item/tk_grab) || istype(H.r_hand, /obj/item/tk_grab))
return 1
return
if(!isturf(M.loc) && M.loc != src)
return
return 1
/mob/living/silicon/ai/canUseTopic(atom/movable/M)
if(stat)
return
//stop AIs from leaving windows open and using then after they lose vision
//apc_override is needed here because AIs use their own APC when powerless
if(cameranet && !cameranet.checkTurfVis(get_turf(M)) && !apc_override)
return
return 1
/mob/living/silicon/robot/canUseTopic(atom/movable/M)
if(stat || lockcharge || stunned || weakened)
return
return 1
////////////////////////////////////////////////////////////////////////////////////////////
/obj/machinery/attack_ai(var/mob/user as mob)
if(isAI(user))
var/mob/living/silicon/ai/A = user
@@ -351,22 +379,6 @@ Class Procs:
user << "<span class='notice'>[A.name] replaced with [B.name].</span>"
shouldplaysound = 1
break
// Power cell snowflake
for(var/obj/item/weapon/cell/A in component_parts)
for(var/D in CB.req_components)
if(ispath(A.type, D))
P = D
break
for(var/obj/item/weapon/cell/B in W.contents)
if(istype(B, P) && istype(A, P))
if(B.rating > A.rating)
W.remove_from_storage(B, src)
W.handle_item_insertion(A, 1)
component_parts -= A
component_parts += B
B.loc = null
user << "<span class='notice'>[A.name] replaced with [B.name].</span>"
break
RefreshParts()
else
user << "<span class='notice'>Following parts detected in the machine:</span>"
+1 -1
View File
@@ -460,7 +460,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
/obj/machinery/newscaster/Topic(href, href_list)
if(..())
return
return 1
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
if(href_list["set_channel_name"])
+1 -1
View File
@@ -233,7 +233,7 @@ Status: []<BR>"},
/obj/machinery/porta_turret/Topic(href, href_list)
if (..())
return
return 1
usr.set_machine(src)
src.add_fingerprint(usr)
if ((href_list["power"]) && (src.allowed(usr)))
+1 -1
View File
@@ -144,7 +144,7 @@
/obj/machinery/programmable/Topic(href, href_list)
if(..())
return
return 1
usr.set_machine(src)
add_fingerprint(usr)
switch(href_list["operation"])
+6 -3
View File
@@ -19,17 +19,20 @@
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/cell/high(src)
component_parts += new /obj/item/weapon/stock_parts/cell/high(src)
RefreshParts()
build_icon()
/obj/machinery/recharge_station/upgraded/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/cyborgrecharger(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(src)
component_parts += new /obj/item/weapon/cell/hyper(src)
component_parts += new /obj/item/weapon/stock_parts/cell/hyper(src)
RefreshParts()
build_icon()
/obj/machinery/recharge_station/RefreshParts()
recharge_speed = 0
@@ -38,7 +41,7 @@
recharge_speed += C.rating * 100
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
repairs += M.rating - 1
for(var/obj/item/weapon/cell/C in component_parts)
for(var/obj/item/weapon/stock_parts/cell/C in component_parts)
recharge_speed *= C.maxcharge / 10000
/obj/machinery/recharge_station/process()
+6 -6
View File
@@ -5,7 +5,7 @@
icon_state = "sheater0"
name = "space heater"
desc = "Made by Space Amish using traditional space techniques, this heater is guaranteed not to set the station on fire."
var/obj/item/weapon/cell/cell
var/obj/item/weapon/stock_parts/cell/cell
var/on = 0
var/open = 0
var/set_temperature = 50 // in celcius, add T0C for kelvin
@@ -52,14 +52,14 @@
..(severity)
attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/cell))
if(istype(I, /obj/item/weapon/stock_parts/cell))
if(open)
if(cell)
user << "There is already a power cell inside."
return
else
// insert cell
var/obj/item/weapon/cell/C = usr.get_active_hand()
var/obj/item/weapon/stock_parts/cell/C = usr.get_active_hand()
if(istype(C))
user.drop_item()
cell = C
@@ -120,8 +120,8 @@
Topic(href, href_list)
if (usr.stat)
return
if (..())
return 1
if ((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
@@ -144,7 +144,7 @@
if("cellinstall")
if(open && !cell)
var/obj/item/weapon/cell/C = usr.get_active_hand()
var/obj/item/weapon/stock_parts/cell/C = usr.get_active_hand()
if(istype(C))
usr.drop_item()
cell = C
+1 -1
View File
@@ -153,7 +153,7 @@
/obj/machinery/suit_storage_unit/Topic(href, href_list) //I fucking HATE this proc
if(..())
return
return 1
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
usr.set_machine(src)
if (href_list["toggleUV"])
+2
View File
@@ -39,6 +39,8 @@
onclose(user, "syndbeacon")
Topic(href, href_list)
if(..())
return 1
if(href_list["betraitor"])
if(charges < 1)
src.updateUsrDialog()
+1 -1
View File
@@ -93,7 +93,7 @@
/obj/machinery/computer/teleporter/Topic(href, href_list)
if(..())
return
return 1
if(href_list["eject"])
eject()
+1 -1
View File
@@ -462,7 +462,7 @@
/obj/machinery/turretid/Topic(href, href_list)
if(..())
return
return 1
if (src.locked)
if (!istype(usr, /mob/living/silicon))
usr << "Control panel is locked!"
+12 -12
View File
@@ -397,7 +397,7 @@
/obj/machinery/vending/Topic(href, href_list)
if(..())
return
return 1
if(istype(usr,/mob/living/silicon))
if(istype(usr,/mob/living/silicon/robot))
@@ -919,7 +919,7 @@
/obj/item/clothing/head/helmet/gladiator = 1,/obj/item/clothing/under/gimmick/rank/captain/suit = 1,/obj/item/clothing/head/flatcap = 1,
/obj/item/clothing/suit/storage/labcoat/mad = 1,/obj/item/clothing/glasses/gglasses = 1,/obj/item/clothing/shoes/jackboots = 1,
/obj/item/clothing/under/schoolgirl = 1,/obj/item/clothing/head/kitty = 1,/obj/item/clothing/under/blackskirt = 1,/obj/item/clothing/head/beret = 1,
/obj/item/clothing/tie/waistcoat = 1,/obj/item/clothing/under/suit_jacket = 1,/obj/item/clothing/head/that =1,/obj/item/clothing/under/kilt = 1,/obj/item/clothing/head/beret = 1,/obj/item/clothing/tie/waistcoat = 1,
/obj/item/clothing/accessory/waistcoat = 1,/obj/item/clothing/under/suit_jacket = 1,/obj/item/clothing/head/that =1,/obj/item/clothing/under/kilt = 1,/obj/item/clothing/head/beret = 1,/obj/item/clothing/accessory/waistcoat = 1,
/obj/item/clothing/glasses/monocle =1,/obj/item/clothing/head/bowlerhat = 1,/obj/item/weapon/cane = 1,/obj/item/clothing/under/sl_suit = 1,
/obj/item/clothing/mask/fakemoustache = 1,/obj/item/clothing/suit/bio_suit/plaguedoctorsuit = 1,/obj/item/clothing/head/plaguedoctorhat = 1,/obj/item/clothing/mask/gas/plaguedoctor = 1,
/obj/item/clothing/under/owl = 1,/obj/item/clothing/mask/gas/owl_mask = 1,/obj/item/clothing/suit/apron = 1,/obj/item/clothing/under/waiter = 1,
@@ -930,7 +930,7 @@
/obj/item/clothing/suit/wizrobe/fake = 1,/obj/item/clothing/head/wizard/fake = 1,/obj/item/weapon/staff = 3,/obj/item/clothing/mask/gas/sexyclown = 1,
/obj/item/clothing/under/sexyclown = 1,/obj/item/clothing/mask/gas/sexymime = 1,/obj/item/clothing/under/sexymime = 1,/obj/item/clothing/suit/apron/overalls = 1,
/obj/item/clothing/head/rabbitears =1, /obj/item/clothing/head/sombrero = 1, /obj/item/clothing/suit/poncho = 1,
/obj/item/clothing/suit/poncho/green = 1, /obj/item/clothing/suit/poncho/red = 1, /obj/item/clothing/tie/blue = 1, /obj/item/clothing/tie/red = 1, /obj/item/clothing/tie/black = 1, /obj/item/clothing/tie/horrible = 1,
/obj/item/clothing/suit/poncho/green = 1, /obj/item/clothing/suit/poncho/red = 1, /obj/item/clothing/accessory/blue = 1, /obj/item/clothing/accessory/red = 1, /obj/item/clothing/accessory/black = 1, /obj/item/clothing/accessory/horrible = 1,
/obj/item/clothing/under/maid = 1, /obj/item/clothing/under/janimaid = 1)
contraband = list(/obj/item/clothing/suit/judgerobe = 1,/obj/item/clothing/head/powdered_wig = 1,/obj/item/weapon/gun/magic/wand = 1)
premium = list(/obj/item/clothing/suit/hgpirate = 1, /obj/item/clothing/head/hgpiratecap = 1, /obj/item/clothing/head/helmet/roman = 1, /obj/item/clothing/head/helmet/roman/legionaire = 1, /obj/item/clothing/under/roman = 1, /obj/item/clothing/shoes/roman = 1)
@@ -979,8 +979,8 @@
icon_state = "engivend"
icon_deny = "engivend-deny"
req_access_txt = "11" //Engineering Equipment access
products = list(/obj/item/clothing/glasses/meson = 2,/obj/item/device/multitool = 4,/obj/item/weapon/airlock_electronics = 10,/obj/item/weapon/module/power_control = 10,/obj/item/weapon/airalarm_electronics = 10,/obj/item/weapon/cell/high = 10)
contraband = list(/obj/item/weapon/cell/potato = 3)
products = list(/obj/item/clothing/glasses/meson = 2,/obj/item/device/multitool = 4,/obj/item/weapon/airlock_electronics = 10,/obj/item/weapon/module/power_control = 10,/obj/item/weapon/airalarm_electronics = 10,/obj/item/weapon/stock_parts/cell/high = 10)
contraband = list(/obj/item/weapon/stock_parts/cell/potato = 3)
premium = list(/obj/item/weapon/storage/belt/utility = 3)
//This one's from bay12
@@ -993,7 +993,7 @@
products = list(/obj/item/clothing/under/rank/chief_engineer = 4,/obj/item/clothing/under/rank/engineer = 4,/obj/item/clothing/shoes/orange = 4,/obj/item/clothing/head/hardhat = 4,
/obj/item/weapon/storage/belt/utility = 4,/obj/item/clothing/glasses/meson = 4,/obj/item/clothing/gloves/yellow = 4, /obj/item/weapon/screwdriver = 12,
/obj/item/weapon/crowbar = 12,/obj/item/weapon/wirecutters = 12,/obj/item/device/multitool = 12,/obj/item/weapon/wrench = 12,/obj/item/device/t_scanner = 12,
/obj/item/stack/cable_coil/heavyduty = 8, /obj/item/weapon/cell = 8, /obj/item/weapon/weldingtool = 8,/obj/item/clothing/head/welding = 8,
/obj/item/stack/cable_coil/heavyduty = 8, /obj/item/weapon/stock_parts/cell = 8, /obj/item/weapon/weldingtool = 8,/obj/item/clothing/head/welding = 8,
/obj/item/weapon/light/tube = 10,/obj/item/clothing/suit/fire = 4, /obj/item/weapon/stock_parts/scanning_module = 5,/obj/item/weapon/stock_parts/micro_laser = 5,
/obj/item/weapon/stock_parts/matter_bin = 5,/obj/item/weapon/stock_parts/manipulator = 5,/obj/item/weapon/stock_parts/console_screen = 5)
// There was an incorrect entry (cablecoil/power). I improvised to cablecoil/heavyduty.
@@ -1008,7 +1008,7 @@
icon_deny = "robotics-deny"
req_access_txt = "29"
products = list(/obj/item/clothing/suit/storage/labcoat = 4,/obj/item/clothing/under/rank/roboticist = 4,/obj/item/stack/cable_coil = 4,/obj/item/device/flash = 4,
/obj/item/weapon/cell/high = 12, /obj/item/device/assembly/prox_sensor = 3,/obj/item/device/assembly/signaler = 3,/obj/item/device/healthanalyzer = 3,
/obj/item/weapon/stock_parts/cell/high = 12, /obj/item/device/assembly/prox_sensor = 3,/obj/item/device/assembly/signaler = 3,/obj/item/device/healthanalyzer = 3,
/obj/item/weapon/scalpel = 2,/obj/item/weapon/circular_saw = 2,/obj/item/weapon/tank/anesthetic = 2,/obj/item/clothing/mask/breath/medical = 5,
/obj/item/weapon/screwdriver = 5,/obj/item/weapon/crowbar = 5)
//everything after the power cell had no amounts, I improvised. -Sayu
@@ -1097,11 +1097,11 @@
/obj/item/clothing/under/pants/camo = 1,/obj/item/clothing/under/pants/blackjeans=2,/obj/item/clothing/under/pants/khaki=2,
/obj/item/clothing/under/pants/white=2,/obj/item/clothing/under/pants/red=1,/obj/item/clothing/under/pants/black=2,
/obj/item/clothing/under/pants/tan=2,/obj/item/clothing/under/pants/blue=1,/obj/item/clothing/under/pants/track=1,
/obj/item/clothing/tie/scarf/red=1,/obj/item/clothing/tie/scarf/green=1,/obj/item/clothing/tie/scarf/darkblue=1,
/obj/item/clothing/tie/scarf/purple=1,/obj/item/clothing/tie/scarf/yellow=1,/obj/item/clothing/tie/scarf/orange=1,
/obj/item/clothing/tie/scarf/lightblue=1,/obj/item/clothing/tie/scarf/white=1,/obj/item/clothing/tie/scarf/black=1,
/obj/item/clothing/tie/scarf/zebra=1,/obj/item/clothing/tie/scarf/christmas=1,/obj/item/clothing/tie/stripedredscarf=1,
/obj/item/clothing/tie/stripedbluescarf=1,/obj/item/clothing/tie/stripedgreenscarf=1,/obj/item/clothing/tie/waistcoat=1,
/obj/item/clothing/accessory/scarf/red=1,/obj/item/clothing/accessory/scarf/green=1,/obj/item/clothing/accessory/scarf/darkblue=1,
/obj/item/clothing/accessory/scarf/purple=1,/obj/item/clothing/accessory/scarf/yellow=1,/obj/item/clothing/accessory/scarf/orange=1,
/obj/item/clothing/accessory/scarf/lightblue=1,/obj/item/clothing/accessory/scarf/white=1,/obj/item/clothing/accessory/scarf/black=1,
/obj/item/clothing/accessory/scarf/zebra=1,/obj/item/clothing/accessory/scarf/christmas=1,/obj/item/clothing/accessory/stripedredscarf=1,
/obj/item/clothing/accessory/stripedbluescarf=1,/obj/item/clothing/accessory/stripedgreenscarf=1,/obj/item/clothing/accessory/waistcoat=1,
/obj/item/clothing/under/sundress=2,/obj/item/clothing/under/stripeddress = 1, /obj/item/clothing/under/sailordress = 1, /obj/item/clothing/under/redeveninggown = 1, /obj/item/clothing/under/blacktango=1,/obj/item/clothing/suit/jacket=3,
/obj/item/clothing/glasses/regular=2,/obj/item/clothing/head/sombrero=1,/obj/item/clothing/suit/poncho=1,
/obj/item/clothing/suit/ianshirt=1,/obj/item/clothing/shoes/laceup=2,/obj/item/clothing/shoes/black=4,
+1 -1
View File
@@ -53,7 +53,7 @@
ME.attach(src)
return
/obj/mecha/combat/gygax/dark/add_cell(var/obj/item/weapon/cell/C=null)
/obj/mecha/combat/gygax/dark/add_cell(var/obj/item/weapon/stock_parts/cell/C=null)
if(C)
C.forceMove(src)
cell = C
+5 -3
View File
@@ -29,7 +29,7 @@
var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act.
//the values in this list show how much damage will pass through, not how much will be absorbed.
var/list/damage_absorption = list("brute"=0.8,"fire"=1.2,"bullet"=0.9,"laser"=1,"energy"=1,"bomb"=1)
var/obj/item/weapon/cell/cell
var/obj/item/weapon/stock_parts/cell/cell
var/state = 0
var/list/log = new
var/last_message = 0
@@ -115,7 +115,7 @@
internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src)
return internal_tank
/obj/mecha/proc/add_cell(var/obj/item/weapon/cell/C=null)
/obj/mecha/proc/add_cell(var/obj/item/weapon/stock_parts/cell/C=null)
if(C)
C.forceMove(src)
cell = C
@@ -781,7 +781,7 @@
user << "You screw the cell in place"
return
else if(istype(W, /obj/item/weapon/cell))
else if(istype(W, /obj/item/weapon/stock_parts/cell))
if(state==4)
if(!src.cell)
user << "You install the powercell"
@@ -1231,6 +1231,8 @@
/////////////////////////
/obj/mecha/proc/operation_allowed(mob/living/carbon/human/H)
if(!ishuman(H))
return 0
for(var/ID in list(H.get_active_hand(), H.wear_id, H.belt))
if(src.check_access(ID,src.operation_req_access))
return 1
+1 -1
View File
@@ -91,7 +91,7 @@
const_holder.icon_state = "ripley0"
const_holder.density = 1
const_holder.overlays.len = 0
qdel(src)
del(src)
return
+14 -1
View File
@@ -480,6 +480,19 @@
if(B.contents.len < B.storage_slots && w_class <= B.max_w_class)
return 1
return 0
if(slot_tie)
if(!H.w_uniform)
if(!disable_warning)
H << "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>"
return 0
var/obj/item/clothing/under/uniform = H.w_uniform
if(uniform.accessories.len && !uniform.can_attach_accessory(src))
if (!disable_warning)
H << "<span class='warning'>You already have an accessory of this type attached to your [uniform].</span>"
return 0
if( !(slot_flags & SLOT_TIE) )
return 0
return 1
return 0 //Unsupported slot
//END HUMAN
@@ -551,7 +564,7 @@
if( src in usr )
attack_self(usr)
return
else if(istype(src, /obj/item/clothing/tie))
else if(istype(src, /obj/item/clothing/accessory))
if(istype(src.loc,/obj/item/clothing/under))
attack_self(usr)
@@ -17,7 +17,7 @@
var/on = 0 //is it turned on?
var/cover_open = 0 //is the cover open?
var/obj/item/weapon/cell/cell
var/obj/item/weapon/stock_parts/cell/cell
var/max_cooling = 12 //in degrees per second - probably don't need to mess with heat capacity here
var/charge_consumption = 16.6 //charge per second at max_cooling
var/thermostat = T20C
@@ -25,7 +25,7 @@
//TODO: make it heat up the surroundings when not in space
/obj/item/device/suit_cooling_unit/New()
cell = new/obj/item/weapon/cell() //comes with the crappy default power cell - high-capacity ones shouldn't be hard to find
cell = new/obj/item/weapon/stock_parts/cell() //comes with the crappy default power cell - high-capacity ones shouldn't be hard to find
cell.loc = src
/obj/item/device/suit_cooling_unit/proc/cool_mob(mob/M)
@@ -132,7 +132,7 @@
updateicon()
return
if (istype(W, /obj/item/weapon/cell))
if (istype(W, /obj/item/weapon/stock_parts/cell))
if(cover_open)
if(cell)
user << "There is a [cell] already installed here."
+2 -2
View File
@@ -49,7 +49,7 @@
construction_time = 350
construction_cost = list("metal"=40000)
var/wires = 0.0
var/obj/item/weapon/cell/cell = null
var/obj/item/weapon/stock_parts/cell/cell = null
/obj/item/robot_parts/head
name = "robot head"
@@ -251,7 +251,7 @@
/obj/item/robot_parts/chest/attackby(obj/item/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/cell))
if(istype(W, /obj/item/weapon/stock_parts/cell))
if(src.cell)
user << "\blue You have already inserted a cell!"
return
+2 -2
View File
@@ -80,7 +80,7 @@
/obj/item/device/lightreplacer,
/obj/item/device/taperecorder,
/obj/item/device/hailer,
/obj/item/clothing/tie/holobadge,
/obj/item/clothing/accessory/holobadge,
/obj/structure/closet/crate/secure,
/obj/structure/closet/secure_closet,
/obj/machinery/librarycomp,
@@ -444,4 +444,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
+58 -13
View File
@@ -19,7 +19,8 @@
var/safety = 1 //if you can zap people with the defibs on harm mode
var/powered = 0 //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise
var/obj/item/weapon/twohanded/shockpaddles/paddles
var/obj/item/weapon/cell/high/bcell = null
var/obj/item/weapon/stock_parts/cell/high/bcell = null
var/combat = 0 //can we revive through space suits?
/obj/item/weapon/defibrillator/New() //starts without a cell for rnd
..()
@@ -67,7 +68,7 @@
overlays += "defibunit-charge[ratio]"
/obj/item/weapon/defibrillator/CheckParts()
bcell = locate(/obj/item/weapon/cell) in contents
bcell = locate(/obj/item/weapon/stock_parts/cell) in contents
update_icon()
/obj/item/weapon/defibrillator/ui_action_click()
@@ -78,8 +79,8 @@
return
/obj/item/weapon/defibrillator/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/cell))
var/obj/item/weapon/cell/C = W
if(istype(W, /obj/item/weapon/stock_parts/cell))
var/obj/item/weapon/stock_parts/cell/C = W
if(bcell)
user << "<span class='notice'>[src] already has a cell.</span>"
else
@@ -195,6 +196,49 @@
paddles.cooldown = 0
paddles.update_icon()
update_icon()
/obj/item/weapon/defibrillator/compact
name = "compact defibrillator"
desc = "A belt-equipped defibrillator that can be rapidly deployed."
icon_state = "defibcompact"
item_state = "defibcompact"
w_class = 3
slot_flags = SLOT_BELT
origin_tech = "biotech=4"
/obj/item/weapon/defibrillator/compact/ui_action_click()
if(usr.get_item_by_slot(slot_belt) == src)
toggle_paddles()
else
usr << "<span class='warning'>Strap the defibrillator's belt on first!</span>"
return
/obj/item/weapon/defibrillator/compact/loaded/New()
..()
paddles = make_paddles()
bcell = new(src)
update_icon()
return
/obj/item/weapon/defibrillator/compact/combat
name = "combat defibrillator"
desc = "A belt-equipped blood-red defibrillator that can be rapidly deployed. Does not have the restrictions or safeties of conventional defibrillators and can revive through space suits."
combat = 1
safety = 0
/obj/item/weapon/defibrillator/compact/combat/loaded/New()
..()
paddles = make_paddles()
bcell = new /obj/item/weapon/stock_parts/cell/infinite(src)
update_icon()
return
/obj/item/weapon/defibrillator/compact/combat/attackby(obj/item/weapon/W, mob/user)
if(W == paddles)
paddles.unwield()
toggle_paddles()
update_icon()
return
//paddles
@@ -254,7 +298,7 @@
else
return 1
/obj/item/weapon/twohanded/shockpaddles/attack(mob/M as mob, mob/user as mob)
/obj/item/weapon/twohanded/shockpaddles/attack(mob/M, mob/user)
var/tobehealed
var/threshold = -config.health_threshold_dead
var/mob/living/carbon/human/H = M
@@ -300,18 +344,19 @@
playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
var/tplus = world.time - H.timeofdeath
var/tlimit = 3000 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 900 //brain damage starts setting in on the patient after some time left rotting
var/tlimit = 6000 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 3000 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
for(var/obj/item/carried_item in H.contents)
if((istype(carried_item, /obj/item/clothing/suit/armor)) || (istype(carried_item, /obj/item/clothing/suit/space)))
user.visible_message("<span class='notice'>[defib] buzzes: Patient's chest is obscured. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 0)
busy = 0
update_icon()
return
if(istype(carried_item, /obj/item/clothing/suit/space))
if(!defib.combat)
user.visible_message("<span class='notice'>[defib] buzzes: Patient's chest is obscured. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 0)
busy = 0
update_icon()
return
if(H.stat == 2)
var/health = H.health
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
@@ -66,7 +66,7 @@
/obj/item/weapon/plastique/afterattack(atom/target as obj|turf, mob/user as mob, flag)
if (!flag)
return
if (ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/) || istype(target, /obj/machinery/door/airlock/hatch/gamma))
if (ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage) || istype(target, /obj/item/clothing/accessory/storage) || istype(target, /obj/item/clothing/under))
return
user << "Planting explosives..."
@@ -104,7 +104,7 @@
/obj/item/device/paicard,
/obj/item/device/violin,
/obj/item/weapon/storage/belt/utility/full,
/obj/item/clothing/tie/horrible)
/obj/item/clothing/accessory/horrible)
if(!ispath(gift_type,/obj/item)) return
@@ -54,7 +54,7 @@
/obj/item/weapon/melee/energy/sword/cyborg/attack(mob/M, var/mob/living/silicon/robot/R)
if(R.cell)
var/obj/item/weapon/cell/C = R.cell
var/obj/item/weapon/stock_parts/cell/C = R.cell
if(active && !(C.use(hitcost)))
attack_self()
R << "<span class='notice'>It's out of charge!</span>"
+15 -15
View File
@@ -1,4 +1,4 @@
/obj/item/weapon/cell
/obj/item/weapon/stock_parts/cell
name = "power cell"
desc = "A rechargable electrochemical power cell."
icon = 'icons/obj/power.dmi'
@@ -13,7 +13,7 @@
w_class = 3.0
var/charge = 0 // note %age conveted to actual charge in New
var/maxcharge = 10000
var/rating = 1
rating = 1
m_amt = 700
g_amt = 50
var/rigged = 0 // true if rigged to explode
@@ -25,7 +25,7 @@
viewers(user) << "<span class='suicide'>[user] is licking the electrodes of the [src.name]! It looks like \he's trying to commit suicide.</span>"
return (FIRELOSS)
/obj/item/weapon/cell/crap
/obj/item/weapon/stock_parts/cell/crap
name = "\improper Nanotrasen brand rechargable AA battery"
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
origin_tech = "powerstorage=0"
@@ -33,22 +33,22 @@
rating = 2
g_amt = 40
/obj/item/weapon/cell/crap/empty/New()
/obj/item/weapon/stock_parts/cell/crap/empty/New()
..()
charge = 0
/obj/item/weapon/cell/secborg
/obj/item/weapon/stock_parts/cell/secborg
name = "\improper Security borg rechargable D battery"
origin_tech = "powerstorage=0"
maxcharge = 6000 //6000 max charge / 1000 charge per shot = six shots
rating = 2.5
g_amt = 40
/obj/item/weapon/cell/secborg/empty/New()
/obj/item/weapon/stock_parts/cell/secborg/empty/New()
..()
charge = 0
/obj/item/weapon/cell/high
/obj/item/weapon/stock_parts/cell/high
name = "high-capacity power cell"
origin_tech = "powerstorage=2"
icon_state = "hcell"
@@ -56,11 +56,11 @@
rating = 3
g_amt = 60
/obj/item/weapon/cell/high/empty/New()
/obj/item/weapon/stock_parts/cell/high/empty/New()
..()
charge = 0
/obj/item/weapon/cell/super
/obj/item/weapon/stock_parts/cell/super
name = "super-capacity power cell"
origin_tech = "powerstorage=5"
icon_state = "scell"
@@ -69,11 +69,11 @@
rating = 4
construction_cost = list("metal"=750,"glass"=100)
/obj/item/weapon/cell/super/empty/New()
/obj/item/weapon/stock_parts/cell/super/empty/New()
..()
charge = 0
/obj/item/weapon/cell/hyper
/obj/item/weapon/stock_parts/cell/hyper
name = "hyper-capacity power cell"
origin_tech = "powerstorage=6"
icon_state = "hpcell"
@@ -82,11 +82,11 @@
g_amt = 80
construction_cost = list("metal"=500,"glass"=150,"gold"=200,"silver"=200)
/obj/item/weapon/cell/hyper/empty/New()
/obj/item/weapon/stock_parts/cell/hyper/empty/New()
..()
charge = 0
/obj/item/weapon/cell/infinite
/obj/item/weapon/stock_parts/cell/infinite
name = "infinite-capacity power cell!"
icon_state = "icell"
origin_tech = null
@@ -96,7 +96,7 @@
use()
return 1
/obj/item/weapon/cell/potato
/obj/item/weapon/stock_parts/cell/potato
name = "potato battery"
desc = "A rechargable starch based power cell."
origin_tech = "powerstorage=1"
@@ -110,7 +110,7 @@
minor_fault = 1
/obj/item/weapon/cell/slime
/obj/item/weapon/stock_parts/cell/slime
name = "charged slime core"
desc = "A yellow slime core infused with plasma, it crackles with power."
origin_tech = "powerstorage=2;biotech=4"
@@ -121,8 +121,8 @@
/obj/item/weapon/storage/firstaid/tactical/New()
..()
if (empty) return
new /obj/item/clothing/tie/stethoscope( src )
new /obj/item/weapon/surgicaldrill(src)
new /obj/item/clothing/accessory/stethoscope( src )
new /obj/item/weapon/defibrillator/compact/combat/loaded(src)
new /obj/item/weapon/reagent_containers/hypospray/combat(src)
new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
new /obj/item/weapon/reagent_containers/pill/dermaline(src)
@@ -0,0 +1,85 @@
//A storage item intended to be used by other items to provide storage functionality.
//Types that use this should consider overriding emp_act() and hear_talk(), unless they shield their contents somehow.
/obj/item/weapon/storage/internal
var/obj/item/master_item
/obj/item/weapon/storage/internal/New(obj/item/MI)
master_item = MI
loc = master_item
name = master_item.name
verbs -= /obj/item/verb/verb_pickup //make sure this is never picked up.
..()
/obj/item/weapon/storage/internal/attack_hand()
return //make sure this is never picked up
/obj/item/weapon/storage/internal/mob_can_equip()
return 0 //make sure this is never picked up
//Helper procs to cleanly implement internal storages - storage items that provide inventory slots for other items.
//These procs are completely optional, it is up to the master item to decide when it's storage get's opened by calling open()
//However they are helpful for allowing the master item to pretend it is a storage item itself.
//If you are using these you will probably want to override attackby() as well.
//See /obj/item/clothing/suit/storage for an example.
//items that use internal storage have the option of calling this to emulate default storage MouseDrop behaviour.
//returns 1 if the master item's parent's MouseDrop() should be called, 0 otherwise. It's strange, but no other way of
//doing it without the ability to call another proc's parent, really.
/obj/item/weapon/storage/internal/proc/handle_mousedrop(mob/user as mob, obj/over_object as obj)
if (ishuman(user) || ismonkey(user)) //so monkeys can take off their backpacks -- Urist
if (istype(user.loc,/obj/mecha)) // stops inventory actions in a mech
return 0
if(over_object == user && Adjacent(user)) // this must come before the screen objects only block
src.open(user)
return 0
if (!( istype(over_object, /obj/screen) ))
return 1
//makes sure master_item is equipped before putting it in hand, so that we can't drag it into our hand from miles away.
//there's got to be a better way of doing this...
if (!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user))
return 0
if (!( user.restrained() ) && !( user.stat ))
switch(over_object.name)
if("r_hand")
user.u_equip(master_item)
user.put_in_r_hand(master_item)
if("l_hand")
user.u_equip(master_item)
user.put_in_l_hand(master_item)
master_item.add_fingerprint(user)
return 0
return 0
//items that use internal storage have the option of calling this to emulate default storage attack_hand behaviour.
//returns 1 if the master item's parent's attack_hand() should be called, 0 otherwise.
//It's strange, but no other way of doing it without the ability to call another proc's parent, really.
/obj/item/weapon/storage/internal/proc/handle_attack_hand(mob/user as mob)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.l_store == master_item && !H.get_active_hand()) //Prevents opening if it's in a pocket.
H.put_in_hands(master_item)
H.l_store = null
return 0
if(H.r_store == master_item && !H.get_active_hand())
H.put_in_hands(master_item)
H.r_store = null
return 0
src.add_fingerprint(user)
if (master_item.loc == user)
src.open(user)
return 0
for(var/mob/M in range(1, master_item.loc))
if (M.s_active == src)
src.close(M)
return 1
/obj/item/weapon/storage/internal/Adjacent(var/atom/neighbor)
return master_item.Adjacent(neighbor)
@@ -104,12 +104,12 @@
New()
..()
new /obj/item/clothing/tie/medal/gold/heroism(src)
new /obj/item/clothing/tie/medal/silver/security(src)
new /obj/item/clothing/tie/medal/silver/valor(src)
new /obj/item/clothing/tie/medal/nobel_science(src)
new /obj/item/clothing/tie/medal/bronze_heart(src)
new /obj/item/clothing/tie/medal/conduct(src)
new /obj/item/clothing/tie/medal/conduct(src)
new /obj/item/clothing/tie/medal/conduct(src)
new /obj/item/clothing/tie/medal/gold/captain(src)
new /obj/item/clothing/accessory/medal/gold/heroism(src)
new /obj/item/clothing/accessory/medal/silver/security(src)
new /obj/item/clothing/accessory/medal/silver/valor(src)
new /obj/item/clothing/accessory/medal/nobel_science(src)
new /obj/item/clothing/accessory/medal/bronze_heart(src)
new /obj/item/clothing/accessory/medal/conduct(src)
new /obj/item/clothing/accessory/medal/conduct(src)
new /obj/item/clothing/accessory/medal/conduct(src)
new /obj/item/clothing/accessory/medal/gold/captain(src)
@@ -22,6 +22,7 @@
var/allow_quick_gather //Set this variable to allow the object to have the 'toggle mode' verb, which quickly collects all items from a tile.
var/collection_mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/foldable = null // BubbleWrap - if set, can be folded (when empty) into a sheet of cardboard
var/use_sound = "rustle" //sound played when used. null for no sound.
/obj/item/weapon/storage/MouseDrop(obj/over_object as obj)
if (ishuman(usr) || ismonkey(usr)) //so monkeys can take off their backpacks -- Urist
@@ -100,6 +101,15 @@
if(user.s_active == src)
user.s_active = null
return
/obj/item/weapon/storage/proc/open(mob/user as mob)
if (src.use_sound)
playsound(src.loc, src.use_sound, 50, 1, -5)
orient2hud(user)
if (user.s_active)
user.s_active.close(user)
show_to(user)
/obj/item/weapon/storage/proc/close(mob/user as mob)
@@ -450,6 +460,39 @@
del(src)
//BubbleWrap END
//Returns the storage depth of an atom. This is the number of storage items the atom is contained in before reaching toplevel (the area).
//Returns -1 if the atom was not found on container.
/atom/proc/storage_depth(atom/container)
var/depth = 0
var/atom/cur_atom = src
while (cur_atom && !(cur_atom in container.contents))
if (isarea(cur_atom))
return -1
if (istype(cur_atom.loc, /obj/item/weapon/storage))
depth++
cur_atom = cur_atom.loc
if (!cur_atom)
return -1 //inside something with a null loc.
return depth
//Like storage depth, but returns the depth to the nearest turf
//Returns -1 if no top level turf (a loc was null somewhere, or a non-turf atom's loc was an area somehow).
/atom/proc/storage_depth_turf()
var/depth = 0
var/atom/cur_atom = src
while (cur_atom && !isturf(cur_atom))
if (isarea(cur_atom))
return -1
if (istype(cur_atom.loc, /obj/item/weapon/storage))
depth++
cur_atom = cur_atom.loc
if (!cur_atom)
return -1 //inside something with a null loc.
return depth
+4 -4
View File
@@ -12,7 +12,7 @@
attack_verb = list("beaten")
var/stunforce = 7
var/status = 0
var/obj/item/weapon/cell/high/bcell = null
var/obj/item/weapon/stock_parts/cell/high/bcell = null
var/hitcost = 1500
/obj/item/weapon/melee/baton/suicide_act(mob/user)
@@ -25,7 +25,7 @@
return
/obj/item/weapon/melee/baton/CheckParts()
bcell = locate(/obj/item/weapon/cell) in contents
bcell = locate(/obj/item/weapon/stock_parts/cell) in contents
update_icon()
/obj/item/weapon/melee/baton/loaded/New() //this one starts with a cell pre-installed.
@@ -61,8 +61,8 @@
user <<"<span class='warning'>The baton does not have a power source installed.</span>"
/obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/cell))
var/obj/item/weapon/cell/C = W
if(istype(W, /obj/item/weapon/stock_parts/cell))
var/obj/item/weapon/stock_parts/cell/C = W
if(bcell)
user << "<span class='notice'>[src] already has a cell.</span>"
else
+6
View File
@@ -20,6 +20,12 @@
// What reagents should be logged when transferred TO this object?
// Reagent ID => friendly name
var/list/reagents_to_log=list()
/obj/Topic(href, href_list, var/nowindow = 0)
// Calling Topic without a corresponding window open causes runtime errors
if(nowindow)
return 0
return ..()
/obj/Destroy()
machines -= src
+5 -5
View File
@@ -56,11 +56,11 @@
icon = 'icons/obj/power.dmi'
icon_state = "cell"
item_to_spawn()
return pick(prob(10);/obj/item/weapon/cell/crap,\
prob(40);/obj/item/weapon/cell,\
prob(40);/obj/item/weapon/cell/high,\
prob(9);/obj/item/weapon/cell/super,\
prob(1);/obj/item/weapon/cell/hyper)
return pick(prob(10);/obj/item/weapon/stock_parts/cell/crap,\
prob(40);/obj/item/weapon/stock_parts/cell,\
prob(40);/obj/item/weapon/stock_parts/cell/high,\
prob(9);/obj/item/weapon/stock_parts/cell/super,\
prob(1);/obj/item/weapon/stock_parts/cell/hyper)
/obj/random/bomb_supply
-224
View File
@@ -1,224 +0,0 @@
/obj/item/clothing/suit/storage
var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set)
var/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set)
var/max_combined_w_class = 4 //The sum of the w_classes of all the items in this storage item.
var/storage_slots = 2 //The number of storage slots in this container.
var/obj/screen/storage/boxes = null
var/obj/screen/close/closer = null
/obj/item/clothing/suit/storage/proc/return_inv()
var/list/L = list( )
L += src.contents
for(var/obj/item/weapon/storage/S in src)
L += S.return_inv()
for(var/obj/item/weapon/gift/G in src)
L += G.gift
if (istype(G.gift, /obj/item/weapon/storage))
L += G.gift:return_inv()
return L
/obj/item/clothing/suit/storage/proc/show_to(mob/user as mob)
user.client.screen -= src.boxes
user.client.screen -= src.closer
user.client.screen -= src.contents
user.client.screen += src.boxes
user.client.screen += src.closer
user.client.screen += src.contents
user.s_active = src
return
/obj/item/clothing/suit/storage/proc/hide_from(mob/user as mob)
if(!user.client)
return
user.client.screen -= src.boxes
user.client.screen -= src.closer
user.client.screen -= src.contents
return
/obj/item/clothing/suit/storage/proc/close(mob/user as mob)
src.hide_from(user)
user.s_active = null
return
//This proc draws out the inventory and places the items on it. tx and ty are the upper left tile and mx, my are the bottm right.
//The numbers are calculated from the bottom-left The bottom-left slot being 1,1.
/obj/item/clothing/suit/storage/proc/orient_objs(tx, ty, mx, my)
var/cx = tx
var/cy = ty
src.boxes.screen_loc = text("[tx]:,[ty] to [mx],[my]")
for(var/obj/O in src.contents)
O.screen_loc = text("[cx],[cy]")
O.layer = 20
cx++
if (cx > mx)
cx = tx
cy--
src.closer.screen_loc = text("[mx+1],[my]")
return
//This proc draws out the inventory and places the items on it. It uses the standard position.
/obj/item/clothing/suit/storage/proc/standard_orient_objs(var/rows,var/cols)
var/cx = 4
var/cy = 2+rows
src.boxes.screen_loc = text("4:16,2:16 to [4+cols]:16,[2+rows]:16")
for(var/obj/O in src.contents)
O.screen_loc = text("[cx]:16,[cy]:16")
O.layer = 20
cx++
if (cx > (4+cols))
cx = 4
cy--
src.closer.screen_loc = text("[4+cols+1]:16,2:16")
return
//This proc determins the size of the inventory to be displayed. Please touch it only if you know what you're doing.
/obj/item/clothing/suit/storage/proc/orient2hud(mob/user as mob)
//var/mob/living/carbon/human/H = user
var/row_num = 0
var/col_count = min(7,storage_slots) -1
if (contents.len > 7)
row_num = round((contents.len-1) / 7) // 7 is the maximum allowed width.
src.standard_orient_objs(row_num,col_count)
return
//This proc is called when you want to place an item into the storage item.
/obj/item/clothing/suit/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/evidencebag) && src.loc != user)
return
..()
if(isrobot(user))
user << "\blue You're a robot. No."
return //Robots can't interact with storage items.
if(src.loc == W)
return //Means the item is already in the storage item
if(contents.len >= storage_slots)
user << "\red \The [src] is full, make some space."
return //Storage item is full
if(can_hold.len)
var/ok = 0
for(var/A in can_hold)
if(istype(W, text2path(A) ))
ok = 1
break
if(!ok)
user << "\red \The [src] cannot hold \the [W]."
return
for(var/A in cant_hold) //Check for specific items which this container can't hold.
if(istype(W, text2path(A) ))
user << "\red \The [src] cannot hold \the [W]."
return
if (W.w_class > max_w_class)
user << "\red \The [W] is too big for \the [src]"
return
var/sum_w_class = W.w_class
for(var/obj/item/I in contents)
sum_w_class += I.w_class //Adds up the combined w_classes which will be in the storage item if the item is added to it.
if(sum_w_class > max_combined_w_class)
user << "\red \The [src] is full, make some space."
return
if(W.w_class >= src.w_class && (istype(W, /obj/item/weapon/storage)))
if(!istype(src, /obj/item/weapon/storage/backpack/holding)) //bohs should be able to hold backpacks again. The override for putting a boh in a boh is in backpack.dm.
user << "\red \The [src] cannot hold \the [W] as it's a storage item of the same size."
return //To prevent the stacking of the same sized items.
user.u_equip(W)
playsound(src.loc, "rustle", 50, 1, -5)
W.loc = src
if ((user.client && user.s_active != src))
user.client.screen -= W
src.orient2hud(user)
W.dropped(user)
add_fingerprint(user)
show_to(user)
/obj/item/weapon/storage/dropped(mob/user as mob)
return
/obj/item/clothing/suit/storage/MouseDrop(atom/over_object)
if(ishuman(usr))
var/mob/living/carbon/human/M = usr
if (!( istype(over_object, /obj/screen) ))
return ..()
playsound(src.loc, "rustle", 50, 1, -5)
if ((!( M.restrained() ) && !( M.stat ) && M.wear_suit == src))
if (over_object.name == "r_hand")
M.u_equip(src)
M.put_in_r_hand(src)
// if (!( M.r_hand ))
// M.u_equip(src)
// M.r_hand = src
else if (over_object.name == "l_hand")
M.u_equip(src)
M.put_in_l_hand(src)
// if (!( M.l_hand ))
// M.u_equip(src)
// M.l_hand = src
M.update_inv_wear_suit()
src.add_fingerprint(usr)
return
if( (over_object == usr && in_range(src, usr) || usr.contents.Find(src)) && usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
/obj/item/clothing/suit/storage/attack_paw(mob/user as mob)
//playsound(src.loc, "rustle", 50, 1, -5) // what
return src.attack_hand(user)
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
src.orient2hud(user)
if (src.loc == user)
if (user.s_active)
user.s_active.close(user)
src.show_to(user)
else
..()
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
src.add_fingerprint(user)
return
/obj/item/clothing/suit/storage/New()
src.boxes = new /obj/screen/storage( )
src.boxes.name = "storage"
src.boxes.master = src
src.boxes.icon_state = "block"
src.boxes.screen_loc = "7,7 to 10,8"
src.boxes.layer = 19
src.closer = new /obj/screen/close( )
src.closer.master = src
src.closer.icon_state = "x"
src.closer.layer = 20
orient2hud()
return
/obj/item/clothing/suit/emp_act(severity)
if(!istype(src.loc, /mob/living))
for(var/obj/O in contents)
O.emp_act(severity)
..()
/obj/item/clothing/suit/hear_talk(mob/M, var/msg)
for (var/atom/A in src)
if(istype(A,/obj/))
var/obj/O = A
O.hear_talk(M, msg)
@@ -13,5 +13,5 @@
new /obj/item/clothing/head/helmet/space/nasavoid(src)
new /obj/item/clothing/suit/space/nasavoid(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/weapon/cell(src)
new /obj/item/weapon/stock_parts/cell(src)
new /obj/item/device/multitool(src)
@@ -148,7 +148,7 @@
new /obj/item/clothing/shoes/brown (src)
new /obj/item/device/radio/headset/heads/cmo(src)
new /obj/item/clothing/gloves/color/latex/nitrile(src)
new /obj/item/weapon/defibrillator/loaded(src)
new /obj/item/weapon/defibrillator/compact/loaded(src)
new /obj/item/weapon/storage/belt/medical(src)
new /obj/item/device/flash(src)
new /obj/item/weapon/reagent_containers/hypospray/CMO(src)
@@ -75,10 +75,14 @@
else if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name)))
//they can open all lockers, or nobody owns this, or they own this locker
src.locked = !( src.locked )
if(src.locked) src.icon_state = src.icon_locked
else src.icon_state = src.icon_closed
if(src.locked)
src.icon_state = src.icon_locked
else
src.icon_state = src.icon_closed
registered_name = null
desc = initial(desc)
if(!src.registered_name)
if(!src.registered_name && src.locked)
src.registered_name = I.registered_name
src.desc = "Owned by [I.registered_name]."
else
@@ -248,7 +248,8 @@
new /obj/item/clothing/under/rank/centcom_officer(src)
new /obj/item/clothing/suit/armor/vest/fluff/deus_blueshield(src)
new /obj/item/clothing/shoes/centcom(src)
new /obj/item/clothing/tie/blue(src)
new /obj/item/clothing/accessory/holster(src)
new /obj/item/clothing/accessory/blue(src)
return
/obj/structure/closet/secure_closet/ntrep
@@ -281,7 +282,7 @@
New()
..()
new /obj/item/clothing/tie/armband/cargo(src)
new /obj/item/clothing/accessory/armband/cargo(src)
new /obj/item/device/encryptionkey/headset_cargo(src)
return
@@ -289,7 +290,7 @@
New()
..()
new /obj/item/clothing/tie/armband/engine(src)
new /obj/item/clothing/accessory/armband/engine(src)
new /obj/item/device/encryptionkey/headset_eng(src)
return
@@ -297,7 +298,7 @@
New()
..()
new /obj/item/clothing/tie/armband/science(src)
new /obj/item/clothing/accessory/armband/science(src)
new /obj/item/device/encryptionkey/headset_sci(src)
return
@@ -305,7 +306,7 @@
New()
..()
new /obj/item/clothing/tie/armband/medgreen(src)
new /obj/item/clothing/accessory/armband/medgreen(src)
new /obj/item/device/encryptionkey/headset_med(src)
return
@@ -339,7 +340,7 @@
new /obj/item/ammo_box/c38(src)
new /obj/item/weapon/gun/projectile/revolver/detective(src)
new /obj/item/taperoll/police(src)
new /obj/item/clothing/tie/holster/armpit(src)
new /obj/item/clothing/accessory/holster/armpit(src)
return
/obj/structure/closet/secure_closet/detective/update_icon()
+2 -2
View File
@@ -90,7 +90,7 @@ FLOOR SAFES
var/mob/living/carbon/human/user = usr
var/canhear = 0
if(istype(user.l_hand, /obj/item/clothing/tie/stethoscope) || istype(user.r_hand, /obj/item/clothing/tie/stethoscope))
if(istype(user.l_hand, /obj/item/clothing/accessory/stethoscope) || istype(user.r_hand, /obj/item/clothing/accessory/stethoscope))
canhear = 1
if(href_list["open"])
@@ -155,7 +155,7 @@ FLOOR SAFES
user << "<span class='notice'>[I] won't fit in [src].</span>"
return
else
if(istype(I, /obj/item/clothing/tie/stethoscope))
if(istype(I, /obj/item/clothing/accessory/stethoscope))
user << "Hold [I] in one of your hands while you manipulate the dial."
return
+4 -4
View File
@@ -42,8 +42,8 @@
/turf/simulated/Entered(atom/A, atom/OL)
if (istype(A,/mob/living/carbon))
var/mob/living/carbon/M = A
if (istype(A,/mob/living/carbon/human))
var/mob/living/carbon/human/M = A
if(M.lying) return
if(prob(80))
dirt++
@@ -121,7 +121,7 @@
switch (src.wet)
if(1)
if(istype(M, /mob/living/carbon/human)) // Added check since monkeys don't have shoes
if ((M.m_intent == "run") && !(istype(M:shoes, /obj/item/clothing/shoes) && M:shoes.flags&NOSLIP))
if ((M.m_intent == "run") && !(istype(M:shoes, /obj/item/clothing/shoes) && M.shoes.flags&NOSLIP))
M.stop_pulling()
step(M, M.dir)
M << "\blue You slipped on the wet floor!"
@@ -131,7 +131,7 @@
else
M.inertia_dir = 0
return
else if(!istype(M, (/mob/living/carbon/slime || /mob/living/carbon/human/slime)) || (M:species.bodyflags & FEET_NOSLIP))
else if(!istype(M, (/mob/living/carbon/human/slime)) || (M.species.bodyflags & FEET_NOSLIP))
if (M.m_intent == "run")
M.stop_pulling()
step(M, M.dir)
+3 -3
View File
@@ -14,8 +14,8 @@
var/mob/living/carbon/occupant
var/mob/living/carbon/occupant2 //two seaters
var/datum/spacepod/equipment/equipment_system
var/battery_type = "/obj/item/weapon/cell/high"
var/obj/item/weapon/cell/battery
var/battery_type = "/obj/item/weapon/stock_parts/cell/high"
var/obj/item/weapon/stock_parts/cell/battery
var/datum/gas_mixture/cabin_air
var/obj/machinery/portable_atmospherics/canister/internal_tank
var/datum/effect/effect/system/ion_trail_follow/space_trail/ion_trail
@@ -158,7 +158,7 @@
if(iscrowbar(W))
hatch_open = !hatch_open
user << "<span class='notice'>You [hatch_open ? "open" : "close"] the maintenance hatch.</span>"
if(istype(W, /obj/item/weapon/cell))
if(istype(W, /obj/item/weapon/stock_parts/cell))
if(!hatch_open)
return ..()
if(battery)
+2 -2
View File
@@ -16,7 +16,7 @@
//var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act.
//the values in this list show how much damage will pass through, not how much will be absorbed.
var/list/damage_absorption = list("brute"=0.8,"fire"=1.2,"bullet"=0.9,"laser"=1,"energy"=1,"bomb"=1)
var/obj/item/weapon/cell/cell //Our power source
var/obj/item/weapon/stock_parts/cell/cell //Our power source
var/state = 0
var/list/log = new
var/last_message = 0
@@ -93,7 +93,7 @@
internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src)
return internal_tank*/
/obj/vehicle/proc/add_cell(var/obj/item/weapon/cell/C=null)
/obj/vehicle/proc/add_cell(var/obj/item/weapon/stock_parts/cell/C=null)
if(C)
C.forceMove(src)
cell = C
+5 -1
View File
@@ -307,7 +307,11 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
output += "<option value='[j]'>[j]</option>"
for(var/j in nonhuman_positions)
output += "<option value='[j]'>[j]</option>"
for(var/j in list("traitor","changeling","operative","revolutionary","cultist","wizard"))
for(var/j in list("Dionaea","NPC","AntagHUD","Emergency Response Team"))
output += "<option value='[j]'>[j]</option>"
for(var/j in list("commanddept","securitydept","engineeringdept","medicaldept","sciencedept","supportdept","nonhumandept"))
output += "<option value='[j]'>[j]</option>"
for(var/j in list("Syndicate","traitor","changeling","operative","revolutionary","cultist","wizard","alien","ninja","raider","mutineer","blob"))
output += "<option value='[j]'>[j]</option>"
output += "</select></td></tr></table>"
output += "<b>Reason:<br></b><textarea name='dbbanreason' cols='50'></textarea><br>"
+54 -30
View File
@@ -331,31 +331,49 @@ BLIND // can't see anything
2 = Report detailed damages
3 = Report location
*/
var/obj/item/clothing/tie/hastie = null
var/list/accessories = list()
var/displays_id = 1
var/rolled_down = 0
var/basecolor
/obj/item/clothing/under/proc/can_attach_accessory(obj/item/clothing/accessory/A)
if(istype(A))
.=1
else
return 0
if(accessories.len && (A.slot in list("utility","armband")))
for(var/obj/item/clothing/accessory/AC in accessories)
if (AC.slot == A.slot)
return 0
/obj/item/clothing/under/attackby(obj/item/I, mob/user)
if(!hastie && istype(I, /obj/item/clothing/tie))
user.drop_item()
hastie = I
I.loc = src
user << "<span class='notice'>You attach [I] to [src].</span>"
if(istype(I, /obj/item/clothing/accessory))
var/obj/item/clothing/accessory/A = I
if(can_attach_accessory(A))
user.drop_item()
accessories += A
A.on_attached(src, user)
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
H.update_inv_w_uniform()
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
H.update_inv_w_uniform()
return
else
user << "<span class='notice'>You cannot attach more accessories of this type to [src].</span>"
if(accessories.len)
for(var/obj/item/clothing/accessory/A in accessories)
A.attackby(I, user)
return
..()
/obj/item/clothing/under/attack_hand(mob/user as mob)
//only forward to the attached accessory if the clothing is equipped (not in a storage)
if(hastie && src.loc == user)
removetie()
if(accessories.len && src.loc == user)
for(var/obj/item/clothing/accessory/A in accessories)
A.attack_hand(user)
return
if ((ishuman(usr) || ismonkey(usr)) && src.loc == user) //make it harder to accidentally undress yourself
@@ -369,7 +387,7 @@ BLIND // can't see anything
if (!(src.loc == usr))
return
if (!( usr.restrained() ) && !( usr.stat ))
if (!( usr.restrained() ) && !( usr.stat ) && ( over_object ))
switch(over_object.name)
if("r_hand")
usr.u_equip(src)
@@ -393,8 +411,9 @@ BLIND // can't see anything
usr << "Its vital tracker appears to be enabled."
if(3)
usr << "Its vital tracker and tracking beacon appear to be enabled."
if(hastie)
usr << "\A [hastie] is clipped to it."
if(accessories.len)
for(var/obj/item/clothing/accessory/A in accessories)
usr << "\A [A] is attached to it."
/obj/item/clothing/under/verb/toggle()
set name = "Toggle Suit Sensors"
@@ -439,30 +458,35 @@ BLIND // can't see anything
else
usr << "<span class='notice'>You cannot roll down the uniform!</span>"
/obj/item/clothing/under/proc/removetie()
/obj/item/clothing/under/proc/remove_accessory(mob/user, obj/item/clothing/accessory/A)
if(!(A in accessories))
return
A.on_removed(user)
accessories -= A
usr.update_inv_w_uniform()
/obj/item/clothing/under/verb/removetie()
set name = "Remove Accessory"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
if(hastie)
usr.put_in_hands(hastie)
hastie = null
if (istype(hastie,/obj/item/clothing/tie/storage))
var/obj/item/clothing/tie/storage/W = hastie
if (W.hold)
W.hold.loc = hastie
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
H.update_inv_w_uniform()
if(!accessories.len) return
var/obj/item/clothing/accessory/A
if(accessories.len > 1)
A = input("Select an accessory to remove from [src]") as null|anything in accessories
else
A = accessories[1]
src.remove_accessory(usr,A)
/obj/item/clothing/under/rank/New()
sensor_mode = pick(0,1,2,3)
..()
/obj/item/clothing/under/emp_act(severity)
if (hastie)
hastie.emp_act(severity)
if(accessories.len)
for(var/obj/item/clothing/accessory/A in accessories)
A.emp_act(severity)
..()
+1 -1
View File
@@ -102,7 +102,7 @@
drain("MECHA",A,suit)
return 1
/*
if(istype(A,/obj/item/weapon/cell))
if(istype(A,/obj/item/weapon/stock_parts/cell))
A.add_fingerprint(H)
drain("CELL",A,suit)
return 1
+3 -3
View File
@@ -3,7 +3,7 @@
name = "ninja hood"
icon_state = "s-ninja"
item_state = "s-ninja_hood"
allowed = list(/obj/item/weapon/cell)
allowed = list(/obj/item/weapon/stock_parts/cell)
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 25)
unacidable = 1
siemens_coefficient = 0.2
@@ -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/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/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)
@@ -22,7 +22,7 @@
//Important parts of the suit.
var/mob/living/carbon/affecting = null//The wearer.
var/obj/item/weapon/cell/cell//Starts out with a high-capacity cell using New().
var/obj/item/weapon/stock_parts/cell/cell//Starts out with a high-capacity cell using New().
var/datum/effect/effect/system/spark_spread/spark_system//To create sparks.
var/reagent_list[] = list("tricordrazine","dexalinp","spaceacillin","anti_toxin","nutriment","uranium","hyronalin")//The reagents ids which are added to the suit at New().
var/stored_research[]//For stealing station research.

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