Skip to content

Commit

Permalink
Merge pull request #3 from animusdev/master
Browse files Browse the repository at this point in the history
just
  • Loading branch information
NEONXSAMURAI authored Jan 16, 2018
2 parents dd90277 + 2f65537 commit 650b731
Show file tree
Hide file tree
Showing 80 changed files with 10,377 additions and 8,437 deletions.
355 changes: 355 additions & 0 deletions CONTRIBUTING.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@
<br>Делаешь изменения карты - делай их с мапмержером, бога ради.
<br>Коммиты должны носить осмысленные и понятные названия, не случайный набор слов и цифр.

## Помощь в разработке

[CONTRIBUTING.md](CONTRIBUTING.md)
4 changes: 3 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 All @@ -756,6 +757,7 @@
#include "code\game\objects\items\weapons\grenades\chem_grenade.dm"
#include "code\game\objects\items\weapons\grenades\emgrenade.dm"
#include "code\game\objects\items\weapons\grenades\flashbang.dm"
#include "code\game\objects\items\weapons\grenades\ghettobomb.dm"
#include "code\game\objects\items\weapons\grenades\grenade.dm"
#include "code\game\objects\items\weapons\grenades\smokebomb.dm"
#include "code\game\objects\items\weapons\grenades\spawnergrenade.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
3 changes: 3 additions & 0 deletions code/game/machinery/computer/supply.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@
var/reason = cp1251_to_utf8( sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text,MAX_MESSAGE_LEN,1) )
if(world.time > timeout) return
if(!reason) return
if(shuttle.has_arrive_time())
to_chat(usr,"You can not make orders during the shuttle flight!")
return

var/idname = "*None Provided*"
var/idrank = "*None Provided*"
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
97 changes: 97 additions & 0 deletions code/game/objects/items/weapons/grenades/ghettobomb.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
//Fucking normal IED for buleshift

/obj/item/weapon/reagent_containers/glass/drinks/cans/attackby(var/obj/item/I, mob/user as mob)
if(istype(I, /obj/item/device/assembly/igniter))
var/obj/item/device/assembly/igniter/G = I
var/obj/item/weapon/grenade/iedcasing/W = new /obj/item/weapon/grenade/iedcasing
user.unEquip(G)
user.unEquip(src)
user.put_in_hands(W)
user << "<span class='notice'>You stuff the [I] in the [src], emptying the contents beforehand.</span>"
W.underlays += image(src.icon, icon_state = src.icon_state)
qdel(I)
qdel(src)


/obj/item/weapon/grenade/iedcasing
name = "improvised explosive assembly"
desc = "An igniter stuffed into an aluminium shell."
w_class = 2.0
icon = 'icons/obj/grenade.dmi'
icon_state = "improvised_grenade"
item_state = "flashbang"
throw_speed = 3
throw_range = 7
flags = CONDUCT
slot_flags = SLOT_BELT
var/assembled = 0
active = 1
det_time = 50
display_timer = 0



/obj/item/weapon/grenade/iedcasing/afterattack(atom/target, mob/user , flag) //Filling it with fuel!!!
if(assembled == 0)
if(istype(target, /obj/structure/reagent_dispensers/fueltank) && in_range(src, target))
if(target.reagents.total_volume < 50)
user << "<span class='notice'>There's not enough fuel left to work with.</span>"
return
var/obj/structure/reagent_dispensers/fueltank/F = target
F.reagents.remove_reagent("fuel", 50, 1)//Deleting 50 fuel from the welding fuel tank,
assembled = 1
user << "<span class='notice'>You've filled the makeshift explosive with welding fuel.</span>"
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
desc = "An improvised explosive assembly. Filled to the brim with 'Explosive flavor'"
overlays += image('icons/obj/grenade.dmi', icon_state = "improvised_grenade_filled")
return


/obj/item/weapon/grenade/iedcasing/attackby(var/obj/item/I, mob/user as mob) //Wiring in progress...
if(istype(I, /obj/item/stack/cable_coil))
if(assembled == 1)
var/obj/item/stack/cable_coil/C = I
C.use(1)
assembled = 2
user << "<span class='notice'>You wire the igniter to detonate the fuel.</span>"
desc = "A weak, improvised explosive."
overlays += image('icons/obj/grenade.dmi', icon_state = "improvised_grenade_wired")
name = "improvised explosive"
active = 0
det_time = rand(30,80)

/obj/item/weapon/grenade/iedcasing/attack_self(mob/user as mob) //Bombing
if(!active)
if(clown_check(user))
user << "<span class='warning'>You light the [name]!</span>"
active = 1
overlays -= image('icons/obj/grenade.dmi', icon_state = "improvised_grenade_filled")
icon_state = initial(icon_state) + "_active"
assembled = 3
add_fingerprint(user)
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)

message_admins("[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).")
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
spawn(det_time)
prime()

/obj/item/weapon/grenade/iedcasing/prime() //Blowing IED
update_mob()
explosion(src.loc,-1,0,2)
qdel(src)

/obj/item/weapon/grenade/iedcasing/examine()
set src in usr
..()
if(assembled == 3)
usr << "You can't tell when it will explode!"

/obj/item/weapon/grenade/proc/update_mob()
if(ismob(loc))
var/mob/M = loc
M.drop_from_inventory(src)
1 change: 1 addition & 0 deletions code/game/objects/items/weapons/grenades/grenade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
slot_flags = SLOT_BELT
var/active = 0
var/det_time = 50
var/display_timer = 1
/obj/item/weapon/grenade/proc/clown_check(var/mob/living/user)
return 1 // Allows to use grenades at all
//TODO: DNA3 clown_block
Expand Down
Loading

0 comments on commit 650b731

Please sign in to comment.