Merge pull request #5 from Neerti/4/8/2015_bay_sync

Syncs to Bay (4/8/2015)
This commit is contained in:
Neerti
2015-04-10 09:41:51 -04:00
57 changed files with 714 additions and 671 deletions
+1 -1
View File
@@ -296,7 +296,7 @@ var/list/admin_verbs_mentor = list(
if(holder.rights & R_SERVER) verbs += admin_verbs_server
if(holder.rights & R_DEBUG)
verbs += admin_verbs_debug
if(config.debugparanoid && !check_rights(R_ADMIN))
if(config.debugparanoid && !(holder.rights & R_ADMIN))
verbs.Remove(admin_verbs_paranoid_debug) //Right now it's just callproc but we can easily add others later on.
if(holder.rights & R_POSSESS) verbs += admin_verbs_possess
if(holder.rights & R_PERMISSIONS) verbs += admin_verbs_permissions
+6
View File
@@ -661,6 +661,12 @@ var/global/list/gear_datums = list()
cost = 2
slot = slot_shoes
/datum/gear/toeless_jackboots
display_name = "toe-less jackboots"
path = /obj/item/clothing/shoes/jackboots/fluff/kecer_eldraran //permisson of owner of custom item was granted
cost = 2
slot = slot_shoes
/datum/gear/sandal
display_name = "sandals"
path = /obj/item/clothing/shoes/sandal
@@ -105,7 +105,14 @@
// Okay, it wasn't a terminal being touched, check for all the simple insertions.
if(input_device.type in list(/obj/item/device/paicard, /obj/item/device/mmi, /obj/item/device/mmi/digital/posibrain))
integrate_ai(input_device,user)
if(integrated_ai)
integrated_ai.attackby(input_device,user)
// If the transfer was successful, we can clear out our vars.
if(integrated_ai.loc != src)
integrated_ai = null
eject_ai()
else
integrate_ai(input_device,user)
return 1
return 0
+18 -13
View File
@@ -1,5 +1,5 @@
/obj/item/device/eftpos
name = "EFTPOS scanner"
name = "\improper EFTPOS scanner"
desc = "Swipe your ID card to make purchases electronically."
icon = 'icons/obj/device.dmi'
icon_state = "eftpos"
@@ -110,11 +110,13 @@
else
user << browse(null,"window=eftpos")
/obj/item/device/eftpos/attackby(O as obj, user as mob)
if(istype(O, /obj/item/weapon/card))
/obj/item/device/eftpos/attackby(obj/item/O as obj, user as mob)
var/obj/item/weapon/card/id/I = O.GetID()
if(I)
if(linked_account)
var/obj/item/weapon/card/I = O
scan_card(I)
scan_card(I, O)
else
usr << "\icon[src]<span class='warning'>Unable to connect to linked account.</span>"
else if (istype(O, /obj/item/weapon/spacecash/ewallet))
@@ -124,7 +126,7 @@
if(transaction_locked && !transaction_paid)
if(transaction_amount <= E.worth)
playsound(src, 'sound/machines/chime.ogg', 50, 1)
src.visible_message("\icon[src] The [src] chimes.")
src.visible_message("\icon[src] \The [src] chimes.")
transaction_paid = 1
//transfer the money
@@ -141,7 +143,7 @@
T.time = worldtime2text()
linked_account.transaction_log.Add(T)
else
usr << "\icon[src]<span class='warning'>The charge card doesn't have that much money!</span>"
usr << "\icon[src]<span class='warning'>\The [O] doesn't have that much money!</span>"
else
usr << "\icon[src]<span class='warning'>Connected account has been suspended.</span>"
else
@@ -225,10 +227,13 @@
src.attack_self(usr)
/obj/item/device/eftpos/proc/scan_card(var/obj/item/weapon/card/I)
/obj/item/device/eftpos/proc/scan_card(var/obj/item/weapon/card/I, var/obj/item/ID_container)
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
if(I==ID_container || ID_container == null)
usr.visible_message("<span class='info'>\The [usr] swipes a card through \the [src].</span>")
else
usr.visible_message("<span class='info'>\The [usr] swipes \the [ID_container] through \the [src].</span>")
if(transaction_locked && !transaction_paid)
if(linked_account)
if(!linked_account.suspended)
@@ -242,7 +247,7 @@
if(!D.suspended)
if(transaction_amount <= D.money)
playsound(src, 'sound/machines/chime.ogg', 50, 1)
src.visible_message("\icon[src] The [src] chimes.")
src.visible_message("\icon[src] \The [src] chimes.")
transaction_paid = 1
//transfer the money
@@ -283,13 +288,13 @@
else if (istype(I, /obj/item/weapon/card/emag))
if(transaction_locked)
if(transaction_paid)
usr << "\icon[src]<span class='info'>You stealthily swipe [I] through [src].</span>"
usr << "\icon[src]<span class='info'>You stealthily swipe \the [I] through \the [src].</span>"
transaction_locked = 0
transaction_paid = 0
else
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
usr.visible_message("<span class='info'>\The [usr] swipes a card through \the [src].</span>")
playsound(src, 'sound/machines/chime.ogg', 50, 1)
src.visible_message("\icon[src] The [src] chimes.")
src.visible_message("\icon[src] \The [src] chimes.")
transaction_paid = 1
else
..()
+4 -2
View File
@@ -62,7 +62,7 @@
matter = list("metal" = 3750)
var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO
origin_tech = "materials=1;engineering=1"
attack_verb = list("hit", "pierced", "sliced", "attacked", "drilled")
attack_verb = list("hit", "pierced", "sliced", "attacked")
var/drill_sound = 'sound/weapons/Genhit.ogg'
var/drill_verb = "drilling"
sharp = 1
@@ -107,6 +107,7 @@
digspeed = 20
origin_tech = "materials=4"
desc = "This makes no metallurgic sense."
drill_verb = "picking"
/obj/item/weapon/pickaxe/plasmacutter
name = "plasma cutter"
@@ -127,7 +128,8 @@
item_state = "dpickaxe"
digspeed = 10
origin_tech = "materials=6;engineering=4"
desc = "A pickaxe with a diamond pick head, this is just like minecraft."
desc = "A pickaxe with a diamond pick head."
drill_verb = "picking"
/obj/item/weapon/pickaxe/diamonddrill //When people ask about the badass leader of the mining tools, they are talking about ME!
name = "diamond mining drill"
+34
View File
@@ -134,6 +134,12 @@
. = (L in languages)
languages.Remove(L)
/mob/living/remove_language(rem_language)
var/datum/language/L = all_languages[rem_language]
if(default_language == L)
default_language = null
return ..()
// Can we speak this language, as opposed to just understanding it?
/mob/proc/can_speak(datum/language/speaking)
@@ -154,4 +160,32 @@
src << browse(dat, "window=checklanguage")
return
/mob/living/check_languages()
var/dat = "<b><font size = 5>Known Languages</font></b><br/><br/>"
if(default_language)
dat += "Current default language: [default_language] - <a href='byond://?src=\ref[src];default_lang=reset'>reset</a><br/><br/>"
for(var/datum/language/L in languages)
if(!(L.flags & NONGLOBAL))
if(L == default_language)
dat += "<b>[L.name] (:[L.key])</b> - default - <a href='byond://?src=\ref[src];default_lang=reset'>reset</a><br/>[L.desc]<br/><br/>"
else
dat += "<b>[L.name] (:[L.key])</b> - <a href='byond://?src=\ref[src];default_lang=[L]'>set default</a><br/>[L.desc]<br/><br/>"
src << browse(dat, "window=checklanguage")
/mob/living/Topic(href, href_list)
if(href_list["default_lang"])
if(href_list["default_lang"] == "reset")
set_default_language(null)
else
var/datum/language/L = all_languages[href_list["default_lang"]]
if(L)
set_default_language(L)
check_languages()
return 1
else
return ..()
#undef SCRAMBLE_CACHE_LEN
+3
View File
@@ -456,6 +456,9 @@
return 1
/mob/living/carbon/get_default_language()
if(default_language)
return default_language
if(!species)
return null
return species.default_language ? all_languages[species.default_language] : null
@@ -74,7 +74,7 @@
mutations.Add(HUSK)
status_flags |= DISFIGURED //makes them unknown without fucking up other stuff like admintools
update_body(0)
update_body(1)
return
/mob/living/carbon/human/proc/Drain()
+6 -16
View File
@@ -21,7 +21,10 @@
set_species()
if(species)
name = species.get_random_name(gender)
real_name = species.get_random_name(gender)
name = real_name
if(mind)
mind.name = real_name
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
@@ -926,23 +929,12 @@
germ_level += n
/mob/living/carbon/human/revive()
for (var/obj/item/organ/external/O in organs)
O.status &= ~ORGAN_BROKEN
O.status &= ~ORGAN_BLEEDING
O.status &= ~ORGAN_SPLINTED
O.status &= ~ORGAN_CUT_AWAY
O.status &= ~ORGAN_ATTACHABLE
O.wounds.Cut()
O.heal_damage(1000,1000,1,1)
var/obj/item/organ/external/head/h = organs_by_name["head"]
h.disfigured = 0
if(species && !(species.flags & NO_BLOOD))
vessel.add_reagent("blood",560-vessel.total_volume)
fixblood()
// Fix up any missing organs.
// Fix up all organs.
// This will ignore any prosthetics in the prefs currently.
species.create_organs(src)
@@ -954,11 +946,9 @@
H.brainmob.mind.transfer_to(src)
del(H)
for(var/obj/item/organ/I in internal_organs)
I.damage = 0
for (var/datum/disease/virus in viruses)
virus.cure()
for (var/ID in virus2)
var/datum/disease2/disease/V = virus2[ID]
V.cure(src)
@@ -100,9 +100,9 @@
var/hit_zone = H.zone_sel.selecting
var/obj/item/organ/external/affecting = get_organ(hit_zone)
if(!affecting || affecting.status & ORGAN_DESTROYED)
if(!affecting || affecting.is_stump() || (affecting.status & ORGAN_DESTROYED))
M << "<span class='danger'>They are missing that limb!</span>"
return
return 1
switch(src.a_intent)
if(I_HELP)
@@ -220,14 +220,14 @@
if (istype(l_hand,/obj/item/weapon/gun))
W = l_hand
chance = hand ? 40 : 20
chance += hand ? 40 : 20
if (istype(r_hand,/obj/item/weapon/gun))
else if (istype(r_hand,/obj/item/weapon/gun))
W = r_hand
chance = !hand ? 40 : 20
chance += !hand ? 40 : 20
if (prob(chance))
visible_message("<span class='danger'>[src]'s [W] goes off during struggle!</span>")
visible_message("<span class='danger'>[src]'s [W.name] goes off during struggle!")
var/list/turfs = list()
for(var/turf/T in view())
turfs += T
@@ -308,7 +308,7 @@
if(!target_zone)
return null
var/obj/item/organ/external/organ = get_organ(check_zone(target_zone))
if(!organ || organ.is_dislocated() || organ.dislocated == -1)
if(!organ || (organ.dislocated == 2) || (organ.dislocated == -1))
return null
var/dislocation_str
if(prob(W.force))
@@ -1,7 +1,7 @@
/mob/living/carbon/human/proc/update_eyes()
if(internal_organs_by_name["eyes"])
var/obj/item/organ/eyes/eyes = internal_organs_by_name["eyes"]
eyes.eye_colour = list(r_eyes,g_eyes,b_eyes)
var/obj/item/organ/eyes/eyes = internal_organs_by_name["eyes"]
if(eyes)
eyes.update_colour()
regenerate_icons()
/mob/living/carbon/var/list/internal_organs = list()
@@ -70,12 +70,12 @@
for(var/limb_tag in list("l_leg","r_leg","l_foot","r_foot"))
var/obj/item/organ/external/E = organs_by_name[limb_tag]
if(!E)
stance_damage += 2
else if (E.status & ORGAN_DESTROYED)
if(!E || (E.status & (ORGAN_DESTROYED|ORGAN_DEAD)))
stance_damage += 2 // let it fail even if just foot&leg
else if (E.is_malfunctioning() || (E.is_broken() && !(E.status & ORGAN_SPLINTED)) || !E.is_usable())
else if (E.is_malfunctioning() || (E.is_broken() && !(E.status & ORGAN_SPLINTED)) || (E.status & ORGAN_MUTATED))
stance_damage += 1
else if (E.is_dislocated())
stance_damage += 0.5
// Canes and crutches help you stand (if the latter is ever added)
// One cane mitigates a broken leg+foot, or a missing foot.
@@ -102,10 +102,14 @@
if(!E || !E.can_grasp || (E.status & ORGAN_SPLINTED))
continue
if(E.is_broken())
if(E.is_broken() || E.is_dislocated())
if(E.body_part == HAND_LEFT)
if(!l_hand)
continue
drop_from_inventory(l_hand)
else
if(!r_hand)
continue
drop_from_inventory(r_hand)
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
+1 -1
View File
@@ -389,7 +389,7 @@
// Lung damage increases the minimum safe pressure.
if(species.has_organ["lungs"])
var/obj/item/organ/lungs/L = internal_organs_by_name["lungs"]
if(!L)
if(isnull(L))
safe_pressure_min = INFINITY //No lungs, how are you breathing?
else if(L.is_broken())
safe_pressure_min *= 1.5
@@ -168,6 +168,10 @@
/datum/species/proc/get_random_name(var/gender)
var/datum/language/species_language = all_languages[language]
if(!species_language)
species_language = all_languages[default_language]
if(!species_language)
return "unknown"
return species_language.get_random_name(gender)
/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs.
@@ -45,11 +45,8 @@
if(prob(1))
H.emote(pick("scratch","jump","roll","tail"))
/datum/species/monkey/handle_post_spawn(var/mob/living/carbon/human/H)
H.real_name = "[lowertext(name)] ([rand(100,999)])"
H.name = H.real_name
..()
/datum/species/monkey/get_random_name()
return "[lowertext(name)] ([rand(100,999)])"
/datum/species/monkey/tajaran
name = "Farwa"
@@ -61,6 +61,9 @@
var/weeds_heal_rate = 1 // Health regen on weeds.
var/weeds_plasma_rate = 5 // Plasma regen on weeds.
/datum/species/xenos/get_random_name()
return "alien [caste_name] ([alien_number])"
/datum/species/xenos/can_understand(var/mob/other)
if(istype(other,/mob/living/carbon/alien/larva))
@@ -41,12 +41,12 @@
if (target.l_hand)
// Disarm left hand
//Urist McAssistant dropped the macguffin with a scream just sounds odd. Plus it doesn't work with NO_PAIN
target.visible_message("<span class='danger'>\The [target.l_hand] was knocked right out of [src]'s grasp!</span>")
target.visible_message("<span class='danger'>\The [target.l_hand] was knocked right out of [target]'s grasp!</span>")
target.drop_l_hand()
if("r_arm", "r_hand")
if (target.r_hand)
// Disarm right hand
target.visible_message("<span class='danger'>\The [target.r_hand] was knocked right out of [src]'s grasp!</span>")
target.visible_message("<span class='danger'>\The [target.r_hand] was knocked right out of [target]'s grasp!</span>")
target.drop_r_hand()
if("chest")
if(!target.lying)
@@ -237,24 +237,30 @@ var/global/list/damage_icon_parts = list()
//CACHING: Generate an index key from visible bodyparts.
//0 = destroyed, 1 = normal, 2 = robotic, 3 = necrotic.
//Create a new, blank icon for our mob to use.
if(stand_icon)
del(stand_icon)
stand_icon = new(species.icon_template ? species.icon_template : 'icons/mob/human.dmi',"blank")
var/icon_key = "[species.race_key][g][s_tone][r_skin][g_skin][b_skin]"
var/obj/item/organ/eyes/eyes = internal_organs_by_name["eyes"]
var/icon_key = "[species.race_key][g][s_tone]"
for(var/obj/item/organ/external/part in organs)
if(part.is_stump() || (part.status & ORGAN_DESTROYED))
icon_key = "[icon_key]0"
if(eyes)
icon_key += "[rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3])]"
else
icon_key += "#000000"
for(var/organ_tag in species.has_limbs)
var/obj/item/organ/external/part = organs_by_name[organ_tag]
if(isnull(part) || part.is_stump() || (part.status & ORGAN_DESTROYED))
icon_key += "0"
else if(part.status & ORGAN_ROBOT)
icon_key = "[icon_key]2[part.model ? "-[part.model]": ""]"
icon_key += "2[part.model ? "-[part.model]": ""]"
else if(part.status & ORGAN_DEAD)
icon_key = "[icon_key]3"
icon_key += "3"
else
icon_key = "[icon_key]1"
icon_key += "1"
icon_key = "[icon_key][husk ? 1 : 0][fat ? 1 : 0][hulk ? 1 : 0][skeleton ? 1 : 0][s_tone]"
icon_key = "[icon_key][husk ? 1 : 0][fat ? 1 : 0][hulk ? 1 : 0][skeleton ? 1 : 0]"
var/icon/base_icon
if(human_icon_cache[icon_key])
@@ -784,11 +790,11 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/update_inv_r_hand(var/update_icons=1)
if(r_hand)
r_hand.screen_loc = ui_rhand //TODO
var/t_icon = INV_R_HAND_DEF_ICON
if(r_hand.item_icons && (icon_r_hand in r_hand.item_icons))
t_icon = r_hand.item_icons[icon_r_hand]
var/t_state = r_hand.item_state //useful for clothing that changes icon_state but retains the same sprite on the mob when held in hand
if(!t_state) t_state = r_hand.icon_state
if(r_hand.icon_override)
@@ -800,18 +806,18 @@ var/global/list/damage_icon_parts = list()
if (handcuffed) drop_r_hand()
else
overlays_standing[R_HAND_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_l_hand(var/update_icons=1)
if(l_hand)
l_hand.screen_loc = ui_lhand //TODO
var/t_icon = INV_L_HAND_DEF_ICON
if(l_hand.item_icons && (icon_l_hand in l_hand.item_icons))
t_icon = l_hand.item_icons[icon_l_hand]
var/t_state = l_hand.item_state //useful for clothing that changes icon_state but retains the same sprite on the mob when held in hand
if(!t_state) t_state = l_hand.icon_state
if(l_hand.icon_override)
@@ -823,7 +829,7 @@ var/global/list/damage_icon_parts = list()
if (handcuffed) drop_l_hand()
else
overlays_standing[L_HAND_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1)
@@ -10,14 +10,13 @@
is_adult = 0
maxHealth = 150
revive()
regenerate_icons()
if (!client) rabid = 1
number = rand(1, 1000)
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
return
. = ..(gibbed, "seizes up and falls limp...")
mood = null
regenerate_icons()
return
@@ -71,6 +71,7 @@
mutation_chance = rand(25, 35)
var/sanitizedcolour = replacetext(colour, " ", "")
coretype = text2path("/obj/item/slime_extract/[sanitizedcolour]")
regenerate_icons()
..(location)
/mob/living/carbon/slime/movement_delay()
@@ -1,141 +0,0 @@
//Monkey Overlays Indexes////////
#define M_MASK_LAYER 1
#define M_BACK_LAYER 2
#define M_HANDCUFF_LAYER 3
#define M_L_HAND_LAYER 4
#define M_R_HAND_LAYER 5
#define TARGETED_LAYER 6
#define M_FIRE_LAYER 6
#define M_TOTAL_LAYERS 7
/////////////////////////////////
/mob/living/carbon/monkey
var/list/overlays_lying[M_TOTAL_LAYERS]
var/list/overlays_standing[M_TOTAL_LAYERS]
/mob/living/carbon/monkey/regenerate_icons()
..()
update_inv_wear_mask(0)
update_inv_back(0)
update_inv_r_hand(0)
update_inv_l_hand(0)
update_inv_handcuffed(0)
update_fire(0)
update_icons()
//Hud Stuff
update_hud()
return
/mob/living/carbon/monkey/update_icons()
update_hud()
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
overlays.Cut()
for(var/image/I in overlays_standing)
overlays += I
if(lying)
var/matrix/M = matrix()
M.Turn(90)
M.Translate(1,-6)
src.transform = M
else
var/matrix/M = matrix()
src.transform = M
////////
/mob/living/carbon/monkey/update_inv_wear_mask(var/update_icons=1)
if( wear_mask && istype(wear_mask, /obj/item/clothing/mask) )
overlays_standing[M_MASK_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "[wear_mask.icon_state]")
wear_mask.screen_loc = ui_monkey_mask
else
overlays_standing[M_MASK_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_inv_r_hand(var/update_icons=1)
if(r_hand)
var/t_icon = INV_R_HAND_DEF_ICON
if(r_hand.item_icons && (icon_r_hand in r_hand.item_icons))
t_icon = r_hand.item_icons[icon_r_hand]
var/t_state = r_hand.item_state
if(!t_state) t_state = r_hand.icon_state
overlays_standing[M_R_HAND_LAYER] = image("icon" = t_icon, "icon_state" = t_state)
r_hand.screen_loc = ui_rhand
if (handcuffed) drop_r_hand()
else
overlays_standing[M_R_HAND_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_inv_l_hand(var/update_icons=1)
if(l_hand)
var/t_icon = INV_L_HAND_DEF_ICON
if(l_hand.item_icons && (icon_l_hand in l_hand.item_icons))
t_icon = l_hand.item_icons[icon_l_hand]
var/t_state = l_hand.item_state
if(!t_state) t_state = l_hand.icon_state
overlays_standing[M_L_HAND_LAYER] = image("icon" = t_icon, "icon_state" = t_state)
l_hand.screen_loc = ui_lhand
if (handcuffed) drop_l_hand()
else
overlays_standing[M_L_HAND_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_inv_back(var/update_icons=1)
if(back)
overlays_standing[M_BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]")
back.screen_loc = ui_monkey_back
else
overlays_standing[M_BACK_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_inv_handcuffed(var/update_icons=1)
if(handcuffed)
drop_r_hand()
drop_l_hand()
stop_pulling()
overlays_standing[M_HANDCUFF_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "handcuff1")
else
overlays_standing[M_HANDCUFF_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_hud()
if (client)
client.screen |= contents
//Call when target overlay should be added/removed
/mob/living/carbon/monkey/update_targeted(var/update_icons=1)
if (targeted_by && target_locked)
overlays_standing[TARGETED_LAYER] = target_locked
else if (!targeted_by && target_locked)
del(target_locked)
if (!targeted_by)
overlays_standing[TARGETED_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_fire(var/update_icons=1)
if(on_fire)
overlays_standing[M_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"= -M_FIRE_LAYER)
else
overlays_standing[M_FIRE_LAYER] = null
if(update_icons) update_icons()
//Monkey Overlays Indexes////////
#undef M_MASK_LAYER
#undef M_BACK_LAYER
#undef M_HANDCUFF_LAYER
#undef M_L_HAND_LAYER
#undef M_R_HAND_LAYER
#undef TARGETED_LAYER
#undef M_FIRE_LAYER
#undef M_TOTAL_LAYERS
@@ -0,0 +1,25 @@
/mob/living
var/datum/language/default_language
/mob/living/verb/set_default_language(language as null|anything in languages)
set name = "Set Default Language"
set category = "IC"
if(language)
src << "<span class='notice'>You will now speak [language] if you do not specify a language when speaking.</span>"
else
src << "<span class='notice'>You will now speak whatever your standard default language is if you do not specify one when speaking.</span>"
default_language = language
// Silicons can't neccessarily speak everything in their languages list
/mob/living/silicon/set_default_language(language as null|anything in speech_synthesizer_langs)
..()
/mob/living/verb/check_default_language()
set name = "Check Default Language"
set category = "IC"
if(default_language)
src << "<span class='notice'>You are currently speaking [default_language] by default.</span>"
else
src << "<span class='notice'>Your current default language is your species or mob type default.</span>"
+1 -1
View File
@@ -80,7 +80,7 @@ proc/get_radio_key_from_channel(var/channel)
if(dongle.translate_binary) return 1
/mob/living/proc/get_default_language()
return null
return default_language
/mob/living/proc/handle_speech_problems(var/message, var/verb)
var/list/returns[3]
+23 -25
View File
@@ -478,41 +478,39 @@ var/list/ai_verbs_default = list(
//Replaces /mob/living/silicon/ai/verb/change_network() in ai.dm & camera.dm
//Adds in /mob/living/silicon/ai/proc/ai_network_change() instead
//Addition by Mord_Sith to define AI's network change ability
/mob/living/silicon/ai/proc/ai_network_change()
set category = "AI Commands"
set name = "Jump To Network"
unset_machine()
var/cameralist[0]
/mob/living/silicon/ai/proc/get_camera_network_list()
if(check_unable())
return
var/mob/living/silicon/ai/U = usr
var/list/cameralist = new()
for (var/obj/machinery/camera/C in cameranet.cameras)
if(!C.can_use())
continue
var/list/tempnetwork = difflist(C.network,restricted_camera_networks,1)
if(tempnetwork.len)
for(var/i in tempnetwork)
cameralist[i] = i
var/old_network = network
network = input(U, "Which network would you like to view?") as null|anything in cameralist
for(var/i in tempnetwork)
cameralist[i] = i
if(!U.eyeobj)
U.view_core()
cameralist = sortAssoc(cameralist)
return cameralist
/mob/living/silicon/ai/proc/ai_network_change(var/network in get_camera_network_list())
set category = "AI Commands"
set name = "Jump To Network"
unset_machine()
if(!network)
return
if(isnull(network))
network = old_network // If nothing is selected
else
for(var/obj/machinery/camera/C in cameranet.cameras)
if(!C.can_use())
continue
if(network in C.network)
U.eyeobj.setLoc(get_turf(C))
break
if(!eyeobj)
view_core()
return
for(var/obj/machinery/camera/C in cameranet.cameras)
if(!C.can_use())
continue
if(network in C.network)
eyeobj.setLoc(get_turf(C))
break
src << "\blue Switched to [network] camera network."
//End of code by Mord_Sith
+11 -1
View File
@@ -210,9 +210,19 @@
var/dat = "<b><font size = 5>Known Languages</font></b><br/><br/>"
if(default_language)
dat += "Current default language: [default_language] - <a href='byond://?src=\ref[src];default_lang=reset'>reset</a><br/><br/>"
for(var/datum/language/L in languages)
if(!(L.flags & NONGLOBAL))
dat += "<b>[L.name] (:[L.key])</b><br/>Speech Synthesizer: <i>[(L in speech_synthesizer_langs)? "YES":"NOT SUPPORTED"]</i><br/>[L.desc]<br/><br/>"
var/default_str
if(L == default_language)
default_str = " - default - <a href='byond://?src=\ref[src];default_lang=reset'>reset</a>"
else
default_str = " - <a href='byond://?src=\ref[src];default_lang=[L]'>set default</a>"
var/synth = (L in speech_synthesizer_langs)
dat += "<b>[L.name] (:[L.key])</b>[synth ? default_str : null]<br/>Speech Synthesizer: <i>[synth ? "YES" : "NOT SUPPORTED"]</i><br/>[L.desc]<br/><br/>"
src << browse(dat, "window=checklanguage")
return
@@ -474,6 +474,7 @@
// Do the initial caching of the player's body icons.
new_character.force_update_limbs()
new_character.update_eyes()
new_character.regenerate_icons()
new_character.key = key //Manually transfer the key to log them in
+20 -17
View File
@@ -3,7 +3,7 @@ var/list/organ_cache = list()
/obj/item/organ
name = "organ"
icon = 'icons/obj/surgery.dmi'
var/dead_icon
var/mob/living/carbon/human/owner = null
var/status = 0
var/vital //Lose a vital limb, die immediately.
@@ -50,11 +50,12 @@ var/list/organ_cache = list()
holder.internal_organs |= src
/obj/item/organ/proc/die()
name = "dead [initial(name)]"
health = 0
if(status & ORGAN_ROBOT)
return
damage = max_damage
processing_objects -= src
//TODO: Grey out the icon state.
//TODO: Inject an organ with peridaxon to make it alive again.
if(dead_icon)
icon_state = dead_icon
/obj/item/organ/process()
@@ -75,10 +76,10 @@ var/list/organ_cache = list()
if(B && prob(40))
reagents.remove_reagent("blood",0.1)
blood_splatter(src,B,1)
health -= rand(1,3)
if(health <= 0)
damage += rand(1,3)
if(damage >= max_damage)
die()
else if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
//** Handle antibiotics and curing infections
handle_antibiotics()
@@ -179,9 +180,10 @@ var/list/organ_cache = list()
else
src.damage += amount
var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
if (!silent)
owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1)
if(owner && parent_organ)
var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
if(parent && !silent)
owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1)
/obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc
robotic = 2
@@ -241,7 +243,7 @@ var/list/organ_cache = list()
var/obj/item/organ/external/affected = owner.get_organ(parent_organ)
if(affected) affected.internal_organs -= src
loc = owner.loc
loc = get_turf(owner)
processing_objects |= src
rejecting = null
var/datum/reagent/blood/organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list
@@ -255,6 +257,8 @@ var/list/organ_cache = list()
msg_admin_attack("[user.name] ([user.ckey]) removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
owner.death()
owner = null
/obj/item/organ/proc/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected)
if(!istype(target)) return
@@ -271,13 +275,13 @@ var/list/organ_cache = list()
transplant_data["blood_DNA"] = transplant_blood.data["blood_DNA"]
owner = target
loc = owner
processing_objects -= src
target.internal_organs |= src
affected.internal_organs |= src
target.internal_organs_by_name[organ_tag] = src
status |= ORGAN_CUT_AWAY
del(src)
if(robotic)
status |= ORGAN_ROBOT
/obj/item/organ/eyes/replaced(var/mob/living/carbon/human/target)
@@ -286,7 +290,7 @@ var/list/organ_cache = list()
target.r_eyes = eye_colour[1]
target.g_eyes = eye_colour[2]
target.b_eyes = eye_colour[3]
target.update_body()
target.update_eyes()
..()
/obj/item/organ/proc/bitten(mob/user)
@@ -298,7 +302,6 @@ var/list/organ_cache = list()
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list
blood_splatter(src,B,1)
user.drop_from_inventory(src)
var/obj/item/weapon/reagent_containers/food/snacks/organ/O = new(get_turf(src))
O.name = name
+52 -44
View File
@@ -96,9 +96,14 @@
dislocated = 0
if(children && children.len)
for(var/obj/item/organ/external/child in children)
child.undislocate()
if(child.dislocated == 1)
child.undislocate()
if(owner)
owner.shock_stage += 20
for(var/obj/item/organ/external/limb in owner.organs)
if(limb.dislocated == 2)
return
owner.verbs -= /mob/living/carbon/human/proc/undislocate
/obj/item/organ/external/update_health()
damage = min(max_damage, (brute_dam + burn_dam))
@@ -110,6 +115,8 @@
if(owner)
replaced(owner)
sync_colour_to_human(owner)
spawn(1)
get_icon()
/obj/item/organ/external/replaced(var/mob/living/carbon/human/target)
owner = target
@@ -243,10 +250,10 @@
status &= ~ORGAN_BROKEN
perma_injury = 0
if((brute || burn) && children && children.len && (owner.species.flags & REGENERATES_LIMBS))
/*if((brute || burn) && children && children.len && (owner.species.flags & REGENERATES_LIMBS))
var/obj/item/organ/external/stump/S = locate() in children
if(S)
world << "Extra healing to go around ([brute+burn]) and [owner] needs a replacement limb."
world << "Extra healing to go around ([brute+burn]) and [owner] needs a replacement limb."*/
//Sync the organ's damage with its wounds
src.update_damages()
@@ -634,8 +641,9 @@ Note that amputating the affected organ does in fact remove the infection from t
"<span class='moderate'><b>Your [src.name] explodes in a shower of gore!</b></span>",\
"<span class='danger'>You hear the sickening splatter of gore.</span>")
src.removed(null, ignore_children)
owner.traumatic_shock += 60
var/mob/living/carbon/human/victim = owner //Keep a reference for post-removed().
removed(null, ignore_children)
victim.traumatic_shock += 60
wounds.Cut()
if(parent)
@@ -649,22 +657,22 @@ Note that amputating the affected organ does in fact remove the infection from t
parent.wounds |= W
parent.update_damages()
else
var/obj/item/organ/external/stump/stump = new (owner, 0, src)
var/obj/item/organ/external/stump/stump = new (victim, 0, src)
stump.wounds |= W
owner.organs |= stump
victim.organs |= stump
stump.update_damages()
parent = null
spawn(1)
owner.update_body()
owner.updatehealth()
owner.UpdateDamageIcon()
victim.updatehealth()
victim.UpdateDamageIcon()
victim.regenerate_icons()
dir = 2
switch(disintegrate)
if(DROPLIMB_EDGE)
compile_icon()
add_blood(owner)
add_blood(victim)
var/matrix/M = matrix()
M.Turn(rand(180))
src.transform = M
@@ -675,13 +683,13 @@ Note that amputating the affected organ does in fact remove the infection from t
dir = 2
return
if(DROPLIMB_BURN)
new /obj/effect/decal/cleanable/ash(get_turf(owner))
new /obj/effect/decal/cleanable/ash(get_turf(victim))
if(DROPLIMB_BLUNT)
var/obj/effect/decal/cleanable/blood/gibs/gore = new owner.species.single_gib_type(get_turf(owner))
if(owner.species.flesh_color)
gore.fleshcolor = owner.species.flesh_color
if(owner.species.blood_color)
gore.basecolor = owner.species.blood_color
var/obj/effect/decal/cleanable/blood/gibs/gore = new owner.species.single_gib_type(get_turf(victim))
if(victim.species.flesh_color)
gore.fleshcolor = victim.species.flesh_color
if(victim.species.blood_color)
gore.basecolor = victim.species.blood_color
gore.update_icon()
gore.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
@@ -699,25 +707,21 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/is_stump()
return 0
/obj/item/organ/external/replaced()
get_icon()
icon = mob_icon
return ..()
/obj/item/organ/external/proc/release_restraints()
if (owner.handcuffed && body_part in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT))
owner.visible_message(\
"\The [owner.handcuffed.name] falls off of [owner.name].",\
"\The [owner.handcuffed.name] falls off you.")
owner.drop_from_inventory(owner.handcuffed)
if (owner.legcuffed && body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT))
owner.visible_message(\
"\The [owner.legcuffed.name] falls off of [owner.name].",\
"\The [owner.legcuffed.name] falls off you.")
owner.drop_from_inventory(owner.legcuffed)
/obj/item/organ/external/proc/release_restraints(var/mob/living/carbon/human/holder)
if(!holder)
holder = owner
if(!holder)
return
if (holder.handcuffed && body_part in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT))
holder.visible_message(\
"\The [holder.handcuffed.name] falls off of [holder.name].",\
"\The [holder.handcuffed.name] falls off you.")
holder.drop_from_inventory(holder.handcuffed)
if (holder.legcuffed && body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT))
holder.visible_message(\
"\The [holder.legcuffed.name] falls off of [holder.name].",\
"\The [holder.legcuffed.name] falls off you.")
holder.drop_from_inventory(holder.legcuffed)
/obj/item/organ/external/proc/bandage()
var/rval = 0
@@ -838,7 +842,7 @@ Note that amputating the affected organ does in fact remove the infection from t
return 0
/obj/item/organ/external/proc/is_usable()
return !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
return !is_dislocated() && !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
/obj/item/organ/external/proc/is_malfunctioning()
return ((status & ORGAN_ROBOT) && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam))
@@ -859,11 +863,15 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/removed(var/mob/living/user, var/ignore_children)
if(!owner)
return
var/is_robotic = status & ORGAN_ROBOT
var/mob/living/carbon/human/victim = owner
..()
status |= ORGAN_DESTROYED
owner.bad_external_organs -= src
victim.bad_external_organs -= src
for(var/implant in implants) //todo: check if this can be left alone
del(implant)
@@ -880,19 +888,19 @@ Note that amputating the affected organ does in fact remove the infection from t
organ.removed()
organ.loc = src
release_restraints()
owner.organs -= src
owner.organs_by_name[limb_name] = null // Remove from owner's vars.
release_restraints(victim)
victim.organs -= src
victim.organs_by_name[limb_name] = null // Remove from owner's vars.
//Robotic limbs explode if sabotaged.
if(is_robotic && sabotaged)
owner.visible_message(
"<span class='danger'>\The [owner]'s [src.name] explodes violently!</span>",\
victim.visible_message(
"<span class='danger'>\The [victim]'s [src.name] explodes violently!</span>",\
"<span class='danger'>Your [src.name] explodes!</span>",\
"<span class='danger'>You hear an explosion!</span>")
explosion(get_turf(owner),-1,-1,2,3)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, owner)
spark_system.set_up(5, 0, victim)
spark_system.attach(owner)
spark_system.start()
spawn(10)
+45 -40
View File
@@ -5,13 +5,12 @@ var/global/list/limb_icon_cache = list()
/obj/item/organ/external/proc/compile_icon()
overlays.Cut()
get_icon()
// This is a kludge, only one icon has more than one generation of children though.
for(var/obj/item/organ/external/organ in contents)
if(organ.children && organ.children.len)
for(var/obj/item/organ/external/child in organ.children)
overlays += child.get_icon()
overlays += organ.get_icon()
overlays += child.mob_icon
overlays += organ.mob_icon
/obj/item/organ/external/proc/sync_colour_to_human(var/mob/living/carbon/human/human)
s_tone = null
@@ -23,6 +22,49 @@ var/global/list/limb_icon_cache = list()
if(human.species.flags & HAS_SKIN_COLOR)
s_col = list(human.r_skin, human.g_skin, human.b_skin)
/obj/item/organ/external/head/sync_colour_to_human(var/mob/living/carbon/human/human)
..()
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
if(eyes) eyes.update_colour()
/obj/item/organ/external/head/removed()
get_icon()
..()
/obj/item/organ/external/head/get_icon()
..()
if(owner.species.has_organ["eyes"])
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
if(owner.species.eyes)
var/icon/eyes_icon = new/icon('icons/mob/human_face.dmi', owner.species.eyes)
if(eyes)
eyes_icon.Blend(rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3]), ICON_ADD)
else
eyes_icon.Blend(rgb(128,0,0), ICON_ADD)
mob_icon.Blend(eyes_icon, ICON_OVERLAY)
if(owner.lip_style && (owner.species && (owner.species.flags & HAS_LIPS)))
mob_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s"), ICON_OVERLAY)
if(owner.f_style)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style]
if(facial_hair_style && facial_hair_style.species_allowed && (owner.species.name in facial_hair_style.species_allowed))
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
if(facial_hair_style.do_colouration)
facial_s.Blend(rgb(owner.r_facial, owner.g_facial, owner.b_facial), ICON_ADD)
overlays |= facial_s
if(owner.h_style && !(owner.head && (owner.head.flags & BLOCKHEADHAIR)))
var/datum/sprite_accessory/hair_style = hair_styles_list[owner.h_style]
if(hair_style && (owner.species.name in hair_style.species_allowed))
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
if(hair_style.do_colouration)
hair_s.Blend(rgb(owner.r_hair, owner.g_hair, owner.b_hair), ICON_ADD)
overlays |= hair_s
return mob_icon
/obj/item/organ/external/proc/get_icon(var/skeletal)
var/gender
@@ -66,43 +108,6 @@ var/global/list/limb_icon_cache = list()
return mob_icon
/obj/item/organ/external/head/get_icon(var/skeletal)
if(skeletal || !owner)
return
..()
if(owner.species.has_organ["eyes"])
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
if(eyes && owner.species.eyes)
var/icon/eyes_icon = new/icon('icons/mob/human_face.dmi', owner.species.eyes)
eyes_icon.Blend(rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3]), ICON_ADD)
mob_icon.Blend(eyes_icon, ICON_OVERLAY)
if(owner.lip_style && (owner.species && (owner.species.flags & HAS_LIPS)))
mob_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s"), ICON_OVERLAY)
if(owner.f_style)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style]
if(facial_hair_style)
var/icon/facial = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
if(facial_hair_style.do_colouration)
facial.Blend(rgb(owner.r_facial, owner.g_facial, owner.b_facial), ICON_ADD)
mob_icon.Blend(facial, ICON_OVERLAY)
if(owner.h_style && !(owner.head && (owner.head.flags & BLOCKHEADHAIR)))
var/datum/sprite_accessory/hair_style = hair_styles_list[owner.h_style]
if(hair_style)
var/icon/hair = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
if(hair_style.do_colouration)
hair.Blend(rgb(owner.r_hair, owner.g_hair, owner.b_hair), ICON_ADD)
mob_icon.Blend(hair, ICON_OVERLAY)
icon = mob_icon
return mob_icon
// new damage icon system
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
/obj/item/organ/external/update_icon()
+20 -41
View File
@@ -11,6 +11,7 @@
icon_state = "heart-on"
organ_tag = "heart"
parent_organ = "chest"
dead_icon = "heart-off"
/obj/item/organ/lungs
name = "lungs"
@@ -69,6 +70,15 @@
parent_organ = "head"
var/list/eye_colour = list(0,0,0)
/obj/item/organ/eyes/proc/update_colour()
if(!owner)
return
eye_colour = list(
owner.r_eyes ? owner.r_eyes : 0,
owner.g_eyes ? owner.g_eyes : 0,
owner.b_eyes ? owner.b_eyes : 0
)
/obj/item/organ/eyes/process() //Eye damage replaces the old eye_stat var.
..()
if(!owner)
@@ -78,36 +88,6 @@
if(is_broken())
owner.eye_blind = 20
/obj/item/organ/eyes/New()
..()
if(owner)
eye_colour = list(
owner.r_eyes ? owner.r_eyes : 0,
owner.g_eyes ? owner.g_eyes : 0,
owner.b_eyes ? owner.b_eyes : 0
)
/obj/item/organ/eyes/removed(var/mob/living/target,var/mob/living/user)
if(!eye_colour)
eye_colour = list(0,0,0)
..() //Make sure target is set so we can steal their eye colour for later.
var/mob/living/carbon/human/H = target
if(istype(H))
eye_colour = list(
H.r_eyes ? H.r_eyes : 0,
H.g_eyes ? H.g_eyes : 0,
H.b_eyes ? H.b_eyes : 0
)
// Leave bloody red pits behind!
H.r_eyes = 128
H.g_eyes = 0
H.b_eyes = 0
H.update_body()
/obj/item/organ/liver
name = "liver"
icon_state = "liver"
@@ -178,14 +158,13 @@
/obj/item/organ/appendix/removed()
..()
var/inflamed = 0
for(var/datum/disease/appendicitis/appendicitis in owner.viruses)
inflamed = 1
appendicitis.cure()
owner.resistances += appendicitis
if(inflamed)
icon_state = "appendixinflamed"
name = "inflamed appendix"
if(owner)
var/inflamed = 0
for(var/datum/disease/appendicitis/appendicitis in owner.viruses)
inflamed = 1
appendicitis.cure()
owner.resistances += appendicitis
if(inflamed)
icon_state = "appendixinflamed"
name = "inflamed appendix"
..()
+3 -3
View File
@@ -209,9 +209,9 @@
/** WOUND DEFINITIONS **/
//Note that the MINIMUM damage before a wound can be applied should correspond to
//Note that the MINIMUM damage before a wound can be applied should correspond to
//the damage amount for the stage with the same name as the wound.
//e.g. /datum/wound/cut/deep should only be applied for 15 damage and up,
//e.g. /datum/wound/cut/deep should only be applied for 15 damage and up,
//because in it's stages list, "deep cut" = 15.
/proc/get_wound_type(var/type = CUT, var/damage)
switch(type)
@@ -323,4 +323,4 @@ datum/wound/cut/massive
return 0 //cannot be merged
/datum/wound/lost_limb/small
stages = list("ripped stump" = 40, "bloody stump" = 30, "clotted stump" = 15, "scarred stump" = 0)
stages = list("ripped hole" = 40, "bloody hole" = 30, "clotted hole" = 15, "scarred hole" = 0)
+6 -1
View File
@@ -194,7 +194,7 @@
update_icon()
/obj/item/weapon/paper/proc/get_signature(var/obj/item/weapon/pen/P, mob/user as mob)
if(P)
if(P && istype(P, /obj/item/weapon/pen))
return P.get_signature(user)
return (user && user.real_name) ? user.real_name : "Anonymous"
@@ -351,6 +351,11 @@
t = replacetext(t, "\n", "<BR>")
t = parsepencode(t, i, usr, iscrayon) // Encode everything from pencode to html
if(fields > 50)//large amount of fields creates a heavy load on the server, see updateinfolinks() and addtofield()
usr << "<span class='warning'>Too many fields. Sorry, you can't do this.</span>"
return
if(id!="end")
addtofield(text2num(id), t) // He wants to edit a field, let him.
else
@@ -8,7 +8,7 @@
load_method = MAGAZINE
/obj/item/weapon/gun/projectile/colt/detective
desc = "A cheap Martian knock-off of a Colt M1911. Uses less-than-lethal .45 rounds."
desc = "A cheap Martian knock-off of a Colt M1911. Uses .45 rounds."
magazine_type = /obj/item/ammo_magazine/c45m/rubber
/obj/item/weapon/gun/projectile/colt/detective/verb/rename_gun()
@@ -30,7 +30,7 @@
return 1
/obj/item/weapon/gun/projectile/sec
desc = "A NanoTrasen designed sidearm, found pretty much everywhere humans are. Uses less-than-lethal .45 rounds."
desc = "A NanoTrasen designed sidearm, found pretty much everywhere humans are. Uses .45 rounds."
name = "\improper NT Mk58"
icon_state = "secguncomp"
magazine_type = /obj/item/ammo_magazine/c45m/rubber
@@ -40,11 +40,10 @@
/obj/item/weapon/gun/projectile/sec/flash
name = "\improper NT Mk58 signal pistol"
desc = "A NanoTrasen designed sidearm, found pretty much everywhere humans are. Uses .45 signal flash rounds."
magazine_type = /obj/item/ammo_magazine/c45m/flash
/obj/item/weapon/gun/projectile/sec/wood
desc = "A Nanotrasen designed sidearm, this one has a sweet wooden grip. Uses less-than-lethal .45 rounds."
desc = "A Nanotrasen designed sidearm, this one has a sweet wooden grip. Uses .45 rounds."
name = "\improper Custom NT Mk58"
icon_state = "secgundark"
@@ -118,7 +117,7 @@
/obj/item/weapon/gun/projectile/pistol/flash
name = "\improper Stechtkin signal pistol"
desc = "A small, easily concealable gun. Uses 9mm signal flash rounds."
desc = "A small, easily concealable gun. Uses 9mm rounds."
magazine_type = /obj/item/ammo_magazine/mc9mm/flash
/obj/item/weapon/gun/projectile/pistol/attack_hand(mob/user as mob)
+7 -5
View File
@@ -149,11 +149,13 @@
//Called when the projectile intercepts a mob. Returns 1 if the projectile hit the mob, 0 if it missed and should keep flying.
/obj/item/projectile/proc/attack_mob(var/mob/living/target_mob, var/distance, var/miss_modifier=0)
if(!istype(target_mob))
return
//accuracy bonus from aiming
if (istype(shot_from, /obj/item/weapon/gun))
var/obj/item/weapon/gun/daddy = shot_from
miss_modifier -= round(15*daddy.accuracy)
//If you aim at someone beforehead, it'll hit more often.
//Kinda balanced by fact you need like 2 seconds to aim
//As opposed to no-delay pew pew
@@ -197,7 +199,7 @@
/obj/item/projectile/Bump(atom/A as mob|obj|turf|area, forced=0)
if(A == src)
return 0 //no
if(A == firer)
loc = A.loc
return 0 //cannot shoot yourself
@@ -218,7 +220,7 @@
visible_message("<span class='danger'>\The [M] uses [G.affecting] as a shield!</span>")
if(Bump(G.affecting, forced=1))
return //If Bump() returns 0 (keep going) then we continue on to attack M.
passthrough = !attack_mob(M, distance)
else
passthrough = 1 //so ghosts don't stop bullets
@@ -227,7 +229,7 @@
if(isturf(A))
for(var/obj/O in A)
O.bullet_act(src)
for(var/mob/M in A)
for(var/mob/living/M in A)
attack_mob(M, distance)
//penetrating projectiles can pass through things that otherwise would not let them
@@ -250,7 +252,7 @@
//stop flying
on_impact(A)
density = 0
invisibility = 101
+1 -1
View File
@@ -57,7 +57,7 @@ Also, you never added distance checking after target is selected. I've went ahea
var/mob/caster = user//The wizard/whomever doing the body transferring.
//SPELL LOSS BEGIN
admin_attack_log(caster, victim, "Used mind transfer on", "Had mind transfer used on him by", "used mind transfer on")
admin_attack_log(caster, victim, "Used mind transfer", "Was the victim of mind transfer", "used mind transfer on")
//NOTE: The caster must ALWAYS keep mind transfer, even when other spells are lost.
var/obj/effect/proc_holder/spell/targeted/mind_transfer/m_transfer = locate() in user.spell_list//Find mind transfer directly.
+7 -6
View File
@@ -1,5 +1,6 @@
//This is an uguu head restoration surgery TOTALLY not yoinked from chinsky's limb reattacher
/datum/surgery_step/attach_head/
priority = 3 // Must be higher than /datum/surgery_step/internal
allowed_tools = list(/obj/item/organ/external/head = 100)
can_infect = 0
@@ -7,20 +8,20 @@
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/organ/external/head = target.get_organ(target_zone)
return !head && target_zone == "head"
var/obj/item/organ/external/head = target.get_organ(target_zone)
return isnull(head) && target_zone == "head" && !isnull(target.species.has_limbs["head"])
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts attaching [tool] to [target]'s reshaped neck.", \
"You start attaching [tool] to [target]'s reshaped neck.")
user.visible_message("[user] starts attaching [tool] to [target]'s neck.", \
"You start attaching [tool] to [target]'s neck.")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has attached [target]'s head to the body.", \
"\blue You have attached [target]'s head to the body.")
var/obj/item/organ/external/head = tool
head.loc = target
user.drop_from_inventory(head)
head.replaced(target)
head.loc = target
head.status = 0
target.update_body()
target.updatehealth()
+3 -3
View File
@@ -228,7 +228,7 @@
var/list/attached_organs = list()
for(var/organ in target.internal_organs_by_name)
var/obj/item/organ/I = target.internal_organs_by_name[organ]
if(!I.status && I.parent_organ == target_zone)
if(I && !I.status && I.parent_organ == target_zone)
attached_organs |= organ
var/organ_to_remove = input(user, "Which organ do you want to prepare for removal?") as null|anything in attached_organs
@@ -347,7 +347,7 @@
return 0
else if(target.species.has_organ[O.organ_tag])
if(O.is_damaged())
if(O.damage > (O.max_damage * 0.75))
user << "\red \The [O.organ_tag] [o_is] in no state to be transplanted."
return 2
@@ -410,7 +410,7 @@
var/list/removable_organs = list()
for(var/organ in target.internal_organs_by_name)
var/obj/item/organ/I = target.internal_organs_by_name[organ]
if(I.status & ORGAN_CUT_AWAY && I.parent_organ == target_zone)
if(I && I.status & ORGAN_CUT_AWAY && I.parent_organ == target_zone)
removable_organs |= organ
var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs
+1 -1
View File
@@ -41,7 +41,7 @@
for(var/part_name in L.part)
if(!isnull(target.get_organ(part_name)))
continue
var/list/organ_data = target.species.has_limbs["[target_zone]"]
var/list/organ_data = target.species.has_limbs["[part_name]"]
if(!organ_data)
continue
var/new_limb_type = organ_data["path"]