Merge pull request #2389 from comma/bleeding-edge-freeze

Guns, medicine and fixes.
This commit is contained in:
Christian Bielert
2013-02-20 13:22:57 -08:00
17 changed files with 128 additions and 93 deletions
@@ -24,11 +24,11 @@
side_effects += M
/mob/living/carbon/human/proc/handle_medical_side_effects()
if(src.reagents.has_reagent("bicaridine") || src.reagents.has_reagent("tricordrazine") || src.reagents.has_reagent("cryoxadone"))
if(src.reagents.has_reagent("bicaridine") && prob(40) || src.reagents.has_reagent("tricordrazine") && prob(10) || src.reagents.has_reagent("cryoxadone") && prob(20))
src.add_side_effect("Headache")
if(src.reagents.has_reagent("kelotane") || src.reagents.has_reagent("dermaline"))
if(src.reagents.has_reagent("kelotane") && prob(20) || src.reagents.has_reagent("dermaline") && prob(40))
src.add_side_effect("Bad Stomach")
// One full cycle(in terms of strength) every 10 minutes
+1
View File
@@ -209,6 +209,7 @@
if(BURN)
size_names = typesof(/datum/wound/burn/) - /datum/wound/burn/
size = min(size,size_names.len)
var/wound_type = size_names[size]
W = new wound_type(damage)
+10 -9
View File
@@ -172,24 +172,25 @@ datum/wound/cut/massive
/datum/wound/bruise/monumental
// implement sub-paths by starting at a later stage
/datum/wound/bruise/huge
current_stage = 1
/datum/wound/bruise/large
current_stage = 2
/datum/wound/bruise/moderate
current_stage = 3
/datum/wound/bruise/tiny
current_stage = 5
needs_treatment = 0
/datum/wound/bruise/small
current_stage = 4
needs_treatment = 0
/datum/wound/bruise/tiny
current_stage = 5
/datum/wound/bruise/moderate
current_stage = 3
needs_treatment = 0
/datum/wound/bruise/large
current_stage = 2
/datum/wound/bruise/huge
current_stage = 1
/** BURNS **/
/datum/wound/burn/moderate
stages = list("ripped burn" = 10, "moderate burn" = 5, "moderate salved burn" = 2, "fresh skin" = 0)
+2 -2
View File
@@ -64,8 +64,8 @@ Whitespace:Seperator;
Implants;
/obj/item/weapon/storage/box/syndie_kit/imp_freedom:3:Freedom Implant;
/obj/item/weapon/storage/box/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals);
/obj/item/weapon/implant/explosive:6:Explosive Implant (DANGER!);
/obj/item/weapon/implant/compressed:4:Compressed Matter Implant;Whitespace:Seperator;
/obj/item/weapon/storage/box/syndie_kit/imp_explosive:6:Explosive Implant (DANGER!);
/obj/item/weapon/storage/box/syndie_kit/imp_compress:4:Compressed Matter Implant;Whitespace:Seperator;
(Pointless) Badassery;
/obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon);"}
+1 -1
View File
@@ -294,6 +294,6 @@
// Tell them about people they might want to contact.
var/mob/living/carbon/human/M = get_nt_opposed()
if(M != traitor_mob)
if(M && M != traitor_mob)
traitor_mob << "We have received credible reports that [M.real_name] might be willing to help our cause. If you need assistance, consider contacting them."
traitor_mob.mind.store_memory("<b>Potential Collaborator</b>: [M.real_name]")
+1 -1
View File
@@ -48,7 +48,7 @@
if (W.current_stage <= W.max_bleeding_stage)
user.visible_message( "\blue [user] bandages [W.desc] on [M]'s [affecting.display_name].", \
"\blue You bandage [W.desc] on [M]'s [affecting.display_name]." )
H.add_side_effect("Itch")
//H.add_side_effect("Itch")
else if (istype(W,/datum/wound/bruise))
user.visible_message( "\blue [user] places bruise patch over [W.desc] on [M]'s [affecting.display_name].", \
"\blue You place bruise patch over [W.desc] on [M]'s [affecting.display_name]." )
@@ -440,7 +440,10 @@ the implant may become unstable and either pre-maturely inject the subject or si
activate()
var/turf/t = get_turf(src)
src.scanned.loc = t
if (imp_in)
imp_in.put_in_hands(scanned)
else
scanned.loc = t
del src
implanted(mob/source as mob)
@@ -83,7 +83,7 @@
/obj/item/weapon/implanter/compressed
name = "implanter (C)"
icon_state = "cimplanter0"
icon_state = "cimplanter1"
/obj/item/weapon/implanter/compressed/New()
imp = new /obj/item/weapon/implant/compressed( src )
@@ -95,11 +95,11 @@
if (imp)
var/obj/item/weapon/implant/compressed/c = imp
if(!c.scanned)
icon_state = "cimplanter0"
else
icon_state = "cimplanter1"
else
icon_state = "cimplanter2"
else
icon_state = "cimplanter2"
icon_state = "cimplanter0"
return
/obj/item/weapon/implanter/compressed/attack(mob/M as mob, mob/user as mob)
@@ -83,24 +83,21 @@
O.update()
return
/*/obj/item/weapon/storage/box/syndie_kit/imp_compress
name = "Compressed Matter Implant (with injector)"
/obj/item/weapon/storage/box/syndie_kit/imp_compress
name = "box (C)"
/obj/item/weapon/storage/syndie_kit/imp_compress/New()
/obj/item/weapon/storage/box/syndie_kit/imp_compress/New()
new /obj/item/weapon/implanter/compressed(src)
..()
return
/obj/item/weapon/storage/syndie_kit/imp_explosive
name = "Explosive Implant (with injector)"
/obj/item/weapon/storage/box/syndie_kit/imp_explosive
name = "box (E)"
/obj/item/weapon/storage/syndie_kit/imp_explosive/New()
var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src)
O.imp = new /obj/item/weapon/implant/explosive(O)
O.name = "(BIO-HAZARD) BIO-detpack"
O.update()
/obj/item/weapon/storage/box/syndie_kit/imp_explosive/New()
new /obj/item/weapon/implanter/explosive(src)
..()
return*/
return
/obj/item/weapon/storage/box/syndie_kit/imp_uplink
name = "Uplink Implant (with injector)"
+4 -2
View File
@@ -134,7 +134,7 @@ proc/hasorgans(A)
zone = "head"
if("mouth")
zone = "head"
if("l_hand")
/* if("l_hand")
zone = "l_arm"
if("r_hand")
zone = "r_arm"
@@ -144,6 +144,7 @@ proc/hasorgans(A)
zone = "r_leg"
if("groin")
zone = "chest"
*/
return zone
@@ -171,7 +172,7 @@ proc/hasorgans(A)
// you can only miss if your target is standing and not restrained
if(!target.buckled && !target.lying)
var/miss_chance = max(10 + miss_chance_mod, 0)
var/miss_chance = 10
switch(zone)
if("head")
miss_chance = 40
@@ -191,6 +192,7 @@ proc/hasorgans(A)
miss_chance = 50
if("r_foot")
miss_chance = 50
miss_chance = max(miss_chance + miss_chance_mod, 0)
if(prob(miss_chance))
if(prob(70))
return null
+27 -4
View File
@@ -1,3 +1,7 @@
#define SPEEDLOADER 0
#define FROM_BOX 1
#define MAGAZINE 2
/obj/item/weapon/gun/projectile
desc = "A classic revolver. Uses 357 ammo"
name = "revolver"
@@ -10,7 +14,7 @@
var/ammo_type = "/obj/item/ammo_casing/a357"
var/list/loaded = list()
var/max_shells = 7
var/load_method = 0 //0 = Single shells or quick loader, 1 = box, 2 = magazine
var/load_method = SPEEDLOADER //0 = Single shells or quick loader, 1 = box, 2 = magazine
var/obj/item/ammo_magazine/empty_mag = null
@@ -45,7 +49,7 @@
var/num_loaded = 0
if(istype(A, /obj/item/ammo_magazine))
if((load_method == 2) && loaded.len) return
if((load_method == MAGAZINE) && loaded.len) return
var/obj/item/ammo_magazine/AM = A
for(var/obj/item/ammo_casing/AC in AM.stored_ammo)
if(loaded.len >= max_shells)
@@ -55,11 +59,11 @@
AM.stored_ammo -= AC
loaded += AC
num_loaded++
if(load_method == 2)
if(load_method == MAGAZINE)
user.remove_from_mob(AM)
empty_mag = AM
empty_mag.loc = src
if(istype(A, /obj/item/ammo_casing) && !load_method)
if(istype(A, /obj/item/ammo_casing) && load_method == SPEEDLOADER)
var/obj/item/ammo_casing/AC = A
if(AC.caliber == caliber && loaded.len < max_shells)
user.drop_item()
@@ -72,6 +76,25 @@
update_icon()
return
/obj/item/weapon/gun/projectile/attack_self(mob/user as mob)
if (loaded.len)
if (load_method == SPEEDLOADER)
var/obj/item/ammo_casing/AC = loaded[1]
loaded -= AC
AC.loc = get_turf(src) //Eject casing onto ground.
user << "\blue You unload shell from \the [src]!"
if (load_method == MAGAZINE)
var/obj/item/ammo_magazine/AM = empty_mag
for (var/obj/item/ammo_casing/AC in loaded)
AM.stored_ammo += AC
loaded -= AC
AM.loc = get_turf(src)
empty_mag = null
user << "\blue You unload magazine from \the [src]!"
else
user << "\red Nothing loaded in \the [src]!"
/obj/item/weapon/gun/projectile/examine()
..()
+16 -20
View File
@@ -74,37 +74,34 @@
loc = A.loc
return 0// nope.avi
var/distance = get_dist(original,loc)
var/distance = get_dist(starting,loc)
//Lower accurancy/longer range tradeoff. Distance matters a lot here, so at
// close distance, actually RAISE the chance to hit.
def_zone = get_zone_with_miss_chance(def_zone, M, -30 + 8*distance)
if(silenced)
if(def_zone)
M << "\red You've been shot in the [parse_zone(def_zone)] by the [src.name]!"
if(!def_zone)
visible_message("\blue \The [src] misses [M] narrowly!")
forcedodge = -1
else
if(!def_zone)
visible_message("\The [src] misses [M] narrowly.")
del(src)
return
if(silenced)
M << "\red You've been shot in the [parse_zone(def_zone)] by the [src.name]!"
else
visible_message("\red [A.name] is hit by the [src.name] in the [parse_zone(def_zone)]!")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
if(istype(firer, /mob))
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>"
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>"
log_attack("<font color='red'>[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src.type]</font>")
msg_admin_attack("ATTACK: [firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src]") //BS12 EDIT ALG
else
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
log_attack("<font color='red'>UNKNOWN shot [M] ([M.ckey]) with a [src.type]</font>")
msg_admin_attack("ATTACK: UNKNOWN shot [M] ([M.ckey]) with a [src]") //BS12 EDIT ALG
if(istype(firer, /mob))
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>"
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>"
log_attack("<font color='red'>[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src.type]</font>")
msg_admin_attack("ATTACK: [firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src]") //BS12 EDIT ALG
else
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
log_attack("<font color='red'>UNKNOWN shot [M] ([M.ckey]) with a [src.type]</font>")
msg_admin_attack("ATTACK: UNKNOWN shot [M] ([M.ckey]) with a [src]") //BS12 EDIT ALG
spawn(0)
if(A)
var/permutation = A.bullet_act(src, def_zone) // searches for return value
if(permutation == -1 || forcedodge) // the bullet passes through a dense object!
if (!forcedodge)
forcedodge = A.bullet_act(src, def_zone) // searches for return value
if(forcedodge == -1) // the bullet passes through a dense object!
bumped = 0 // reset bumped variable!
if(istype(A, /turf))
loc = A
@@ -118,7 +115,6 @@
O.bullet_act(src)
for(var/mob/M in A)
M.bullet_act(src, def_zone)
density = 0
invisibility = 101
del(src)
+38 -32
View File
@@ -20,50 +20,56 @@ var/list/beam_master = list()
process()
var/reference = "\ref[src]" //So we do not have to recalculate it a ton
var/first = 1 //So we don't make the overlay in the same tile as the firer
spawn while(src) //Move until we hit something
spawn(0)
while(!bumped) //Move until we hit something
step_towards(src, current) //Move~
if((!( current ) || loc == current)) //If we pass our target
current = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z)
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
del(src) //Delete if it passes the world edge
return
step_towards(src, current) //Move~
for(var/mob/living/M in loc)
Bump(M) //Bump anyone we touch
if(kill_count < 1)
del(src)
kill_count--
if((!( current ) || loc == current)) //If we pass our target
current = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z)
if(!bumped && !isturf(original))
if(loc == get_turf(original))
if(!(original in permutated))
Bump(original)
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
del(src) //Delete if it passes the world edge
return
if(!first) //Add the overlay as we pass over tiles
var/target_dir = get_dir(src, current) //So we don't call this too much
if(!first) //Add the overlay as we pass over tiles
var/target_dir = get_dir(src, current) //So we don't call this too much
//If the icon has not been added yet
if( !("[icon_state][target_dir]" in beam_master) )
var/image/I = image(icon,icon_state,10,target_dir) //Generate it.
beam_master["[icon_state][target_dir]"] = I //And cache it!
//If the icon has not been added yet
if( !("[icon_state][target_dir]" in beam_master) )
var/image/I = image(icon,icon_state,10,target_dir) //Generate it.
beam_master["[icon_state][target_dir]"] = I //And cache it!
//Finally add the overlay
src.loc.overlays += beam_master["[icon_state][target_dir]"]
//Finally add the overlay
src.loc.overlays += beam_master["[icon_state][target_dir]"]
//Add the turf to a list in the beam master so they can be cleaned up easily.
if(reference in beam_master)
var/list/turf_master = beam_master[reference]
if("[icon_state][target_dir]" in turf_master)
var/list/turfs = turf_master["[icon_state][target_dir]"]
turfs += loc
else
turf_master["[icon_state][target_dir]"] = list(loc)
//Add the turf to a list in the beam master so they can be cleaned up easily.
if(reference in beam_master)
var/list/turf_master = beam_master[reference]
if("[icon_state][target_dir]" in turf_master)
var/list/turfs = turf_master["[icon_state][target_dir]"]
turfs += loc
else
var/list/turfs = list()
turfs["[icon_state][target_dir]"] = list(loc)
beam_master[reference] = turfs
turf_master["[icon_state][target_dir]"] = list(loc)
else
first = 0
var/list/turfs = list()
turfs["[icon_state][target_dir]"] = list(loc)
beam_master[reference] = turfs
else
first = 0
cleanup(reference)
return
Del()
cleanup("\ref[src]")
..()
proc/cleanup(reference) //Waits .3 seconds then removes the overlay.
src = null
sleep(3)
+1 -1
View File
@@ -85,7 +85,7 @@
/datum/surgery_step/generic/retract_skin
required_tool = /obj/item/weapon/retractor
allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
allowed_tools = list(/obj/item/weapon/crowbar,/obj/item/weapon/kitchen/utensil/fork)
min_duration = 30
max_duration = 40