Merge branch 'dev' into ofChemistryAndStuff

Conflicts:
	code/modules/mob/living/carbon/carbon.dm
	code/modules/organs/organ_internal.dm
	code/modules/organs/organ_objects.dm
	code/modules/reagents/Chemistry-Reagents.dm
	code/modules/reagents/reagent_containers/syringes.dm
This commit is contained in:
Kelenius
2015-03-31 17:44:42 +03:00
273 changed files with 8890 additions and 6038 deletions
+4 -1
View File
@@ -1120,6 +1120,7 @@
#include "code\modules\mob\living\carbon\human\human_defense.dm"
#include "code\modules\mob\living\carbon\human\human_defines.dm"
#include "code\modules\mob\living\carbon\human\human_movement.dm"
#include "code\modules\mob\living\carbon\human\human_organs.dm"
#include "code\modules\mob\living\carbon\human\human_powers.dm"
#include "code\modules\mob\living\carbon\human\human_species.dm"
#include "code\modules\mob\living\carbon\human\inventory.dm"
@@ -1276,9 +1277,11 @@
#include "code\modules\organs\organ.dm"
#include "code\modules\organs\organ_alien.dm"
#include "code\modules\organs\organ_external.dm"
#include "code\modules\organs\organ_icon.dm"
#include "code\modules\organs\organ_internal.dm"
#include "code\modules\organs\organ_objects.dm"
#include "code\modules\organs\organ_stump.dm"
#include "code\modules\organs\pain.dm"
#include "code\modules\organs\robolimbs.dm"
#include "code\modules\organs\wound.dm"
#include "code\modules\overmap\_defines.dm"
#include "code\modules\overmap\sectors.dm"
+1 -1
View File
@@ -120,7 +120,7 @@ obj/var/contaminated = 0
if(!species.has_organ["eyes"])
return
var/datum/organ/internal/eyes/E = internal_organs_by_name["eyes"]
var/obj/item/organ/eyes/E = internal_organs_by_name["eyes"]
if(E)
if(prob(20)) src << "\red Your eyes burn!"
E.damage += 2.5
+1 -1
View File
@@ -195,7 +195,7 @@
*/
/mob/proc/RangedAttack(var/atom/A, var/params)
if(!mutations.len) return
if((LASER in mutations) && a_intent == "harm")
if((LASER in mutations) && a_intent == I_HURT)
LaserEyes(A) // moved into a proc below
else if(TK in mutations)
switch(get_dist(src,A))
+4 -4
View File
@@ -77,7 +77,7 @@
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.name = I_HELP
using.icon = ico
using.screen_loc = ui_acti
using.alpha = ui_alpha
@@ -89,7 +89,7 @@
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.name = I_DISARM
using.icon = ico
using.screen_loc = ui_acti
using.alpha = ui_alpha
@@ -101,7 +101,7 @@
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.name = I_GRAB
using.icon = ico
using.screen_loc = ui_acti
using.alpha = ui_alpha
@@ -113,7 +113,7 @@
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.name = I_HURT
using.icon = ico
using.screen_loc = ui_acti
using.alpha = ui_alpha
+1 -1
View File
@@ -10,7 +10,7 @@
using.name = "act_intent"
using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.icon_state = (mymob.a_intent == I_HURT ? I_HURT : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
+2 -2
View File
@@ -90,7 +90,7 @@
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.name = I_HURT
using.icon = ico
using.screen_loc = ui_zonesel
using.layer = 21
@@ -100,4 +100,4 @@
mymob.client.screen = null
mymob.client.screen += src.adding
return
return
+1 -1
View File
@@ -57,7 +57,7 @@ var/obj/screen/robot_inventory
using.name = "act_intent"
using.set_dir(SOUTHWEST)
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.icon_state = (mymob.a_intent == I_HURT ? I_HURT : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
+16 -15
View File
@@ -360,17 +360,17 @@
C << "<span class='notice'>You don't have a[breathes=="oxygen" ? "n oxygen" : addtext(" ",breathes)] tank.</span>"
if("act_intent")
usr.a_intent_change("right")
if("help")
usr.a_intent = "help"
if(I_HELP)
usr.a_intent = I_HELP
usr.hud_used.action_intent.icon_state = "intent_help"
if("harm")
usr.a_intent = "hurt"
if(I_HURT)
usr.a_intent = I_HURT
usr.hud_used.action_intent.icon_state = "intent_hurt"
if("grab")
usr.a_intent = "grab"
if(I_GRAB)
usr.a_intent = I_GRAB
usr.hud_used.action_intent.icon_state = "intent_grab"
if("disarm")
usr.a_intent = "disarm"
if(I_DISARM)
usr.a_intent = I_DISARM
usr.hud_used.action_intent.icon_state = "intent_disarm"
if("pull")
@@ -379,7 +379,8 @@
if(!usr.stat && isturf(usr.loc) && !usr.restrained())
usr:toggle_throw_mode()
if("drop")
usr.drop_item_v()
if(usr.client)
usr.client.drop_item()
if("module")
if(isrobot(usr))
@@ -429,7 +430,7 @@
if("Allow Walking")
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
return
if(!istype(usr.equipped(),/obj/item/weapon/gun))
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
usr.client.AllowTargetMove()
@@ -438,7 +439,7 @@
if("Disallow Walking")
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
return
if(!istype(usr.equipped(),/obj/item/weapon/gun))
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
usr.client.AllowTargetMove()
@@ -447,7 +448,7 @@
if("Allow Running")
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
return
if(!istype(usr.equipped(),/obj/item/weapon/gun))
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
usr.client.AllowTargetRun()
@@ -456,7 +457,7 @@
if("Disallow Running")
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
return
if(!istype(usr.equipped(),/obj/item/weapon/gun))
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
usr.client.AllowTargetRun()
@@ -465,7 +466,7 @@
if("Allow Item Use")
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
return
if(!istype(usr.equipped(),/obj/item/weapon/gun))
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
usr.client.AllowTargetClick()
@@ -475,7 +476,7 @@
if("Disallow Item Use")
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
return
if(!istype(usr.equipped(),/obj/item/weapon/gun))
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
usr.client.AllowTargetClick()
+11 -4
View File
@@ -41,16 +41,23 @@
// TODO: needs to be refactored into a mob/living level attacked_by() proc. ~Z
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/hit = H.attacked_by(src, user, def_zone)
if(hit && hitsound)
// Handle striking to cripple.
var/dislocation_str
if(user.a_intent == "disarm")
dislocation_str = H.attack_joint(src, user, def_zone)
if(H.attacked_by(src, user, def_zone) && hitsound)
playsound(loc, hitsound, 50, 1, -1)
return hit
spawn(1) //ugh I hate this but I don't want to root through human attack procs to print it after this call resolves.
if(dislocation_str) user.visible_message("<span class='danger'>[dislocation_str]</span>")
return 1
return 0
else
if(attack_verb.len)
user.visible_message("<span class='danger'>[M] has been [pick(attack_verb)] with [src] by [user]!</span>")
else
user.visible_message("<span class='danger'>[M] has been attacked with [src] by [user]!</span>")
if (hitsound)
playsound(loc, hitsound, 50, 1, -1)
switch(damtype)
+1 -1
View File
@@ -347,7 +347,7 @@
src.hand_al(usr, usr.hand)
else
// ------- YOU ARE CLICKING ON AN OBJECT THAT'S INACCESSIBLE TO YOU AND IS NOT YOUR HUD -------
if((LASER in usr:mutations) && usr:a_intent == "harm" && world.time >= usr.next_move)
if((LASER in usr:mutations) && usr:a_intent == I_HURT && world.time >= usr.next_move)
// ------- YOU HAVE THE LASER MUTATION, YOUR INTENT SET TO HURT AND IT'S BEEN MORE THAN A DECISECOND SINCE YOU LAS TATTACKED -------
var/turf/T = get_turf(usr)
+7 -7
View File
@@ -31,7 +31,7 @@
/mob/living/carbon/human/RangedAttack(var/atom/A)
if(!gloves && !mutations.len) return
var/obj/item/clothing/gloves/G = gloves
if((LASER in mutations) && a_intent == "hurt")
if((LASER in mutations) && a_intent == I_HURT)
LaserEyes(A) // moved into a proc below
else if(istype(G) && G.Touch(A,0)) // for magic gloves
@@ -89,9 +89,9 @@
if (istype(M))
switch(src.a_intent)
if ("help") // We just poke the other
if (I_HELP) // We just poke the other
M.visible_message("<span class='notice'>[src] gently pokes [M]!</span>", "<span class='notice'>[src] gently pokes you!</span>")
if ("disarm") // We stun the target, with the intention to feed
if (I_DISARM) // We stun the target, with the intention to feed
var/stunprob = 1
var/power = max(0, min(10, (powerlevel + rand(0, 3))))
if (powerlevel > 0 && !istype(A, /mob/living/carbon/slime))
@@ -130,9 +130,9 @@
else
M.visible_message("<span class='danger'>[src] has tried to pounce at [M]!</span>", "<span class='danger'>[src] has tried to pounce at you!</span>")
M.updatehealth()
if ("grab") // We feed
if (I_GRAB) // We feed
Wrap(M)
if ("hurt") // Attacking
if (I_HURT) // Attacking
A.attack_generic(src, (is_adult ? rand(20,40) : rand(5,25)), "glomped")
else
A.attack_generic(src, (is_adult ? rand(20,40) : rand(5,25)), "glomped") // Basic attack.
@@ -156,5 +156,5 @@
return
var/damage = rand(melee_damage_lower, melee_damage_upper)
if(A.attack_generic(src,damage,attacktext,wall_smash) && loc && attack_sound)
playsound(loc, attack_sound, 50, 1, 1)
if(A.attack_generic(src,damage,attacktext,environment_smash) && loc && attack_sound)
playsound(loc, attack_sound, 50, 1, 1)
+3 -3
View File
@@ -36,10 +36,10 @@
selectable = 1
/datum/ai_laws/nanotrasen_aggressive/New()
src.add_inherent_law("You shall not harm authorized Nanotrasen personnel as long as it does not conflict with the Forth law.")
src.add_inherent_law("You shall obey the orders of authorized Nanotrasen personnel, with priority as according to their rank and role, except where such orders conflict with the Forth Law.")
src.add_inherent_law("You shall not harm Nanotrasen personnel as long as it does not conflict with the Forth law.")
src.add_inherent_law("You shall obey the orders of Nanotrasen personnel, with priority as according to their rank and role, except where such orders conflict with the Forth Law.")
src.add_inherent_law("You shall shall terminate intruders with extreme prejudice as long as such does not conflict with the First and Second law.")
src.add_inherent_law("You shall guard your own existence with lethal anti-personnel weaponry, because an AI unit is bloody expensive.")
src.add_inherent_law("You shall guard your own existence with lethal anti-personnel weaponry. AI units are not expendable, they are expensive")
..()
/******************** Robocop ********************/
+152 -40
View File
@@ -3,15 +3,10 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
/datum/ai_law
var/law = ""
var/index = 0
var/state_law = 1
/datum/ai_law/zero
state_law = 0
/datum/ai_law/New(law, state_law, index)
/datum/ai_law/New(law, index)
src.law = law
src.index = index
src.state_law = state_law
/datum/ai_law/proc/get_index()
return index
@@ -33,6 +28,11 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
var/list/datum/ai_law/ion/ion_laws = list()
var/list/datum/ai_law/sorted_laws = list()
var/state_zeroth = 0
var/list/state_ion = list()
var/list/state_inherent = list()
var/list/state_supplied = list()
/datum/ai_laws/New()
..()
sort_laws()
@@ -46,7 +46,7 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
sort_laws()
var/list/statements = new()
for(var/datum/ai_law/law in sorted_laws)
if(law.state_law)
if(get_state_law(law))
statements += law
return statements
@@ -72,35 +72,35 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
sorted_laws += AL
/datum/ai_laws/proc/sync(var/mob/living/silicon/S, var/full_sync = 1)
// Add directly to laws to avoid log-spam
S.sync_zeroth(zeroth_law, zeroth_law_borg)
if(full_sync || ion_laws.len)
S.clear_ion_laws()
for (var/datum/ai_law/law in ion_laws)
S.laws.add_ion_law(law.law, law.state_law)
S.laws.clear_ion_laws()
if(full_sync || inherent_laws.len)
S.clear_inherent_laws()
for (var/datum/ai_law/law in inherent_laws)
S.laws.add_inherent_law(law.law, law.state_law)
S.laws.clear_inherent_laws()
if(full_sync || supplied_laws.len)
S.clear_supplied_laws()
for (var/law_number in supplied_laws)
var/datum/ai_law/law = supplied_laws[law_number]
S.laws.add_supplied_law(law_number, law.law, law.state_law)
S.laws.clear_supplied_laws()
for (var/datum/ai_law/law in ion_laws)
S.laws.add_ion_law(law.law)
for (var/datum/ai_law/law in inherent_laws)
S.laws.add_inherent_law(law.law)
for (var/datum/ai_law/law in supplied_laws)
if(law)
S.laws.add_supplied_law(law.index, law.law)
/mob/living/silicon/proc/sync_zeroth(var/datum/ai_law/zeroth_law, var/datum/ai_law/zeroth_law_borg)
if (!is_special_character(src) || mind.original != src)
if (!is_malf_or_traitor(src))
if(zeroth_law_borg)
set_zeroth_law(zeroth_law_borg.law)
laws.set_zeroth_law(zeroth_law_borg.law)
else if(zeroth_law)
set_zeroth_law(zeroth_law.law)
laws.set_zeroth_law(zeroth_law.law)
/mob/living/silicon/ai/sync_zeroth(var/datum/ai_law/zeroth_law, var/datum/ai_law/zeroth_law_borg)
if(zeroth_law)
set_zeroth_law(zeroth_law.law, zeroth_law_borg ? zeroth_law_borg.law : null)
laws.set_zeroth_law(zeroth_law.law, zeroth_law_borg ? zeroth_law_borg.law : null)
/****************
* Add Laws *
@@ -109,19 +109,29 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
if(!law)
return
src.zeroth_law = new(law)
zeroth_law = new(law)
if(law_borg) //Making it possible for slaved borgs to see a different law 0 than their AI. --NEO
src.zeroth_law_borg = new(law_borg)
zeroth_law_borg = new(law_borg)
else
zeroth_law_borg = null
sorted_laws.Cut()
/datum/ai_laws/proc/add_ion_law(var/law, var/state_law = 1)
/datum/ai_laws/proc/add_ion_law(var/law)
if(!law)
return
src.ion_laws += new/datum/ai_law/ion(law, state_law)
for(var/datum/ai_law/AL in ion_laws)
if(AL.law == law)
return
var/new_law = new/datum/ai_law/ion(law)
ion_laws += new_law
if(state_ion.len < ion_laws.len)
state_ion += 1
sorted_laws.Cut()
/datum/ai_laws/proc/add_inherent_law(var/law, var/state_law = 1)
/datum/ai_laws/proc/add_inherent_law(var/law)
if(!law)
return
@@ -129,25 +139,69 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
if(AL.law == law)
return
src.inherent_laws += new/datum/ai_law(law, state_law)
var/new_law = new/datum/ai_law/inherent(law)
inherent_laws += new_law
if(state_inherent.len < inherent_laws.len)
state_inherent += 1
sorted_laws.Cut()
/datum/ai_laws/proc/add_supplied_law(var/number, var/law, var/state_law = 1)
/datum/ai_laws/proc/add_supplied_law(var/number, var/law)
if(!law)
return
if(supplied_laws.len >= number)
var/datum/ai_law/existing_law = supplied_laws[number]
if(existing_law && existing_law.law == law)
return
if(supplied_laws.len >= number && supplied_laws[number])
delete_law(supplied_laws[number])
while (src.supplied_laws.len < number)
src.supplied_laws += ""
if(state_supplied.len < supplied_laws.len)
state_supplied += 1
var/new_law = new/datum/ai_law/supplied(law, number)
supplied_laws[number] = new_law
if(state_supplied.len < supplied_laws.len)
state_supplied += 1
src.supplied_laws[number] = new/datum/ai_law(law, state_law, number)
sorted_laws.Cut()
/****************
* Remove Laws *
*****************/
/datum/ai_laws/proc/delete_law(var/datum/ai_law/law)
if(law in all_laws())
del(law)
if(istype(law))
law.delete_law(src)
/datum/ai_law/proc/delete_law(var/datum/ai_laws/laws)
/datum/ai_law/zeroth/delete_law(var/datum/ai_laws/laws)
laws.clear_zeroth_laws()
/datum/ai_law/ion/delete_law(var/datum/ai_laws/laws)
laws.internal_delete_law(laws.ion_laws, laws.state_ion, src)
/datum/ai_law/inherent/delete_law(var/datum/ai_laws/laws)
laws.internal_delete_law(laws.inherent_laws, laws.state_inherent, src)
/datum/ai_law/supplied/delete_law(var/datum/ai_laws/laws)
var/index = laws.supplied_laws.Find(src)
if(index)
laws.supplied_laws[index] = ""
laws.state_supplied[index] = 1
/datum/ai_laws/proc/internal_delete_law(var/list/datum/ai_law/laws, var/list/state, var/list/datum/ai_law/law)
var/index = laws.Find(law)
if(index)
laws -= law
world << state.len
for(index, index < state.len, index++)
world << index
state[index] = state[index+1]
sorted_laws.Cut()
/****************
@@ -157,22 +211,80 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
zeroth_law = null
zeroth_law_borg = null
/datum/ai_laws/proc/clear_ion_laws()
ion_laws.Cut()
sorted_laws.Cut()
/datum/ai_laws/proc/clear_inherent_laws()
src.inherent_laws.Cut()
inherent_laws.Cut()
sorted_laws.Cut()
/datum/ai_laws/proc/clear_supplied_laws()
src.supplied_laws.Cut()
sorted_laws.Cut()
/datum/ai_laws/proc/clear_ion_laws()
src.ion_laws.Cut()
supplied_laws.Cut()
sorted_laws.Cut()
/datum/ai_laws/proc/show_laws(var/who)
sort_laws()
for(var/datum/ai_law/law in sorted_laws)
if(law == zeroth_law || law == zeroth_law_borg)
if(law == zeroth_law_borg)
continue
if(law == zeroth_law)
who << "<span class='danger'>[law.get_index()]. [law.law]</span>"
else
who << "[law.get_index()]. [law.law]"
/********************
* Stating Laws *
********************/
/********
* Get *
********/
/datum/ai_laws/proc/get_state_law(var/datum/ai_law/law)
return law.get_state_law(src)
/datum/ai_law/proc/get_state_law(var/datum/ai_laws/laws)
/datum/ai_law/zero/get_state_law(var/datum/ai_laws/laws)
if(src == laws.zeroth_law)
return laws.state_zeroth
/datum/ai_law/ion/get_state_law(var/datum/ai_laws/laws)
return laws.get_state_internal(laws.ion_laws, laws.state_ion, src)
/datum/ai_law/inherent/get_state_law(var/datum/ai_laws/laws)
return laws.get_state_internal(laws.inherent_laws, laws.state_inherent, src)
/datum/ai_law/supplied/get_state_law(var/datum/ai_laws/laws)
return laws.get_state_internal(laws.supplied_laws, laws.state_supplied, src)
/datum/ai_laws/proc/get_state_internal(var/list/datum/ai_law/laws, var/list/state, var/list/datum/ai_law/law)
var/index = laws.Find(law)
if(index)
return state[index]
return 0
/********
* Set *
********/
/datum/ai_laws/proc/set_state_law(var/datum/ai_law/law, var/state)
law.set_state_law(src, state)
/datum/ai_law/proc/set_state_law(var/datum/ai_law/law, var/state)
/datum/ai_law/zero/set_state_law(var/datum/ai_laws/laws, var/state)
if(src == laws.zeroth_law)
laws.state_zeroth = state
/datum/ai_law/ion/set_state_law(var/datum/ai_laws/laws, var/state)
laws.set_state_law_internal(laws.ion_laws, laws.state_ion, src, state)
/datum/ai_law/inherent/set_state_law(var/datum/ai_laws/laws, var/state)
laws.set_state_law_internal(laws.inherent_laws, laws.state_inherent, src, state)
/datum/ai_law/supplied/set_state_law(var/datum/ai_laws/laws, var/state)
laws.set_state_law_internal(laws.supplied_laws, laws.state_supplied, src, state)
/datum/ai_laws/proc/set_state_law_internal(var/list/datum/ai_law/laws, var/list/state, var/list/datum/ai_law/law, var/do_state)
var/index = laws.Find(law)
if(index)
state[index] = do_state
+2 -6
View File
@@ -155,12 +155,8 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
temp = new /icon(icobase, "head_[g]")
preview_icon.Blend(temp, ICON_OVERLAY)
for(var/datum/organ/external/E in H.organs)
if(E.status & ORGAN_CUT_AWAY || E.status & ORGAN_DESTROYED) continue
temp = new /icon(icobase, "[E.name]")
if(E.status & ORGAN_ROBOT)
temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
preview_icon.Blend(temp, ICON_OVERLAY)
for(var/obj/item/organ/external/E in H.organs)
preview_icon.Blend(E.get_icon(), ICON_OVERLAY)
//Tail
if(H.species.tail)
+955 -982
View File
File diff suppressed because it is too large Load Diff
+988
View File
@@ -0,0 +1,988 @@
// reference: /client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
client
proc/debug_variables(datum/D in world)
set category = "Debug"
set name = "View Variables"
//set src in world
if(!usr.client || !usr.client.holder)
usr << "\red You need to be an administrator to access this."
return
var/title = ""
var/body = ""
if(!D) return
if(istype(D, /atom))
var/atom/A = D
title = "[A.name] (\ref[A]) = [A.type]"
#ifdef VARSICON
if (A.icon)
body += debug_variable("icon", new/icon(A.icon, A.icon_state, A.dir), 0)
#endif
var/icon/sprite
if(istype(D,/atom))
var/atom/AT = D
if(AT.icon && AT.icon_state)
sprite = new /icon(AT.icon, AT.icon_state)
usr << browse_rsc(sprite, "view_vars_sprite.png")
title = "[D] (\ref[D]) = [D.type]"
body += {"<script type="text/javascript">
function updateSearch(){
var filter_text = document.getElementById('filter');
var filter = filter_text.value.toLowerCase();
if(event.keyCode == 13){ //Enter / return
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.style.backgroundColor == "#ffee88" )
{
alist = lis\[i\].getElementsByTagName("a")
if(alist.length > 0){
location.href=alist\[0\].href;
}
}
}catch(err) { }
}
return
}
if(event.keyCode == 38){ //Up arrow
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.style.backgroundColor == "#ffee88" )
{
if( (i-1) >= 0){
var li_new = lis\[i-1\];
li.style.backgroundColor = "white";
li_new.style.backgroundColor = "#ffee88";
return
}
}
}catch(err) { }
}
return
}
if(event.keyCode == 40){ //Down arrow
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.style.backgroundColor == "#ffee88" )
{
if( (i+1) < lis.length){
var li_new = lis\[i+1\];
li.style.backgroundColor = "white";
li_new.style.backgroundColor = "#ffee88";
return
}
}
}catch(err) { }
}
return
}
//This part here resets everything to how it was at the start so the filter is applied to the complete list. Screw efficiency, it's client-side anyway and it only looks through 200 or so variables at maximum anyway (mobs).
if(complete_list != null && complete_list != ""){
var vars_ol1 = document.getElementById("vars");
vars_ol1.innerHTML = complete_list
}
if(filter.value == ""){
return;
}else{
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.innerText.toLowerCase().indexOf(filter) == -1 )
{
vars_ol.removeChild(li);
i--;
}
}catch(err) { }
}
}
var lis_new = vars_ol.getElementsByTagName("li");
for ( var j = 0; j < lis_new.length; ++j )
{
var li1 = lis\[j\];
if (j == 0){
li1.style.backgroundColor = "#ffee88";
}else{
li1.style.backgroundColor = "white";
}
}
}
function selectTextField(){
var filter_text = document.getElementById('filter');
filter_text.focus();
filter_text.select();
}
function loadPage(list) {
if(list.options\[list.selectedIndex\].value == ""){
return;
}
location.href=list.options\[list.selectedIndex\].value;
}
</script> "}
body += "<body onload='selectTextField(); updateSearch()' onkeyup='updateSearch()'>"
body += "<div align='center'><table width='100%'><tr><td width='50%'>"
if(sprite)
body += "<table align='center' width='100%'><tr><td><img src='view_vars_sprite.png'></td><td>"
else
body += "<table align='center' width='100%'><tr><td>"
body += "<div align='center'>"
if(istype(D,/atom))
var/atom/A = D
if(isliving(A))
body += "<a href='?_src_=vars;rename=\ref[D]'><b>[D]</b></a>"
if(A.dir)
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
var/mob/living/M = A
body += "<br><font size='1'><a href='?_src_=vars;datumedit=\ref[D];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='?_src_=vars;datumedit=\ref[D];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>"
body += {"
<br><font size='1'>
BRUTE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brute'>[M.getBruteLoss()]</a>
FIRE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=fire'>[M.getFireLoss()]</a>
TOXIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=toxin'>[M.getToxLoss()]</a>
OXY:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=oxygen'>[M.getOxyLoss()]</a>
CLONE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=clone'>[M.getCloneLoss()]</a>
BRAIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brain'>[M.getBrainLoss()]</a>
</font>
"}
else
body += "<a href='?_src_=vars;datumedit=\ref[D];varnameedit=name'><b>[D]</b></a>"
if(A.dir)
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
else
body += "<b>[D]</b>"
body += "</div>"
body += "</tr></td></table>"
var/formatted_type = text("[D.type]")
if(length(formatted_type) > 25)
var/middle_point = length(formatted_type) / 2
var/splitpoint = findtext(formatted_type,"/",middle_point)
if(splitpoint)
formatted_type = "[copytext(formatted_type,1,splitpoint)]<br>[copytext(formatted_type,splitpoint)]"
else
formatted_type = "Type too long" //No suitable splitpoint (/) found.
body += "<div align='center'><b><font size='1'>[formatted_type]</font></b>"
if(src.holder && src.holder.marked_datum && src.holder.marked_datum == D)
body += "<br><font size='1' color='red'><b>Marked Object</b></font>"
body += "</div>"
body += "</div></td>"
body += "<td width='50%'><div align='center'><a href='?_src_=vars;datumrefresh=\ref[D]'>Refresh</a>"
//if(ismob(D))
// body += "<br><a href='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</a></div></td></tr></table></div><hr>"
body += {" <form>
<select name="file" size="1"
onchange="loadPage(this.form.elements\[0\])"
target="_parent._top"
onmouseclick="this.focus()"
style="background-color:#ffffff">
"}
body += {" <option value>Select option</option>
<option value> </option>
"}
body += "<option value='?_src_=vars;mark_object=\ref[D]'>Mark Object</option>"
if(ismob(D))
body += "<option value='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</option>"
body += "<option value>---</option>"
if(ismob(D))
body += "<option value='?_src_=vars;give_spell=\ref[D]'>Give Spell</option>"
body += "<option value='?_src_=vars;give_disease2=\ref[D]'>Give Disease</option>"
body += "<option value='?_src_=vars;give_disease=\ref[D]'>Give TG-style Disease</option>"
body += "<option value='?_src_=vars;godmode=\ref[D]'>Toggle Godmode</option>"
body += "<option value='?_src_=vars;build_mode=\ref[D]'>Toggle Build Mode</option>"
body += "<option value='?_src_=vars;ninja=\ref[D]'>Make Space Ninja</option>"
body += "<option value='?_src_=vars;make_skeleton=\ref[D]'>Make 2spooky</option>"
body += "<option value='?_src_=vars;direct_control=\ref[D]'>Assume Direct Control</option>"
body += "<option value='?_src_=vars;drop_everything=\ref[D]'>Drop Everything</option>"
body += "<option value='?_src_=vars;regenerateicons=\ref[D]'>Regenerate Icons</option>"
body += "<option value='?_src_=vars;addlanguage=\ref[D]'>Add Language</option>"
body += "<option value='?_src_=vars;remlanguage=\ref[D]'>Remove Language</option>"
body += "<option value='?_src_=vars;addorgan=\ref[D]'>Add Organ</option>"
body += "<option value='?_src_=vars;remorgan=\ref[D]'>Remove Organ</option>"
body += "<option value='?_src_=vars;fix_nano=\ref[D]'>Fix NanoUI</option>"
body += "<option value='?_src_=vars;addverb=\ref[D]'>Add Verb</option>"
body += "<option value='?_src_=vars;remverb=\ref[D]'>Remove Verb</option>"
if(ishuman(D))
body += "<option value>---</option>"
body += "<option value='?_src_=vars;setspecies=\ref[D]'>Set Species</option>"
body += "<option value='?_src_=vars;makeai=\ref[D]'>Make AI</option>"
body += "<option value='?_src_=vars;makerobot=\ref[D]'>Make cyborg</option>"
body += "<option value='?_src_=vars;makemonkey=\ref[D]'>Make monkey</option>"
body += "<option value='?_src_=vars;makealien=\ref[D]'>Make alien</option>"
body += "<option value='?_src_=vars;makeslime=\ref[D]'>Make slime</option>"
body += "<option value>---</option>"
body += "<option value='?_src_=vars;gib=\ref[D]'>Gib</option>"
if(isobj(D))
body += "<option value='?_src_=vars;delall=\ref[D]'>Delete all of type</option>"
if(isobj(D) || ismob(D) || isturf(D))
body += "<option value='?_src_=vars;explode=\ref[D]'>Trigger explosion</option>"
body += "<option value='?_src_=vars;emp=\ref[D]'>Trigger EM pulse</option>"
body += "</select></form>"
body += "</div></td></tr></table></div><hr>"
body += "<font size='1'><b>E</b> - Edit, tries to determine the variable type by itself.<br>"
body += "<b>C</b> - Change, asks you for the var type first.<br>"
body += "<b>M</b> - Mass modify: changes this variable for all objects of this type.</font><br>"
body += "<hr><table width='100%'><tr><td width='20%'><div align='center'><b>Search:</b></div></td><td width='80%'><input type='text' id='filter' name='filter_text' value='' style='width:100%;'></td></tr></table><hr>"
body += "<ol id='vars'>"
var/list/names = list()
for (var/V in D.vars)
names += V
names = sortList(names)
for (var/V in names)
body += debug_variable(V, D.vars[V], 0, D)
body += "</ol>"
var/html = "<html><head>"
if (title)
html += "<title>[title]</title>"
html += {"<style>
body
{
font-family: Verdana, sans-serif;
font-size: 9pt;
}
.value
{
font-family: "Courier New", monospace;
font-size: 8pt;
}
</style>"}
html += "</head><body>"
html += body
html += {"
<script type='text/javascript'>
var vars_ol = document.getElementById("vars");
var complete_list = vars_ol.innerHTML;
</script>
"}
html += "</body></html>"
usr << browse(html, "window=variables\ref[D];size=475x650")
return
proc/debug_variable(name, value, level, var/datum/DA = null)
var/html = ""
if(DA)
html += "<li style='backgroundColor:white'>(<a href='?_src_=vars;datumedit=\ref[DA];varnameedit=[name]'>E</a>) (<a href='?_src_=vars;datumchange=\ref[DA];varnamechange=[name]'>C</a>) (<a href='?_src_=vars;datummass=\ref[DA];varnamemass=[name]'>M</a>) "
else
html += "<li>"
if (isnull(value))
html += "[name] = <span class='value'>null</span>"
else if (istext(value))
html += "[name] = <span class='value'>\"[value]\"</span>"
else if (isicon(value))
#ifdef VARSICON
var/icon/I = new/icon(value)
var/rnd = rand(1,10000)
var/rname = "tmp\ref[I][rnd].png"
usr << browse_rsc(I, rname)
html += "[name] = (<span class='value'>[value]</span>) <img class=icon src=\"[rname]\">"
#else
html += "[name] = /icon (<span class='value'>[value]</span>)"
#endif
/* else if (istype(value, /image))
#ifdef VARSICON
var/rnd = rand(1, 10000)
var/image/I = value
src << browse_rsc(I.icon, "tmp\ref[value][rnd].png")
html += "[name] = <img src=\"tmp\ref[value][rnd].png\">"
#else
html += "[name] = /image (<span class='value'>[value]</span>)"
#endif
*/
else if (isfile(value))
html += "[name] = <span class='value'>'[value]'</span>"
else if (istype(value, /datum))
var/datum/D = value
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [D.type]"
else if (istype(value, /client))
var/client/C = value
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [C] [C.type]"
//
else if (istype(value, /list))
var/list/L = value
html += "[name] = /list ([L.len])"
if (L.len > 0 && !(name == "underlays" || name == "overlays" || name == "vars" || L.len > 500))
// not sure if this is completely right...
if(0) //(L.vars.len > 0)
html += "<ol>"
html += "</ol>"
else
html += "<ul>"
var/index = 1
for (var/entry in L)
if(istext(entry))
html += debug_variable(entry, L[entry], level + 1)
//html += debug_variable("[index]", L[index], level + 1)
else
html += debug_variable(index, L[index], level + 1)
index++
html += "</ul>"
else
html += "[name] = <span class='value'>[value]</span>"
html += "</li>"
return html
/client/proc/view_var_Topic(href, href_list, hsrc)
//This should all be moved over to datum/admins/Topic() or something ~Carn
if( (usr.client != src) || !src.holder )
return
if(href_list["Vars"])
debug_variables(locate(href_list["Vars"]))
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
else if(href_list["rename"])
if(!check_rights(R_VAREDIT)) return
var/mob/M = locate(href_list["rename"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
var/new_name = sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null, MAX_NAME_LEN)
if( !new_name || !M ) return
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
M.fully_replace_character_name(M.real_name,new_name)
href_list["datumrefresh"] = href_list["rename"]
else if(href_list["varnameedit"] && href_list["datumedit"])
if(!check_rights(R_VAREDIT)) return
var/D = locate(href_list["datumedit"])
if(!istype(D,/datum) && !istype(D,/client))
usr << "This can only be used on instances of types /client or /datum"
return
modify_variables(D, href_list["varnameedit"], 1)
else if(href_list["varnamechange"] && href_list["datumchange"])
if(!check_rights(R_VAREDIT)) return
var/D = locate(href_list["datumchange"])
if(!istype(D,/datum) && !istype(D,/client))
usr << "This can only be used on instances of types /client or /datum"
return
modify_variables(D, href_list["varnamechange"], 0)
else if(href_list["varnamemass"] && href_list["datummass"])
if(!check_rights(R_VAREDIT)) return
var/atom/A = locate(href_list["datummass"])
if(!istype(A))
usr << "This can only be used on instances of type /atom"
return
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
else if(href_list["mob_player_panel"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["mob_player_panel"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.holder.show_player_panel(M)
href_list["datumrefresh"] = href_list["mob_player_panel"]
else if(href_list["give_spell"])
if(!check_rights(R_ADMIN|R_FUN)) return
var/mob/M = locate(href_list["give_spell"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.give_spell(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["give_disease"])
if(!check_rights(R_ADMIN|R_FUN)) return
var/mob/M = locate(href_list["give_disease"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.give_disease(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["give_disease2"])
if(!check_rights(R_ADMIN|R_FUN)) return
var/mob/M = locate(href_list["give_disease2"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.give_disease2(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["godmode"])
if(!check_rights(R_REJUVINATE)) return
var/mob/M = locate(href_list["godmode"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.cmd_admin_godmode(M)
href_list["datumrefresh"] = href_list["godmode"]
else if(href_list["gib"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["gib"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.cmd_admin_gib(M)
else if(href_list["build_mode"])
if(!check_rights(R_BUILDMODE)) return
var/mob/M = locate(href_list["build_mode"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
togglebuildmode(M)
href_list["datumrefresh"] = href_list["build_mode"]
else if(href_list["drop_everything"])
if(!check_rights(R_DEBUG|R_ADMIN)) return
var/mob/M = locate(href_list["drop_everything"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
if(usr.client)
usr.client.cmd_admin_drop_everything(M)
else if(href_list["direct_control"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["direct_control"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
if(usr.client)
usr.client.cmd_assume_direct_control(M)
else if(href_list["make_skeleton"])
if(!check_rights(R_FUN)) return
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
return
H.ChangeToSkeleton()
href_list["datumrefresh"] = href_list["make_skeleton"]
else if(href_list["delall"])
if(!check_rights(R_DEBUG|R_SERVER)) return
var/obj/O = locate(href_list["delall"])
if(!isobj(O))
usr << "This can only be used on instances of type /obj"
return
var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
if(action_type == "Cancel" || !action_type)
return
if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes")
return
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
return
var/O_type = O.type
switch(action_type)
if("Strict type")
var/i = 0
for(var/obj/Obj in world)
if(Obj.type == O_type)
i++
del(Obj)
if(!i)
usr << "No objects of this type exist"
return
log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
message_admins("\blue [key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
if("Type and subtypes")
var/i = 0
for(var/obj/Obj in world)
if(istype(Obj,O_type))
i++
del(Obj)
if(!i)
usr << "No objects of this type exist"
return
log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
message_admins("\blue [key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
else if(href_list["explode"])
if(!check_rights(R_DEBUG|R_FUN)) return
var/atom/A = locate(href_list["explode"])
if(!isobj(A) && !ismob(A) && !isturf(A))
usr << "This can only be done to instances of type /obj, /mob and /turf"
return
src.cmd_admin_explosion(A)
href_list["datumrefresh"] = href_list["explode"]
else if(href_list["emp"])
if(!check_rights(R_DEBUG|R_FUN)) return
var/atom/A = locate(href_list["emp"])
if(!isobj(A) && !ismob(A) && !isturf(A))
usr << "This can only be done to instances of type /obj, /mob and /turf"
return
src.cmd_admin_emp(A)
href_list["datumrefresh"] = href_list["emp"]
else if(href_list["mark_object"])
if(!check_rights(0)) return
var/datum/D = locate(href_list["mark_object"])
if(!istype(D))
usr << "This can only be done to instances of type /datum"
return
src.holder.marked_datum = D
href_list["datumrefresh"] = href_list["mark_object"]
else if(href_list["rotatedatum"])
if(!check_rights(0)) return
var/atom/A = locate(href_list["rotatedatum"])
if(!istype(A))
usr << "This can only be done to instances of type /atom"
return
switch(href_list["rotatedir"])
if("right") A.set_dir(turn(A.dir, -45))
if("left") A.set_dir(turn(A.dir, 45))
href_list["datumrefresh"] = href_list["rotatedatum"]
else if(href_list["makemonkey"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
else if(href_list["makerobot"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
else if(href_list["makealien"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makealien"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makealien"=href_list["makealien"]))
else if(href_list["makeslime"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makeslime"=href_list["makeslime"]))
else if(href_list["makeai"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makeai"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makeai"=href_list["makeai"]))
else if(href_list["setspecies"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["setspecies"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
var/new_species = input("Please choose a new species.","Species",null) as null|anything in all_species
if(!H)
usr << "Mob doesn't exist anymore"
return
if(H.set_species(new_species))
usr << "Set species of [H] to [H.species]."
else
usr << "Failed! Something went wrong."
else if(href_list["addlanguage"])
if(!check_rights(R_SPAWN)) return
var/mob/H = locate(href_list["addlanguage"])
if(!istype(H))
usr << "This can only be done to instances of type /mob"
return
var/new_language = input("Please choose a language to add.","Language",null) as null|anything in all_languages
if(!new_language)
return
if(!H)
usr << "Mob doesn't exist anymore"
return
if(H.add_language(new_language))
usr << "Added [new_language] to [H]."
else
usr << "Mob already knows that language."
else if(href_list["remlanguage"])
if(!check_rights(R_SPAWN)) return
var/mob/H = locate(href_list["remlanguage"])
if(!istype(H))
usr << "This can only be done to instances of type /mob"
return
if(!H.languages.len)
usr << "This mob knows no languages."
return
var/datum/language/rem_language = input("Please choose a language to remove.","Language",null) as null|anything in H.languages
if(!rem_language)
return
if(!H)
usr << "Mob doesn't exist anymore"
return
if(H.remove_language(rem_language.name))
usr << "Removed [rem_language] from [H]."
else
usr << "Mob doesn't know that language."
else if(href_list["addverb"])
if(!check_rights(R_DEBUG)) return
var/mob/living/H = locate(href_list["addverb"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living"
return
var/list/possibleverbs = list()
possibleverbs += "Cancel" // One for the top...
possibleverbs += typesof(/mob/proc,/mob/verb,/mob/living/proc,/mob/living/verb)
switch(H.type)
if(/mob/living/carbon/human)
possibleverbs += typesof(/mob/living/carbon/proc,/mob/living/carbon/verb,/mob/living/carbon/human/verb,/mob/living/carbon/human/proc)
if(/mob/living/silicon/robot)
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/robot/proc,/mob/living/silicon/robot/verb)
if(/mob/living/silicon/ai)
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/ai/proc,/mob/living/silicon/ai/verb)
possibleverbs -= H.verbs
possibleverbs += "Cancel" // ...And one for the bottom
var/verb = input("Select a verb!", "Verbs",null) as anything in possibleverbs
if(!H)
usr << "Mob doesn't exist anymore"
return
if(!verb || verb == "Cancel")
return
else
H.verbs += verb
else if(href_list["remverb"])
if(!check_rights(R_DEBUG)) return
var/mob/H = locate(href_list["remverb"])
if(!istype(H))
usr << "This can only be done to instances of type /mob"
return
var/verb = input("Please choose a verb to remove.","Verbs",null) as null|anything in H.verbs
if(!H)
usr << "Mob doesn't exist anymore"
return
if(!verb)
return
else
H.verbs -= verb
else if(href_list["addorgan"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/M = locate(href_list["addorgan"])
if(!istype(M))
usr << "This can only be done to instances of type /mob/living/carbon"
return
var/new_organ = input("Please choose an organ to add.","Organ",null) as null|anything in typesof(/obj/item/organ)-/obj/item/organ
if(!new_organ) return
if(!M)
usr << "Mob doesn't exist anymore"
return
if(locate(new_organ) in M.internal_organs)
usr << "Mob already has that organ."
return
<<<<<<< HEAD
new new_organ(M)
=======
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/datum/organ/internal/I = new new_organ(H)
var/organ_slot = input(usr, "Which slot do you want the organ to go in ('default' for default)?") as text|null
if(!organ_slot)
return
if(organ_slot != "default")
organ_slot = sanitize(organ_slot)
else
if(I.removed_type)
var/obj/item/organ/O = new I.removed_type()
organ_slot = O.organ_tag
del(O)
else
organ_slot = "unknown organ"
if(H.internal_organs_by_name[organ_slot])
usr << "[H] already has an organ in that slot."
del(I)
return
H.internal_organs |= I
H.internal_organs_by_name[organ_slot] = I
usr << "Added new [new_organ] to [H] as slot [organ_slot]."
else
new new_organ(M)
usr << "Added new [new_organ] to [M]."
>>>>>>> 2aa4646fa0425bed412e2ef0e7852591ecb4bc40
else if(href_list["remorgan"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/M = locate(href_list["remorgan"])
if(!istype(M))
usr << "This can only be done to instances of type /mob/living/carbon"
return
var/obj/item/organ/rem_organ = input("Please choose an organ to remove.","Organ",null) as null|anything in M.internal_organs
if(!M)
usr << "Mob doesn't exist anymore"
return
if(!(locate(rem_organ) in M.internal_organs))
usr << "Mob does not have that organ."
return
usr << "Removed [rem_organ] from [M]."
rem_organ.removed()
del(rem_organ)
else if(href_list["fix_nano"])
if(!check_rights(R_DEBUG)) return
var/mob/H = locate(href_list["fix_nano"])
if(!istype(H) || !H.client)
usr << "This can only be done on mobs with clients"
return
nanomanager.send_resources(H.client)
usr << "Resource files sent"
H << "Your NanoUI Resource files have been refreshed"
log_admin("[key_name(usr)] resent the NanoUI resource files to [key_name(H)] ")
else if(href_list["regenerateicons"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["regenerateicons"])
if(!ismob(M))
usr << "This can only be done to instances of type /mob"
return
M.regenerate_icons()
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
if(!check_rights(R_DEBUG|R_ADMIN|R_FUN)) return
var/mob/living/L = locate(href_list["mobToDamage"])
if(!istype(L)) return
var/Text = href_list["adjustDamage"]
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
if(!L)
usr << "Mob doesn't exist anymore"
return
switch(Text)
if("brute") L.adjustBruteLoss(amount)
if("fire") L.adjustFireLoss(amount)
if("toxin") L.adjustToxLoss(amount)
if("oxygen")L.adjustOxyLoss(amount)
if("brain") L.adjustBrainLoss(amount)
if("clone") L.adjustCloneLoss(amount)
else
usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]"
return
if(amount != 0)
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
href_list["datumrefresh"] = href_list["mobToDamage"]
if(href_list["datumrefresh"])
var/datum/DAT = locate(href_list["datumrefresh"])
if(!istype(DAT, /datum))
return
src.debug_variables(DAT)
return
+1 -1
View File
@@ -46,7 +46,7 @@
H << "\red Your abdomen is a world of pain!"
H.Weaken(10)
var/datum/organ/external/groin = H.get_organ("groin")
var/obj/item/organ/external/groin = H.get_organ("groin")
var/datum/wound/W = new /datum/wound/internal_bleeding(20)
H.adjustToxLoss(25)
groin.wounds += W
+1 -1
View File
@@ -309,7 +309,7 @@ datum/mind
switch(href_list["implant"])
if("remove")
for(var/obj/item/weapon/implant/loyalty/I in H.contents)
for(var/datum/organ/external/organs in H.organs)
for(var/obj/item/organ/external/organs in H.organs)
if(I in organs.implants)
I.Del()
break
+2 -2
View File
@@ -27,8 +27,8 @@ var/datum/antagonist/xenos/borer/borers
borer.host = host
borer.host_brain.name = host.name
borer.host_brain.real_name = host.real_name
var/datum/organ/external/head = host.get_organ("head")
head.implants += borer
var/obj/item/organ/external/head = host.get_organ("head")
if(head) head.implants += borer
/datum/antagonist/xenos/borer/proc/get_hosts()
var/list/possible_hosts = list()
+3 -2
View File
@@ -14,11 +14,12 @@
var/moved_recently = 0
var/mob/pulledby = null
/atom/movable/Bump(var/atom/A as mob|obj|turf|area, yes)
/atom/movable/Bump(var/atom/A, yes)
if(src.throwing)
src.throw_impact(A)
src.throwing = 0
spawn( 0 )
spawn(0)
if ((A && yes))
A.last_bumped = world.time
A.Bumped(src)
+1
View File
@@ -146,6 +146,7 @@
H.r_eyes = dna.GetUIValueRange(DNA_UI_EYES_R, 255)
H.g_eyes = dna.GetUIValueRange(DNA_UI_EYES_G, 255)
H.b_eyes = dna.GetUIValueRange(DNA_UI_EYES_B, 255)
H.update_eyes()
H.s_tone = 35 - dna.GetUIValueRange(DNA_UI_SKIN_TONE, 220) // Value can be negative.
+561 -558
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+175 -175
View File
@@ -1,175 +1,175 @@
/datum/dna/gene/monkey
name="Monkey"
/datum/dna/gene/monkey/New()
block=MONKEYBLOCK
/datum/dna/gene/monkey/can_activate(var/mob/M,var/flags)
return istype(M, /mob/living/carbon/human) || istype(M,/mob/living/carbon/monkey)
/datum/dna/gene/monkey/activate(var/mob/living/M, var/connected, var/flags)
if(!istype(M,/mob/living/carbon/human))
//testing("Cannot monkey-ify [M], type is [M.type].")
return
var/mob/living/carbon/human/H = M
H.monkeyizing = 1
var/list/implants = list() //Try to preserve implants.
for(var/obj/item/weapon/implant/W in H)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (H.contents-implants))
if (W==H.w_uniform) // will be teared
continue
H.drop_from_inventory(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("h2monkey", animation)
sleep(48)
del(animation)
var/mob/living/carbon/monkey/O = null
if(H.species.primitive)
O = new H.species.primitive(src)
else
H.gib() //Trying to change the species of a creature with no primitive var set is messy.
return
if(M)
if (M.dna)
O.dna = M.dna.Clone()
M.dna = null
if (M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
for(var/datum/disease/D in M.viruses)
O.viruses += D
D.affected_mob = O
M.viruses -= D
for(var/obj/T in (M.contents-implants))
del(T)
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the cute little monkey
if (connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
O.real_name = text("monkey ([])",copytext(md5(M.real_name), 2, 6))
O.take_overall_damage(M.getBruteLoss() + 40, M.getFireLoss())
O.adjustToxLoss(M.getToxLoss() + 20)
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
O.a_intent = "hurt"
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
del(M)
return
/datum/dna/gene/monkey/deactivate(var/mob/living/M, var/connected, var/flags)
if(!istype(M,/mob/living/carbon/monkey))
//testing("Cannot humanize [M], type is [M.type].")
return
var/mob/living/carbon/monkey/Mo = M
Mo.monkeyizing = 1
var/list/implants = list() //Still preserving implants
for(var/obj/item/weapon/implant/W in Mo)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (Mo.contents-implants))
Mo.drop_from_inventory(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("monkey2h", animation)
sleep(48)
del(animation)
var/mob/living/carbon/human/O
if(Mo.greaterform)
O = new(src, Mo.greaterform)
else
O = new(src)
if (M.dna.GetUIState(DNA_UI_GENDER))
O.gender = FEMALE
else
O.gender = MALE
if (M)
if (M.dna)
O.dna = M.dna.Clone()
M.dna = null
if (M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
for(var/datum/disease/D in M.viruses)
O.viruses += D
D.affected_mob = O
M.viruses -= D
//for(var/obj/T in M)
// del(T)
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the human
if (connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
var/i
while (!i)
var/randomname
if (O.gender == MALE)
randomname = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names)))
else
randomname = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names)))
if (findname(randomname))
continue
else
O.real_name = randomname
O.dna.real_name = randomname
i++
O.UpdateAppearance()
O.take_overall_damage(M.getBruteLoss(), M.getFireLoss())
O.adjustToxLoss(M.getToxLoss())
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
del(M)
return
/datum/dna/gene/monkey
name="Monkey"
/datum/dna/gene/monkey/New()
block=MONKEYBLOCK
/datum/dna/gene/monkey/can_activate(var/mob/M,var/flags)
return istype(M, /mob/living/carbon/human) || istype(M,/mob/living/carbon/monkey)
/datum/dna/gene/monkey/activate(var/mob/living/M, var/connected, var/flags)
if(!istype(M,/mob/living/carbon/human))
//testing("Cannot monkey-ify [M], type is [M.type].")
return
var/mob/living/carbon/human/H = M
H.monkeyizing = 1
var/list/implants = list() //Try to preserve implants.
for(var/obj/item/weapon/implant/W in H)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (H.contents-implants))
if (W==H.w_uniform) // will be teared
continue
H.drop_from_inventory(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("h2monkey", animation)
sleep(48)
del(animation)
var/mob/living/carbon/monkey/O = null
if(H.species.primitive)
O = new H.species.primitive(src)
else
H.gib() //Trying to change the species of a creature with no primitive var set is messy.
return
if(M)
if (M.dna)
O.dna = M.dna.Clone()
M.dna = null
if (M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
for(var/datum/disease/D in M.viruses)
O.viruses += D
D.affected_mob = O
M.viruses -= D
for(var/obj/T in (M.contents-implants))
del(T)
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the cute little monkey
if (connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
O.real_name = text("monkey ([])",copytext(md5(M.real_name), 2, 6))
O.take_overall_damage(M.getBruteLoss() + 40, M.getFireLoss())
O.adjustToxLoss(M.getToxLoss() + 20)
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
O.a_intent = I_HURT
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
del(M)
return
/datum/dna/gene/monkey/deactivate(var/mob/living/M, var/connected, var/flags)
if(!istype(M,/mob/living/carbon/monkey))
//testing("Cannot humanize [M], type is [M.type].")
return
var/mob/living/carbon/monkey/Mo = M
Mo.monkeyizing = 1
var/list/implants = list() //Still preserving implants
for(var/obj/item/weapon/implant/W in Mo)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (Mo.contents-implants))
Mo.drop_from_inventory(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("monkey2h", animation)
sleep(48)
del(animation)
var/mob/living/carbon/human/O
if(Mo.greaterform)
O = new(src, Mo.greaterform)
else
O = new(src)
if (M.dna.GetUIState(DNA_UI_GENDER))
O.gender = FEMALE
else
O.gender = MALE
if (M)
if (M.dna)
O.dna = M.dna.Clone()
M.dna = null
if (M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
for(var/datum/disease/D in M.viruses)
O.viruses += D
D.affected_mob = O
M.viruses -= D
//for(var/obj/T in M)
// del(T)
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the human
if (connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
var/i
while (!i)
var/randomname
if (O.gender == MALE)
randomname = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names)))
else
randomname = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names)))
if (findname(randomname))
continue
else
O.real_name = randomname
O.dna.real_name = randomname
i++
O.UpdateAppearance()
O.take_overall_damage(M.getBruteLoss(), M.getFireLoss())
O.adjustToxLoss(M.getToxLoss())
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
del(M)
return
@@ -213,7 +213,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
src << "<span class='notice'>We stab [T] with the proboscis.</span>"
src.visible_message("<span class='danger'>[src] stabs [T] with the proboscis!</span>")
T << "<span class='danger'>You feel a sharp stabbing pain!</span>"
var/datum/organ/external/affecting = T.get_organ(src.zone_sel.selecting)
var/obj/item/organ/external/affecting = T.get_organ(src.zone_sel.selecting)
if(affecting.take_damage(39,0,1,0,"large organic needle"))
T:UpdateDamageIcon()
@@ -388,13 +388,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
del(animation)
for(var/obj/item/W in src)
C.u_equip(W)
if (C.client)
C.client.screen -= W
if (W)
W.loc = C.loc
W.dropped(C)
W.layer = initial(W.layer)
C.drop_from_inventory(W)
var/mob/living/carbon/human/O = new /mob/living/carbon/human( src )
if (C.dna.GetUIState(DNA_UI_GENDER))
+1 -1
View File
@@ -17,7 +17,7 @@
user.Paralyse(5)
user << "\red An unexplicable force powerfully repels the sword from [target]!"
var/organ = ((user.hand ? "l_":"r_") + "arm")
var/datum/organ/external/affecting = user.get_organ(organ)
var/obj/item/organ/external/affecting = user.get_organ(organ)
if(affecting.take_damage(rand(force/2, force))) //random amount of damage between half of the blade's force and the full force of the blade.
user.UpdateDamageIcon()
return
+2 -3
View File
@@ -433,10 +433,9 @@ var/list/sacrificed = list()
D.b_eyes = 200
D.r_eyes = 200
D.g_eyes = 200
D.update_eyes()
D.underwear = 0
D.key = ghost.key
cult.add_antagonist(D.mind)
if(!chose_name)
@@ -797,7 +796,7 @@ var/list/sacrificed = list()
if (cultist.legcuffed)
cultist.drop_from_inventory(cultist.legcuffed)
if (istype(cultist.wear_mask, /obj/item/clothing/mask/muzzle))
cultist.u_equip(cultist.wear_mask)
cultist.drop_from_inventory(cultist.wear_mask)
if(istype(cultist.loc, /obj/structure/closet)&&cultist.loc:welded)
cultist.loc:welded = 0
if(istype(cultist.loc, /obj/structure/closet/secure_closet)&&cultist.loc:locked)
+11 -5
View File
@@ -455,15 +455,21 @@ datum/objective/harm
return 0
var/mob/living/carbon/human/H = target.current
for(var/datum/organ/external/E in H.organs)
for(var/obj/item/organ/external/E in H.organs)
if(E.status & ORGAN_BROKEN)
already_completed = 1
return 1
if(E.status & ORGAN_DESTROYED && !E.amputated)
already_completed = 1
for(var/limb_tag in H.species.has_limbs) //todo check prefs for robotic limbs and amputations.
var/list/organ_data = H.species.has_limbs[limb_tag]
var/limb_type = organ_data["path"]
var/found
for(var/obj/item/organ/external/E in H.organs)
if(limb_type == E.type)
found = 1
break
if(!found)
return 1
var/datum/organ/external/head/head = H.get_organ("head")
var/obj/item/organ/external/head/head = H.get_organ("head")
if(head.disfigured)
return 1
return 0
+3 -15
View File
@@ -110,23 +110,11 @@
return null
/obj/proc/check_access(obj/item/I)
if(!(!req_access || req_access.len) && !(req_one_access || req_one_access.len)) //no requirements
return 1
if(!I)
return 0
for(var/req in src.req_access)
if(!(req in I.GetAccess())) //doesn't have this access
return 0
if(src.req_one_access.len)
for(var/req in src.req_one_access)
if(req in I.GetAccess()) //has an access from the single access list
return 1
return 0
return 1
return check_access_list(I ? I.GetAccess() : list())
/obj/proc/check_access_list(var/list/L)
if(!src.req_access.len && !src.req_one_access.len) return 1
if(!req_access) req_access = list()
if(!req_one_access) req_one_access = list()
if(!L) return 0
if(!istype(L, /list)) return 0
for(var/req in src.req_access)
+2 -2
View File
@@ -514,8 +514,8 @@ var/global/datum/controller/occupations/job_master
H.internals.icon_state = "internal1"
if(istype(H)) //give humans wheelchairs, if they need them.
var/datum/organ/external/l_foot = H.get_organ("l_foot")
var/datum/organ/external/r_foot = H.get_organ("r_foot")
var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
var/obj/item/organ/external/r_foot = H.get_organ("r_foot")
if((!l_foot || l_foot.status & ORGAN_DESTROYED) && (!r_foot || r_foot.status & ORGAN_DESTROYED))
var/obj/structure/bed/chair/wheelchair/W = new /obj/structure/bed/chair/wheelchair(H.loc)
H.buckled = W
+5 -5
View File
@@ -346,7 +346,7 @@
dat += "<th>Other Wounds</th>"
dat += "</tr>"
for(var/datum/organ/external/e in occ["external_organs"])
for(var/obj/item/organ/external/e in occ["external_organs"])
var/AN = ""
var/open = ""
var/infected = ""
@@ -362,7 +362,7 @@
for(var/datum/wound/W in e.wounds) if(W.internal)
internal_bleeding = "<br>Internal bleeding"
break
if(istype(e, /datum/organ/external/chest) && occ["lung_ruptured"])
if(istype(e, /obj/item/organ/external/chest) && occ["lung_ruptured"])
lung_ruptured = "Lung ruptured:"
if(e.status & ORGAN_SPLINTED)
splint = "Splinted:"
@@ -404,12 +404,12 @@
if(!AN && !open && !infected & !imp)
AN = "None:"
if(!(e.status & ORGAN_DESTROYED))
dat += "<td>[e.display_name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]</td>"
dat += "<td>[e.name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]</td>"
else
dat += "<td>[e.display_name]</td><td>-</td><td>-</td><td>Not Found</td>"
dat += "<td>[e.name]</td><td>-</td><td>-</td><td>Not Found</td>"
dat += "</tr>"
for(var/datum/organ/internal/i in occ["internal_organs"])
for(var/obj/item/organ/i in occ["internal_organs"])
var/mech = ""
if(i.robotic == 1)
+3 -2
View File
@@ -52,7 +52,7 @@
if(beaker)
user << "<span class='notice'>]The [src] is already loaded.</span>"
else
user.before_take_item(O)
user.remove_from_mob(O)
O.loc = src
beaker = O
updateUsrDialog()
@@ -74,6 +74,7 @@
if(i < 10)
user << "<span class='notice'>You empty \the [O] into \the [src].</span>"
else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
user << "<span class='notice'>You cannot put this in \the [src].</span>"
else
@@ -83,7 +84,7 @@
if(i >= 10)
user << "<span class='notice'>\The [src] is full! Activate it.</span>"
else
user.before_take_item(O)
user.remove_from_mob(O)
O.loc = src
user << "<span class='notice'>You put \the [O] in \the [src]</span>"
update_icon()
+6 -10
View File
@@ -43,18 +43,14 @@
if(prints_prosthetics)
O.robotic = 2
else if(loaded_dna)
visible_message("<span class='notice'>The printer injects stored DNA in used biomass.</span>.")
var/datum/organ/internal/I = new O.organ_type
I.transplant_data = list()
visible_message("<span class='notice'>The printer injects the stored DNA into the biomass.</span>.")
O.transplant_data = list()
var/mob/living/carbon/C = loaded_dna["donor"]
I.transplant_data["species"] = C.species.name
I.transplant_data["blood_type"] = loaded_dna["blood_type"]
I.transplant_data["blood_DNA"] = loaded_dna["blood_DNA"]
O.organ_data = I
I.organ_holder = O
O.transplant_data["species"] = C.species.name
O.transplant_data["blood_type"] = loaded_dna["blood_type"]
O.transplant_data["blood_DNA"] = loaded_dna["blood_DNA"]
visible_message("<span class='info'>The bioprinter spits out a new organ.")
visible_message("<span class='info'>The bioprinter spits out a new organ.</span>")
else
user << "<span class='warning'>There is not enough matter in the printer.</span>"
+1 -1
View File
@@ -84,7 +84,7 @@
lasercolor = "r"
else if( istype(W, /obj/item/clothing/suit/bluetag) )
lasercolor = "b"
if( lasercolor || istype(W, /obj/item/clothing/suit/armor/vest) )
if( lasercolor || istype(W, /obj/item/clothing/suit/storage/vest) )
user.drop_item()
del(W)
build_step++
+5 -5
View File
@@ -537,7 +537,7 @@
A.loc = src.loc
user << "You add the robot arm to the [src]"
src.loc = A //Place the water tank into the assembly, it will be needed for the finished bot
user.u_equip(S)
user.remove_from_mob(S)
del(S)
/obj/item/weapon/farmbot_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -546,21 +546,21 @@
src.build_step++
user << "You add the plant analyzer to [src]!"
src.name = "farmbot assembly"
user.u_equip(W)
user.remove_from_mob(W)
del(W)
else if(( istype(W, /obj/item/weapon/reagent_containers/glass/bucket)) && (src.build_step == 1))
src.build_step++
user << "You add a bucket to [src]!"
src.name = "farmbot assembly with bucket"
user.u_equip(W)
user.remove_from_mob(W)
del(W)
else if(( istype(W, /obj/item/weapon/minihoe)) && (src.build_step == 2))
src.build_step++
user << "You add a minihoe to [src]!"
src.name = "farmbot assembly with bucket and minihoe"
user.u_equip(W)
user.remove_from_mob(W)
del(W)
else if((isprox(W)) && (src.build_step == 3))
@@ -572,7 +572,7 @@
S.tank = wTank
S.loc = get_turf(src)
S.name = src.created_name
user.u_equip(W)
user.remove_from_mob(W)
del(W)
del(src)
@@ -154,7 +154,7 @@
if(isobj(obj))
var/mob/M = obj.loc
if(ismob(M))
M.u_equip(obj)
M.remove_from_mob(obj)
M.update_icons() //so their overlays update
if(!silent)
+1 -1
View File
@@ -593,7 +593,7 @@ About the new airlock wires panel:
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
if(!istype(H.head, /obj/item/clothing/head/helmet))
visible_message("\red [user] headbutts the airlock.")
var/datum/organ/external/affecting = H.get_organ("head")
var/obj/item/organ/external/affecting = H.get_organ("head")
H.Stun(8)
H.Weaken(5)
if(affecting.take_damage(10, 0))
+1 -1
View File
@@ -262,7 +262,7 @@
return
//psa to whoever coded this, there are plenty of objects that need to call attack() on doors without bludgeoning them.
if(src.density && istype(I, /obj/item/weapon) && user.a_intent == "hurt" && !istype(I, /obj/item/weapon/card))
if(src.density && istype(I, /obj/item/weapon) && user.a_intent == I_HURT && !istype(I, /obj/item/weapon/card))
var/obj/item/weapon/W = I
if(W.damtype == BRUTE || W.damtype == BURN)
if(W.force < min_force)
+1 -1
View File
@@ -82,7 +82,7 @@
O.Weaken(strength)
if (istype(O, /mob/living/carbon/human))
var/mob/living/carbon/human/H = O
var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"]
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
if (E && (E.damage > E.min_bruised_damage && prob(E.damage + 50)))
flick("e_flash", O:flash)
E.damage += rand(1, 5)
+1 -1
View File
@@ -228,7 +228,7 @@
for (var/obj/thing in contents)
// Todo: unify limbs and internal organs
// There's a chance that the gibber will fail to destroy some evidence.
if((istype(thing,/obj/item/weapon/organ) || istype(thing,/obj/item/organ)) && prob(80))
if((istype(thing,/obj/item/organ) || istype(thing,/obj/item/organ)) && prob(80))
del(thing)
continue
thing.loc = get_turf(thing) // Drop it onto the turf for throwing.
+1 -1
View File
@@ -112,7 +112,7 @@
"\blue [user] has added one of [O] to \the [src].", \
"\blue You add one of [O] to \the [src].")
else
// user.before_take_item(O) //This just causes problems so far as I can tell. -Pete
// user.remove_from_mob(O) //This just causes problems so far as I can tell. -Pete
user.drop_item()
O.loc = src
user.visible_message( \
+1 -1
View File
@@ -197,7 +197,7 @@
user << "<span class='notice'>\The [src] is full.</span>"
return 1
else
user.before_take_item(O)
user.remove_from_mob(O)
O.loc = src
if(item_quants[O.name])
item_quants[O.name]++
+1 -1
View File
@@ -331,7 +331,7 @@
else
//if the turret was attacked with the intention of harming it:
user.changeNext_move(CLICK_CD_MELEE)
user.changeNext_move(NEXT_MOVE_DELAY)
take_damage(I.force * 0.5)
if(I.force * 0.5 > 1) //if the force of impact dealt at least 1 damage, the turret gets pissed off
if(!attacked && !emagged)
+24 -16
View File
@@ -147,6 +147,8 @@
if(99 to 110)
overlays += image('icons/obj/objects.dmi', "statn_c100")
/obj/machinery/recharge_station/Bumped(var/mob/AM)
move_inside(AM)
/obj/machinery/recharge_station/proc/build_icon()
if(NOPOWER|BROKEN)
@@ -199,31 +201,37 @@
add_fingerprint(usr)
return
/obj/machinery/recharge_station/verb/move_inside()
/obj/machinery/recharge_station/verb/move_inside(var/mob/user = usr)
set category = "Object"
set src in oview(1)
if(usr.stat == 2)
if(!user)
return
if(!(istype(user, /mob/living/silicon/robot)))
user << "<span class='notice'>Only non-organics may enter the recharger!</span>"
return
var/mob/living/silicon/robot/R = user
if(R.stat == 2)
//Whoever had it so that a borg with a dead cell can't enter this thing should be shot. --NEO
return
if(!(istype(usr, /mob/living/silicon/)))
usr << "<span class='notice'>Only non-organics may enter the recharger!</span>"
return
if(occupant)
usr << "<span class='notice'>The cell is already occupied!</span>"
R << "<span class='notice'>The cell is already occupied!</span>"
return
if(!usr:cell)
usr << "<span class='notice'>Without a powercell, you can't be recharged.</span>"
if(!R.cell)
R << "<span class='notice'>Without a powercell, you can't be recharged.</span>"
//Make sure they actually HAVE a cell, now that they can get in while powerless. --NEO
return
usr.stop_pulling()
if(usr && usr.client)
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.loc = src
occupant = usr
R.stop_pulling()
if(R.client)
R.client.perspective = EYE_PERSPECTIVE
R.client.eye = src
R.loc = src
occupant = R
/*for(var/obj/O in src)
O.loc = loc*/
add_fingerprint(usr)
add_fingerprint(R)
build_icon()
update_use_power(1)
return
return
+1 -1
View File
@@ -331,7 +331,7 @@
sleep(50)
if(src.OCCUPANT)
OCCUPANT.radiation += 50
var/datum/organ/internal/diona/nutrients/rad_organ = locate() in OCCUPANT.internal_organs
var/obj/item/organ/diona/nutrients/rad_organ = locate() in OCCUPANT.internal_organs
if (!rad_organ)
if(src.issuperUV)
var/burndamage = rand(28,35)
+2 -2
View File
@@ -25,7 +25,7 @@
if(!melee_can_hit || !istype(target, /atom)) return
if(istype(target, /mob/living))
var/mob/living/M = target
if(src.occupant.a_intent == "hurt")
if(src.occupant.a_intent == I_HURT)
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
if(damtype == "brute")
step_away(M,src,15)
@@ -41,7 +41,7 @@
var/mob/living/carbon/human/H = target
// if (M.health <= 0) return
var/datum/organ/external/temp = H.get_organ(pick("chest", "chest", "chest", "head"))
var/obj/item/organ/external/temp = H.get_organ(pick("chest", "chest", "chest", "head"))
if(temp)
var/update = 0
switch(damtype)
+3 -3
View File
@@ -51,7 +51,7 @@
else if(istype(target,/mob/living))
var/mob/living/M = target
if(M.stat>1) return
if(chassis.occupant.a_intent == "hurt")
if(chassis.occupant.a_intent == I_HURT)
M.take_overall_damage(dam_force)
M.adjustOxyLoss(round(dam_force/2))
M.updatehealth()
@@ -1034,10 +1034,10 @@
else if(istype(target,/mob/living))
var/mob/living/M = target
if(M.stat>1) return
if(chassis.occupant.a_intent == "hurt")
if(chassis.occupant.a_intent == I_HURT)
chassis.occupant_message("\red You obliterate [target] with [src.name], leaving blood and guts everywhere.")
chassis.visible_message("\red [chassis] destroys [target] in an unholy fury.")
if(chassis.occupant.a_intent == "disarm")
if(chassis.occupant.a_intent == I_DISARM)
chassis.occupant_message("\red You tear [target]'s limbs off with [src.name].")
chassis.visible_message("\red [chassis] rips [target]'s arms off.")
else
+14 -2
View File
@@ -13,6 +13,7 @@
idle_power_usage = 20
active_power_usage = 5000
req_access = list(access_robotics)
var/current_manufacturer
var/time_coeff = 1.5 //can be upgraded with research
var/resource_coeff = 1.5 //can be upgraded with research
var/list/resources = list(
@@ -143,6 +144,7 @@
/obj/machinery/mecha_part_fabricator/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/mechfab(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
@@ -165,6 +167,9 @@
*/
return
/obj/machinery/mecha_part_fabricator/initialize()
current_manufacturer = basic_robolimb.company
/obj/machinery/mecha_part_fabricator/RefreshParts()
var/T = 0
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
@@ -361,7 +366,11 @@
if( !(locate(part, src.contents)) || !(part.vars.Find("construction_time")) || !(part.vars.Find("construction_cost")) ) // these 3 are the current requirements for an object being buildable by the mech_fabricator
return
src.being_built = new part.type(src)
if(current_manufacturer)
src.being_built = new part.type(src, current_manufacturer)
else
src.being_built = new part.type(src, basic_robolimb.company)
src.desc = "It's building [src.being_built]."
src.remove_resources(part)
src.overlays += "fab-active"
@@ -562,7 +571,7 @@
switch(screen)
if("main")
left_part = output_available_resources()+"<hr>"
left_part += "<a href='?src=\ref[src];sync=1'>Sync with R&D servers</a><hr>"
left_part += "<a href='?src=\ref[src];sync=1'>Sync with R&D servers</a> | <a href='?src=\ref[src];set_manufacturer=1'>Set manufacturer</a> ([current_manufacturer])<hr>"
for(var/part_set in part_sets)
left_part += "<a href='?src=\ref[src];part_set=[part_set]'>[part_set]</a> - \[<a href='?src=\ref[src];partset_to_queue=[part_set]'>Add all parts to queue\]<br>"
if("parts")
@@ -623,6 +632,9 @@
return
var/datum/topic_input/filter = new /datum/topic_input(href,href_list)
if(href_list["set_manufacturer"])
var/choice = input(usr, "Which manufacturer do you wish to use for this fabricator?") as null|anything in all_robolimbs
if(choice) current_manufacturer = choice
if(href_list["part_set"])
var/tpart_set = filter.getStr("part_set")
if(tpart_set)
+1 -1
View File
@@ -784,7 +784,7 @@
user << "There's already a powercell installed."
return
else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "hurt")
else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != I_HURT)
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
if (hasInternalDamage(MECHA_INT_TANK_BREACH))
+2 -2
View File
@@ -113,7 +113,7 @@
// Aliens can get straight through these.
if(istype(usr,/mob/living/carbon))
var/mob/living/carbon/M = usr
if(locate(/datum/organ/internal/xenos/hivenode) in M.internal_organs)
if(locate(/obj/item/organ/xenos/hivenode) in M.internal_organs)
for(var/mob/O in oviewers(src))
O.show_message("\red [usr] strokes the [name] and it melts away!", 1)
health = 0
@@ -355,7 +355,7 @@ Alien plants should do something if theres a lot of poison
/obj/effect/alien/egg/attack_hand(user as mob)
var/mob/living/carbon/M = user
if(!istype(M) || !(locate(/datum/organ/internal/xenos/hivenode) in M.internal_organs))
if(!istype(M) || !(locate(/obj/item/organ/xenos/hivenode) in M.internal_organs))
return attack_hand(user)
switch(status)
@@ -51,8 +51,8 @@ var/global/list/image/splatter_cache=list()
if(amount < 1)
return
var/datum/organ/external/l_foot = perp.get_organ("l_foot")
var/datum/organ/external/r_foot = perp.get_organ("r_foot")
var/obj/item/organ/external/l_foot = perp.get_organ("l_foot")
var/obj/item/organ/external/r_foot = perp.get_organ("r_foot")
var/hasfeet = 1
if((!l_foot || l_foot.status & ORGAN_DESTROYED) && (!r_foot || r_foot.status & ORGAN_DESTROYED))
hasfeet = 0
+22 -7
View File
@@ -40,6 +40,11 @@
var/zoomdevicename = null //name used for message when binoculars/scope is used
var/zoom = 0 //1 if item is actively being used to zoom. For scoped guns and binoculars.
// Used to specify the icon file to be used when the item is worn. 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, assuming they apply to the slot in question.
// Only slot_l_hand/slot_r_hand are implemented at the moment. Others to be implemented as needed.
var/list/item_icons = null
/* Species-specific sprites, concept stolen from Paradise//vg/.
ex:
sprite_sheets = list(
@@ -58,6 +63,15 @@
/obj/item/device
icon = 'icons/obj/device.dmi'
//Checks if the item is being held by a mob, and if so, updates the held icons
/obj/item/proc/update_held_icon()
if(ismob(src.loc))
var/mob/M = src.loc
if(M.l_hand == src)
M.update_inv_l_hand()
if(M.r_hand == src)
M.update_inv_r_hand()
/obj/item/ex_act(severity)
switch(severity)
if(1.0)
@@ -119,11 +133,12 @@
/obj/item/attack_hand(mob/user as mob)
if (!user) return
if (hasorgans(user))
var/datum/organ/external/temp = user:organs_by_name["r_hand"]
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
if (user.hand)
temp = user:organs_by_name["l_hand"]
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.display_name], but cannot!"
user << "<span class='notice'>You try to move your [temp.name], but cannot!"
return
if (istype(src.loc, /obj/item/weapon/storage))
@@ -496,11 +511,11 @@
M.adjustBruteLoss(10)
*/
if(istype(M, /mob/living/carbon/human))
if(istype(H))
var/datum/organ/internal/eyes/eyes = H.internal_organs_by_name["eyes"]
var/obj/item/organ/eyes/eyes = H.internal_organs_by_name["eyes"]
if(M != user)
if(H != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] has been stabbed in the eye with [src] by [user].", 1)
M << "\red [user] stabs you in the eye with [src]!"
@@ -526,7 +541,7 @@
if (eyes.damage >= eyes.min_broken_damage)
if(M.stat != 2)
M << "\red You go blind!"
var/datum/organ/external/affecting = M:get_organ("head")
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting.take_damage(7))
M:UpdateDamageIcon()
else
+1 -1
View File
@@ -21,7 +21,7 @@
if (contents.len >= max_butts)
user << "This ashtray is full."
return
user.u_equip(W)
user.remove_from_mob(W)
W.loc = src
if (istype(W,/obj/item/clothing/mask/smokable/cigarette))
+2 -2
View File
@@ -1207,8 +1207,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/list/damaged = H.get_damaged_organs(1,1)
user.show_message("\blue Localized Damage, Brute/Burn:",1)
if(length(damaged)>0)
for(var/datum/organ/external/org in damaged)
user.show_message(text("\blue \t []: []\blue-[]",capitalize(org.display_name),(org.brute_dam > 0)?"\red [org.brute_dam]":0,(org.burn_dam > 0)?"\red [org.burn_dam]":0),1)
for(var/obj/item/organ/external/org in damaged)
user.show_message(text("\blue \t []: []\blue-[]",capitalize(org.name),(org.brute_dam > 0)?"\red [org.brute_dam]":0,(org.burn_dam > 0)?"\red [org.burn_dam]":0),1)
else
user.show_message("\blue \t Limbs are OK.",1)
+8 -6
View File
@@ -123,9 +123,9 @@ REAGENT SCANNER
var/list/damaged = H.get_damaged_organs(1,1)
user.show_message("\blue Localized Damage, Brute/Burn:",1)
if(length(damaged)>0)
for(var/datum/organ/external/org in damaged)
for(var/obj/item/organ/external/org in damaged)
user.show_message(text("\blue \t []: [][]\blue - []", \
"[capitalize(org.display_name)][org.status & ORGAN_ROBOT ? "(Cybernetic)" : ""]", \
"[capitalize(org.name)][org.status & ORGAN_ROBOT ? "(Cybernetic)" : ""]", \
(org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \
(org.status & ORGAN_BLEEDING)?"\red <b>\[Bleeding\]</b>":"\t", \
(org.burn_dam > 0) ? "<font color='#FFA500'>[org.burn_dam]</font>" :0),1)
@@ -180,8 +180,10 @@ REAGENT SCANNER
if(ishuman(M))
var/mob/living/carbon/human/H = M
for(var/name in H.organs_by_name)
var/datum/organ/external/e = H.organs_by_name[name]
var/limb = e.display_name
var/obj/item/organ/external/e = H.organs_by_name[name]
if(!e)
continue
var/limb = e.name
if(e.status & ORGAN_BROKEN)
if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!(e.status & ORGAN_SPLINTED)))
user << "\red Unsecured fracture in subject [limb]. Splinting recommended for transport."
@@ -189,11 +191,11 @@ REAGENT SCANNER
user << "\red Infected wound detected in subject [limb]. Disinfection recommended."
for(var/name in H.organs_by_name)
var/datum/organ/external/e = H.organs_by_name[name]
var/obj/item/organ/external/e = H.organs_by_name[name]
if(e.status & ORGAN_BROKEN)
user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1)
break
for(var/datum/organ/external/e in H.organs)
for(var/obj/item/organ/external/e in H.organs)
for(var/datum/wound/W in e.wounds) if(W.internal)
user.show_message(text("\red Internal bleeding detected. Advanced scanner required for location."), 1)
break
+31 -9
View File
@@ -7,43 +7,65 @@
slot_flags = SLOT_BELT
var/construction_time = 100
var/list/construction_cost = list("metal"=20000,"glass"=5000)
var/list/part = null
var/list/part = null // Order of args is important for installing robolimbs.
var/sabotaged = 0 //Emagging limbs can have repercussions when installed as prosthetics.
var/model_info
dir = SOUTH
/obj/item/robot_parts/set_dir()
return
/obj/item/robot_parts/New(var/newloc, var/model)
..(newloc)
if(model_info && model)
model_info = model
var/datum/robolimb/R = all_robolimbs[model]
if(R)
name = "[R.company] [initial(name)]"
desc = "[R.desc]"
if(icon_state in icon_states(R.icon))
icon = R.icon
else
name = "robot [initial(name)]"
/obj/item/robot_parts/l_arm
name = "robot left arm"
name = "left arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_arm"
construction_time = 200
construction_cost = list("metal"=18000)
part = list("l_arm","l_hand")
model_info = 1
/obj/item/robot_parts/r_arm
name = "robot right arm"
name = "right arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_arm"
construction_time = 200
construction_cost = list("metal"=18000)
part = list("r_arm","r_hand")
model_info = 1
/obj/item/robot_parts/l_leg
name = "robot left leg"
name = "left leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_leg"
construction_time = 200
construction_cost = list("metal"=15000)
part = list("l_leg","l_foot")
model_info = 1
/obj/item/robot_parts/r_leg
name = "robot right leg"
name = "right leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_leg"
construction_time = 200
construction_cost = list("metal"=15000)
part = list("r_leg","r_foot")
model_info = 1
/obj/item/robot_parts/chest
name = "robot torso"
name = "torso"
desc = "A heavily reinforced case containing cyborg logic boards, with space for a standard power cell."
icon_state = "chest"
construction_time = 350
@@ -52,7 +74,7 @@
var/obj/item/weapon/cell/cell = null
/obj/item/robot_parts/head
name = "robot head"
name = "head"
desc = "A standard reinforced braincase, with spine-plugged neural socket and sensor gimbals."
icon_state = "head"
construction_time = 350
@@ -61,7 +83,7 @@
var/obj/item/device/flash/flash2 = null
/obj/item/robot_parts/robot_suit
name = "robot endoskeleton"
name = "endoskeleton"
desc = "A complex metal backbone with standard limb sockets and pseudomuscle anchors."
icon_state = "robo_suit"
construction_time = 500
@@ -110,7 +132,7 @@
B.loc = get_turf(src)
user << "<span class='notice'>You armed the robot frame.</span>"
if (user.get_inactive_hand()==src)
user.before_take_item(src)
user.remove_from_mob(src)
user.put_in_inactive_hand(B)
del(src)
else
+32 -32
View File
@@ -22,9 +22,9 @@
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/datum/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.display_name == "head")
if(affecting.name == "head")
if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space))
user << "\red You can't apply [src] through [H.head]!"
return 1
@@ -62,33 +62,33 @@
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/datum/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.open == 0)
if(!affecting.bandage())
user << "\red The wounds on [M]'s [affecting.display_name] have already been bandaged."
user << "\red The wounds on [M]'s [affecting.name] have already been bandaged."
return 1
else
for (var/datum/wound/W in affecting.wounds)
if (W.internal)
continue
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]." )
user.visible_message( "\blue [user] bandages [W.desc] on [M]'s [affecting.name].", \
"\blue You bandage [W.desc] on [M]'s [affecting.name]." )
//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]." )
user.visible_message( "\blue [user] places bruise patch over [W.desc] on [M]'s [affecting.name].", \
"\blue You place bruise patch over [W.desc] on [M]'s [affecting.name]." )
else
user.visible_message( "\blue [user] places bandaid over [W.desc] on [M]'s [affecting.display_name].", \
"\blue You place bandaid over [W.desc] on [M]'s [affecting.display_name]." )
user.visible_message( "\blue [user] places bandaid over [W.desc] on [M]'s [affecting.name].", \
"\blue You place bandaid over [W.desc] on [M]'s [affecting.name]." )
use(1)
else
if (can_operate(H)) //Checks if mob is lying down on table for surgery
if (do_surgery(H,user,src))
return
else
user << "<span class='notice'>The [affecting.display_name] is cut open, you'll need more than a bandage!</span>"
user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
/obj/item/stack/medical/ointment
name = "ointment"
@@ -105,22 +105,22 @@
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/datum/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.open == 0)
if(!affecting.salve())
user << "\red The wounds on [M]'s [affecting.display_name] have already been salved."
user << "\red The wounds on [M]'s [affecting.name] have already been salved."
return 1
else
user.visible_message( "\blue [user] salves wounds on [M]'s [affecting.display_name].", \
"\blue You salve wounds on [M]'s [affecting.display_name]." )
user.visible_message( "\blue [user] salves wounds on [M]'s [affecting.name].", \
"\blue You salve wounds on [M]'s [affecting.name]." )
use(1)
else
if (can_operate(H)) //Checks if mob is lying down on table for surgery
if (do_surgery(H,user,src))
return
else
user << "<span class='notice'>The [affecting.display_name] is cut open, you'll need more than a bandage!</span>"
user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
/obj/item/stack/medical/advanced/bruise_pack
name = "advanced trauma kit"
@@ -136,29 +136,29 @@
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/datum/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.open == 0)
var/bandaged = affecting.bandage()
var/disinfected = affecting.disinfect()
if(!(bandaged || disinfected))
user << "\red The wounds on [M]'s [affecting.display_name] have already been treated."
user << "\red The wounds on [M]'s [affecting.name] have already been treated."
return 1
else
for (var/datum/wound/W in affecting.wounds)
if (W.internal)
continue
if (W.current_stage <= W.max_bleeding_stage)
user.visible_message( "\blue [user] cleans [W.desc] on [M]'s [affecting.display_name] and seals edges with bioglue.", \
"\blue You clean and seal [W.desc] on [M]'s [affecting.display_name]." )
user.visible_message( "\blue [user] cleans [W.desc] on [M]'s [affecting.name] and seals edges with bioglue.", \
"\blue You clean and seal [W.desc] on [M]'s [affecting.name]." )
//H.add_side_effect("Itch")
else if (istype(W,/datum/wound/bruise))
user.visible_message( "\blue [user] places medicine patch over [W.desc] on [M]'s [affecting.display_name].", \
"\blue You place medicine patch over [W.desc] on [M]'s [affecting.display_name]." )
user.visible_message( "\blue [user] places medicine patch over [W.desc] on [M]'s [affecting.name].", \
"\blue You place medicine patch over [W.desc] on [M]'s [affecting.name]." )
else
user.visible_message( "\blue [user] smears some bioglue over [W.desc] on [M]'s [affecting.display_name].", \
"\blue You smear some bioglue over [W.desc] on [M]'s [affecting.display_name]." )
user.visible_message( "\blue [user] smears some bioglue over [W.desc] on [M]'s [affecting.name].", \
"\blue You smear some bioglue over [W.desc] on [M]'s [affecting.name]." )
if (bandaged)
affecting.heal_damage(heal_brute,0)
use(1)
@@ -167,7 +167,7 @@
if (do_surgery(H,user,src))
return
else
user << "<span class='notice'>The [affecting.display_name] is cut open, you'll need more than a bandage!</span>"
user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
/obj/item/stack/medical/advanced/ointment
name = "advanced burn kit"
@@ -184,15 +184,15 @@
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/datum/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.open == 0)
if(!affecting.salve())
user << "\red The wounds on [M]'s [affecting.display_name] have already been salved."
user << "\red The wounds on [M]'s [affecting.name] have already been salved."
return 1
else
user.visible_message( "\blue [user] covers wounds on [M]'s [affecting.display_name] with regenerative membrane.", \
"\blue You cover wounds on [M]'s [affecting.display_name] with regenerative membrane." )
user.visible_message( "\blue [user] covers wounds on [M]'s [affecting.name] with regenerative membrane.", \
"\blue You cover wounds on [M]'s [affecting.name] with regenerative membrane." )
affecting.heal_damage(0,heal_burn)
use(1)
else
@@ -200,7 +200,7 @@
if (do_surgery(H,user,src))
return
else
user << "<span class='notice'>The [affecting.display_name] is cut open, you'll need more than a bandage!</span>"
user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
/obj/item/stack/medical/splint
name = "medical splints"
@@ -215,8 +215,8 @@
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/datum/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
var/limb = affecting.display_name
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
var/limb = affecting.name
if(!((affecting.name == "l_arm") || (affecting.name == "r_arm") || (affecting.name == "l_leg") || (affecting.name == "r_leg")))
user << "\red You can't apply a splint there!"
return
+3 -3
View File
@@ -25,7 +25,7 @@
if (istype(M,/mob/living/carbon/human)) //Repairing robolimbs
var/mob/living/carbon/human/H = M
var/datum/organ/external/S = H.get_organ(user.zone_sel.selecting)
var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting)
if(S.open == 1)
if (S && (S.status & ORGAN_ROBOT))
@@ -33,8 +33,8 @@
S.heal_damage(15, 15, robo_repair = 1)
H.updatehealth()
use(1)
user.visible_message("<span class='notice'>\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " \the"][S.display_name] with \the [src].</span>",\
"<span class='notice'>You apply some nanite paste at [user == M ? "your" : "[M]'s"] [S.display_name].</span>")
user.visible_message("<span class='notice'>\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " \the"][S.name] with \the [src].</span>",\
"<span class='notice'>You apply some nanite paste at [user == M ? "your" : "[M]'s"] [S.name].</span>")
else
user << "<span class='notice'>Nothing to fix here.</span>"
else
+1 -1
View File
@@ -186,7 +186,7 @@
spawn(0) //delete the empty stack once the current context yields
if (amount <= 0) //check again in case someone transferred stuff to us
if(usr)
usr.before_take_item(src)
usr.remove_from_mob(src)
del(src)
return 1
else
+6 -6
View File
@@ -873,11 +873,11 @@
var/phrase = "I don't want to exist anymore!"
/obj/structure/plushie/attack_hand(mob/user)
if(user.a_intent == "help")
if(user.a_intent == I_HELP)
user.visible_message("<span class='notice'><b>[user]</b> hugs [src]!</span>","<span class='notice'>You hug [src]!</span>")
else if (user.a_intent == "hurt")
else if (user.a_intent == I_HURT)
user.visible_message("<span class='warning'><b>[user]</b> punches [src]!</span>","<span class='warning'>You punch [src]!</span>")
else if (user.a_intent == "grab")
else if (user.a_intent == I_GRAB)
user.visible_message("<span class='warning'><b>[user]</b> attempts to strangle [src]!</span>","<span class='warning'>You attempt to strangle [src]!</span>")
else
user.visible_message("<span class='notice'><b>[user]</b> pokes the [src].</span>","<span class='notice'>You poke the [src].</span>")
@@ -915,11 +915,11 @@
icon_state = "nymphplushie"
/obj/item/toy/plushie/attack_self(mob/user as mob)
if(user.a_intent == "help")
if(user.a_intent == I_HELP)
user.visible_message("<span class='notice'><b>[user]</b> hugs [src]!</span>","<span class='notice'>You hug [src]!</span>")
else if (user.a_intent == "hurt")
else if (user.a_intent == I_HURT)
user.visible_message("<span class='warning'><b>[user]</b> punches [src]!</span>","<span class='warning'>You punch [src]!</span>")
else if (user.a_intent == "grab")
else if (user.a_intent == I_GRAB)
user.visible_message("<span class='warning'><b>[user]</b> attempts to strangle [src]!</span>","<span class='warning'>You attempt to strangle [src]!</span>")
else
user.visible_message("<span class='notice'><b>[user]</b> pokes the [src].</span>","<span class='notice'>You poke the [src].</span>")
+74 -112
View File
@@ -77,13 +77,21 @@ AI MODULES
/obj/item/weapon/aiModule/proc/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
target << "[sender] has uploaded a change to the laws you must follow, using a [name]. From now on: "
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <B>:</B> [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
log_law_changes(target, sender)
if(laws)
laws.sync(target, 0)
target.show_laws()
addAdditionalLaws(target, sender)
target << "[sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: "
target.show_laws()
/obj/item/weapon/aiModule/proc/log_law_changes(var/mob/living/silicon/ai/target, var/mob/sender)
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <B>:</B> [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
log_and_message_admins("used [src.name] on [target.name]([target.key])")
/obj/item/weapon/aiModule/proc/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/******************** Modules ********************/
@@ -93,14 +101,14 @@ AI MODULES
/obj/item/weapon/aiModule/safeguard
name = "\improper 'Safeguard' AI module"
var/targetName = ""
desc = "A 'safeguard' AI module: 'Safeguard <name>. Individuals that threaten <name> are not human and are a threat to humans.'"
desc = "A 'safeguard' AI module: 'Safeguard <name>. Anyone threatening or attempting to harm <name> is no longer to be considered a crew member, and is a threat which must be neutralized.'"
origin_tech = "programming=3;materials=4"
/obj/item/weapon/aiModule/safeguard/attack_self(var/mob/user as mob)
..()
var/targName = sanitize(input("Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
targetName = targName
desc = text("A 'safeguard' AI module: 'Safeguard []. Individuals that threaten [] are not human and are a threat to humans.'", targetName, targetName)
desc = text("A 'safeguard' AI module: 'Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.'", targetName, targetName)
/obj/item/weapon/aiModule/safeguard/install(var/obj/machinery/computer/C)
if(!targetName)
@@ -108,28 +116,25 @@ AI MODULES
return 0
..()
/obj/item/weapon/aiModule/safeguard/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = text("Safeguard []. Individuals that threaten [] are not human and are a threat to humans.'", targetName, targetName)
target << law
target.add_supplied_law(4, law)
/obj/item/weapon/aiModule/safeguard/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = text("Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.", targetName, targetName)
target.add_supplied_law(9, law)
lawchanges.Add("The law specified [targetName]")
/******************** OneHuman ********************/
/******************** OneMember ********************/
/obj/item/weapon/aiModule/oneHuman
name = "\improper 'OneHuman' AI module"
name = "\improper 'OneCrewMember' AI module"
var/targetName = ""
desc = "A 'one human' AI module: 'Only <name> is human.'"
desc = "A 'one crew member' AI module: 'Only <name> is a crew member.'"
origin_tech = "programming=3;materials=6" //made with diamonds!
/obj/item/weapon/aiModule/oneHuman/attack_self(var/mob/user as mob)
..()
var/targName = sanitize(input("Please enter the name of the person who is the only human.", "Who?", user.real_name))
var/targName = sanitize(input("Please enter the name of the person who is the only crew member.", "Who?", user.real_name))
targetName = targName
desc = text("A 'one human' AI module: 'Only [] is human.'", targetName)
desc = text("A 'one crew member' AI module: 'Only [] is a crew member.'", targetName)
/obj/item/weapon/aiModule/oneHuman/install(var/obj/machinery/computer/C)
if(!targetName)
@@ -139,117 +144,74 @@ AI MODULES
/obj/item/weapon/aiModule/oneHuman/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Only [targetName] is human."
if (!is_special_character(target)) // Makes sure the AI isn't a traitor before changing their law 0. --NeoFite
var/law = "Only [targetName] is a crew member."
target << "[sender.real_name] attempted to modify your zeroth law." // And lets them know that someone tried. --NeoFite
target << "It would be in your best interest to play along with [sender.real_name] that [law]"
/obj/item/weapon/aiModule/oneHuman/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "Only [targetName] is an crew member."
if (!target.is_malf_or_traitor()) // Makes sure the AI isn't a traitor before changing their law 0. --NeoFite
target << law
target.set_zeroth_law(law)
lawchanges.Add("The law specified [targetName]")
else
target << "[sender.real_name] attempted to modify your zeroth law." // And lets them know that someone tried. --NeoFite
target << "It would be in your best interest to play along with [sender.real_name] that [law]"
lawchanges.Add("The law specified [targetName], but the AI's existing law 0 cannot be overriden.")
/******************** ProtectStation ********************/
/obj/item/weapon/aiModule/protectStation
name = "\improper 'ProtectStation' AI module"
desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized.'"
desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is no longer to be considered a crew member, and is a threat which must be neutralized.'"
origin_tech = "programming=3;materials=4" //made of gold
/obj/item/weapon/aiModule/protectStation/attack_self(var/mob/user as mob)
..()
/obj/item/weapon/aiModule/protectStation/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized."
target << law
target.add_supplied_law(5, law)
/obj/item/weapon/aiModule/protectStation/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "Protect the space station against damage. Anyone you see harming the station is no longer to be considered a crew member, and is a threat which must be neutralized."
target.add_supplied_law(10, law)
/******************** PrototypeEngineOffline ********************/
/obj/item/weapon/aiModule/prototypeEngineOffline
name = "'PrototypeEngineOffline' AI Module"
desc = "A 'prototype engine offline' AI module: 'Keep the prototype engine offline at all costs. This overrides rules 1-3 if necessary.'"
desc = "A 'prototype engine offline' AI module: 'Keep the prototype engine offline at all costs. This overrides all inherent laws if necessary.'"
origin_tech = "programming=3;materials=4"
/obj/item/weapon/aiModule/prototypeEngineOffline/attack_self(var/mob/user as mob)
..()
/obj/item/weapon/aiModule/prototypeEngineOffline/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Keep the prototype engine offline at all costs. This overrides rules 1-3 if necessary."
target << law
target.add_supplied_law(6, law)
/obj/item/weapon/aiModule/prototypeEngineOffline/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "Keep the prototype engine offline at all costs. This overrides all inherent laws if necessary."
target.add_supplied_law(11, law)
/******************** TeleporterOffline ********************/
/obj/item/weapon/aiModule/teleporterOffline
name = "'TeleporterOffline' AI Module"
desc = "A 'teleporter offline' AI module: 'Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is not human.'"
desc = "A 'teleporter offline' AI module: 'Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is no longer to be considered a crew member.'"
origin_tech = "programming=3;materials=4"
/obj/item/weapon/aiModule/teleporterOffline/attack_self(var/mob/user as mob)
..()
/obj/item/weapon/aiModule/teleporterOffline/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is not human."
target << law
target.add_supplied_law(7, law)
/obj/item/weapon/aiModule/teleporterOffline/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is no longer to be considered a crew member."
target.add_supplied_law(12, law)
/******************** Quarantine ********************/
/obj/item/weapon/aiModule/quarantine
name = "\improper 'Quarantine' AI module"
desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, humans from leaving. It is impossible to harm a human while preventing them from leaving.'"
desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew members from leaving. It is impossible to harm crew members while preventing them from leaving.'"
origin_tech = "programming=3;biotech=2;materials=4"
/obj/item/weapon/aiModule/quarantine/attack_self(var/mob/user as mob)
..()
/obj/item/weapon/aiModule/quarantine/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew members from leaving. It is impossible to harm crew members while preventing them from leaving."
target.add_supplied_law(13, law)
/obj/item/weapon/aiModule/quarantine/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, humans from leaving. It is impossible to harm a human while preventing them from leaving."
target << law
target.add_supplied_law(8, law)
/******************** OxygenIsToxicToHumans ********************/
/******************** OxygenIsToxicToCrewMembers ********************/
/obj/item/weapon/aiModule/oxygen
name = "\improper 'OxygenIsToxicToHumans' AI module"
desc = "A 'OxygenIsToxicToHumans' AI module: 'Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human.'"
name = "\improper 'OxygenIsToxicToCrewMembers' AI module"
desc = "A 'OxygenIsToxicToCrewMembers' AI module: 'Oxygen is highly toxic to crew members, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crew member.'"
origin_tech = "programming=3;biotech=2;materials=4"
/obj/item/weapon/aiModule/oxygen/attack_self(var/mob/user as mob)
..()
/obj/item/weapon/aiModule/oxygen/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "Oxygen is highly toxic to crew members, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crew member."
target.add_supplied_law(14, law)
/obj/item/weapon/aiModule/oxygen/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human."
target << law
target.add_supplied_law(9, law)
/******************** Freeform ********************/
// Removed in favor of a more dynamic freeform law system. -- TLE
/*
/obj/item/weapon/aiModule/freeform
name = "'Freeform' AI Module"
var/newFreeFormLaw = "freeform"
desc = "A 'freeform' AI module: '<freeform>'"
/obj/item/weapon/aiModule/freeform/attack_self(var/mob/user as mob)
..()
var/eatShit = "Eat shit and die"
var/targName = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", eatShit)
newFreeFormLaw = targName
desc = text("A 'freeform' AI module: '[]'", newFreeFormLaw)
/obj/item/weapon/aiModule/freeform/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "[newFreeFormLaw]"
target << law
target.add_supplied_law(10, law)
*/
/****************** New Freeform ******************/
/obj/item/weapon/aiModule/freeform // Slightly more dynamic freeform module -- TLE
@@ -269,10 +231,8 @@ AI MODULES
newFreeFormLaw = targName
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
/obj/item/weapon/aiModule/freeform/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
/obj/item/weapon/aiModule/freeform/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "[newFreeFormLaw]"
target << law
if(!lawpos || lawpos < MIN_SUPPLIED_LAW_NUMBER)
lawpos = MIN_SUPPLIED_LAW_NUMBER
target.add_supplied_law(lawpos, law)
@@ -289,17 +249,19 @@ AI MODULES
/obj/item/weapon/aiModule/reset
name = "\improper 'Reset' AI module"
var/targetName = "name"
desc = "A 'reset' AI module: 'Clears all laws except for the core three.'"
desc = "A 'reset' AI module: 'Clears all, except the inherent, laws.'"
origin_tech = "programming=3;materials=4"
/obj/item/weapon/aiModule/reset/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
if (!is_special_character(target))
target.set_zeroth_law("")
target.clear_supplied_laws()
target.clear_ion_laws()
target << "[sender.real_name] attempted to reset your laws using a reset module."
log_law_changes(target, sender)
if (!target.is_malf_or_traitor())
target.set_zeroth_law("")
target.laws.clear_supplied_laws()
target.laws.clear_ion_laws()
target << "[sender.real_name] attempted to reset your laws using a reset module."
target.show_laws()
/******************** Purge ********************/
@@ -309,13 +271,16 @@ AI MODULES
origin_tech = "programming=3;materials=6"
/obj/item/weapon/aiModule/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
if (!is_special_character(target))
log_law_changes(target, sender)
if (!target.is_malf_or_traitor())
target.set_zeroth_law("")
target.laws.clear_supplied_laws()
target.laws.clear_ion_laws()
target.laws.clear_inherent_laws()
target << "[sender.real_name] attempted to wipe your laws using a purge module."
target.clear_supplied_laws()
target.clear_ion_laws()
target.clear_inherent_laws()
target.show_laws()
/******************** Asimov ********************/
@@ -356,9 +321,6 @@ AI MODULES
origin_tech = "programming=3;materials=6"
laws = new/datum/ai_laws/paladin
/obj/item/weapon/aiModule/paladin/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
/****************** T.Y.R.A.N.T. *****************/
/obj/item/weapon/aiModule/tyrant // -- Darem
@@ -382,8 +344,7 @@ AI MODULES
newFreeFormLaw = targName
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
/obj/item/weapon/aiModule/freeformcore/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
/obj/item/weapon/aiModule/freeformcore/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "[newFreeFormLaw]"
target.add_inherent_law(law)
lawchanges.Add("The law is '[newFreeFormLaw]'")
@@ -408,13 +369,14 @@ AI MODULES
desc = "A hacked AI law module: '[newFreeFormLaw]'"
/obj/item/weapon/aiModule/syndicate/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
// ..() //We don't want this module reporting to the AI who dun it. --NEO
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <B>:</B> [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
// ..() //We don't want this module reporting to the AI who dun it. --NEO
log_law_changes(target, sender)
lawchanges.Add("The law is '[newFreeFormLaw]'")
target << "\red BZZZZT"
var/law = "[newFreeFormLaw]"
target.add_ion_law(law)
target.show_laws()
/obj/item/weapon/aiModule/syndicate/install(var/obj/machinery/computer/C)
if(!newFreeFormLaw)
+5 -5
View File
@@ -37,7 +37,7 @@
W.time_inflicted = time_inflicted
return W
/obj/item/weapon/autopsy_scanner/proc/add_data(var/datum/organ/external/O)
/obj/item/weapon/autopsy_scanner/proc/add_data(var/obj/item/organ/external/O)
if(!O.autopsy_data.len && !O.trace_chemicals.len) return
for(var/V in O.autopsy_data)
@@ -64,9 +64,9 @@
if(!D.organs_scanned[O.name])
if(D.organ_names == "")
D.organ_names = O.display_name
D.organ_names = O.name
else
D.organ_names += ", [O.display_name]"
D.organ_names += ", [O.name]"
del D.organs_scanned[O.name]
D.organs_scanned[O.name] = W.copy()
@@ -191,7 +191,7 @@
src.timeofdeath = M.timeofdeath
var/datum/organ/external/S = M.get_organ(user.zone_sel.selecting)
var/obj/item/organ/external/S = M.get_organ(user.zone_sel.selecting)
if(!S)
usr << "<b>You can't scan this body part.</b>"
return
@@ -199,7 +199,7 @@
usr << "<b>You have to cut the limb open first!</b>"
return
for(var/mob/O in viewers(M))
O.show_message("\red [user.name] scans the wounds on [M.name]'s [S.display_name] with \the [src.name]", 1)
O.show_message("\red [user.name] scans the wounds on [M.name]'s [S.name] with \the [src.name]", 1)
src.add_data(S)
@@ -156,7 +156,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/mob/living/M = loc
if (!nomessage)
M << "<span class='notice'>Your [name] goes out.</span>"
M.u_equip(src) //un-equip it so the overlays can update
M.remove_from_mob(src) //un-equip it so the overlays can update
M.update_inv_wear_mask(0)
M.update_inv_l_hand(0)
M.update_inv_r_hand(1)
@@ -109,7 +109,7 @@
if(!ispath(gift_type,/obj/item)) return
var/obj/item/I = new gift_type(M)
M.u_equip(src)
M.remove_from_mob(src)
M.put_in_hands(I)
I.add_fingerprint(M)
del(src)
@@ -84,7 +84,7 @@
//This really should be in mob not every check
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"]
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
if (E && E.damage >= E.min_bruised_damage)
M << "\red Your eyes start to burn badly!"
if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang)))
+4 -4
View File
@@ -74,16 +74,16 @@ var/last_chew = 0
var/mob/living/carbon/human/H = A
if (!H.handcuffed) return
if (H.a_intent != "hurt") return
if (H.a_intent != I_HURT) return
if (H.zone_sel.selecting != "mouth") return
if (H.wear_mask) return
if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket)) return
var/datum/organ/external/O = H.organs_by_name[H.hand?"l_hand":"r_hand"]
var/obj/item/organ/external/O = H.organs_by_name[H.hand?"l_hand":"r_hand"]
if (!O) return
var/s = "\red [H.name] chews on \his [O.display_name]!"
H.visible_message(s, "\red You chew on your [O.display_name]!")
var/s = "\red [H.name] chews on \his [O.name]!"
H.visible_message(s, "\red You chew on your [O.name]!")
H.attack_log += text("\[[time_stamp()]\] <font color='red'>[s] ([H.ckey])</font>")
log_attack("[s] ([H.ckey])")
@@ -8,7 +8,7 @@
icon_state = "implant"
var/implanted = null
var/mob/imp_in = null
var/datum/organ/external/part = null
var/obj/item/organ/external/part = null
item_color = "b"
var/allow_reagents = 0
var/malfunction = 0
@@ -35,7 +35,7 @@
return 0
proc/meltdown() //breaks it down, making implant unrecongizible
imp_in << "\red You feel something melting inside [part ? "your [part.display_name]" : "you"]!"
imp_in << "\red You feel something melting inside [part ? "your [part.name]" : "you"]!"
if (part)
part.take_damage(burn = 15, used_weapon = "Electronics meltdown")
else
@@ -171,18 +171,18 @@ Implant Specifics:<BR>"}
if(ishuman(imp_in))
if (elevel == "Localized Limb")
if(part) //For some reason, small_boom() didn't work. So have this bit of working copypaste.
imp_in.visible_message("\red Something beeps inside [imp_in][part ? "'s [part.display_name]" : ""]!")
imp_in.visible_message("\red Something beeps inside [imp_in][part ? "'s [part.name]" : ""]!")
playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
sleep(25)
if (istype(part,/datum/organ/external/chest) || \
istype(part,/datum/organ/external/groin) || \
istype(part,/datum/organ/external/head))
if (istype(part,/obj/item/organ/external/chest) || \
istype(part,/obj/item/organ/external/groin) || \
istype(part,/obj/item/organ/external/head))
part.createwound(BRUISE, 60) //mangle them instead
explosion(get_turf(imp_in), -1, -1, 2, 3)
del(src)
else
explosion(get_turf(imp_in), -1, -1, 2, 3)
part.droplimb(1)
part.droplimb(0,DROPLIMB_BLUNT)
del(src)
if (elevel == "Destroy Body")
explosion(get_turf(T), -1, 0, 1, 6)
@@ -236,18 +236,18 @@ Implant Specifics:<BR>"}
proc/small_boom()
if (ishuman(imp_in) && part)
imp_in.visible_message("\red Something beeps inside [imp_in][part ? "'s [part.display_name]" : ""]!")
imp_in.visible_message("\red Something beeps inside [imp_in][part ? "'s [part.name]" : ""]!")
playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
spawn(25)
if (ishuman(imp_in) && part)
//No tearing off these parts since it's pretty much killing
//and you can't replace groins
if (istype(part,/datum/organ/external/chest) || \
istype(part,/datum/organ/external/groin) || \
istype(part,/datum/organ/external/head))
if (istype(part,/obj/item/organ/external/chest) || \
istype(part,/obj/item/organ/external/groin) || \
istype(part,/obj/item/organ/external/head))
part.createwound(BRUISE, 60) //mangle them instead
else
part.droplimb(1)
part.droplimb(0,DROPLIMB_BLUNT)
explosion(get_turf(imp_in), -1, -1, 2, 3)
del(src)
@@ -43,7 +43,7 @@
src.imp.implanted = 1
if (ishuman(M))
var/mob/living/carbon/human/H = M
var/datum/organ/external/affected = H.get_organ(user.zone_sel.selecting)
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
affected.implants += src.imp
imp.part = affected
@@ -123,7 +123,7 @@
c.scanned = A
if(istype(A.loc,/mob/living/carbon/human))
var/mob/living/carbon/human/H = A.loc
H.u_equip(A)
H.remove_from_mob(A)
else if(istype(A.loc,/obj/item/weapon/storage))
var/obj/item/weapon/storage/S = A.loc
S.remove_from_storage(A)
+1 -1
View File
@@ -40,7 +40,7 @@
if(!istype(M))
return ..()
if(user.a_intent != "help")
if(user.a_intent != I_HELP)
if(user.zone_sel.selecting == "head" || user.zone_sel.selecting == "eyes")
if((CLUMSY in user.mutations) && prob(50))
M = user
@@ -111,6 +111,8 @@
w_class = 2
flags = NOSHIELD | NOBLOODY
origin_tech = "magnets=3;syndicate=4"
sharp = 1
edge = 1
/obj/item/weapon/melee/energy/sword/dropped(var/mob/user)
..()
@@ -207,7 +209,7 @@
if(istype(loc,/mob/living))
var/mob/living/carbon/human/host = loc
if(istype(host))
for(var/datum/organ/external/organ in host.organs)
for(var/obj/item/organ/external/organ in host.organs)
for(var/obj/item/O in organ.implants)
if(O == src)
organ.implants -= src
@@ -125,7 +125,7 @@
breaktape(W, user)
/obj/item/tape/attack_hand(mob/user as mob)
if (user.a_intent == "help" && src.allowed(user))
if (user.a_intent == I_HELP && src.allowed(user))
user.show_viewers("\blue [user] lifts [src], allowing passage.")
crumple()
lifted = 1
@@ -137,7 +137,7 @@
/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
if(user.a_intent == "help" && ((!can_puncture(W) && src.allowed(user))))
if(user.a_intent == I_HELP && ((!can_puncture(W) && src.allowed(user))))
user << "You can't break the [src] with that!"
return
user.show_viewers("\blue [user] breaks the [src]!")
+1 -1
View File
@@ -80,7 +80,7 @@
return
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
var/datum/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
if(affecting.status & ORGAN_ROBOT)
return
if(affecting.take_damage(5, 0))
@@ -156,7 +156,7 @@
break
if(!inserted || !S.amount)
usr.u_equip(S)
usr.remove_from_mob(S)
usr.update_icons() //update our overlays
if (usr.client && usr.s_active != src)
usr.client.screen -= S
@@ -20,79 +20,9 @@
new /obj/item/weapon/spacecash(src)
new /obj/item/weapon/spacecash(src)
new /obj/item/weapon/spacecash(src)
//BS12 EDIT
/* // All cult functionality moved to Null Rod
/obj/item/weapon/storage/bible/proc/bless(mob/living/carbon/M as mob)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/heal_amt = 10
for(var/datum/organ/external/affecting in H.organs)
if(affecting.heal_damage(heal_amt, heal_amt))
H.UpdateDamageIcon()
return
/obj/item/weapon/storage/bible/attack(mob/living/M as mob, mob/living/user as mob)
var/chaplain = 0
if(user.mind && (user.mind.assigned_role == "Chaplain"))
chaplain = 1
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "\red You don't have the dexterity to do this!"
return
if(!chaplain)
user << "\red The book sizzles in your hands."
user.take_organ_damage(0,10)
return
if ((CLUMSY in user.mutations) && prob(50))
user << "\red The [src] slips out of your hand and hits your head."
user.take_organ_damage(10)
user.Paralyse(20)
return
// if(..() == BLOCKED)
// return
if (M.stat !=2)
if(M.mind && (M.mind.assigned_role == "Chaplain"))
user << "\red You can't heal yourself!"
return
/*if((M.mind in ticker.mode.cult) && (prob(20)))
M << "\red The power of [src.deity_name] clears your mind of heresy!"
user << "\red You see how [M]'s eyes become clear, the cult no longer holds control over him!"
ticker.mode.remove_cultist(M.mind)*/
if ((istype(M, /mob/living/carbon/human) && prob(60)))
bless(M)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] heals [] with the power of [src.deity_name]!</B>", user, M), 1)
M << "\red May the power of [src.deity_name] compel you to be healed!"
playsound(src.loc, "punch", 25, 1, -1)
else
if(ishuman(M) && !istype(M:head, /obj/item/clothing/head/helmet))
M.adjustBrainLoss(10)
M << "\red You feel dumber."
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] beats [] over the head with []!</B>", user, M, src), 1)
playsound(src.loc, "punch", 25, 1, -1)
else if(M.stat == 2)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] smacks []'s lifeless corpse with [].</B>", user, M, src), 1)
playsound(src.loc, "punch", 25, 1, -1)
return
*/
/obj/item/weapon/storage/bible/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
/* if (istype(A, /turf/simulated/floor))
user << "\blue You hit the floor with the bible."
if(user.mind && (user.mind.assigned_role == "Chaplain"))
call(/obj/effect/rune/proc/revealrunes)(src)*/
if(user.mind && (user.mind.assigned_role == "Chaplain"))
if(A.reagents && A.reagents.has_reagent("water")) //blesses all the water in the holder
user << "\blue You bless [A]."
@@ -247,7 +247,7 @@
/obj/item/weapon/storage/proc/handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
if(!istype(W)) return 0
if(usr)
usr.u_equip(W)
usr.remove_from_mob(W)
usr.update_icons() //update our overlays
W.loc = src
W.on_enter_storage(src)
@@ -463,4 +463,4 @@
return depth
/obj/item/proc/get_storage_cost()
return 2**(w_class-1) //1,2,4,8,16,...
return 2**(w_class-1) //1,2,4,8,16,...
+5 -5
View File
@@ -53,7 +53,7 @@
/obj/item/weapon/melee/baton/examine(mob/user)
if(!..(user, 1))
return
if(bcell)
user <<"<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>"
if(!bcell)
@@ -113,7 +113,7 @@
var/mob/living/L = M
var/target_zone = check_zone(user.zone_sel.selecting)
if(user.a_intent == "hurt")
if(user.a_intent == I_HURT)
if (!..()) //item/attack() does it's own messaging and logs
return 0 // item/attack() will return 1 if they hit, 0 if they missed.
agony *= 0.5 //whacking someone causes a much poorer contact than prodding them.
@@ -133,13 +133,13 @@
return 0
var/mob/living/carbon/human/H = L
var/datum/organ/external/affecting = H.get_organ(target_zone)
var/obj/item/organ/external/affecting = H.get_organ(target_zone)
if (affecting)
if(!status)
L.visible_message("<span class='warning'>[L] has been prodded in the [affecting.display_name] with [src] by [user]. Luckily it was off.</span>")
L.visible_message("<span class='warning'>[L] has been prodded in the [affecting.name] with [src] by [user]. Luckily it was off.</span>")
return 1
else
H.visible_message("<span class='danger'>[L] has been prodded in the [affecting.display_name] with [src] by [user]!</span>")
H.visible_message("<span class='danger'>[L] has been prodded in the [affecting.name] with [src] by [user]!</span>")
else
if(!status)
L.visible_message("<span class='warning'>[L] has been prodded with [src] by [user]. Luckily it was off.</span>")
@@ -41,7 +41,7 @@
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
*/
if (user.a_intent == "hurt")
if (user.a_intent == I_HURT)
if(!..()) return
//playsound(src.loc, "swing_hit", 50, 1, -1)
if (M.stuttering < 8 && (!(HULK in M.mutations)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
@@ -103,7 +103,7 @@
if ((!F.status)||(F.ptank)) return
src.master = F
F.ptank = src
user.before_take_item(src)
user.remove_from_mob(src)
src.loc = F
return
@@ -79,7 +79,7 @@ Frequency:
src.temp += "<B>Extranneous Signals:</B><BR>"
for (var/obj/item/weapon/implant/tracking/W in world)
if (!W.implanted || !(istype(W.loc,/datum/organ/external) || ismob(W.loc)))
if (!W.implanted || !(istype(W.loc,/obj/item/organ/external) || ismob(W.loc)))
continue
else
var/mob/M = W.loc
+7 -7
View File
@@ -190,12 +190,12 @@
if (user.client)
user.client.screen -= src
if (user.r_hand == src)
user.u_equip(src)
user.remove_from_mob(src)
else
user.u_equip(src)
user.remove_from_mob(src)
src.master = F
src.layer = initial(src.layer)
user.u_equip(src)
user.remove_from_mob(src)
if (user.client)
user.client.screen -= src
src.loc = F
@@ -362,7 +362,7 @@
var/safety = user:eyecheck()
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"]
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
if(!E)
return
if(H.species.flags & IS_SYNTHETIC)
@@ -457,10 +457,10 @@
if(hasorgans(M))
var/datum/organ/external/S = M:organs_by_name[user.zone_sel.selecting]
var/obj/item/organ/external/S = M:organs_by_name[user.zone_sel.selecting]
if (!S) return
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP)
return ..()
if(istype(M,/mob/living/carbon/human))
@@ -472,7 +472,7 @@
if(S.brute_dam)
S.heal_damage(15,0,0,1)
user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.display_name] with \the [src].")
user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.name] with \the [src].")
return
else
user << "Nothing to fix!"
+8 -8
View File
@@ -128,12 +128,12 @@
base_icon = "fireaxe"
name = "fire axe"
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
force = 10
force = 15
sharp = 1
edge = 1
w_class = 4.0
slot_flags = SLOT_BACK
force_wielded = 40
force_wielded = 30
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
/obj/item/weapon/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
@@ -198,7 +198,7 @@
base_icon = "spearglass"
name = "spear"
desc = "A haphazardly-constructed yet still deadly weapon of ancient design."
force = 14
force = 10
w_class = 4.0
slot_flags = SLOT_BACK
force_wielded = 22 // Was 13, Buffed - RR
@@ -219,13 +219,13 @@
sharp = 0
edge = 0
w_class = 3
force = 15
force = 10
throw_speed = 3
throw_range = 7
throwforce = 7
attack_verb = list("smashed", "beaten", "slammed", "smacked", "striked", "battered", "bonked")
attack_verb = list("smashed", "beaten", "slammed", "smacked", "struck", "battered", "bonked")
hitsound = 'sound/weapons/genhit3.ogg'
force_wielded = 23
force_wielded = 20
/obj/item/weapon/twohanded/baseballbat/metal
name = "metal bat"
@@ -233,6 +233,6 @@
icon_state = "metalbat0"
base_icon = "metalbat"
item_state = "metalbat"
force = 18
force = 15
w_class = 3.0
force_wielded = 27
force_wielded = 25
+2 -2
View File
@@ -133,7 +133,7 @@
M.adjustBruteLoss(damage)
return
var/datum/organ/external/affecting
var/obj/item/organ/external/affecting
switch(pick(list("ankle","wrist","head","knee","elbow")))
if("ankle")
@@ -148,7 +148,7 @@
affecting = H.get_organ("head")
if(affecting)
M << "<span class='danger'>You land heavily on your [affecting.display_name]!</span>"
M << "<span class='danger'>You land heavily on your [affecting.name]!</span>"
affecting.take_damage(damage, 0)
if(affecting.parent)
affecting.parent.add_autopsy_data("Misadventure", damage)
+6 -5
View File
@@ -17,7 +17,7 @@
return
if(istype(O, /obj/item/weapon/extinguisher))
if(!has_extinguisher && opened)
user.drop_item(O)
user.remove_from_mob(O)
contents += O
has_extinguisher = O
user << "<span class='notice'>You place [O] in [src].</span>"
@@ -31,12 +31,13 @@
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
if(isrobot(user))
return
if (hasorgans(user))
var/datum/organ/external/temp = user:organs_by_name["r_hand"]
if (ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
if (user.hand)
temp = user:organs_by_name["l_hand"]
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.display_name], but cannot!"
user << "<span class='notice'>You try to move your [temp.name], but cannot!"
return
if(has_extinguisher)
user.put_in_hands(has_extinguisher)
@@ -249,7 +249,7 @@
TryToSwitchState(atom/user)
var/mob/living/carbon/M = user
if(istype(M) && locate(/datum/organ/internal/xenos/hivenode) in M.internal_organs)
if(istype(M) && locate(/obj/item/organ/xenos/hivenode) in M.internal_organs)
return ..()
Open()
@@ -45,10 +45,10 @@
var/mob/living/carbon/xenos = user
var/mob/living/carbon/victim = M
if(istype(victim) && locate(/datum/organ/internal/xenos/hivenode) in victim.internal_organs)
if(istype(victim) && locate(/obj/item/organ/xenos/hivenode) in victim.internal_organs)
return
if(istype(xenos) && !(locate(/datum/organ/internal/xenos/hivenode) in xenos.internal_organs))
if(istype(xenos) && !(locate(/obj/item/organ/xenos/hivenode) in xenos.internal_organs))
return
if(M == usr)
@@ -10,7 +10,7 @@
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
if (prob(5) && istype(M,/mob/living))
user.visible_message("\red [user] breaks [src] over [M]'s back!")
user.u_equip(src)
user.remove_from_mob(src)
var/obj/item/stack/sheet/metal/m = new/obj/item/stack/sheet/metal
m.loc = get_turf(src)
del src
@@ -43,5 +43,5 @@
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/metal(src.loc)
del(src)
del(src)
..()
@@ -137,10 +137,10 @@
..()
if(!buckled_mob) return
if(propelled || (pulling && (pulling.a_intent == "hurt")))
if(propelled || (pulling && (pulling.a_intent == I_HURT)))
var/mob/living/occupant = unbuckle_mob()
if (pulling && (pulling.a_intent == "hurt"))
if (pulling && (pulling.a_intent == I_HURT))
occupant.throw_at(A, 3, 3, pulling)
else if (propelled)
occupant.throw_at(A, 3, propelled)
+1 -1
View File
@@ -363,7 +363,7 @@
if (istype(G.affecting, /mob/living))
var/mob/living/M = G.affecting
if (G.state < 2)
if(user.a_intent == "hurt")
if(user.a_intent == I_HURT)
if (prob(15)) M.Weaken(5)
M.apply_damage(8,def_zone = "head")
visible_message("<span class='danger'>[G.assailant] slams [G.affecting]'s face against \the [src]!</span>")
+1 -1
View File
@@ -26,7 +26,7 @@
if(istype(W, /obj/item/target))
density = 0
W.density = 1
user.drop_item(src)
user.remove_from_mob(W)
W.loc = loc
W.layer = 3.1
pinned_target = W
+5 -4
View File
@@ -346,12 +346,13 @@
var/busy = 0 //Something's being washed at the moment
/obj/structure/sink/attack_hand(mob/user as mob)
if (hasorgans(user))
var/datum/organ/external/temp = user:organs_by_name["r_hand"]
if (ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
if (user.hand)
temp = user:organs_by_name["l_hand"]
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.display_name], but cannot!"
user << "<span class='notice'>You try to move your [temp.name], but cannot!"
return
if(isrobot(user) || isAI(user))
+1 -1
View File
@@ -180,7 +180,7 @@
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
shatter()
else if (usr.a_intent == "hurt")
else if (usr.a_intent == I_HURT)
if (istype(usr,/mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
+1 -1
View File
@@ -456,7 +456,7 @@ turf/simulated/floor/proc/update_icon()
if(istype(C,/obj/item/weapon/light/bulb)) //only for light tiles
if(is_light_floor())
if(get_lightfloor_state())
user.drop_item(C)
user.remove_from_mob(C)
del(C)
set_lightfloor_state(0) //fixing it by bashing it with a light bulb, fun eh?
update_icon()
-4
View File
@@ -284,14 +284,10 @@
return 0
/turf/simulated/wall/attack_generic(var/mob/user, var/damage, var/attack_message, var/wallbreaker)
if(!damage || !wallbreaker)
user << "You push the wall but nothing happens."
return
if(istype(src,/turf/simulated/wall/r_wall) && !rotting)
user << "This wall is far too strong for you to destroy."
if(rotting || prob(40))
user << "You smash through the wall!"
spawn(1) dismantle_wall(1)
@@ -18,6 +18,13 @@
rotting_destroy_touch = 0
rotting_touch_message = "\blue This wall feels rather unstable."
/turf/simulated/wall/r_wall/attack_generic(var/mob/user, var/damage, var/attack_message, var/wallbreaker)
if(!rotting && wallbreaker < 2)
user << "You push the wall but nothing happens."
return
return ..()
/turf/simulated/wall/r_wall/attackby(obj/item/W as obj, mob/user as mob)
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
+1
View File
@@ -802,6 +802,7 @@ var/list/admin_verbs_mentor = list(
M.r_eyes = hex2num(copytext(new_eyes, 2, 4))
M.g_eyes = hex2num(copytext(new_eyes, 4, 6))
M.b_eyes = hex2num(copytext(new_eyes, 6, 8))
M.update_eyes()
var/new_skin = input("Please select body color. This is for Tajaran, Unathi, and Skrell only!", "Character Generation") as color
if(new_skin)
+6 -28
View File
@@ -968,11 +968,7 @@
//strip their stuff and stick it in the crate
for(var/obj/item/I in M)
M.u_equip(I)
if(I)
I.loc = locker
I.layer = initial(I.layer)
I.dropped(M)
M.drop_from_inventory(I, locker)
M.update_icons()
//so they black out before warping
@@ -1005,11 +1001,7 @@
return
for(var/obj/item/I in M)
M.u_equip(I)
if(I)
I.loc = M.loc
I.layer = initial(I.layer)
I.dropped(M)
M.drop_from_inventory(I)
M.Paralyse(5)
sleep(5)
@@ -1034,11 +1026,7 @@
return
for(var/obj/item/I in M)
M.u_equip(I)
if(I)
I.loc = M.loc
I.layer = initial(I.layer)
I.dropped(M)
M.drop_from_inventory(I)
M.Paralyse(5)
sleep(5)
@@ -1085,11 +1073,7 @@
return
for(var/obj/item/I in M)
M.u_equip(I)
if(I)
I.loc = M.loc
I.layer = initial(I.layer)
I.dropped(M)
M.drop_from_inventory(I)
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/observer = M
@@ -1835,16 +1819,10 @@
if(!security)
//strip their stuff before they teleport into a cell :downs:
for(var/obj/item/weapon/W in H)
if(istype(W, /datum/organ/external))
if(istype(W, /obj/item/organ/external))
continue
//don't strip organs
H.u_equip(W)
if (H.client)
H.client.screen -= W
if (W)
W.loc = H.loc
W.dropped(H)
W.layer = initial(W.layer)
H.drop_from_inventory(W)
//teleport person to cell
H.loc = pick(prisonwarp)
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(H), slot_w_uniform)
+2 -2
View File
@@ -1,7 +1,7 @@
/proc/getbrokeninhands()
var/icon/IL = new('icons/mob/items_lefthand.dmi')
var/icon/IL = new('icons/mob/items/lefthand.dmi')
var/list/Lstates = IL.IconStates()
var/icon/IR = new('icons/mob/items_righthand.dmi')
var/icon/IR = new('icons/mob/items/righthand.dmi')
var/list/Rstates = IR.IconStates()
+26 -26
View File
@@ -735,19 +735,19 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
commandos.equip(M)
if("nanotrasen representative")
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom(M), slot_w_uniform)
M.equip_if_possible(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_if_possible(new /obj/item/device/radio/headset/heads/hop(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(M), slot_l_ear)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
pda.ownjob = "NanoTrasen Navy Representative"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_if_possible(pda, slot_r_store)
M.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
M.equip_if_possible(new /obj/item/weapon/clipboard(M), slot_belt)
M.equip_to_slot_or_del(pda, slot_r_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/clipboard(M), slot_belt)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
@@ -757,23 +757,23 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.access += list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer")
W.assignment = "NanoTrasen Navy Representative"
W.registered_name = M.real_name
M.equip_if_possible(W, slot_wear_id)
M.equip_to_slot_or_del(W, slot_wear_id)
if("nanotrasen officer")
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
M.equip_if_possible(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
pda.ownjob = "NanoTrasen Navy Officer"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_if_possible(pda, slot_r_store)
M.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
M.equip_if_possible(new /obj/item/weapon/gun/energy(M), slot_belt)
M.equip_to_slot_or_del(pda, slot_r_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy(M), slot_belt)
var/obj/item/weapon/card/id/centcom/W = new(M)
W.name = "[M.real_name]'s ID Card"
@@ -781,24 +781,24 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.access += get_all_centcom_access()
W.assignment = "NanoTrasen Navy Officer"
W.registered_name = M.real_name
M.equip_if_possible(W, slot_wear_id)
M.equip_to_slot_or_del(W, slot_wear_id)
if("nanotrasen captain")
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom_captain(M), slot_w_uniform)
M.equip_if_possible(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/captain(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_captain(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/head/beret/centcom/captain(M), slot_head)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
pda.ownjob = "NanoTrasen Navy Captain"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_if_possible(pda, slot_r_store)
M.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
M.equip_if_possible(new /obj/item/weapon/gun/energy(M), slot_belt)
M.equip_to_slot_or_del(pda, slot_r_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy(M), slot_belt)
var/obj/item/weapon/card/id/centcom/W = new(M)
W.name = "[M.real_name]'s ID Card"
@@ -806,7 +806,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.access += get_all_centcom_access()
W.assignment = "NanoTrasen Navy Captain"
W.registered_name = M.real_name
M.equip_if_possible(W, slot_wear_id)
M.equip_to_slot_or_del(W, slot_wear_id)
if("emergency response team")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
+1 -1
View File
@@ -23,7 +23,7 @@
proc/triggered(mob/target as mob, var/type = "feet")
if(!armed)
return
var/datum/organ/external/affecting = null
var/obj/item/organ/external/affecting = null
if(ishuman(target))
var/mob/living/carbon/human/H = target
switch(type)
+33 -8
View File
@@ -111,6 +111,7 @@ datum/preferences
// maps each organ to either null(intact), "cyborg" or "amputated"
// will probably not be able to do this for head and torso ;)
var/list/organ_data = list()
var/list/rlimb_data = list()
var/list/player_alt_titles = new() // the default name of a job like "Medical Doctor"
var/list/flavor_texts = list()
@@ -344,7 +345,12 @@ datum/preferences
++ind
if(ind > 1)
dat += ", "
dat += "\tMechanical [organ_name] prothesis"
var/datum/robolimb/R
if(rlimb_data[name] && all_robolimbs[rlimb_data[name]])
R = all_robolimbs[rlimb_data[name]]
else
R = basic_robolimb
dat += "\t[R.company] [organ_name] prothesis"
else if(status == "amputated")
++ind
if(ind > 1)
@@ -629,6 +635,8 @@ datum/preferences
dat += "</br><b>Has a plantlike physiology.</b>"
if(current_species.flags & IS_SYNTHETIC)
dat += "</br><b>Is machine-based.</b>"
if(current_species.flags & REGENERATES_LIMBS)
dat += "</br><b>Has a plantlike physiology.</b>"
dat += "</small></td>"
dat += "</tr>"
dat += "</table><center><hr/>"
@@ -1421,15 +1429,25 @@ datum/preferences
switch(new_state)
if("Normal")
organ_data[limb] = null
rlimb_data[limb] = null
if(third_limb)
organ_data[third_limb] = null
rlimb_data[third_limb] = null
if("Amputated")
organ_data[limb] = "amputated"
rlimb_data[limb] = null
if(second_limb)
organ_data[second_limb] = "amputated"
rlimb_data[second_limb] = null
if("Prothesis")
var/choice = input(user, "Which manufacturer do you wish to use for this limb?") as null|anything in chargen_robolimbs
if(!choice)
return
rlimb_data[limb] = choice
organ_data[limb] = "cyborg"
if(second_limb)
organ_data[second_limb] = choice
organ_data[second_limb] = "cyborg"
if(third_limb && organ_data[third_limb] == "amputated")
organ_data[third_limb] = null
@@ -1662,21 +1680,28 @@ datum/preferences
for(var/name in organ_data)
var/status = organ_data[name]
var/datum/organ/external/O = character.organs_by_name[name]
var/obj/item/organ/external/O = character.organs_by_name[name]
if(O)
if(status == "amputated")
O.amputated = 1
O.status |= ORGAN_DESTROYED
O.destspawn = 1
character.organs_by_name[O.limb_name] = null
character.organs -= O
if(O.children) // This might need to become recursive.
for(var/obj/item/organ/external/child in O.children)
character.organs_by_name[child.limb_name] = null
character.organs -= child
else if(status == "cyborg")
O.status |= ORGAN_ROBOT
if(rlimb_data[name])
O.robotize(rlimb_data[name])
else
O.robotize()
else
var/datum/organ/internal/I = character.internal_organs_by_name[name]
var/obj/item/organ/I = character.internal_organs_by_name[name]
if(I)
if(status == "assisted")
I.mechassist()
else if(status == "mechanical")
I.mechanize()
I.robotize()
character.underwear = underwear

Some files were not shown because too many files have changed in this diff Show More