mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 07:03:30 +01:00
Defib update, cell path update
This commit is contained in:
@@ -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,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.
|
||||
|
||||
@@ -20,7 +20,10 @@
|
||||
|
||||
/obj/item/clothing/accessory/holster/attack_self()
|
||||
var/holsteritem = usr.get_active_hand()
|
||||
holster(holsteritem, usr)
|
||||
if(!holstered)
|
||||
holster(holsteritem, usr)
|
||||
else
|
||||
unholster(usr)
|
||||
|
||||
/obj/item/clothing/accessory/holster/proc/holster(obj/item/I, mob/user as mob)
|
||||
if(holstered)
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
// Battery must be installed BEFORE wiring the computer.
|
||||
// if installing it in an existing computer, you will have to
|
||||
// get back to this state first.
|
||||
var/obj/item/weapon/cell/battery = null
|
||||
var/obj/item/weapon/stock_parts/cell/battery = null
|
||||
|
||||
/obj/structure/computer3frame/server
|
||||
name = "server frame"
|
||||
@@ -143,7 +143,7 @@
|
||||
else
|
||||
user << "\red There's no battery to remove!"
|
||||
|
||||
if(istype(P, /obj/item/weapon/cell))
|
||||
if(istype(P, /obj/item/weapon/stock_parts/cell))
|
||||
if(!battery)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(5))
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
// the comms computer, solar trackers, etc, that should function when all else is off.
|
||||
// Laptops will require batteries and have no mains power.
|
||||
|
||||
var/obj/item/weapon/cell/battery = null // uninterruptible power supply aka battery
|
||||
var/obj/item/weapon/stock_parts/cell/battery = null // uninterruptible power supply aka battery
|
||||
|
||||
|
||||
verb/ResetComputer()
|
||||
@@ -185,7 +185,7 @@
|
||||
toybox.init(src)
|
||||
continue
|
||||
|
||||
if(ispath(typekey,/obj/item/weapon/cell))
|
||||
if(ispath(typekey,/obj/item/weapon/stock_parts/cell))
|
||||
if(battery) continue
|
||||
battery = new typekey(src)
|
||||
continue
|
||||
@@ -452,7 +452,7 @@
|
||||
//Returns percentage of battery charge remaining. Returns -1 if no battery is installed.
|
||||
proc/check_battery_status()
|
||||
if (battery)
|
||||
var/obj/item/weapon/cell/B = battery
|
||||
var/obj/item/weapon/stock_parts/cell/B = battery
|
||||
return round(B.charge / (B.maxcharge / 100))
|
||||
else
|
||||
return -1
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
|
||||
New(var/L, var/built = 0)
|
||||
if(!built && !battery)
|
||||
battery = new /obj/item/weapon/cell(src)
|
||||
battery = new /obj/item/weapon/stock_parts/cell(src)
|
||||
..(L,built)
|
||||
|
||||
verb/close_computer()
|
||||
|
||||
@@ -202,10 +202,10 @@
|
||||
newlap.spawn_parts += (/obj/item/part/computer/networking/cable)
|
||||
if (power == 1)
|
||||
del(newlap.battery)
|
||||
newlap.battery = new /obj/item/weapon/cell/high(newlap)
|
||||
newlap.battery = new /obj/item/weapon/stock_parts/cell/high(newlap)
|
||||
if (power == 2)
|
||||
del(newlap.battery)
|
||||
newlap.battery = new /obj/item/weapon/cell/super(newlap)
|
||||
newlap.battery = new /obj/item/weapon/stock_parts/cell/super(newlap)
|
||||
|
||||
newlap.spawn_parts()
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
return total
|
||||
|
||||
/obj/machinery/lapvend/proc/choose_progs(var/obj/item/weapon/card/id/C)
|
||||
if(access_security in C.access || access_forensics_lockers in C.access)
|
||||
if((access_medical in C.access) || (access_forensics_lockers in C.access))
|
||||
newlap.spawn_files += (/datum/file/program/secure_data)
|
||||
newlap.spawn_files += (/datum/file/camnet_key)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/researchoutpost)
|
||||
@@ -349,9 +349,9 @@
|
||||
network = 2
|
||||
if(istype(L.stored_computer.net,/obj/item/part/computer/networking/cable))
|
||||
network = 3
|
||||
if(istype(L.stored_computer.battery, /obj/item/weapon/cell/high))
|
||||
if(istype(L.stored_computer.battery, /obj/item/weapon/stock_parts/cell/high))
|
||||
power = 1
|
||||
if(istype(L.stored_computer.battery, /obj/item/weapon/cell/super))
|
||||
if(istype(L.stored_computer.battery, /obj/item/weapon/stock_parts/cell/super))
|
||||
power = 2
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/area)
|
||||
New(var/L,var/built=0)
|
||||
if(!built && !battery)
|
||||
battery = new /obj/item/weapon/cell(src)
|
||||
battery = new /obj/item/weapon/stock_parts/cell(src)
|
||||
..(L,built)
|
||||
|
||||
/obj/machinery/computer3/laptop/testing
|
||||
@@ -28,7 +28,7 @@
|
||||
/obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/area)
|
||||
New(var/L,var/built=0)
|
||||
if(!built && !battery)
|
||||
battery = new /obj/item/weapon/cell/super(src)
|
||||
battery = new /obj/item/weapon/stock_parts/cell/super(src)
|
||||
..(L,built)
|
||||
|
||||
/obj/machinery/computer3/wall_comp/testing
|
||||
@@ -44,7 +44,7 @@
|
||||
/obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/area)
|
||||
New(var/L,var/built=0)
|
||||
if(!built && !battery)
|
||||
battery = new /obj/item/weapon/cell(src)
|
||||
battery = new /obj/item/weapon/stock_parts/cell(src)
|
||||
..(L,built)
|
||||
|
||||
/obj/machinery/computer3/server/testing
|
||||
@@ -60,7 +60,7 @@
|
||||
/obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/area)
|
||||
New(var/L,var/built=0)
|
||||
if(!built && !battery)
|
||||
battery = new /obj/item/weapon/cell(src)
|
||||
battery = new /obj/item/weapon/stock_parts/cell(src)
|
||||
..(L,built)
|
||||
|
||||
/obj/machinery/computer3/server/rack/testing
|
||||
@@ -76,7 +76,7 @@
|
||||
/obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/area)
|
||||
New(var/L,var/built=0)
|
||||
if(!built && !battery)
|
||||
battery = new /obj/item/weapon/cell(src)
|
||||
battery = new /obj/item/weapon/stock_parts/cell(src)
|
||||
..(L,built)
|
||||
|
||||
/obj/item/weapon/storage/box/testing_disks
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
new /obj/item/weapon/storage/toolbox/electrical(C)
|
||||
|
||||
if(prob(25))
|
||||
new /obj/item/weapon/cell(C)
|
||||
new /obj/item/weapon/stock_parts/cell(C)
|
||||
|
||||
if("coffin")
|
||||
new /obj/structure/closet/coffin(src.loc)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
var/obj/item/weapon/stock_parts/matter_bin/storage
|
||||
var/obj/item/weapon/stock_parts/micro_laser/cutter
|
||||
var/obj/item/weapon/stock_parts/capacitor/cellmount
|
||||
var/obj/item/weapon/cell/cell
|
||||
var/obj/item/weapon/stock_parts/cell/cell
|
||||
|
||||
//Flags
|
||||
var/need_update_field = 0
|
||||
@@ -195,7 +195,7 @@
|
||||
cellmount = W
|
||||
user << "You install \the [W]."
|
||||
return
|
||||
else if(istype(W,/obj/item/weapon/cell))
|
||||
else if(istype(W,/obj/item/weapon/stock_parts/cell))
|
||||
if(cell)
|
||||
user << "The drill already has a cell installed."
|
||||
else
|
||||
|
||||
@@ -814,7 +814,7 @@
|
||||
|
||||
/datum/manufacture/powercell
|
||||
name = "Power Cell"
|
||||
item = /obj/item/weapon/cell
|
||||
item = /obj/item/weapon/stock_parts/cell
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 4
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
spawntypes = list(
|
||||
/obj/item/weapon/pickaxe/plasmacutter=1,
|
||||
/obj/machinery/shieldgen=1,
|
||||
/obj/item/weapon/cell/hyper=1
|
||||
/obj/item/weapon/stock_parts/cell/hyper=1
|
||||
)
|
||||
fluffitems = list(
|
||||
/obj/structure/table/reinforced=2,
|
||||
|
||||
@@ -843,8 +843,8 @@ It can still be worn/put on as normal.
|
||||
if(slot_r_hand)
|
||||
return r_hand
|
||||
return null
|
||||
|
||||
/mob/living/carbon/human/get_item_by_slot(slot_id)
|
||||
|
||||
/mob/living/carbon/get_item_by_slot(slot_id)
|
||||
switch(slot_id)
|
||||
if(slot_back)
|
||||
return back
|
||||
@@ -860,4 +860,45 @@ It can still be worn/put on as normal.
|
||||
return r_hand
|
||||
return null
|
||||
|
||||
|
||||
// Return the item currently in the slot ID
|
||||
/mob/living/carbon/human/get_item_by_slot(slot_id)
|
||||
switch(slot_id)
|
||||
if(slot_back)
|
||||
return back
|
||||
if(slot_wear_mask)
|
||||
return wear_mask
|
||||
if(slot_handcuffed)
|
||||
return handcuffed
|
||||
if(slot_legcuffed)
|
||||
return legcuffed
|
||||
if(slot_l_hand)
|
||||
return l_hand
|
||||
if(slot_r_hand)
|
||||
return r_hand
|
||||
if(slot_belt)
|
||||
return belt
|
||||
if(slot_wear_id)
|
||||
return wear_id
|
||||
if(slot_l_ear)
|
||||
return l_ear
|
||||
if(slot_r_ear)
|
||||
return r_ear
|
||||
if(slot_glasses)
|
||||
return glasses
|
||||
if(slot_gloves)
|
||||
return gloves
|
||||
if(slot_head)
|
||||
return head
|
||||
if(slot_shoes)
|
||||
return shoes
|
||||
if(slot_wear_suit)
|
||||
return wear_suit
|
||||
if(slot_w_uniform)
|
||||
return w_uniform
|
||||
if(slot_l_store)
|
||||
return l_store
|
||||
if(slot_r_store)
|
||||
return r_store
|
||||
if(slot_s_store)
|
||||
return s_store
|
||||
return null
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
if (src.client)
|
||||
src.client.screen -= src.contents
|
||||
for(var/obj/I in src.contents)
|
||||
//if(I && !(istype(I,/obj/item/weapon/cell) || istype(I,/obj/item/device/radio) || istype(I,/obj/machinery/camera) || istype(I,/obj/item/device/mmi)))
|
||||
//if(I && !(istype(I,/obj/item/weapon/stock_parts/cell) || istype(I,/obj/item/device/radio) || istype(I,/obj/machinery/camera) || istype(I,/obj/item/device/mmi)))
|
||||
if(I)
|
||||
// Make sure we're not showing any of our internal components, as that would be lewd.
|
||||
// This way of doing it ensures that shit we pick up will be visible, wheras shit inside of us isn't.
|
||||
|
||||
@@ -40,7 +40,7 @@ They can only use one tool at a time, they can't choose modules, and they have 1
|
||||
updateicon()
|
||||
|
||||
if(!cell)
|
||||
cell = new /obj/item/weapon/cell(src)
|
||||
cell = new /obj/item/weapon/stock_parts/cell(src)
|
||||
cell.maxcharge = 7500
|
||||
cell.charge = 7500
|
||||
..()
|
||||
@@ -190,7 +190,7 @@ They can only use one tool at a time, they can't choose modules, and they have 1
|
||||
opened = 1
|
||||
updateicon()
|
||||
|
||||
else if (istype(W, /obj/item/weapon/cell) && opened) // trying to put a cell inside
|
||||
else if (istype(W, /obj/item/weapon/stock_parts/cell) && opened) // trying to put a cell inside
|
||||
if(wiresexposed)
|
||||
user << "Close the panel first."
|
||||
else if(cell)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
//Has a list of items that it can hold.
|
||||
var/list/can_hold = list(
|
||||
/obj/item/weapon/cell,
|
||||
/obj/item/weapon/stock_parts/cell,
|
||||
/obj/item/weapon/firealarm_electronics,
|
||||
/obj/item/weapon/airalarm_electronics,
|
||||
/obj/item/weapon/airlock_electronics,
|
||||
|
||||
@@ -309,7 +309,7 @@
|
||||
if (src.client)
|
||||
src.client.screen -= src.contents
|
||||
for(var/obj/I in src.contents)
|
||||
if(I && !(istype(I,/obj/item/weapon/cell) || istype(I,/obj/item/device/radio) || istype(I,/obj/machinery/camera) || istype(I,/obj/item/device/mmi)))
|
||||
if(I && !(istype(I,/obj/item/weapon/stock_parts/cell) || istype(I,/obj/item/device/radio) || istype(I,/obj/machinery/camera) || istype(I,/obj/item/device/mmi)))
|
||||
src.client.screen += I
|
||||
if(src.module_state_1)
|
||||
src.module_state_1:screen_loc = ui_inv1
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
var/obj/item/device/radio/borg/radio = null
|
||||
var/mob/living/silicon/ai/connected_ai = null
|
||||
var/obj/item/weapon/cell/cell = null
|
||||
var/obj/item/weapon/stock_parts/cell/cell = null
|
||||
var/obj/machinery/camera/camera = null
|
||||
|
||||
// Components are basically robot organs.
|
||||
@@ -95,7 +95,7 @@
|
||||
mmi.icon_state="posibrain-occupied"
|
||||
if(syndie)
|
||||
if(!cell)
|
||||
cell = new /obj/item/weapon/cell(src)
|
||||
cell = new /obj/item/weapon/stock_parts/cell(src)
|
||||
laws = new /datum/ai_laws/antimov()
|
||||
lawupdate = 0
|
||||
scrambledcodes = 1
|
||||
@@ -124,7 +124,7 @@
|
||||
C.wrapped = new C.external_type
|
||||
|
||||
if(!cell)
|
||||
cell = new /obj/item/weapon/cell(src)
|
||||
cell = new /obj/item/weapon/stock_parts/cell(src)
|
||||
cell.maxcharge = 7500
|
||||
cell.charge = 7500
|
||||
|
||||
@@ -752,7 +752,7 @@
|
||||
opened = 1
|
||||
updateicon()
|
||||
|
||||
else if (istype(W, /obj/item/weapon/cell) && opened) // trying to put a cell inside
|
||||
else if (istype(W, /obj/item/weapon/stock_parts/cell) && opened) // trying to put a cell inside
|
||||
var/datum/robot_component/C = components["power cell"]
|
||||
if(wiresexposed)
|
||||
user << "Close the panel first."
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
var/obj/item/device/radio/borg/radio = null
|
||||
var/mob/living/silicon/ai/connected_ai = null
|
||||
var/obj/item/weapon/cell/cell = null
|
||||
var/obj/item/weapon/stock_parts/cell/cell = null
|
||||
var/obj/machinery/camera/camera = null
|
||||
var/obj/item/device/mmi/mmi = null
|
||||
var/list/req_access = list(access_robotics) //Access needed to pop out the brain.
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
var/spooky=0
|
||||
var/area/area
|
||||
var/areastring = null
|
||||
var/obj/item/weapon/cell/cell
|
||||
var/obj/item/weapon/stock_parts/cell/cell
|
||||
var/start_charge = 90 // initial cell charge %
|
||||
var/cell_type = 2500 // 0=no cell, 1=regular, 2=high-cap (x5) <- old, now it's just 0=no cell, otherwise dictate cellcapacity by changing this value. 1 used to be 1000, 2 was 2500
|
||||
var/opened = 0 //0=closed, 1=opened, 2=cover removed
|
||||
@@ -142,7 +142,7 @@
|
||||
has_electronics = 2 //installed and secured
|
||||
// is starting with a power cell installed, create it and set its charge level
|
||||
if(cell_type)
|
||||
src.cell = new/obj/item/weapon/cell(src)
|
||||
src.cell = new/obj/item/weapon/stock_parts/cell(src)
|
||||
cell.maxcharge = cell_type // cell_type is maximum charge (old default was 1000 or 2500 (values one and two respectively)
|
||||
cell.charge = start_charge * cell.maxcharge / 100.0 // (convert percentage to actual value)
|
||||
|
||||
@@ -399,7 +399,7 @@
|
||||
else
|
||||
opened = 1
|
||||
update_icon()
|
||||
else if (istype(W, /obj/item/weapon/cell) && opened) // trying to put a cell inside
|
||||
else if (istype(W, /obj/item/weapon/stock_parts/cell) && opened) // trying to put a cell inside
|
||||
if(cell)
|
||||
user << "There is a power cell already installed."
|
||||
return
|
||||
|
||||
+15
-15
@@ -1,16 +1,16 @@
|
||||
// the power cell
|
||||
// charge from 0 to 100%
|
||||
// fits in APC to provide backup power
|
||||
/obj/item/weapon/cell/var/image/overlay_image
|
||||
/obj/item/weapon/stock_parts/cell/var/image/overlay_image
|
||||
|
||||
/obj/item/weapon/cell/New()
|
||||
/obj/item/weapon/stock_parts/cell/New()
|
||||
..()
|
||||
charge = maxcharge
|
||||
|
||||
spawn(5)
|
||||
updateicon()
|
||||
|
||||
/obj/item/weapon/cell/proc/updateicon()
|
||||
/obj/item/weapon/stock_parts/cell/proc/updateicon()
|
||||
if(isnull(src.overlay_image))
|
||||
src.overlay_image = image('icons/obj/power.dmi')
|
||||
overlays.Cut()
|
||||
@@ -24,11 +24,11 @@
|
||||
src.overlay_image.icon_state = "cell-o1"
|
||||
overlays += src.overlay_image
|
||||
|
||||
/obj/item/weapon/cell/proc/percent() // return % charge of cell
|
||||
/obj/item/weapon/stock_parts/cell/proc/percent() // return % charge of cell
|
||||
return 100.0*charge/maxcharge
|
||||
|
||||
// use power from a cell
|
||||
/obj/item/weapon/cell/proc/use(var/amount)
|
||||
/obj/item/weapon/stock_parts/cell/proc/use(var/amount)
|
||||
if(rigged && amount > 0)
|
||||
explode()
|
||||
return 0
|
||||
@@ -38,7 +38,7 @@
|
||||
return 1
|
||||
|
||||
// recharge the cell
|
||||
/obj/item/weapon/cell/proc/give(var/amount)
|
||||
/obj/item/weapon/stock_parts/cell/proc/give(var/amount)
|
||||
if(rigged && amount > 0)
|
||||
explode()
|
||||
return 0
|
||||
@@ -55,7 +55,7 @@
|
||||
return power_used
|
||||
|
||||
|
||||
/obj/item/weapon/cell/examine()
|
||||
/obj/item/weapon/stock_parts/cell/examine()
|
||||
set src in view(1)
|
||||
if(usr /*&& !usr.stat*/)
|
||||
if(maxcharge <= 2500)
|
||||
@@ -65,7 +65,7 @@
|
||||
if(crit_fail)
|
||||
usr << "\red This power cell seems to be faulty."
|
||||
|
||||
/obj/item/weapon/cell/attack_self(mob/user as mob)
|
||||
/obj/item/weapon/stock_parts/cell/attack_self(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if(ishuman(user))
|
||||
@@ -76,7 +76,7 @@
|
||||
SNG.drain("CELL",src,H.wear_suit)
|
||||
return
|
||||
|
||||
/obj/item/weapon/cell/attackby(obj/item/W, mob/user)
|
||||
/obj/item/weapon/stock_parts/cell/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/syringe))
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = W
|
||||
@@ -93,7 +93,7 @@
|
||||
S.reagents.clear_reagents()
|
||||
|
||||
|
||||
/obj/item/weapon/cell/proc/explode()
|
||||
/obj/item/weapon/stock_parts/cell/proc/explode()
|
||||
var/turf/T = get_turf(src.loc)
|
||||
/*
|
||||
* 1000-cell explosion(T, -1, 0, 1, 1)
|
||||
@@ -121,13 +121,13 @@
|
||||
spawn(1)
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/cell/proc/corrupt()
|
||||
/obj/item/weapon/stock_parts/cell/proc/corrupt()
|
||||
charge /= 2
|
||||
maxcharge /= 2
|
||||
if (prob(10))
|
||||
rigged = 1 //broken batterys are dangerous
|
||||
|
||||
/obj/item/weapon/cell/emp_act(severity)
|
||||
/obj/item/weapon/stock_parts/cell/emp_act(severity)
|
||||
charge -= 1000 / severity
|
||||
if (charge < 0)
|
||||
charge = 0
|
||||
@@ -135,7 +135,7 @@
|
||||
reliability -= 10 / severity
|
||||
..()
|
||||
|
||||
/obj/item/weapon/cell/ex_act(severity)
|
||||
/obj/item/weapon/stock_parts/cell/ex_act(severity)
|
||||
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
@@ -155,10 +155,10 @@
|
||||
corrupt()
|
||||
return
|
||||
|
||||
/obj/item/weapon/cell/blob_act()
|
||||
/obj/item/weapon/stock_parts/cell/blob_act()
|
||||
ex_act(1)
|
||||
|
||||
/obj/item/weapon/cell/proc/get_electrocute_damage()
|
||||
/obj/item/weapon/stock_parts/cell/proc/get_electrocute_damage()
|
||||
switch (charge)
|
||||
/* if (9000 to INFINITY)
|
||||
return min(rand(90,150),rand(90,150))
|
||||
|
||||
@@ -475,11 +475,11 @@
|
||||
power_source = Cable.powernet
|
||||
|
||||
var/datum/powernet/PN
|
||||
var/obj/item/weapon/cell/cell
|
||||
var/obj/item/weapon/stock_parts/cell/cell
|
||||
|
||||
if(istype(power_source,/datum/powernet))
|
||||
PN = power_source
|
||||
else if(istype(power_source,/obj/item/weapon/cell))
|
||||
else if(istype(power_source,/obj/item/weapon/stock_parts/cell))
|
||||
cell = power_source
|
||||
else if(istype(power_source,/obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/apc = power_source
|
||||
@@ -514,7 +514,7 @@
|
||||
else if (istype(power_source,/datum/powernet))
|
||||
var/drained_power = drained_energy/CELLRATE //convert from "joules" to "watts"
|
||||
PN.newload+=drained_power
|
||||
else if (istype(power_source, /obj/item/weapon/cell))
|
||||
else if (istype(power_source, /obj/item/weapon/stock_parts/cell))
|
||||
cell.use(drained_energy)
|
||||
return drained_energy
|
||||
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/smes(null)
|
||||
component_parts += new /obj/item/weapon/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 5)
|
||||
RefreshParts()
|
||||
@@ -68,7 +68,7 @@
|
||||
IO += CP.rating
|
||||
input_level_max = 200000 * IO
|
||||
output_level_max = 200000 * IO
|
||||
for(var/obj/item/weapon/cell/PC in component_parts)
|
||||
for(var/obj/item/weapon/stock_parts/cell/PC in component_parts)
|
||||
C += PC.maxcharge
|
||||
capacity = C / (15000) * 1e6
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
force = 10
|
||||
projectile_type = "/obj/item/projectile/energy/sonic"
|
||||
cell_type = "/obj/item/weapon/cell/super"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/super"
|
||||
fire_delay = 40
|
||||
fire_sound = 'sound/effects/basscannon.ogg'
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
desc = "A basic energy-based gun."
|
||||
fire_sound = 'sound/weapons/Taser.ogg'
|
||||
|
||||
var/obj/item/weapon/cell/power_supply //What type of power cell this uses
|
||||
var/obj/item/weapon/stock_parts/cell/power_supply //What type of power cell this uses
|
||||
var/charge_cost = 1000 //How much energy is needed to fire.
|
||||
var/cell_type = "/obj/item/weapon/cell"
|
||||
var/cell_type = "/obj/item/weapon/stock_parts/cell"
|
||||
var/projectile_type = "/obj/item/projectile/beam"
|
||||
var/modifystate
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
/*
|
||||
attackby(obj/item/weapon/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/cell))
|
||||
if(istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
if(!power_supply)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "advtaser"
|
||||
item_state = null //so the human update icon uses the icon_state instead.
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
cell_type = "/obj/item/weapon/cell"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell"
|
||||
origin_tech = null
|
||||
fire_sound = 'sound/weapons/Taser.ogg'
|
||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
fire_sound = 'sound/weapons/pulse.ogg'
|
||||
charge_cost = 200
|
||||
projectile_type = "/obj/item/projectile/beam/pulse"
|
||||
cell_type = "/obj/item/weapon/cell/super"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/super"
|
||||
var/mode = 2
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = 4.0
|
||||
@@ -52,7 +52,7 @@
|
||||
/obj/item/weapon/gun/energy/pulse_rifle/destroyer
|
||||
name = "pulse destroyer"
|
||||
desc = "A heavy-duty, pulse-based energy weapon."
|
||||
cell_type = "/obj/item/weapon/cell/infinite"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/infinite"
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
user << "\red [src.name] has three settings, and they are all DESTROY."
|
||||
@@ -63,7 +63,7 @@
|
||||
name = "m1911-P"
|
||||
desc = "It's not the size of the gun, it's the size of the hole it puts through people."
|
||||
icon_state = "m1911-p"
|
||||
cell_type = "/obj/item/weapon/cell/infinite"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/infinite"
|
||||
w_class = 3.0
|
||||
slot_flags = SLOT_BELT
|
||||
isHandgun()
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
item_state = "c20r"
|
||||
w_class = 4
|
||||
projectile_type = "/obj/item/projectile/meteor"
|
||||
cell_type = "/obj/item/weapon/cell/potato"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/potato"
|
||||
clumsy_check = 0 //Admin spawn only, might as well let clowns use it.
|
||||
var/charge_tick = 0
|
||||
var/recharge_time = 5 //Time it takes for shots to recharge (in ticks)
|
||||
@@ -229,7 +229,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
projectile_type = "/obj/item/projectile/kinetic"
|
||||
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
|
||||
charge_cost = 5000
|
||||
cell_type = "/obj/item/weapon/cell/crap"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/crap"
|
||||
var/overheat = 0
|
||||
var/recent_reload = 1
|
||||
|
||||
@@ -255,7 +255,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
icon_state = "disabler"
|
||||
item_state = null
|
||||
projectile_type = "/obj/item/projectile/beam/disabler"
|
||||
cell_type = "/obj/item/weapon/cell"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell"
|
||||
charge_cost = 500
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
icon_state = "l6closed0"
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
||||
cell_type = "/obj/item/weapon/cell/secborg"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/secborg"
|
||||
projectile_type = "/obj/item/projectile/bullet/midbullet3"
|
||||
charge_cost = 300 //Yeah, let's NOT give them a 300 round clip that recharges, 20 is more reasonable and will actually hurt the borg's battery for overuse.
|
||||
var/charge_tick = 0
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
item_state = null //so the human update icon uses the icon_state instead.
|
||||
fire_sound = 'sound/weapons/Taser.ogg'
|
||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
||||
cell_type = "/obj/item/weapon/cell/crap"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/crap"
|
||||
|
||||
/obj/item/weapon/gun/energy/taser/cyborg
|
||||
name = "taser gun"
|
||||
@@ -14,7 +14,7 @@
|
||||
icon_state = "taser"
|
||||
fire_sound = 'sound/weapons/Taser.ogg'
|
||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
||||
cell_type = "/obj/item/weapon/cell/secborg"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/secborg"
|
||||
var/charge_tick = 0
|
||||
var/recharge_time = 10 //Time it takes for shots to recharge (in ticks)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
fire_sound = "sound/weapons/gunshot.ogg"
|
||||
origin_tech = "combat=3;materials=3;powerstorage=2"
|
||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
||||
cell_type = "/obj/item/weapon/cell"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell"
|
||||
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
silenced = 1
|
||||
fire_sound = 'sound/weapons/Genhit.ogg'
|
||||
projectile_type = "/obj/item/projectile/energy/bolt"
|
||||
cell_type = "/obj/item/weapon/cell/crap"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/crap"
|
||||
var/charge_tick = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/crossbow/New()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
|
||||
|
||||
projectile_type = "/obj/item/projectile/temp"
|
||||
cell_type = "/obj/item/weapon/cell/crap"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/crap"
|
||||
|
||||
|
||||
New()
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
var/tension = 0 // Current draw on the bow.
|
||||
var/max_tension = 5 // Highest possible tension.
|
||||
var/release_speed = 5 // Speed per unit of tension.
|
||||
var/obj/item/weapon/cell/cell = null // Used for firing superheated rods.
|
||||
var/obj/item/weapon/stock_parts/cell/cell = null // Used for firing superheated rods.
|
||||
var/current_user // Used to check if the crossbow has changed hands since being drawn.
|
||||
|
||||
/obj/item/weapon/gun/launcher/crossbow/emp_act(severity)
|
||||
@@ -158,7 +158,7 @@
|
||||
superheat_rod(user)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/cell))
|
||||
if(istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
if(!cell)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
@@ -213,7 +213,7 @@
|
||||
user.visible_message("\The [src] only takes baguettes.")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/cell))
|
||||
if(istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
user.visible_message("The [src] is too simple be adapted with a cell.")
|
||||
return
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
options[/obj/item/weapon/stock_parts/console_screen] = "Replace the console screen to fix it."
|
||||
options[/obj/item/weapon/stock_parts/manipulator/pico] = "Upgrade to a pico manipulator to fix it."
|
||||
options[/obj/item/weapon/stock_parts/matter_bin/super] = "Give it a super matter bin to fix it."
|
||||
options[/obj/item/weapon/cell/super] = "Replace the reagent synthesizer with a super capacity cell to fix it."
|
||||
options[/obj/item/weapon/stock_parts/cell/super] = "Replace the reagent synthesizer with a super capacity cell to fix it."
|
||||
options[/obj/item/device/mass_spectrometer/adv] = "Replace the reagent scanner with an advanced mass spectrometer to fix it"
|
||||
options[/obj/item/weapon/stock_parts/micro_laser/high] = "Repair the reagent synthesizer with an high-power micro-laser to fix it"
|
||||
options[/obj/item/device/reagent_scanner/adv] = "Replace the reagent scanner with an advanced reagent scanner to fix it"
|
||||
@@ -290,7 +290,7 @@
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/weapon/cell/super(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/super(src)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/chem_dispenser/constructable/RefreshParts()
|
||||
@@ -303,7 +303,7 @@
|
||||
max_energy = temp_energy * 5 //max energy = (bin1.rating + bin2.rating - 1) * 5, 5 on lowest 25 on highest
|
||||
for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts)
|
||||
time += C.rating
|
||||
for(var/obj/item/weapon/cell/P in component_parts)
|
||||
for(var/obj/item/weapon/stock_parts/cell/P in component_parts)
|
||||
time += round(P.maxcharge, 10000) / 10000
|
||||
recharge_delay /= time/2 //delay between recharges, double the usual time on lowest 50% less than usual on highest
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
|
||||
@@ -1323,7 +1323,7 @@ datum
|
||||
required_container = /obj/item/slime_extract/yellow
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/obj/item/weapon/cell/slime/P = new /obj/item/weapon/cell/slime
|
||||
var/obj/item/weapon/stock_parts/cell/slime/P = new /obj/item/weapon/stock_parts/cell/slime
|
||||
P.loc = get_turf_loc(holder.my_atom)
|
||||
|
||||
slimeglow
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
W:amount -= 5
|
||||
if(!W:amount) del(W)
|
||||
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)
|
||||
var/obj/item/weapon/stock_parts/cell/potato/pocell = new /obj/item/weapon/stock_parts/cell/potato(user.loc)
|
||||
pocell.maxcharge = src.potency * 10
|
||||
pocell.charge = pocell.maxcharge
|
||||
del(src)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
req_tech = list("powerstorage" = 1)
|
||||
build_type = PROTOLATHE | AUTOLATHE | MECHFAB
|
||||
materials = list("$metal" = 700, "$glass" = 50)
|
||||
build_path = /obj/item/weapon/cell
|
||||
build_path = /obj/item/weapon/stock_parts/cell
|
||||
category = list("Misc","Power")
|
||||
|
||||
/datum/design/high_cell
|
||||
@@ -19,7 +19,7 @@
|
||||
req_tech = list("powerstorage" = 2)
|
||||
build_type = PROTOLATHE | AUTOLATHE | MECHFAB
|
||||
materials = list("$metal" = 700, "$glass" = 60)
|
||||
build_path = /obj/item/weapon/cell/high
|
||||
build_path = /obj/item/weapon/stock_parts/cell/high
|
||||
category = list("Misc","Power")
|
||||
|
||||
/datum/design/hyper_cell
|
||||
@@ -30,7 +30,7 @@
|
||||
reliability_base = 70
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
materials = list("$metal" = 400, "$gold" = 150, "$silver" = 150, "$glass" = 70)
|
||||
build_path = /obj/item/weapon/cell/hyper
|
||||
build_path = /obj/item/weapon/stock_parts/cell/hyper
|
||||
category = list("Misc","Power")
|
||||
|
||||
/datum/design/super_cell
|
||||
@@ -41,7 +41,7 @@
|
||||
reliability_base = 75
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
materials = list("$metal" = 700, "$glass" = 70)
|
||||
build_path = /obj/item/weapon/cell/super
|
||||
build_path = /obj/item/weapon/stock_parts/cell/super
|
||||
category = list("Misc","Power")
|
||||
|
||||
/datum/design/pacman
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
/obj/item/weapon/caution/cone,\
|
||||
/obj/item/weapon/crowbar,\
|
||||
/obj/item/weapon/clipboard,\
|
||||
/obj/item/weapon/cell,\
|
||||
/obj/item/weapon/stock_parts/cell,\
|
||||
/obj/item/weapon/circular_saw,\
|
||||
/obj/item/weapon/hatchet,\
|
||||
/obj/item/weapon/handcuffs,\
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
if(user)
|
||||
if(istype(user, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
for (var/obj/item/weapon/cell/D in R.contents)
|
||||
for (var/obj/item/weapon/stock_parts/cell/D in R.contents)
|
||||
D.charge += rand() * 100 + 50
|
||||
R << "\blue SYSTEM ALERT: Large energy boost detected!"
|
||||
return 1
|
||||
@@ -17,12 +17,12 @@
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/obj/machinery/power/apc/C in range(200, T))
|
||||
for (var/obj/item/weapon/cell/B in C.contents)
|
||||
for (var/obj/item/weapon/stock_parts/cell/B in C.contents)
|
||||
B.charge += 25
|
||||
for (var/obj/machinery/power/smes/S in range (src.effectrange,src))
|
||||
S.charge += 25
|
||||
for (var/mob/living/silicon/robot/M in mob_list)
|
||||
for (var/obj/item/weapon/cell/D in M.contents)
|
||||
for (var/obj/item/weapon/stock_parts/cell/D in M.contents)
|
||||
D.charge += 25
|
||||
M << "\blue SYSTEM ALERT: Energy boost detected!"
|
||||
return 1
|
||||
@@ -31,12 +31,12 @@
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/obj/machinery/power/apc/C in range(200, T))
|
||||
for (var/obj/item/weapon/cell/B in C.contents)
|
||||
for (var/obj/item/weapon/stock_parts/cell/B in C.contents)
|
||||
B.charge += rand() * 100
|
||||
for (var/obj/machinery/power/smes/S in range (src.effectrange,src))
|
||||
S.charge += 250
|
||||
for (var/mob/living/silicon/robot/M in mob_list)
|
||||
for (var/obj/item/weapon/cell/D in M.contents)
|
||||
for (var/obj/item/weapon/stock_parts/cell/D in M.contents)
|
||||
D.charge += rand() * 100
|
||||
M << "\blue SYSTEM ALERT: Energy boost detected!"
|
||||
return 1
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
if(user)
|
||||
if(istype(user, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
for (var/obj/item/weapon/cell/D in R.contents)
|
||||
for (var/obj/item/weapon/stock_parts/cell/D in R.contents)
|
||||
D.charge = max(D.charge - rand() * 100, 0)
|
||||
R << "\blue SYSTEM ALERT: Energy drain detected!"
|
||||
return 1
|
||||
@@ -19,12 +19,12 @@
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/obj/machinery/power/apc/C in range(200, T))
|
||||
for (var/obj/item/weapon/cell/B in C.contents)
|
||||
for (var/obj/item/weapon/stock_parts/cell/B in C.contents)
|
||||
B.charge = max(B.charge - 50,0)
|
||||
for (var/obj/machinery/power/smes/S in range (src.effectrange,src))
|
||||
S.charge = max(S.charge - 100,0)
|
||||
for (var/mob/living/silicon/robot/M in mob_list)
|
||||
for (var/obj/item/weapon/cell/D in M.contents)
|
||||
for (var/obj/item/weapon/stock_parts/cell/D in M.contents)
|
||||
D.charge = max(D.charge - 50,0)
|
||||
M << "\red SYSTEM ALERT: Energy drain detected!"
|
||||
return 1
|
||||
@@ -33,12 +33,12 @@
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/obj/machinery/power/apc/C in range(200, T))
|
||||
for (var/obj/item/weapon/cell/B in C.contents)
|
||||
for (var/obj/item/weapon/stock_parts/cell/B in C.contents)
|
||||
B.charge = max(B.charge - rand() * 150,0)
|
||||
for (var/obj/machinery/power/smes/S in range (src.effectrange,src))
|
||||
S.charge = max(S.charge - 250,0)
|
||||
for (var/mob/living/silicon/robot/M in mob_list)
|
||||
for (var/obj/item/weapon/cell/D in M.contents)
|
||||
for (var/obj/item/weapon/stock_parts/cell/D in M.contents)
|
||||
D.charge = max(D.charge - rand() * 150,0)
|
||||
M << "\red SYSTEM ALERT: Energy drain detected!"
|
||||
return 1
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "suspension2"
|
||||
density = 1
|
||||
req_access = list(access_research)
|
||||
var/obj/item/weapon/cell/cell
|
||||
var/obj/item/weapon/stock_parts/cell/cell
|
||||
var/obj/item/weapon/card/id/auth_card
|
||||
var/locked = 1
|
||||
var/open = 0
|
||||
@@ -16,7 +16,7 @@
|
||||
var/list/secured_mobs = list()
|
||||
|
||||
/obj/machinery/suspension_gen/New()
|
||||
src.cell = new/obj/item/weapon/cell/high(src)
|
||||
src.cell = new/obj/item/weapon/stock_parts/cell/high(src)
|
||||
..()
|
||||
|
||||
/obj/machinery/suspension_gen/process()
|
||||
@@ -205,7 +205,7 @@
|
||||
desc = "It has stubby legs bolted up against it's body for stabilising."
|
||||
else
|
||||
user << "<span class='warning'>You are unable to secure [src] while it is active!</span>"
|
||||
else if (istype(W, /obj/item/weapon/cell))
|
||||
else if (istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
if(open)
|
||||
if(cell)
|
||||
user << "<span class='warning'>There is a power cell already installed.</span>"
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
//-------------------------------------------
|
||||
/obj/vehicle/train/ambulance/engine/New()
|
||||
..()
|
||||
cell = new /obj/item/weapon/cell/high
|
||||
cell = new /obj/item/weapon/stock_parts/cell/high
|
||||
verbs -= /atom/movable/verb/pull
|
||||
key = new()
|
||||
|
||||
@@ -86,10 +86,10 @@
|
||||
..()
|
||||
flick("mulebot-emagged", src)
|
||||
|
||||
/obj/vehicle/train/ambulance/trolley/insert_cell(var/obj/item/weapon/cell/C, var/mob/living/carbon/human/H)
|
||||
/obj/vehicle/train/ambulance/trolley/insert_cell(var/obj/item/weapon/stock_parts/cell/C, var/mob/living/carbon/human/H)
|
||||
return
|
||||
|
||||
/obj/vehicle/train/ambulance/engine/insert_cell(var/obj/item/weapon/cell/C, var/mob/living/carbon/human/H)
|
||||
/obj/vehicle/train/ambulance/engine/insert_cell(var/obj/item/weapon/stock_parts/cell/C, var/mob/living/carbon/human/H)
|
||||
..()
|
||||
update_stats()
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
//-------------------------------------------
|
||||
/obj/vehicle/train/cargo/engine/New()
|
||||
..()
|
||||
cell = new /obj/item/weapon/cell/high
|
||||
cell = new /obj/item/weapon/stock_parts/cell/high
|
||||
verbs -= /atom/movable/verb/pull
|
||||
key = new()
|
||||
var/image/I = new(icon = 'icons/obj/vehicles.dmi', icon_state = "cargo_engine_overlay", layer = src.layer + 0.2) //over mobs
|
||||
@@ -82,10 +82,10 @@
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/vehicle/train/cargo/trolley/insert_cell(var/obj/item/weapon/cell/C, var/mob/living/carbon/human/H)
|
||||
/obj/vehicle/train/cargo/trolley/insert_cell(var/obj/item/weapon/stock_parts/cell/C, var/mob/living/carbon/human/H)
|
||||
return
|
||||
|
||||
/obj/vehicle/train/cargo/engine/insert_cell(var/obj/item/weapon/cell/C, var/mob/living/carbon/human/H)
|
||||
/obj/vehicle/train/cargo/engine/insert_cell(var/obj/item/weapon/stock_parts/cell/C, var/mob/living/carbon/human/H)
|
||||
..()
|
||||
update_stats()
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
//-------------------------------------------
|
||||
/obj/vehicle/train/janitor/engine/New()
|
||||
..()
|
||||
cell = new /obj/item/weapon/cell/high
|
||||
cell = new /obj/item/weapon/stock_parts/cell/high
|
||||
verbs -= /atom/movable/verb/pull
|
||||
key = new()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
@@ -136,10 +136,10 @@
|
||||
..()
|
||||
flick("mulebot-emagged", src)
|
||||
|
||||
/obj/vehicle/train/janitor/trolley/insert_cell(var/obj/item/weapon/cell/C, var/mob/living/carbon/human/H)
|
||||
/obj/vehicle/train/janitor/trolley/insert_cell(var/obj/item/weapon/stock_parts/cell/C, var/mob/living/carbon/human/H)
|
||||
return
|
||||
|
||||
/obj/vehicle/train/janitor/engine/insert_cell(var/obj/item/weapon/cell/C, var/mob/living/carbon/human/H)
|
||||
/obj/vehicle/train/janitor/engine/insert_cell(var/obj/item/weapon/stock_parts/cell/C, var/mob/living/carbon/human/H)
|
||||
..()
|
||||
update_stats()
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
var/move_delay = 1 //set this to limit the speed of the vehicle
|
||||
var/movable = 1
|
||||
|
||||
var/obj/item/weapon/cell/cell
|
||||
var/obj/item/weapon/stock_parts/cell/cell
|
||||
var/charge_use = 5 //set this to adjust the amount of power the vehicle uses per move
|
||||
|
||||
var/atom/movable/load //all vehicles can take a load, since they should all be a least drivable
|
||||
@@ -72,7 +72,7 @@
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && cell && open)
|
||||
remove_cell(user)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/cell) && !cell && open)
|
||||
else if(istype(W, /obj/item/weapon/stock_parts/cell) && !cell && open)
|
||||
insert_cell(W, user)
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/T = W
|
||||
@@ -236,7 +236,7 @@
|
||||
turn_on()
|
||||
return
|
||||
|
||||
/obj/vehicle/proc/insert_cell(var/obj/item/weapon/cell/C, var/mob/living/carbon/human/H)
|
||||
/obj/vehicle/proc/insert_cell(var/obj/item/weapon/stock_parts/cell/C, var/mob/living/carbon/human/H)
|
||||
if(cell)
|
||||
return
|
||||
if(!istype(C))
|
||||
|
||||
Reference in New Issue
Block a user