Skip to content

Commit

Permalink
Merge pull request #3 from animusdev/master
Browse files Browse the repository at this point in the history
krya
  • Loading branch information
ZerlGray authored Jan 13, 2018
2 parents 8782edb + c6e6118 commit 8cb366b
Show file tree
Hide file tree
Showing 72 changed files with 9,897 additions and 8,436 deletions.
3 changes: 2 additions & 1 deletion baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,6 @@
#include "code\game\objects\items\weapons\paint.dm"
#include "code\game\objects\items\weapons\paiwire.dm"
#include "code\game\objects\items\weapons\policetape.dm"
#include "code\game\objects\items\weapons\power_cells.dm"
#include "code\game\objects\items\weapons\RCD.dm"
#include "code\game\objects\items\weapons\RPD.dm"
#include "code\game\objects\items\weapons\RSF.dm"
Expand All @@ -730,6 +729,8 @@
#include "code\game\objects\items\weapons\weaponry.dm"
#include "code\game\objects\items\weapons\weldbackpack.dm"
#include "code\game\objects\items\weapons\wires.dm"
#include "code\game\objects\items\weapons\cells\device_cells.dm"
#include "code\game\objects\items\weapons\cells\power_cells.dm"
#include "code\game\objects\items\weapons\circuitboards\broken.dm"
#include "code\game\objects\items\weapons\circuitboards\circuitboard.dm"
#include "code\game\objects\items\weapons\circuitboards\mecha.dm"
Expand Down
14 changes: 12 additions & 2 deletions code/_helpers/unsorted.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31

/*
* A large number of misc global procs.
*/
Expand Down Expand Up @@ -1332,6 +1330,18 @@ proc/GaussRandRound(var/sigma,var/roundto)
if(istype(N, areatype)) areas += N
return areas

// Returns an instance of a valid surgery surface.
/mob/living/proc/get_surgery_surface()
if(!lying)
return null // Not lying down means no surface.
var/obj/surface = null
for(var/obj/O in loc) // Looks for the best surface.
if(O.surgery_odds)
if(!surface || surface.surgery_odds < O)
surface = O
if(surface)
return surface

//Takes: Area type as text string or as typepath OR an instance of the area.
//Returns: A list of all turfs in areas of that type of that type in the world.
/proc/get_area_turfs(var/areatype)
Expand Down
18 changes: 9 additions & 9 deletions code/datums/supplypacks/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@
/datum/supply_packs/med/surgery
name = "Surgery crate"
contains = list(
/obj/item/weapon/cautery,
/obj/item/weapon/surgicaldrill,
/obj/item/weapon/surgical/cautery,
/obj/item/weapon/surgical/surgicaldrill,
/obj/item/clothing/mask/breath/medical,
/obj/item/weapon/tank/anesthetic,
/obj/item/weapon/FixOVein,
/obj/item/weapon/hemostat,
/obj/item/weapon/scalpel,
/obj/item/weapon/bonegel,
/obj/item/weapon/retractor,
/obj/item/weapon/bonesetter,
/obj/item/weapon/circular_saw
/obj/item/weapon/surgical/FixOVein,
/obj/item/weapon/surgical/hemostat,
/obj/item/weapon/surgical/scalpel,
/obj/item/weapon/surgical/bonegel,
/obj/item/weapon/surgical/retractor,
/obj/item/weapon/surgical/bonesetter,
/obj/item/weapon/surgical/circular_saw
)
cost = 25
containertype = /obj/structure/closet/crate/secure
Expand Down
31 changes: 21 additions & 10 deletions code/game/antagonist/alien/borer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,24 @@ var/datum/antagonist/xenos/borer/borers
break
if(istype(host))
var/obj/item/organ/external/head = host.get_organ(BP_HEAD)
if(head)
borer.host = host
head.implants += borer
borer.forceMove(head)
if(!borer.host_brain)
borer.host_brain = new(borer)
borer.host_brain.name = host.name
borer.host_brain.real_name = host.real_name
return
..() // Place them at a vent if they can't get a host.
borer.host = host
head.implants += borer
borer.forceMove(head)
if(!borer.host_brain)
borer.host_brain = new(borer)
borer.host_brain.name = host.name
borer.host_brain.real_name = host.real_name
return
// Place them at a vent if they can't get a host.
borer.forceMove(get_turf(pick(get_vents())))

/datum/antagonist/borer/attempt_random_spawn()
if(config.aliens_allowed) ..()

/datum/antagonist/borer/proc/get_vents()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
if(isStationLevel(!temp_vent.welded && temp_vent.network && temp_vent.loc.z))
if(temp_vent.network.normal_members.len > 50)
vents += temp_vent
return vents
1 change: 1 addition & 0 deletions code/game/machinery/OpTable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use_power = 1
idle_power_usage = 1
active_power_usage = 5
surgery_odds = 100
var/mob/living/carbon/human/victim = null
var/strapped = 0.0

Expand Down
12 changes: 6 additions & 6 deletions code/game/machinery/autolathe_datums.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,32 +156,32 @@

/datum/autolathe/recipe/scalpel
name = "scalpel"
path = /obj/item/weapon/scalpel
path = /obj/item/weapon/surgical/scalpel
category = "Medical"

/datum/autolathe/recipe/circularsaw
name = "circular saw"
path = /obj/item/weapon/circular_saw
path = /obj/item/weapon/surgical/circular_saw
category = "Medical"

