Merge pull request #4349 from Citadel-Station-13/upstream-merge-33481

[MIRROR] Correctly set description of nonstandard cells
This commit is contained in:
deathride58
2017-12-13 21:47:57 +00:00
committed by GitHub
7 changed files with 71 additions and 84 deletions

View File

@@ -98,9 +98,7 @@
use_power(5000) // Use a lot of power. use_power(5000) // Use a lot of power.
var/mob/living/silicon/robot/R = H.Robotize() var/mob/living/silicon/robot/R = H.Robotize()
R.cell = new /obj/item/stock_parts/cell/upgraded/plus(R, robot_cell_charge)
R.cell.maxcharge = robot_cell_charge
R.cell.charge = robot_cell_charge
// So he can't jump out the gate right away. // So he can't jump out the gate right away.
R.SetLockdown() R.SetLockdown()

View File

@@ -44,9 +44,7 @@
C.forceMove(src) C.forceMove(src)
cell = C cell = C
return return
cell = new(src) cell = new /obj/item/stock_parts/cell/hyper(src)
cell.charge = 30000
cell.maxcharge = 30000
/obj/mecha/combat/gygax/GrantActions(mob/living/user, human_occupant = 0) /obj/mecha/combat/gygax/GrantActions(mob/living/user, human_occupant = 0)
@@ -65,4 +63,3 @@
/obj/mecha/combat/gygax/dark/RemoveActions(mob/living/user, human_occupant = 0) /obj/mecha/combat/gygax/dark/RemoveActions(mob/living/user, human_occupant = 0)
..() ..()
thrusters_action.Remove(user) thrusters_action.Remove(user)

View File

@@ -231,9 +231,7 @@
C.forceMove(src) C.forceMove(src)
cell = C cell = C
return return
cell = new(src) cell = new /obj/item/stock_parts/cell/high/plus(src)
cell.charge = 15000
cell.maxcharge = 15000
/obj/mecha/proc/add_cabin() /obj/mecha/proc/add_cabin()
cabin_air = new cabin_air = new

View File

@@ -115,9 +115,7 @@
ident = rand(1, 999) ident = rand(1, 999)
if(!cell) if(!cell)
cell = new /obj/item/stock_parts/cell(src) cell = new /obj/item/stock_parts/cell/high(src, 7500)
cell.maxcharge = 7500
cell.charge = 7500
if(lawupdate) if(lawupdate)
make_laws() make_laws()
@@ -854,8 +852,7 @@
/mob/living/silicon/robot/modules/syndicate/Initialize() /mob/living/silicon/robot/modules/syndicate/Initialize()
. = ..() . = ..()
cell.maxcharge = 25000 cell = new /obj/item/stock_parts/cell/hyper(src, 25000)
cell.charge = 25000
radio = new /obj/item/device/radio/borg/syndicate(src) radio = new /obj/item/device/radio/borg/syndicate(src)
laws = new /datum/ai_laws/syndicate_override() laws = new /datum/ai_laws/syndicate_override()
addtimer(CALLBACK(src, .proc/show_playstyle), 5) addtimer(CALLBACK(src, .proc/show_playstyle), 5)

View File

@@ -54,9 +54,7 @@
var/datum/job/cargo_tech/J = new/datum/job/cargo_tech var/datum/job/cargo_tech/J = new/datum/job/cargo_tech
access_card.access = J.get_access() access_card.access = J.get_access()
prev_access = access_card.access prev_access = access_card.access
cell = new(src) cell = new /obj/item/stock_parts/cell/upgraded(src, 2000)
cell.charge = 2000
cell.maxcharge = 2000
var/static/mulebot_count = 0 var/static/mulebot_count = 0
mulebot_count += 1 mulebot_count += 1

View File

@@ -378,10 +378,7 @@
var/mob/living/silicon/robot/R = new /mob/living/silicon/robot(loc) var/mob/living/silicon/robot/R = new /mob/living/silicon/robot(loc)
// cyborgs produced by Robotize get an automatic power cell // cyborgs produced by Robotize get an automatic power cell
R.cell = new(R) R.cell = new /obj/item/stock_parts/cell/high(R, 7500)
R.cell.maxcharge = 7500
R.cell.charge = 7500
R.gender = gender R.gender = gender
R.invisibility = 0 R.invisibility = 0

View File

@@ -23,9 +23,11 @@
/obj/item/stock_parts/cell/get_cell() /obj/item/stock_parts/cell/get_cell()
return src return src
/obj/item/stock_parts/cell/New() /obj/item/stock_parts/cell/Initialize(mapload, override_maxcharge)
. = ..() . = ..()
START_PROCESSING(SSobj, src) START_PROCESSING(SSobj, src)
if (override_maxcharge)
maxcharge = override_maxcharge
charge = maxcharge charge = maxcharge
if(ratingdesc) if(ratingdesc)
desc += " This one has a rating of [DisplayEnergy(maxcharge)], and you should not swallow it." desc += " This one has a rating of [DisplayEnergy(maxcharge)], and you should not swallow it."