Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into bleeding-edge-freeze

This commit is contained in:
Cael_Aislinn
2013-02-22 23:56:38 +10:00
61 changed files with 1018 additions and 895 deletions
+1 -1
View File
@@ -641,7 +641,7 @@ var/list/admin_verbs_mod = list(
if(!istype(M, /mob/living/carbon/human))
usr << "\red You can only do this to humans!"
return
switch(alert("Are you sure you wish to edit this mob's appearance? Skrell, Soghun and Tajaran can result in unintended consequences.",,"Yes","No"))
switch(alert("Are you sure you wish to edit this mob's appearance? Skrell, Unathi and Tajaran can result in unintended consequences.",,"Yes","No"))
if("No")
return
var/new_facial = input("Please select facial hair color.", "Character Generation") as color
+1
View File
@@ -16,6 +16,7 @@
var/moving = null
var/adminobs = null
var/area = null
var/time_died_as_mouse = null //when the client last died as a mouse
///////////////
+4 -4
View File
@@ -768,8 +768,8 @@ datum/preferences
var/prev_species = species
var/whitelisted = 0
if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it!
if(is_alien_whitelisted(user, "Soghun")) //Check for Soghun and admins
new_species += "Soghun"
if(is_alien_whitelisted(user, "Soghun")) //Check for Unathi and admins
new_species += "Unathi"
whitelisted = 1
if(is_alien_whitelisted(user, "Tajaran")) //Check for Tajaran and admins
new_species += "Tajaran"
@@ -782,7 +782,7 @@ datum/preferences
alert(user, "You cannot change your species as you need to be whitelisted. If you wish to be whitelisted contact an admin in-game, on the forums, or on IRC.")
else //Not using the whitelist? Aliens for everyone!
new_species += "Tajaran"
new_species += "Soghun"
new_species += "Unathi"
new_species += "Skrell"
species = input("Please select a species", "Character Generation", null) in new_species
@@ -843,7 +843,7 @@ datum/preferences
b_type = new_b_type
if("hair")
if(species == "Human" || species == "Soghun")
if(species == "Human" || species == "Unathi")
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference") as color|null
if(new_hair)
r_hair = hex2num(copytext(new_hair, 2, 4))
@@ -151,6 +151,7 @@
metadata = sanitize_text(metadata, initial(metadata))
real_name = reject_bad_name(real_name)
if(isnull(species)) species = "Human"
if(isnull(nanotrasen_relation)) nanotrasen_relation = initial(nanotrasen_relation)
if(!real_name) real_name = random_name()
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
gender = sanitize_gender(gender)
+14 -10
View File
@@ -1,19 +1,23 @@
/obj/item/clothing/head/helmet/space/helmet_soghun_cheap
/obj/item/clothing/head/helmet/space/unathi
var/up = 0 //So Unathi helmets play nicely with the weldervision check.
/obj/item/clothing/head/helmet/space/unathi/helmet_cheap
name = "NT breacher helmet"
desc = "Hey! Watch it with that thing! It's a knock-off of a soghun battle-helm, and that spike could put someone's eye out."
icon_state = "sog_helm_cheap"
item_state = "sog_helm_cheap"
color = "sog_helm_cheap"
desc = "Hey! Watch it with that thing! It's a knock-off of a Unathi battle-helm, and that spike could put someone's eye out."
icon_state = "unathi_helm_cheap"
item_state = "unathi_helm_cheap"
color = "unathi_helm_cheap"
armor = list(melee = 40, bullet = 30, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 50)
heat_protection = HEAD
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE
/obj/item/clothing/suit/space/rig_soghun_cheap
/obj/item/clothing/suit/space/unathi/rig_cheap
name = "NT breacher chassis"
desc = "A cheap NT knock-off of a soghun battle-rig. Looks like a fish, moves like a fish, steers like a cow."
icon_state = "rig-soghun-cheap"
item_state = "rig-soghun-cheap"
slowdown = 2
desc = "A cheap NT knock-off of a Unathi battle-rig. Looks like a fish, moves like a fish, steers like a cow."
icon_state = "rig-unathi-cheap"
item_state = "rig-unathi-cheap"
slowdown = 3
armor = list(melee = 40, bullet = 30, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 50)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
+15
View File
@@ -0,0 +1,15 @@
//Unathi clothing.
/obj/item/clothing/suit/unathi/robe
name = "roughspun robes"
desc = "A traditional Unathi garment."
icon_state = "robe-unathi"
item_state = "robe-unathi"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
/obj/item/clothing/suit/unathi/mantle
name = "hide mantle"
desc = "A rather grisly selection of cured hides and skin, sewn together to form a ragged mantle."
icon_state = "mantle-unathi"
item_state = "mantle-unathi"
body_parts_covered = UPPER_TORSO
@@ -263,6 +263,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set name = "Become mouse"
set category = "Ghost"
var/timedifference = world.time - client.time_died_as_mouse
if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600)
var/timedifference_text
timedifference_text = time2text(mouse_respawn_time * 600 - timedifference,"mm:ss")
src << "<span class='warning'>You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death. You have [timedifference_text] left.</span>"
return
//find a viable mouse candidate
var/mob/living/simple_animal/mouse/host
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
+1 -1
View File
@@ -188,7 +188,7 @@
status = "MISSING!"
if(status == "")
status = "OK"
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.getDisplayName(),status),1)
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.display_name,status),1)
if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
H.play_xylophone()
else
@@ -461,6 +461,7 @@ It can still be worn/put on as normal.
*/
/obj/effect/equip_e/human/done() //TODO: And rewrite this :< ~Carn
target.cpr_time = 1
if(isanimal(source)) return //animals cannot strip people
if(!source || !target) return //Target or source no longer exist
if(source.loc != s_loc) return //source has moved
if(target.loc != t_loc) return //target has moved
+1 -1
View File
@@ -1402,7 +1402,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
var/masked = 0
if( istype(head, /obj/item/clothing/head/welding) )
if( istype(head, /obj/item/clothing/head/welding) || istype(head, /obj/item/clothing/head/helmet/space/unathi))
var/obj/item/clothing/head/welding/O = head
if(!O.up && tinted_weldhelh)
client.screen += global_hud.darkMask
@@ -789,7 +789,7 @@ proc/get_damage_icon_part(damage_state, body_part)
if(!wear_suit || !(wear_suit.flags_inv & HIDEJUMPSUIT) && !istype(wear_suit, /obj/item/clothing/suit/space))
overlays_lying[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "tajtail_l")
overlays_standing[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "tajtail_s")
else if( cur_species == "Soghun")
else if( cur_species == "Unathi")
if(!wear_suit || !(wear_suit.flags_inv & HIDEJUMPSUIT) && !istype(wear_suit, /obj/item/clothing/suit/space))
overlays_lying[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "sogtail_l")
overlays_standing[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "sogtail_s")
@@ -5,6 +5,7 @@
icon_state = "crab"
icon_living = "crab"
icon_dead = "crab_dead"
small = 1
speak_emote = list("clicks")
emote_hear = list("clicks")
emote_see = list("clacks")
@@ -167,6 +167,7 @@
health = 1
var/amount_grown = 0
pass_flags = PASSTABLE | PASSGRILLE
small = 1
/mob/living/simple_animal/chick/New()
..()
@@ -208,6 +209,7 @@ var/global/chicken_count = 0
var/eggsleft = 0
var/color
pass_flags = PASSTABLE
small = 1
/mob/living/simple_animal/chicken/New()
..()
@@ -5,6 +5,7 @@
icon_state = "lizard"
icon_living = "lizard"
icon_dead = "lizard-dead"
small = 1
speak_emote = list("hisses")
health = 5
maxHealth = 5
@@ -10,6 +10,7 @@
emote_hear = list("squeeks","squeaks","squiks")
emote_see = list("runs in a circle", "shakes", "scritches at something")
pass_flags = PASSTABLE
small = 1
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
@@ -48,6 +49,8 @@
src.stat = DEAD
src.icon_dead = "mouse_[color]_splat"
src.icon_state = "mouse_[color]_splat"
if(client)
client.time_died_as_mouse = world.time
//copy paste from alien/larva, if that func is updated please update this one also
/mob/living/simple_animal/mouse/verb/ventcrawl()
@@ -84,9 +87,11 @@
if(loc==startloc)
var/obj/target_vent = vents[selection_position]
if(target_vent)
/*
for(var/mob/O in oviewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
*/
loc = target_vent.loc
else
src << "\blue You need to remain still while entering a vent."
@@ -107,15 +112,19 @@
if (layer != TURF_LAYER+0.2)
layer = TURF_LAYER+0.2
src << text("\blue You are now hiding.")
/*
for(var/mob/O in oviewers(src, null))
if ((O.client && !( O.blinded )))
O << text("<B>[] scurries to the ground!</B>", src)
*/
else
layer = MOB_LAYER
src << text("\blue You have stopped hiding.")
/*
for(var/mob/O in oviewers(src, null))
if ((O.client && !( O.blinded )))
O << text("[] slowly peaks up from the ground...", src)
*/
//make mice fit under tables etc? this was hacky, and not working
/*
@@ -152,6 +161,11 @@
M << 'sound/effects/mousesqueek.ogg'
..()
/mob/living/simple_animal/mouse/Die()
if(client)
client.time_died_as_mouse = world.time
..()
/*
* Mouse types
*/
@@ -4,6 +4,7 @@
icon_state = "mushroom"
icon_living = "mushroom"
icon_dead = "mushroom_dead"
small = 1
speak_chance = 0
turns_per_move = 1
maxHealth = 5
@@ -8,7 +8,7 @@
var/projectiletype
var/projectilesound
var/casingtype
var/move_to_delay = 2 //delay for the automated movement.
var/move_to_delay = 4 //delay for the automated movement.
var/list/friends = list()
var/break_stuff_probability = 10
stop_automated_movement_when_pulled = 0
@@ -19,7 +19,7 @@
stop_automated_movement_when_pulled = 0
health = 300
maxHealth = 300
speed = 4
speed = 8
projectiletype = /obj/item/projectile/beam/drone
projectilesound = 'sound/weapons/laser3.ogg'
destroy_surroundings = 0
@@ -35,11 +35,16 @@
var/disabled = 0
var/exploding = 0
//Drones aren't affected by atmos.
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
minbodytemp = 0
maxbodytemp = 600
var/has_loot = 1
faction = "malf_drone"
@@ -33,6 +33,7 @@
icon_living = "parrot_fly"
icon_dead = "parrot_dead"
pass_flags = PASSTABLE
small = 1
speak = list("Hi","Hello!","Cracker?","BAWWWWK george mellons griffing me")
speak_emote = list("squawks","says","yells")
@@ -446,7 +446,7 @@
/mob/living/simple_animal/proc/SA_attackable(target_mob)
if (isliving(target_mob))
var/mob/living/L = target_mob
if(!L.stat || L.health <= 0)
if(!L.stat && L.health >= 0)
return (0)
if (istype(target_mob,/obj/mecha))
var/obj/mecha/M = target_mob
+1
View File
@@ -79,6 +79,7 @@
var/eye_stat = null//Living, potentially Carbon
var/lastpuke = 0
var/unacidable = 0
var/small = 0
var/name_archive //For admin things like possession
+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
+1 -1
View File
@@ -338,7 +338,7 @@
if(is_alien_whitelisted(src, "Tajaran") || !config.usealienwhitelist)
new_character.dna.mutantrace = "tajaran"
new_character.tajaran_talk_understand = 1
if(client.prefs.species == "Soghun")
if(client.prefs.species == "Unathi")
if(is_alien_whitelisted(src, "Soghun") || !config.usealienwhitelist)
new_character.dna.mutantrace = "lizard"
new_character.soghun_talk_understand = 1
@@ -138,7 +138,7 @@ datum/preferences
if(species == "Tajaran")
preview_icon = new /icon('icons/effects/species.dmi', "tajaran_[g]_s")
preview_icon.Blend(new /icon('icons/effects/species.dmi', "tajtail_s"), ICON_OVERLAY)
else if(species == "Soghun")
else if(species == "Unathi")
preview_icon = new /icon('icons/effects/species.dmi', "lizard_[g]_s")
preview_icon.Blend(new /icon('icons/effects/species.dmi', "sogtail_s"), ICON_OVERLAY)
else if(species == "Skrell")
@@ -48,7 +48,7 @@
name = "Bald"
icon_state = "bald"
gender = MALE
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
short
name = "Short Hair" // try to capatilize the names please~
@@ -119,7 +119,7 @@
name = "Pompadour"
icon_state = "hair_pompadour"
gender = MALE
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
quiff
name = "Quiff"
@@ -142,19 +142,19 @@
name = "Beehive"
icon_state = "hair_beehive"
gender = FEMALE
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
bobcurl
name = "Bobcurl"
icon_state = "hair_bobcurl"
gender = FEMALE
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
bob
name = "Bob"
icon_state = "hair_bobcut"
gender = FEMALE
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
bowl
name = "Bowl"
@@ -165,7 +165,7 @@
name = "Buzzcut"
icon_state = "hair_buzzcut"
gender = MALE
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
crew
name = "Crewcut"
@@ -227,7 +227,7 @@
mohawk
name = "Mohawk"
icon_state = "hair_d"
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
jensen
name = "Adam Jensen Hair"
icon_state = "hair_jensen"
@@ -241,7 +241,7 @@
spiky
name = "Spiky"
icon_state = "hair_spikey"
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
kusangi
name = "Kusanagi Hair"
icon_state = "hair_kusanagi"
@@ -306,7 +306,7 @@
name = "Shaved"
icon_state = "bald"
gender = NEUTER
species_allowed = list("Human","Soghun","Tajaran","Skrell")
species_allowed = list("Human","Unathi","Tajaran","Skrell")
watson
name = "Watson Mustache"
@@ -347,7 +347,7 @@
elvis
name = "Elvis Sideburns"
icon_state = "facial_elvis"
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
abe
name = "Abraham Lincoln Beard"
@@ -521,11 +521,11 @@
icon = 'icons/mob/human_races/r_tajaran.dmi'
species_allowed = list("Tajaran")
soghun
name = "Default soghun skin"
unathi
name = "Default Unathi skin"
icon_state = "default"
icon = 'icons/mob/human_races/r_lizard.dmi'
species_allowed = list("Soghun")
species_allowed = list("Unathi")
skrell
name = "Default skrell skin"
+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)
@@ -198,7 +198,10 @@
del(src)
if(ismouse(M))
var/mob/living/simple_animal/mouse/N = M
N.emote("nibbles away at the [src]")
N << text("\blue You nibble away at [src].")
if(prob(50))
N.visible_message("[N] nibbles away at [src].", "")
//N.emote("nibbles away at the [src]")
N.health = min(N.health + 1, N.maxHealth)
+1
View File
@@ -136,6 +136,7 @@
MouseDrop_T(mob/target, mob/user)
if (!istype(target) || target.buckled || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || istype(user, /mob/living/silicon/ai))
return
if(isanimal(user) && target != user) return //animals cannot put mobs other than themselves into disposal
src.add_fingerprint(user)
var/target_loc = target.loc
var/msg
+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
+62 -8
View File
@@ -80,15 +80,23 @@
find_prob +=40
if (isright(tool))
find_prob +=20
if (prob(find_prob))
if (prob(find_prob))
user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.display_name] with \the [tool].", \
"\blue You take something out of incision on [target]'s [affected.display_name]s with \the [tool]." )
affected.implants -= imp
imp.loc = get_turf(target)
imp.imp_in = null
imp.implanted = 0
else if (affected.hidden)
user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.display_name] with \the [tool].", \
"\blue You take something out of incision on [target]'s [affected.display_name]s with \the [tool]." )
var/obj/item/weapon/implant/imp = affected.implants[1]
affected.implants -= imp
imp.loc = get_turf(target)
imp.imp_in = null
imp.implanted = 0
affected.hidden.loc = get_turf(target)
if(!affected.hidden.blood_DNA)
affected.hidden.blood_DNA = list()
affected.hidden.blood_DNA[target.dna.unique_enzymes] = target.dna.b_type
affected.hidden.update_icon()
affected.hidden = null
else
user.visible_message("\blue [user] could not find anything inside [target]'s [affected.display_name], and pulls \the [tool] out.", \
"\blue You could not find anything inside [target]'s [affected.display_name]." )
@@ -107,4 +115,50 @@
user.visible_message("\red Something beeps inside [target]'s [affected.display_name]!")
playsound(imp.loc, 'sound/items/countdown.ogg', 75, 1, -3)
spawn(25)
imp.activate()
imp.activate()
//////////////////////////////////////////////////////////////////
// ITEM PLACEMENT SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/item_place
required_tool = /obj/item
min_duration = 80
max_duration = 100
var/max_size = 2 //maximum w_class of item that fits.
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
if (affected.name in list("chest","groin","head"))
max_size = 3
else
max_size = 2
return affected.open == 2 && !(affected.status & ORGAN_BLEEDING) && tool.w_class <= max_size && !affected.hidden
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts putting [tool] inside the incision on [target]'s [affected.display_name].", \
"You start putting [tool] inside the incision on [target]'s [affected.display_name]." )
target.custom_pain("The pain in your chest is living hell!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] puts [tool] inside [target]'s [affected.display_name].", \
"\blue You put [tool] inside [target]'s [affected.display_name]." )
if (tool.w_class > max_size/2 && prob(50))
user << "\red You tear some vessels trying to fit such big object in this cavity."
var/datum/wound/internal_bleeding/I = new (15)
affected.wounds += I
affected.owner.custom_pain("You feel something rip in your [affected.display_name]!", 1)
user.drop_item()
affected.hidden = tool
tool.loc = target
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!", \
"\red Your hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!")
affected.createwound(CUT, 20)