/datum/autolathe/recipe/surgicaldrill
name = "surgical drill"
path = /obj/item/weapon/surgicaldrill
path = /obj/item/weapon/surgical/surgicaldrill
category = "Medical"

/datum/autolathe/recipe/retractor
name = "retractor"
path = /obj/item/weapon/retractor
path = /obj/item/weapon/surgical/retractor
category = "Medical"

/datum/autolathe/recipe/cautery
name = "cautery"
path = /obj/item/weapon/cautery
path = /obj/item/weapon/surgical/cautery
category = "Medical"

/datum/autolathe/recipe/hemostat
name = "hemostat"
path = /obj/item/weapon/hemostat
path = /obj/item/weapon/surgical/hemostat
category = "Medical"

/datum/autolathe/recipe/beaker
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1291,11 +1291,11 @@
/obj/item/device/assembly/signaler = 3,
/obj/item/weapon/tank/anesthetic = 2,
/obj/item/device/healthanalyzer = 3,
/obj/item/weapon/circular_saw = 2,
/obj/item/weapon/surgical/circular_saw = 2,
/obj/item/weapon/screwdriver = 5,
/obj/item/weapon/cell/high = 12,
/obj/item/stack/cable_coil = 4,
/obj/item/weapon/scalpel = 2,
/obj/item/weapon/surgical/scalpel = 2,
/obj/item/weapon/crowbar = 5,
/obj/item/device/flash = 4,
)
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
// If not set the default icon for that slot will be used.
// If icon_override or sprite_sheets are set they will take precendence over this.
var/tmp/sprite_group = null
var/toolspeed = 1.0 // This is a multipler on how 'fast' a tool works. e.g. setting this to 0.5 will make the tool work twice as fast.


/* Species-specific sprite sheets for inventory sprites
Expand Down
18 changes: 9 additions & 9 deletions code/game/objects/items/storage/firstaid.dm
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@
/obj/item/storage/firstaid/surgery/New()
..()
if (empty) return
new /obj/item/weapon/bonesetter(src)
new /obj/item/weapon/cautery(src)
new /obj/item/weapon/circular_saw(src)
new /obj/item/weapon/hemostat(src)
new /obj/item/weapon/retractor(src)
new /obj/item/weapon/scalpel(src)
new /obj/item/weapon/surgicaldrill(src)
new /obj/item/weapon/bonegel(src)
new /obj/item/weapon/FixOVein(src)
new /obj/item/weapon/surgical/bonesetter(src)
new /obj/item/weapon/surgical/cautery(src)
new /obj/item/weapon/surgical/circular_saw(src)
new /obj/item/weapon/surgical/hemostat(src)
new /obj/item/weapon/surgical/retractor(src)
new /obj/item/weapon/surgical/scalpel(src)
new /obj/item/weapon/surgical/surgicaldrill(src)
new /obj/item/weapon/surgical/bonegel(src)
new /obj/item/weapon/surgical/FixOVein(src)
new /obj/item/stack/medical/bruise_pack/advanced(src)
return

Expand Down
37 changes: 37 additions & 0 deletions code/game/objects/items/weapons/cells/device_cells.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//currently only used by energy-type guns, that may change in the future.
/obj/item/weapon/cell/device
name = "device power cell"
desc = "A small power cell designed to power handheld devices."
icon_state = "dcell"
item_state = "egg6"
w_class = ITEM_SIZE_SMALL
force = 0
throw_speed = 5
throw_range = 7
maxcharge = 480
charge_amount = 5
matter = list("metal" = 350, "glass" = 50)

/obj/item/weapon/cell/device/weapon
name = "weapon power cell"
desc = "A small power cell designed to power handheld weaponry."
icon_state = "wcell"
maxcharge = 2400
charge_amount = 20

/obj/item/weapon/cell/device/weapon/empty/initialize()
..()
charge = 0
update_icon()

/obj/item/weapon/cell/device/weapon/recharge
name = "self-charging weapon power cell"
desc = "A small power cell designed to power handheld weaponry. This one recharges itself."
// icon_state = "wcell" //TODO: Different sprite
self_recharge = TRUE
charge_amount = 120
charge_delay = 75

/obj/item/weapon/cell/device/weapon/recharge/captain
charge_amount = 160 //Recharges a lot more quickly...
charge_delay = 100 //... but it takes a while to get started
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
/obj/item/weapon/cell
name = "power cell"
desc = "A rechargable electrochemical power cell."
icon = 'icons/obj/power.dmi'
icon_state = "cell"
item_state = "cell"
origin_tech = list(TECH_POWER = 1)
force = 5.0
throwforce = 5.0
throw_speed = 3
throw_range = 5
w_class = ITEM_SIZE_NORMAL
var/charge = 0 // note %age conveted to actual charge in New
var/maxcharge = 1000
var/rigged = 0 // true if rigged to explode
var/minor_fault = 0 //If not 100% reliable, it will build up faults.
matter = list(MATERIAL_STEEL = 700, MATERIAL_GLASS = 50)

suicide_act(mob/user)
viewers(user) << "<span class='danger'>\The [user] is licking the electrodes of \the [src]! It looks like \he's trying to commit suicide.</span>"
return (FIRELOSS)

//currently only used by energy-type guns, that may change in the future.
/obj/item/weapon/cell/device
name = "device power cell"
Expand Down
Loading

0 comments on commit 8cb366b

Please sign in to comment.