Defib update, cell path update

This commit is contained in:
Markolie
2015-02-09 16:12:01 +01:00
parent 1af0b33393
commit 7285f39fc1
82 changed files with 362 additions and 284 deletions
@@ -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
+9 -8
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,7 +98,7 @@ 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"
@@ -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
@@ -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
+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 -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."
-16
View File
@@ -351,22 +351,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>"
+3 -3
View File
@@ -19,7 +19,7 @@
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()
@@ -28,7 +28,7 @@
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()
/obj/machinery/recharge_station/RefreshParts()
@@ -38,7 +38,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()
+4 -4
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
@@ -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
+4 -4
View File
@@ -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
+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
+3 -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"
@@ -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
+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.")
@@ -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"
+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
+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
@@ -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)
+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