This commit is contained in:
Nanai
2013-10-19 13:13:02 -04:00
213 changed files with 17493 additions and 16999 deletions

View File

@@ -233,8 +233,10 @@ var/list/admin_verbs_mod = list(
/client/proc/cmd_mod_say,
/datum/admins/proc/show_player_info,
/client/proc/player_panel_new,
/client/proc/dsay,
/datum/admins/proc/show_skills,
/client/proc/dsay
/client/proc/jobbans,
/client/proc/cmd_admin_subtle_message /*send an message to somebody as a 'voice in their head'*/
)
/client/proc/add_admin_verbs()
if(holder)
@@ -591,15 +593,6 @@ var/list/admin_verbs_mod = list(
log_admin("[key_name(usr)] used 'kill air'.")
message_admins("\blue [key_name_admin(usr)] used 'kill air'.", 1)
/client/proc/toggle_clickproc() //TODO ERRORAGE (This is a temporary verb here while I test the new clicking proc)
set name = "Toggle NewClickProc"
set category = "Debug"
if(!holder) return
using_new_click_proc = !using_new_click_proc
world << "Testing of new click proc [using_new_click_proc ? "enabled" : "disabled"]"
feedback_add_details("admin_verb","TNCP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/deadmin_self()
set name = "De-admin self"
set category = "Admin"

View File

@@ -12,8 +12,8 @@
<html>
<head>
<title>Permissions Panel</title>
<script type='text/javascript' src='html/search.js'></script>
<link rel='stylesheet' type='text/css' href='html/panels.css'>
<script type='text/javascript' src='search.js'></script>
<link rel='stylesheet' type='text/css' href='panels.css'>
</head>
<body onload='selectTextField();updateSearch();'>
<div id='main'><table id='searchable' cellspacing='0'>

View File

@@ -610,7 +610,7 @@
//JOBBAN'S INNARDS
else if(href_list["jobban3"])
if(!check_rights(R_BAN)) return
if(!check_rights(R_MOD,0) && !check_rights(R_ADMIN)) return
var/mob/M = locate(href_list["jobban4"])
if(!ismob(M))
@@ -715,6 +715,7 @@
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
if("No")
if(!check_rights(R_BAN)) return
var/reason = input(usr,"Reason?","Please State Reason","") as text|null
if(reason)
var/msg
@@ -812,7 +813,7 @@
DB_ban_unban(ckey(key), BANTYPE_JOB_PERMA, job)
else if(href_list["newban"])
if(!check_rights(R_BAN)) return
if(!check_rights(R_MOD,0) && !check_rights(R_BAN)) return
var/mob/M = locate(href_list["newban"])
if(!ismob(M)) return
@@ -845,6 +846,7 @@
del(M.client)
//del(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
if("No")
if(check_rights(R_BAN)) return
var/reason = input(usr,"Reason?","reason","Griefer") as text|null
if(!reason)
return
@@ -885,7 +887,7 @@
unjobbanpanel()
else if(href_list["mute"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_MOD,0) && !check_rights(R_ADMIN)) return
var/mob/M = locate(href_list["mute"])
if(!ismob(M)) return
@@ -1501,7 +1503,7 @@
usr.client.cmd_admin_direct_narrate(M)
else if(href_list["subtlemessage"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_MOD,0) && !check_rights(R_ADMIN)) return
var/mob/M = locate(href_list["subtlemessage"])
usr.client.cmd_admin_subtle_message(M)
@@ -2591,4 +2593,4 @@
show_player_info(ckey)
if("list")
PlayerNotesPage(text2num(href_list["index"]))
return
return

View File

@@ -78,15 +78,15 @@
largest_move_time = M.next_move - world.time
else
largest_move_time = 1
if(M.lastDblClick >= largest_click_time)
if(M.next_click >= largest_click_time)
largest_click_mob = M
if(M.lastDblClick > world.time)
largest_click_time = M.lastDblClick - world.time
if(M.next_click > world.time)
largest_click_time = M.next_click - world.time
else
largest_click_time = 0
log_admin("DEBUG: [key_name(M)] next_move = [M.next_move] lastDblClick = [M.lastDblClick] world.time = [world.time]")
log_admin("DEBUG: [key_name(M)] next_move = [M.next_move] next_click = [M.next_click] world.time = [world.time]")
M.next_move = 1
M.lastDblClick = 0
M.next_click = 0
message_admins("[key_name_admin(largest_move_mob)] had the largest move delay with [largest_move_time] frames / [largest_move_time/10] seconds!", 1)
message_admins("[key_name_admin(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [largest_click_time/10] seconds!", 1)
message_admins("world.time = [world.time]", 1)

View File

@@ -132,7 +132,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
if(!M.client)
usr << "<font color='red'>Error: cmd_admin_mute: This mob doesn't have a client tied to it.</font>"
if(M.client.holder)
usr << "<font color='red'>Error: cmd_admin_mute: You cannot mute an admin.</font>"
usr << "<font color='red'>Error: cmd_admin_mute: You cannot mute an admin/mod.</font>"
if(!M.client) return
if(M.client.holder) return

View File

@@ -69,6 +69,7 @@ datum/preferences
var/language = "None" //Secondary language
//Mob preview
var/icon/preview_icon = null
var/icon/preview_icon_front = null
var/icon/preview_icon_side = null

View File

@@ -141,6 +141,9 @@ BLIND // can't see anything
cell.reliability -= 10 / severity
..()
// Called just before an attack_hand(), in mob/UnarmedAttack()
/obj/item/clothing/gloves/proc/Touch(var/atom/A, var/proximity)
return 0 // return 1 to cancel attack_hand()
//Head
/obj/item/clothing/head
@@ -310,9 +313,6 @@ BLIND // can't see anything
if(usr.stat) return
if(hastie)
usr.put_in_hands(hastie)
hastie = null
if (istype(hastie,/obj/item/clothing/tie/holster))
verbs -= /obj/item/clothing/under/proc/holster
@@ -320,7 +320,10 @@ BLIND // can't see anything
verbs -= /obj/item/clothing/under/proc/storage
var/obj/item/clothing/tie/storage/W = hastie
if (W.hold)
W.hold.loc = hastie
W.hold.close(usr)
usr.put_in_hands(hastie)
hastie = null
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc

View File

@@ -1,14 +1,3 @@
/obj/item/clothing/gloves/space_ninja
desc = "These nano-enhanced gloves insulate from electricity and provide fire resistance."
name = "ninja gloves"
icon_state = "s-ninja"
item_state = "s-ninja"
siemens_coefficient = 0.2
var/draining = 0
var/candrain = 0
var/mindrain = 200
var/maxdrain = 400
/obj/item/clothing/gloves/captain
desc = "Regal blue gloves, with a nice gold trim. Swanky."
name = "captain's gloves"

View File

@@ -0,0 +1,113 @@
/*
Dear ninja gloves
This isn't because I like you
this is because your father is a bastard
...
I guess you're a little cool.
-Sayu
*/
/obj/item/clothing/gloves/space_ninja
desc = "These nano-enhanced gloves insulate from electricity and provide fire resistance."
name = "ninja gloves"
icon_state = "s-ninja"
item_state = "s-ninja"
siemens_coefficient = 0
var/draining = 0
var/candrain = 0
var/mindrain = 200
var/maxdrain = 400
/*
This runs the gamut of what ninja gloves can do
The other option would be a dedicated ninja touch bullshit proc on everything
which would probably more efficient, but ninjas are pretty rare.
This was mostly introduced to keep ninja code from contaminating other code;
with this in place it would be easier to untangle the rest of it.
For the drain proc, see events/ninja.dm
*/
/obj/item/clothing/gloves/space_ninja/Touch(var/atom/A,var/proximity)
if(!candrain || draining) return 0
var/mob/living/carbon/human/H = loc
if(!istype(H)) return 0 // what
var/obj/item/clothing/suit/space/space_ninja/suit = H.wear_suit
if(!istype(suit)) return 0
if(isturf(A)) return 0
if(!proximity) // todo: you could add ninja stars or computer hacking here
return 0
// Move an AI into and out of things
if(istype(A,/mob/living/silicon/ai))
if(suit.s_control)
A.add_fingerprint(H)
suit.transfer_ai("AICORE", "NINJASUIT", A, H)
return 1
else
H << "\red <b>ERROR</b>: \black Remote access channel disabled."
return 0
if(istype(A,/obj/structure/AIcore/deactivated))
if(suit.s_control)
A.add_fingerprint(H)
suit.transfer_ai("INACTIVE","NINJASUIT",A, H)
return 1
else
H << "\red <b>ERROR</b>: \black Remote access channel disabled."
return 0
if(istype(A,/obj/machinery/computer/aifixer))
if(suit.s_control)
A.add_fingerprint(H)
suit.transfer_ai("AIFIXER","NINJASUIT",A, H)
return 1
else
H << "\red <b>ERROR</b>: \black Remote access channel disabled."
return 0
// steal energy from powered things
if(istype(A,/mob/living/silicon/robot))
A.add_fingerprint(H)
drain("CYBORG",A,suit)
return 1
if(istype(A,/obj/machinery/power/apc))
A.add_fingerprint(H)
drain("APC",A,suit)
return 1
if(istype(A,/obj/structure/cable))
A.add_fingerprint(H)
drain("WIRE",A,suit)
return 1
if(istype(A,/obj/structure/grille))
var/obj/structure/cable/C = locate() in A.loc
if(C)
drain("WIRE",C,suit)
return 1
if(istype(A,/obj/machinery/power/smes))
A.add_fingerprint(H)
drain("SMES",A,suit)
return 1
if(istype(A,/obj/mecha))
A.add_fingerprint(H)
drain("MECHA",A,suit)
return 1
// download research
if(istype(A,/obj/machinery/computer/rdconsole))
A.add_fingerprint(H)
drain("RESEARCH",A,suit)
return 1
if(istype(A,/obj/machinery/r_n_d/server))
A.add_fingerprint(H)
var/obj/machinery/r_n_d/server/S = A
if(S.disabled)
return 1
if(S.shocked)
S.shock(H,50)
return 1
drain("RESEARCH",A,suit)
return 1

View File

@@ -18,14 +18,14 @@
if(!src.hanging)
src.hanging = !src.hanging
gas_transfer_coefficient = 1 //gas is now escaping to the turf and vice versa
flags_inv |= MASKCOVERSMOUTH | MASKINTERNALS
flags &= ~(MASKCOVERSMOUTH | MASKINTERNALS)
icon_state = "breathdown"
usr << "Your mask is now hanging on your neck."
else
src.hanging = !src.hanging
gas_transfer_coefficient = 0.10
flags_inv &= ~(MASKCOVERSMOUTH | MASKINTERNALS)
flags |= MASKCOVERSMOUTH | MASKINTERNALS
icon_state = "breath"
usr << "You pull the mask up to cover your face."
usr.update_inv_wear_mask()

View File

@@ -34,6 +34,13 @@
flags = FPRINT|TABLEPASS
flags_inv = HIDEFACE
/obj/item/clothing/mask/snorkel
name = "Snorkel"
desc = "For the Swimming Savant."
icon_state = "snorkel"
flags = FPRINT|TABLEPASS
flags_inv = HIDEFACE
//scarves (fit in in mask slot)
/obj/item/clothing/mask/bluescarf

View File

@@ -125,3 +125,11 @@
name = "laceup shoes"
desc = "The height of fashion, and they're pre-polished!"
icon_state = "laceups"
/obj/item/clothing/shoes/swimmingfins
desc = "Help you swim good."
name = "swimming fins"
icon_state = "flippers"
flags = NOSLIP
slowdown = SHOES_SLOWDOWN+1
species_restricted = null

View File

@@ -8,16 +8,14 @@
item_state = ""
w_class = 1
/obj/item/weapon/evidencebag/afterattack(obj/item/I, mob/user as mob)
/obj/item/weapon/evidencebag/afterattack(obj/item/I, mob/user as mob, proximity)
if(!proximity) return
if(!in_range(I, user))
return
if(!istype(I) || I.anchored == 1)
return ..()
if(istype(I, /obj/item/weapon/storage))
return ..()
if(istype(I, /obj/item/weapon/evidencebag))
user << "<span class='notice'>You find putting an evidence bag in another evidence bag to be slightly absurd.</span>"
return

View File

@@ -35,7 +35,8 @@
else
..()
/obj/item/weapon/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user as mob)
/obj/item/weapon/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
if(istype(A) && src in user)
user.visible_message("[user] starts to wipe down [A] with [src]!")
if(do_after(user,30))

View File

@@ -9,7 +9,7 @@
var/list/stored = list()
w_class = 3.0
item_state = "electronic"
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
flags = FPRINT | TABLEPASS | CONDUCT | NOBLUDGEON
slot_flags = SLOT_BELT
attackby(obj/item/weapon/f_card/W as obj, mob/user as mob)
@@ -64,9 +64,8 @@
user << "\blue Blood type: [M.blood_DNA[blood]]\nDNA: [blood]"
return
afterattack(atom/A as obj|turf|area, mob/user as mob)
if(!in_range(A,user))
return
afterattack(atom/A as obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
if(loc != user)
return
if(istype(A,/obj/machinery/computer/forensic_scanning)) //breaks shit.

View File

@@ -1,3 +0,0 @@
/datum/hud/proc/ghost_hud()
return

View File

@@ -30,6 +30,17 @@
T = get_turf(body) //Where is the body located?
attack_log = body.attack_log //preserve our attack logs by copying them to our ghost
if (ishuman(body))
var/mob/living/carbon/human/H = body
icon = H.stand_icon
overlays = H.overlays_standing
else
icon = body.icon
icon_state = body.icon_state
overlays = body.overlays
alpha = 127
gender = body.gender
if(body.mind && body.mind.name)
name = body.mind.name
@@ -63,7 +74,7 @@ Works together with spawning an observer, noted above.
if(key)
var/mob/dead/observer/ghost = new(src) //Transfer safety to observer spawning proc.
ghost.can_reenter_corpse = can_reenter_corpse
ghost.timeofdeath = timeofdeath //BS12 EDIT
ghost.timeofdeath = src.timeofdeath //BS12 EDIT
ghost.key = key
return ghost
@@ -78,14 +89,16 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(stat == DEAD)
ghostize(1)
else
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst still alive you may not play again this round! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body")
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost, you won't be able to play this round for another 30 minutes! You can't change your mind so choose wisely!)","Are you sure you want to ghost?","Ghost","Stay in body")
if(response != "Ghost") return //didn't want to ghost after-all
resting = 1
ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
var/mob/dead/observer/ghost = ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
return
/mob/dead/observer/Move(NewLoc, direct)
dir = direct
if(NewLoc)
loc = NewLoc
for(var/obj/effect/step_trigger/S in NewLoc)

View File

@@ -89,6 +89,7 @@
if(W)
if(client) client.screen -= W
u_equip(W)
if(!W) return 1 // self destroying objects (tk, grabs)
W.layer = initial(W.layer)
W.loc = loc

View File

@@ -1,242 +0,0 @@
/datum/hud/proc/alien_hud()
src.adding = list( )
src.other = list( )
var/obj/screen/using
var/obj/screen/inventory/inv_box
using = new /obj/screen()
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
//intent small hud objects
var/icon/ico
ico = new('icons/mob/screen1_alien.dmi', "black")
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.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
help_intent = using
ico = new('icons/mob/screen1_alien.dmi', "black")
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.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
disarm_intent = using
ico = new('icons/mob/screen1_alien.dmi', "black")
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.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
grab_intent = using
ico = new('icons/mob/screen1_alien.dmi', "black")
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.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
hurt_intent = using
//end intent small hud objects
using = new /obj/screen()
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
move_intent = using
using = new /obj/screen()
using.name = "drop"
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = "act_drop"
using.screen_loc = ui_drop_throw
using.layer = 19
src.adding += using
//equippable shit
//suit
inv_box = new /obj/screen/inventory()
inv_box.name = "o_clothing"
inv_box.dir = SOUTH
inv_box.icon = 'icons/mob/screen1_alien.dmi'
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_alien_oclothing
inv_box.slot_id = slot_wear_suit
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "r_hand"
inv_box.dir = WEST
inv_box.icon = 'icons/mob/screen1_alien.dmi'
inv_box.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
using.icon_state = "hand_active"
inv_box.screen_loc = ui_rhand
inv_box.layer = 19
src.r_hand_hud_object = inv_box
inv_box.slot_id = slot_r_hand
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "l_hand"
inv_box.dir = EAST
inv_box.icon = 'icons/mob/screen1_alien.dmi'
inv_box.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
inv_box.icon_state = "hand_active"
inv_box.screen_loc = ui_lhand
inv_box.layer = 19
inv_box.slot_id = slot_l_hand
src.l_hand_hud_object = inv_box
src.adding += inv_box
using = new /obj/screen/inventory()
using.name = "hand"
using.dir = SOUTH
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
using.layer = 19
src.adding += using
using = new /obj/screen/inventory()
using.name = "hand"
using.dir = SOUTH
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
using.layer = 19
src.adding += using
//pocket 1
inv_box = new /obj/screen/inventory()
inv_box.name = "storage1"
inv_box.icon = 'icons/mob/screen1_alien.dmi'
inv_box.icon_state = "pocket"
inv_box.screen_loc = ui_storage1
inv_box.slot_id = slot_l_store
inv_box.layer = 19
src.adding += inv_box
//pocket 2
inv_box = new /obj/screen/inventory()
inv_box.name = "storage2"
inv_box.icon = 'icons/mob/screen1_alien.dmi'
inv_box.icon_state = "pocket"
inv_box.screen_loc = ui_storage2
inv_box.slot_id = slot_r_store
inv_box.layer = 19
src.adding += inv_box
//head
inv_box = new /obj/screen/inventory()
inv_box.name = "head"
inv_box.icon = 'icons/mob/screen1_alien.dmi'
inv_box.icon_state = "hair"
inv_box.screen_loc = ui_alien_head
inv_box.slot_id = slot_head
inv_box.layer = 19
src.adding += inv_box
//end of equippable shit
/*
using = new /obj/screen()
using.name = "resist"
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = "act_resist"
using.screen_loc = ui_resist
using.layer = 19
src.adding += using
*/
mymob.throw_icon = new /obj/screen()
mymob.throw_icon.icon = 'icons/mob/screen1_alien.dmi'
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.screen_loc = ui_drop_throw
mymob.oxygen = new /obj/screen()
mymob.oxygen.icon = 'icons/mob/screen1_alien.dmi'
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_alien_oxygen
mymob.toxin = new /obj/screen()
mymob.toxin.icon = 'icons/mob/screen1_alien.dmi'
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_alien_toxin
mymob.fire = new /obj/screen()
mymob.fire.icon = 'icons/mob/screen1_alien.dmi'
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_alien_fire
mymob.healths = new /obj/screen()
mymob.healths.icon = 'icons/mob/screen1_alien.dmi'
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_alien_health
mymob.pullin = new /obj/screen()
mymob.pullin.icon = 'icons/mob/screen1_alien.dmi'
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_resist
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen()
mymob.flash.icon = 'icons/mob/screen1_alien.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = 'icons/mob/screen1_alien.dmi'
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
mymob.client.screen = null
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other

View File

@@ -133,24 +133,6 @@
updatehealth()
return
/mob/living/carbon/alien/humanoid/hand_p(mob/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (M.a_intent == "hurt")
if (istype(M.wear_mask, /obj/item/clothing/mask/muzzle))
return
if (health > 0)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
adjustBruteLoss(rand(1, 3))
updatehealth()
return
/mob/living/carbon/alien/humanoid/attack_paw(mob/living/carbon/monkey/M as mob)
if(!ismonkey(M)) return//Fix for aliens receiving double messages when attacking other aliens.
@@ -305,9 +287,9 @@
return
if ("grab")
if (M == src)
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, M, src)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
M.put_in_active_hand(G)

View File

@@ -1,85 +0,0 @@
/datum/hud/proc/larva_hud()
src.adding = list()
src.other = list()
var/obj/screen/using
using = new /obj/screen()
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
using = new /obj/screen()
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
move_intent = using
mymob.oxygen = new /obj/screen()
mymob.oxygen.icon = 'icons/mob/screen1_alien.dmi'
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_alien_oxygen
mymob.toxin = new /obj/screen()
mymob.toxin.icon = 'icons/mob/screen1_alien.dmi'
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_alien_toxin
mymob.fire = new /obj/screen()
mymob.fire.icon = 'icons/mob/screen1_alien.dmi'
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_alien_fire
mymob.healths = new /obj/screen()
mymob.healths.icon = 'icons/mob/screen1_alien.dmi'
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_alien_health
mymob.pullin = new /obj/screen()
mymob.pullin.icon = 'icons/mob/screen1_alien.dmi'
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_resist
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen()
mymob.flash.icon = 'icons/mob/screen1_alien.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
mymob.client.screen = null
mymob.client.screen += list( mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other

View File

@@ -140,28 +140,6 @@
return
/mob/living/carbon/alien/larva/hand_p(mob/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (M.a_intent == "hurt")
if (istype(M.wear_mask, /obj/item/clothing/mask/muzzle))
return
if (health > 0)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
var/damage = rand(1, 3)
adjustBruteLoss(damage)
updatehealth()
return
/mob/living/carbon/alien/larva/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")

View File

@@ -6,6 +6,8 @@
var/emp_damage = 0//Handles a type of MMI damage
var/alert = null
use_me = 0 //Can't use the me verb, it's a freaking immobile brain
icon = 'icons/obj/surgery.dmi'
icon_state = "brain1"
New()
var/datum/reagents/R = new/datum/reagents(1000)

View File

@@ -1,10 +0,0 @@
/datum/hud/proc/brain_hud(var/ui_style='icons/mob/screen1_old.dmi')
//ui_style='icons/mob/screen1_old.dmi' //Overriding the parameter. Only this UI style is acceptable with the 'sleek' layout.
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0

View File

@@ -135,10 +135,10 @@
if(istext(selhand))
selhand = lowertext(selhand)
if(selhand == "right" || selhand == "r")
selhand = 0
if(selhand == "left" || selhand == "l")
selhand = 1
if(selhand == "right" || selhand == "r")
selhand = 0
if(selhand == "left" || selhand == "l")
selhand = 1
if(selhand != src.hand)
swap_hand()
@@ -221,95 +221,97 @@
// ++++ROCKDTBEN++++ MOB PROCS //END
/mob/living/carbon/proc/handle_ventcrawl() // -- TLE -- Merged by Carn
if(!stat)
if(!lying)
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
if(!v.welded)
vent_found = v
else
src << "\red That vent is welded."
if(vent_found)
if(vent_found.network&&vent_found.network.normal_members.len)
var/list/vents[0]
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
if(temp_vent.loc == loc)
continue
if(temp_vent.welded)
continue
var/turf/T = get_turf(temp_vent)
if(!T || T.z != loc.z)
continue
var/i = 1
var/index = "[T.loc.name]\[[i]\]"
while(index in vents)
i++
index = "[T.loc.name]\[[i]\]"
vents[index] = temp_vent
var/turf/startloc = loc
var/obj/selection = input("Select a destination.", "Duct System") as null|anything in sortList(vents)
if(!selection)
return
if(!do_after(src, 45))
return
if(!src||!selection)
return
if(loc==startloc)
if(contents.len)
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
if( !istype(carried_item, /obj/item/weapon/implant) && !istype(carried_item, /obj/item/clothing/mask/facehugger) )//If it's not an implant or a facehugger
src << "\red You can't be carrying items or have items equipped when vent crawling!"
return
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection]
if(target_vent)
for(var/mob/O in viewers(src, null))
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
loc = target_vent
var/travel_time = round(get_dist(loc, target_vent.loc) / 2)
spawn(travel_time)
if(!target_vent) return
for(var/mob/O in hearers(target_vent,null))
O.show_message("You hear something squeezing through the ventilation ducts.",2)
sleep(travel_time)
if(!target_vent) return
if(target_vent.welded) //the vent can be welded while alien scrolled through the list or travelled.
target_vent = vent_found //travel back. No additional time required.
src << "\red The vent you were heading to appears to be welded."
loc = target_vent.loc
var/area/new_area = get_area(loc)
if(new_area)
new_area.Entered(src)
else
src << "You need to remain still while entering a vent."
else
src << "This vent is not connected to anything."
else
src << "You must be standing on or beside an air vent to enter it."
else
src << "You can't vent crawl while you're stunned!"
else
/mob/living/carbon/proc/handle_ventcrawl(var/obj/machinery/atmospherics/unary/vent_pump/vent_found = null) // -- TLE -- Merged by Carn
if(stat)
src << "You must be conscious to do this!"
return
return
if(lying)
src << "You can't vent crawl while you're stunned!"
return
if(vent_found) // one was passed in, probably from vent/AltClick()
if(vent_found.welded)
src << "That vent is welded shut."
return
if(!vent_found.Adjacent(src))
return // don't even acknowledge that
else
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
if(!v.welded)
if(v.Adjacent(src))
vent_found = v
if(!vent_found)
src << "You'll need a non-welded vent to crawl into!"
return
if(!vent_found.network || !vent_found.network.normal_members.len)
src << "This vent is not connected to anything."
return
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
if(temp_vent.welded)
continue
if(temp_vent in loc)
continue
var/turf/T = get_turf(temp_vent)
if(!T || T.z != loc.z)
continue
var/i = 1
var/index = "[T.loc.name]\[[i]\]"
while(index in vents)
i++
index = "[T.loc.name]\[[i]\]"
vents[index] = temp_vent
if(!vents.len)
src << "\red There are no available vents to travel to, they could be welded."
return
var/obj/selection = input("Select a destination.", "Duct System") as null|anything in sortAssoc(vents)
if(!selection) return
if(!vent_found.Adjacent(src))
src << "Never mind, you left."
return
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
if( !istype(carried_item, /obj/item/weapon/implant) && !istype(carried_item, /obj/item/clothing/mask/facehugger) )//If it's not an implant or a facehugger
src << "\red You can't be carrying items or have items equipped when vent crawling!"
return
if(isslime(src))
var/mob/living/carbon/slime/S = src
if(S.Victim)
src << "\red You'll have to let [S.Victim] go or finish eating \him first."
return
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection]
if(!target_vent)
return
for(var/mob/O in viewers(src, null))
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
loc = target_vent
var/travel_time = round(get_dist(loc, target_vent.loc) / 2)
spawn(travel_time)
if(!target_vent) return
for(var/mob/O in hearers(target_vent,null))
O.show_message("You hear something squeezing through the ventilation ducts.",2)
sleep(travel_time)
if(!target_vent) return
if(target_vent.welded) //the vent can be welded while alien scrolled through the list or travelled.
target_vent = vent_found //travel back. No additional time required.
src << "\red The vent you were heading to appears to be welded."
loc = target_vent.loc
var/area/new_area = get_area(loc)
if(new_area)
new_area.Entered(src)
/mob/living/carbon/clean_blood()
@@ -331,19 +333,6 @@
//Throwing stuff
/mob/living/carbon/proc/toggle_throw_mode()
var/obj/item/W = get_active_hand()
if( !W )//Not holding anything
if( client && (TK in mutations) )
var/obj/item/tk_grab/O = new(src)
put_in_active_hand(O)
O.host = src
return
if( istype(W,/obj/item/tk_grab) )
if(hand) del(l_hand)
else del(r_hand)
return
if (src.in_throw_mode)
throw_mode_off()
else
@@ -357,7 +346,10 @@
src.in_throw_mode = 1
src.throw_icon.icon_state = "act_throw_on"
/mob/living/carbon/proc/throw_item(atom/target)
/mob/proc/throw_item(atom/target)
return
/mob/living/carbon/throw_item(atom/target)
src.throw_mode_off()
if(usr.stat || !target)
return
@@ -487,6 +479,15 @@
return method ? ">250" : "extremely weak and fast, patient's artery feels like a thread"
// output for machines^ ^^^^^^^output for people^^^^^^^^^
/mob/living/carbon/verb/mob_sleep()
set name = "Sleep"
set category = "IC"
if(usr.sleeping)
usr << "\red You are already sleeping"
return
if(alert(src,"You sure you want to sleep for a while?","Sleep","Yes","No") == "Yes")
usr.sleeping = 20 //Short nap
//Brain slug proc for voluntary removal of control.
/mob/living/carbon/proc/release_control()
@@ -560,4 +561,4 @@
else
src << "You do not have enough chemicals stored to reproduce."
return
return

View File

@@ -1,18 +1,18 @@
mob/living/carbon/verb/give()
/mob/living/carbon/verb/give()
set category = "IC"
set name = "Give"
set src in view(1)
if(src.stat == 2 || usr.stat == 2|| src.client == null)
if(src.stat == 2 || usr.stat == 2 || src.client == null)
return
if(src == usr)
usr << "I feel stupider, suddenly."
usr << "\red I feel stupider, suddenly."
return
var/obj/item/I
if(!usr.hand && usr.r_hand == null)
usr << "You don't have anything in your right hand to give to [src.name]"
usr << "\red You don't have anything in your right hand to give to [src.name]"
return
if(usr.hand && usr.l_hand == null)
usr << "You don't have anything in your left hand to give to [src.name]"
usr << "\red You don't have anything in your left hand to give to [src.name]"
return
if(usr.hand)
I = usr.l_hand
@@ -20,64 +20,29 @@ mob/living/carbon/verb/give()
I = usr.r_hand
if(!I)
return
if(src.r_hand == null)
if(src.r_hand == null || src.l_hand == null)
switch(alert(src,"[usr] wants to give you \a [I]?",,"Yes","No"))
if("Yes")
if(!I)
return
if(!check_can_reach(usr,src))
usr << "You need to keep in reaching distance."
src << "[usr.name] moved too far away."
if(!Adjacent(usr))
usr << "\red You need to stay in reaching distance while giving an object."
src << "\red [usr.name] moved too far away."
return
if((usr.hand && usr.l_hand != I) || (!usr.hand && usr.r_hand != I))
usr << "You need to keep the item in your active hand."
src << "[usr.name] seem to have given up on giving \the [I.name] to you."
usr << "\red You need to keep the item in your active hand."
src << "\red [usr.name] seem to have given up on giving \the [I.name] to you."
return
if(src.r_hand != null && src.l_hand != null)
src << "\red Your hands are full."
usr << "\red Their hands are full."
return
if(src.r_hand != null)
if(src.l_hand == null)
usr.drop_item()
src.l_hand = I
else
src << "Your hands are full."
usr << "Their hands are full."
return
else
usr.drop_item()
src.r_hand = I
I.loc = src
I.layer = 20
I.add_fingerprint(src)
src.update_inv_l_hand()
src.update_inv_r_hand()
usr.update_inv_l_hand()
usr.update_inv_r_hand()
src.visible_message("[usr.name] handed \the [I.name] to [src.name].")
if("No")
src.visible_message("[usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.")
else if(src.l_hand == null)
switch(alert(src,"[usr] wants to give you \a [I]?",,"Yes","No"))
if("Yes")
if(!I)
return
if(!check_can_reach(usr,src))
usr << "You need to keep in reaching distance."
src << "[usr.name] moved too far away."
return
if((usr.hand && usr.l_hand != I) || (!usr.hand && usr.r_hand != I))
usr << "You need to keep the item in your active hand."
src << "[usr.name] seem to have given up on giving \the [I.name] to you."
return
if(src.l_hand != null)
if(src.r_hand == null)
usr.drop_item()
src.r_hand = I
else
src << "Your hands are full."
usr << "Their hands are full."
return
else
usr.drop_item()
src.l_hand = I
src.l_hand = I
I.loc = src
I.layer = 20
I.add_fingerprint(src)
@@ -85,8 +50,8 @@ mob/living/carbon/verb/give()
src.update_inv_r_hand()
usr.update_inv_l_hand()
usr.update_inv_r_hand()
src.visible_message("[usr.name] handed \the [I.name] to [src.name].")
src.visible_message("\blue [usr.name] handed \the [I.name] to [src.name].")
if("No")
src.visible_message("[usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.")
src.visible_message("\red [usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.")
else
usr << "[src.name]'s hands are full."
usr << "\red [src.name]'s hands are full."

View File

@@ -1,576 +0,0 @@
/datum/hud/proc/human_hud(var/ui_style='icons/mob/screen1_old.dmi')
src.adding = list()
src.other = list()
src.hotkeybuttons = list() //These can be disabled for hotkey usersx
var/obj/screen/using
var/obj/screen/inventory/inv_box
using = new /obj/screen()
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = "intent_"+mymob.a_intent
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
//intent small hud objects
var/icon/ico
ico = new(ui_style, "black")
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.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
help_intent = using
ico = new(ui_style, "black")
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.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
disarm_intent = using
ico = new(ui_style, "black")
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.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
grab_intent = using
ico = new(ui_style, "black")
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.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
hurt_intent = using
//end intent small hud objects
using = new /obj/screen()
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
move_intent = using
using = new /obj/screen()
using.name = "drop"
using.icon = ui_style
using.icon_state = "act_drop"
using.screen_loc = ui_drop_throw
using.layer = 19
src.hotkeybuttons += using
inv_box = new /obj/screen/inventory()
inv_box.name = "i_clothing"
inv_box.dir = SOUTH
inv_box.icon = ui_style
inv_box.slot_id = slot_w_uniform
inv_box.icon_state = "center"
inv_box.screen_loc = ui_iclothing
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "o_clothing"
inv_box.dir = SOUTH
inv_box.icon = ui_style
inv_box.slot_id = slot_wear_suit
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_oclothing
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "r_hand"
inv_box.dir = WEST
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
inv_box.icon_state = "hand_active"
inv_box.screen_loc = ui_rhand
inv_box.slot_id = slot_r_hand
inv_box.layer = 19
src.r_hand_hud_object = inv_box
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "l_hand"
inv_box.dir = EAST
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
inv_box.icon_state = "hand_active"
inv_box.screen_loc = ui_lhand
inv_box.slot_id = slot_l_hand
inv_box.layer = 19
src.l_hand_hud_object = inv_box
src.adding += inv_box
using = new /obj/screen/inventory()
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
using.layer = 19
src.adding += using
using = new /obj/screen/inventory()
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
using.layer = 19
src.adding += using
inv_box = new /obj/screen/inventory()
inv_box.name = "id"
inv_box.dir = NORTH
inv_box.icon = ui_style
inv_box.icon_state = "id"
inv_box.screen_loc = ui_id
inv_box.slot_id = slot_wear_id
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "mask"
inv_box.dir = NORTH
inv_box.icon = ui_style
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_mask
inv_box.slot_id = slot_wear_mask
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "back"
inv_box.dir = NORTH
inv_box.icon = ui_style
inv_box.icon_state = "back"
inv_box.screen_loc = ui_back
inv_box.slot_id = slot_back
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "storage1"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
inv_box.screen_loc = ui_storage1
inv_box.slot_id = slot_l_store
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "storage2"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
inv_box.screen_loc = ui_storage2
inv_box.slot_id = slot_r_store
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "suit storage"
inv_box.icon = ui_style
inv_box.dir = 8 //The sprite at dir=8 has the background whereas the others don't.
inv_box.icon_state = "belt"
inv_box.screen_loc = ui_sstore1
inv_box.slot_id = slot_s_store
inv_box.layer = 19
src.adding += inv_box
using = new /obj/screen()
using.name = "resist"
using.icon = ui_style
using.icon_state = "act_resist"
using.screen_loc = ui_pull_resist
using.layer = 19
src.hotkeybuttons += using
using = new /obj/screen()
using.name = "other"
using.icon = ui_style
using.icon_state = "other"
using.screen_loc = ui_inventory
using.layer = 20
src.adding += using
using = new /obj/screen()
using.name = "equip"
using.icon = ui_style
using.icon_state = "act_equip"
using.screen_loc = ui_equip
using.layer = 20
src.adding += using
inv_box = new /obj/screen/inventory()
inv_box.name = "gloves"
inv_box.icon = ui_style
inv_box.icon_state = "gloves"
inv_box.screen_loc = ui_gloves
inv_box.slot_id = slot_gloves
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "eyes"
inv_box.icon = ui_style
inv_box.icon_state = "glasses"
inv_box.screen_loc = ui_glasses
inv_box.slot_id = slot_glasses
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "l_ear"
inv_box.icon = ui_style
inv_box.icon_state = "ears"
inv_box.screen_loc = ui_l_ear
inv_box.slot_id = slot_l_ear
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "r_ear"
inv_box.icon = ui_style
inv_box.icon_state = "ears"
inv_box.screen_loc = ui_r_ear
inv_box.slot_id = slot_r_ear
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "head"
inv_box.icon = ui_style
inv_box.icon_state = "hair"
inv_box.screen_loc = ui_head
inv_box.slot_id = slot_head
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "shoes"
inv_box.icon = ui_style
inv_box.icon_state = "shoes"
inv_box.screen_loc = ui_shoes
inv_box.slot_id = slot_shoes
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "belt"
inv_box.icon = ui_style
inv_box.icon_state = "belt"
inv_box.screen_loc = ui_belt
inv_box.slot_id = slot_belt
inv_box.layer = 19
src.adding += inv_box
mymob.throw_icon = new /obj/screen()
mymob.throw_icon.icon = ui_style
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.screen_loc = ui_drop_throw
src.hotkeybuttons += mymob.throw_icon
mymob.oxygen = new /obj/screen()
mymob.oxygen.icon = ui_style
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.pressure = new /obj/screen()
mymob.pressure.icon = ui_style
mymob.pressure.icon_state = "pressure0"
mymob.pressure.name = "pressure"
mymob.pressure.screen_loc = ui_pressure
mymob.toxin = new /obj/screen()
mymob.toxin.icon = ui_style
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_toxin
mymob.internals = new /obj/screen()
mymob.internals.icon = ui_style
mymob.internals.icon_state = "internal0"
mymob.internals.name = "internal"
mymob.internals.screen_loc = ui_internal
mymob.fire = new /obj/screen()
mymob.fire.icon = ui_style
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.bodytemp = new /obj/screen()
mymob.bodytemp.icon = ui_style
mymob.bodytemp.icon_state = "temp1"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.healths = new /obj/screen()
mymob.healths.icon = ui_style
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.nutrition_icon = new /obj/screen()
mymob.nutrition_icon.icon = ui_style
mymob.nutrition_icon.icon_state = "nutrition0"
mymob.nutrition_icon.name = "nutrition"
mymob.nutrition_icon.screen_loc = ui_nutrition
mymob.pullin = new /obj/screen()
mymob.pullin.icon = ui_style
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_resist
src.hotkeybuttons += mymob.pullin
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.mouse_opacity = 0
mymob.blind.layer = 0
mymob.damageoverlay = new /obj/screen()
mymob.damageoverlay.icon = 'icons/mob/screen1_full.dmi'
mymob.damageoverlay.icon_state = "oxydamageoverlay0"
mymob.damageoverlay.name = "dmg"
mymob.damageoverlay.screen_loc = "1,1"
mymob.damageoverlay.mouse_opacity = 0
mymob.damageoverlay.layer = 18.1 //The black screen overlay sets layer to 18 to display it, this one has to be just on top.
mymob.flash = new /obj/screen()
mymob.flash.icon = ui_style
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.pain = new /obj/screen( null )
/*
mymob.hands = new /obj/screen( null )
mymob.hands.icon = ui_style
mymob.hands.icon_state = "hand"
mymob.hands.name = "hand"
mymob.hands.screen_loc = ui_hand
mymob.hands.dir = NORTH
mymob.sleep = new /obj/screen( null )
mymob.sleep.icon = ui_style
mymob.sleep.icon_state = "sleep0"
mymob.sleep.name = "sleep"
mymob.sleep.screen_loc = ui_sleep
mymob.rest = new /obj/screen( null )
mymob.rest.icon = ui_style
mymob.rest.icon_state = "rest0"
mymob.rest.name = "rest"
mymob.rest.screen_loc = ui_rest
*/
/*/Monkey blockers
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_ears
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_belt
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_shoes
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_storage2
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_glasses
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_gloves
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_storage1
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_headset
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_oclothing
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_iclothing
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_id
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_head
using.layer = 20
src.mon_blo += using
//Monkey blockers
*/
mymob.zone_sel = new /obj/screen/zone_sel( null )
mymob.zone_sel.icon = ui_style
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
//Handle the gun settings buttons
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.dir = 2
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
if (mymob.client.target_can_click)
mymob.item_use_icon.dir = 1
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
mymob.gun_move_icon.dir = 1
mymob.gun_run_icon = new /obj/screen/gun/run(null)
if (mymob.client.target_can_run)
mymob.gun_run_icon.dir = 1
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
mymob.client.screen = null
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += src.adding + src.hotkeybuttons
inventory_shown = 0;
return
/mob/living/carbon/human/verb/toggle_hotkey_verbs()
set category = "OOC"
set name = "Toggle hotkey buttons"
set desc = "This disables or enables the user interface buttons which can be used with hotkeys."
if(hud_used.hotkey_ui_hidden)
client.screen += src.hud_used.hotkeybuttons
src.hud_used.hotkey_ui_hidden = 0
else
client.screen -= src.hud_used.hotkeybuttons
src.hud_used.hotkey_ui_hidden = 1
/mob/living/carbon/human/update_action_buttons()
var/num = 1
if(!src.hud_used) return
if(!src.client) return
if(!hud_used.hud_shown) //Hud toggled to minimal
return
src.client.screen -= src.hud_used.item_action_list
hud_used.item_action_list = list()
for(var/obj/item/I in src)
if(I.icon_action_button)
var/obj/screen/item_action/A = new(src.hud_used)
A.icon = 'icons/mob/screen1_action.dmi'
A.icon_state = I.icon_action_button
if(I.action_button_name)
A.name = I.action_button_name
else
A.name = "Use [I.name]"
A.owner = I
hud_used.item_action_list += A
switch(num)
if(1)
A.screen_loc = ui_action_slot1
if(2)
A.screen_loc = ui_action_slot2
if(3)
A.screen_loc = ui_action_slot3
if(4)
A.screen_loc = ui_action_slot4
if(5)
A.screen_loc = ui_action_slot5
break //5 slots available, so no more can be added.
num++
src.client.screen += src.hud_used.item_action_list

View File

@@ -71,6 +71,8 @@
if (ismob(AM))
var/mob/tmob = AM
if( istype(tmob, /mob/living/carbon) && prob(10) )
src.spread_disease_to(AM, "Contact")
//BubbleWrap - Should stop you pushing a restrained person out of the way
if(istype(tmob, /mob/living/carbon/human))
@@ -276,23 +278,6 @@
return
/mob/living/carbon/human/hand_p(mob/M as mob)
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
var/armor = run_armor_check(affecting, "melee")
apply_damage(rand(1,2), BRUTE, affecting, armor)
if(armor >= 2) return
for(var/datum/disease/D in M.viruses)
if(istype(D, /datum/disease/jungle_fever))
var/mob/living/carbon/human/H = src
src = null
src = H.monkeyize()
contract_disease(D,1,0)
return
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")

View File

@@ -7,10 +7,11 @@
if ("help")
visible_message(text("\blue [M] caresses [src] with its scythe like arm."))
if ("grab")
if(M == src) return
if(M == src || anchored)
return
if (w_uniform)
w_uniform.add_fingerprint(M)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, M, src)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
M.put_in_active_hand(G)

View File

@@ -59,6 +59,10 @@
apply_effect(4, WEAKEN, armor_block)
return
else
if(istype(M,/mob/living/carbon))
// log_debug("No gloves, [M] is truing to infect [src]")
M.spread_disease_to(src, "Contact")
switch(M.a_intent)
@@ -87,18 +91,23 @@
return 1
if("grab")
if(M == src) return 0
if(w_uniform) w_uniform.add_fingerprint(M)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, M, src)
if(M == src || anchored)
return 0
if(w_uniform)
w_uniform.add_fingerprint(M)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
if(buckled)
M << "<span class='notice'>You cannot grab [src], \he is buckled in!</span>"
if(!G) //the grab will delete itself in New if affecting is anchored
return
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("\red [M] has grabbed [src] passively!")
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
return 1
if("hurt")

View File

@@ -174,6 +174,21 @@
////////////////////////////////////////////
/*
This function restores the subjects blood to max.
*/
/mob/living/carbon/human/proc/restore_blood()
var/blood_volume = vessel.get_reagent_amount("blood")
vessel.add_reagent("blood",560.0-blood_volume)
/*
This function restores all organs.
*/
/mob/living/carbon/human/restore_all_organs()
for(var/datum/organ/external/current_organ in organs)
current_organ.rejuvenate()
/mob/living/carbon/human/proc/HealDamage(zone, brute, burn)
var/datum/organ/external/E = get_organ(zone)
if(istype(E, /datum/organ/external))

View File

@@ -1,3 +1,21 @@
/mob/living/carbon/human/verb/quick_equip()
set name = "quick-equip"
set hidden = 1
if(ishuman(src))
var/mob/living/carbon/human/H = src
var/obj/item/I = H.get_active_hand()
if(!I)
H << "<span class='notice'>You are not holding anything to equip.</span>"
return
if(H.equip_to_appropriate_slot(I))
if(hand)
update_inv_l_hand(0)
else
update_inv_r_hand(0)
else
H << "\red You are unable to equip that."
/mob/living/carbon/human/proc/equip_in_one_of_slots(obj/item/W, list/slots, del_on_fail = 1)
for (var/slot in slots)
if (equip_to_slot_if_possible(W, slots[slot], del_on_fail = 0))

View File

@@ -97,7 +97,7 @@
handle_pain()
// handle_medical_side_effects()
handle_medical_side_effects()
handle_stasis_bag()
@@ -377,6 +377,13 @@
if(breath)
loc.assume_air(breath)
//spread some viruses while we are at it
if (virus2.len > 0)
if (get_infection_chance(src) && prob(20))
// log_debug("[src] : Exhaling some viruses")
for(var/mob/living/carbon/M in view(1,src))
src.spread_disease_to(M)
proc/get_breath_from_internal(volume_needed)
if(internal)
@@ -511,7 +518,7 @@
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
Paralyse(3) // 3 gives them one second to wake up and run away a bit!
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
sleeping = max(sleeping+2, 10)
sleeping = min(sleeping+2, 10)
else if(SA_pp > 0.15) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
spawn(0) emote(pick("giggle", "laugh"))
@@ -1377,14 +1384,15 @@
V.cure(src)
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
if(B.virus2.len && get_infection_chance(src))
if(B.virus2.len)
for (var/ID in B.virus2)
var/datum/disease2/disease/V = virus2[ID]
var/datum/disease2/disease/V = B.virus2[ID]
infect_virus2(src,V)
for(var/obj/effect/decal/cleanable/mucus/M in view(1,src))
if(M.virus2.len && get_infection_chance(src))
if(M.virus2.len)
for (var/ID in M.virus2)
var/datum/disease2/disease/V = virus2[ID]
var/datum/disease2/disease/V = M.virus2[ID]
infect_virus2(src,V)
for (var/ID in virus2)

View File

@@ -103,7 +103,7 @@
sleep(15)
Atkcool = 0
if(get_obstacle_ok(Target))
if(Target.Adjacent(src))
Target.attack_slime(src)
//world << "retrun 1"
return
@@ -116,7 +116,7 @@
sleep(25)
Atkcool = 0
if(get_obstacle_ok(Target))
if(Target.Adjacent(src))
Target.attack_slime(src)
@@ -124,16 +124,16 @@
step_to(src, Target)
else
if(!Atkcool && get_obstacle_ok(Target))
if(!Atkcool && Target.Adjacent(src))
Feedon(Target)
else
if(!Atkcool && get_obstacle_ok(Target))
if(!Atkcool && Target.Adjacent(src))
Feedon(Target)
else
if(Target in view(7, src))
if(get_obstacle_ok(Target))
if(Target.Adjacent(src))
step_to(src, Target)
else

View File

@@ -457,7 +457,7 @@
if ("grab")
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src )
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src )
M.put_in_active_hand(G)
@@ -636,88 +636,6 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
/mob/living/carbon/slime/proc/get_obstacle_ok(atom/A)
var/direct = get_dir(src, A)
var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy( src.loc )
var/ok = 0
if ( (direct - 1) & direct)
var/turf/Step_1
var/turf/Step_2
switch(direct)
if(5.0)
Step_1 = get_step(src, NORTH)
Step_2 = get_step(src, EAST)
if(6.0)
Step_1 = get_step(src, SOUTH)
Step_2 = get_step(src, EAST)
if(9.0)
Step_1 = get_step(src, NORTH)
Step_2 = get_step(src, WEST)
if(10.0)
Step_1 = get_step(src, SOUTH)
Step_2 = get_step(src, WEST)
else
if(Step_1 && Step_2)
var/check_1 = 0
var/check_2 = 0
if(step_to(D, Step_1))
check_1 = 1
for(var/obj/border_obstacle in Step_1)
if(border_obstacle.flags & ON_BORDER)
if(!border_obstacle.CheckExit(D, A))
check_1 = 0
for(var/obj/border_obstacle in get_turf(A))
if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
check_1 = 0
D.loc = src.loc
if(step_to(D, Step_2))
check_2 = 1
for(var/obj/border_obstacle in Step_2)
if(border_obstacle.flags & ON_BORDER)
if(!border_obstacle.CheckExit(D, A))
check_2 = 0
for(var/obj/border_obstacle in get_turf(A))
if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
check_2 = 0
if(check_1 || check_2)
ok = 1
else
if(loc == src.loc)
ok = 1
else
ok = 1
//Now, check objects to block exit that are on the border
for(var/obj/border_obstacle in src.loc)
if(border_obstacle.flags & ON_BORDER)
if(!border_obstacle.CheckExit(D, A))
ok = 0
//Next, check objects to block entry that are on the border
for(var/obj/border_obstacle in get_turf(A))
if((border_obstacle.flags & ON_BORDER) && (A != border_obstacle))
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
ok = 0
//del(D)
//Garbage Collect Dummy
D.loc = null
D = null
if (!( ok ))
return 0
return 1
/obj/item/slime_extract
name = "slime extract"
desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."

View File

@@ -82,6 +82,9 @@
adult.name = src.name
adult.real_name = src.real_name
adult.ckey = src.ckey
for (var/obj/item/W in src.contents)
src.drop_from_inventory(W)
del(src)
/mob/living/carbon/monkey/diona/verb/steal_blood()
@@ -90,7 +93,7 @@
set desc = "Take a blood sample from a suitable donor."
var/list/choices = list()
for(var/mob/living/C in view(1,src))
for(var/mob/living/carbon/C in view(1,src))
if(C.real_name != real_name)
choices += C

View File

@@ -1,249 +0,0 @@
/datum/hud/proc/monkey_hud(var/ui_style='icons/mob/screen1_old.dmi')
src.adding = list()
src.other = list()
var/obj/screen/using
var/obj/screen/inventory/inv_box
using = new /obj/screen()
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
//intent small hud objects
var/icon/ico
ico = new(ui_style, "black")
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.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
help_intent = using
ico = new(ui_style, "black")
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.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
disarm_intent = using
ico = new(ui_style, "black")
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.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
grab_intent = using
ico = new(ui_style, "black")
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.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
hurt_intent = using
//end intent small hud objects
using = new /obj/screen()
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
move_intent = using
using = new /obj/screen()
using.name = "drop"
using.icon = ui_style
using.icon_state = "act_drop"
using.screen_loc = ui_drop_throw
using.layer = 19
src.adding += using
inv_box = new /obj/screen/inventory()
inv_box.name = "r_hand"
inv_box.dir = WEST
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
inv_box.icon_state = "hand_active"
inv_box.screen_loc = ui_rhand
inv_box.slot_id = slot_r_hand
inv_box.layer = 19
src.r_hand_hud_object = inv_box
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "l_hand"
inv_box.dir = EAST
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
inv_box.icon_state = "hand_active"
inv_box.screen_loc = ui_lhand
inv_box.slot_id = slot_l_hand
inv_box.layer = 19
src.l_hand_hud_object = inv_box
src.adding += inv_box
using = new /obj/screen()
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
using.layer = 19
src.adding += using
using = new /obj/screen()
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
using.layer = 19
src.adding += using
inv_box = new /obj/screen/inventory()
inv_box.name = "mask"
inv_box.dir = NORTH
inv_box.icon = ui_style
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_monkey_mask
inv_box.slot_id = slot_wear_mask
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "back"
inv_box.dir = NORTHEAST
inv_box.icon = ui_style
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_back
inv_box.slot_id = slot_back
inv_box.layer = 19
src.adding += inv_box
mymob.throw_icon = new /obj/screen()
mymob.throw_icon.icon = ui_style
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.screen_loc = ui_drop_throw
mymob.oxygen = new /obj/screen()
mymob.oxygen.icon = ui_style
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.pressure = new /obj/screen()
mymob.pressure.icon = ui_style
mymob.pressure.icon_state = "pressure0"
mymob.pressure.name = "pressure"
mymob.pressure.screen_loc = ui_pressure
mymob.toxin = new /obj/screen()
mymob.toxin.icon = ui_style
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_toxin
mymob.internals = new /obj/screen()
mymob.internals.icon = ui_style
mymob.internals.icon_state = "internal0"
mymob.internals.name = "internal"
mymob.internals.screen_loc = ui_internal
mymob.fire = new /obj/screen()
mymob.fire.icon = ui_style
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.bodytemp = new /obj/screen()
mymob.bodytemp.icon = ui_style
mymob.bodytemp.icon_state = "temp1"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.healths = new /obj/screen()
mymob.healths.icon = ui_style
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.pullin = new /obj/screen()
mymob.pullin.icon = ui_style
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_resist
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen()
mymob.flash.icon = ui_style
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = ui_style
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
//Handle the gun settings buttons
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.dir = 2
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
if (mymob.client.target_can_click)
mymob.item_use_icon.dir = 1
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
mymob.gun_move_icon.dir = 1
mymob.gun_run_icon = new /obj/screen/gun/run(null)
if (mymob.client.target_can_run)
mymob.gun_run_icon.dir = 1
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
mymob.client.screen = null
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other
return

View File

@@ -171,14 +171,14 @@
V.cure(src)
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
if(B.virus2.len && get_infection_chance(src))
if(B.virus2.len)
for (var/ID in B.virus2)
var/datum/disease2/disease/V = virus2[ID]
var/datum/disease2/disease/V = B.virus2[ID]
infect_virus2(src,V)
for(var/obj/effect/decal/cleanable/mucus/M in view(1,src))
if(M.virus2.len && get_infection_chance(src))
if(M.virus2.len)
for (var/ID in M.virus2)
var/datum/disease2/disease/V = virus2[ID]
var/datum/disease2/disease/V = M.virus2[ID]
infect_virus2(src,V)
for (var/ID in virus2)

View File

@@ -39,7 +39,7 @@
reagents = R
R.my_atom = src
if(name == "monkey" || name == "farwa" || name == "stok" || name == "neara" || name == "diona nymph") //Hideous but necessary to stop Pun-Pun becoming generic.
if(name == initial(name)) //To stop Pun-Pun becoming generic.
name = "[name] ([rand(1, 1000)])"
real_name = name
@@ -175,23 +175,6 @@
//mob/living/carbon/monkey/bullet_act(var/obj/item/projectile/Proj)taken care of in living
/mob/living/carbon/monkey/hand_p(mob/M as mob)
if ((M.a_intent == "hurt" && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) )))
if ((prob(75) && health > 0))
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
var/damage = rand(1, 5)
if (HULK in mutations) damage += 10
adjustBruteLoss(damage)
updatehealth()
for(var/datum/disease/D in M.viruses)
if(istype(D, /datum/disease/jungle_fever))
contract_disease(D,1,0)
else
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has attempted to bite []!</B>", src), 1)
return
/mob/living/carbon/monkey/attack_paw(mob/M as mob)
..()
@@ -272,10 +255,10 @@
O.show_message(text("\red <B>[] has attempted to punch [name]!</B>", M), 1)
else
if (M.a_intent == "grab")
if (M == src)
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src )
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
M.put_in_active_hand(G)

View File

@@ -39,6 +39,7 @@
/datum/species/human
name = "Human"
language = "Sol Common"
primitive = /mob/living/carbon/monkey
flags = HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR

View File

@@ -246,7 +246,21 @@
adjustFireLoss(burn)
src.updatehealth()
/mob/living/proc/restore_all_organs()
return
/mob/living/proc/revive()
rejuvenate()
buckled = initial(src.buckled)
if(iscarbon(src))
var/mob/living/carbon/C = src
C.handcuffed = initial(C.handcuffed)
/mob/living/proc/rejuvenate()
// shut down various types of badness
setToxLoss(0)
setOxyLoss(0)
setCloneLoss(0)
@@ -254,30 +268,43 @@
SetParalysis(0)
SetStunned(0)
SetWeakened(0)
// shut down ongoing problems
radiation = 0
nutrition = 400
bodytemperature = 310
bodytemperature = T20C
sdisabilities = 0
disabilities = 0
// fix blindness and deafness
blinded = 0
eye_blind = 0
eye_blurry = 0
eye_stat = 0
ear_deaf = 0
ear_damage = 0
heal_overall_damage(1000, 1000)
buckled = initial(src.buckled)
if(iscarbon(src))
var/mob/living/carbon/C = src
C.handcuffed = initial(C.handcuffed)
for(var/datum/disease/D in viruses)
D.cure(0)
heal_overall_damage(getBruteLoss(), getFireLoss())
// restore all of a human's blood
if(ishuman(src))
var/mob/living/carbon/human/human_mob = src
human_mob.restore_blood()
// fix all of our organs
restore_all_organs()
// remove the character from the list of the dead
if(stat == 2)
dead_mob_list -= src
living_mob_list += src
tod = null
// restore us to conciousness
stat = CONSCIOUS
// make the icons look correct
regenerate_icons()
..()
return
/mob/living/proc/UpdateDamageIcon()
@@ -397,3 +424,247 @@
if(update_slimes)
for(var/mob/living/carbon/slime/M in view(1,src))
M.UpdateFeed(src)
/mob/living/verb/resist()
set name = "Resist"
set category = "IC"
if(!isliving(usr) || usr.next_move > world.time)
return
usr.next_move = world.time + 20
var/mob/living/L = usr
//Resisting control by an alien mind.
if(istype(src.loc,/mob/living/simple_animal/borer))
var/mob/living/simple_animal/borer/B = src.loc
var/mob/living/captive_brain/H = src
H << "\red <B>You begin doggedly resisting the parasite's control (this will take approximately sixty seconds).</B>"
B.host << "\red <B>You feel the captive mind of [src] begin to resist your control.</B>"
spawn(rand(350,450)+B.host.brainloss)
if(!B || !B.controlling)
return
B.host.adjustBrainLoss(rand(5,10))
H << "\red <B>With an immense exertion of will, you regain control of your body!</B>"
B.host << "\red <B>You feel control of the host brain ripped from your grasp, and retract your probosci before the wild neural impulses can damage you.</b>"
B.controlling = 0
B.ckey = B.host.ckey
B.host.ckey = H.ckey
H.ckey = null
H.name = "host brain"
H.real_name = "host brain"
verbs -= /mob/living/carbon/proc/release_control
verbs -= /mob/living/carbon/proc/punish_host
verbs -= /mob/living/carbon/proc/spawn_larvae
return
//resisting grabs (as if it helps anyone...)
if ((!( L.stat ) && L.canmove && !( L.restrained() )))
var/resisting = 0
for(var/obj/O in L.requests)
L.requests.Remove(O)
del(O)
resisting++
for(var/obj/item/weapon/grab/G in usr.grabbed_by)
resisting++
if (G.state == 1)
del(G)
else
if (G.state == 2)
if (prob(25))
for(var/mob/O in viewers(L, null))
O.show_message(text("\red [] has broken free of []'s grip!", L, G.assailant), 1)
del(G)
else
if (G.state == 3)
if (prob(5))
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red [] has broken free of []'s headlock!", L, G.assailant), 1)
del(G)
if(resisting)
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red <B>[] resists!</B>", L), 1)
//unbuckling yourself
if(L.buckled && (L.last_special <= world.time) )
if(iscarbon(L))
var/mob/living/carbon/C = L
if( C.handcuffed )
C.next_move = world.time + 100
C.last_special = world.time + 100
C << "\red You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)"
for(var/mob/O in viewers(L))
O.show_message("\red <B>[usr] attempts to unbuckle themself!</B>", 1)
spawn(0)
if(do_after(usr, 1200))
if(!C.buckled)
return
for(var/mob/O in viewers(C))
O.show_message("\red <B>[usr] manages to unbuckle themself!</B>", 1)
C << "\blue You successfully unbuckle yourself."
C.buckled.manual_unbuckle(C)
else
L.buckled.manual_unbuckle(L)
//Breaking out of a locker?
else if( src.loc && (istype(src.loc, /obj/structure/closet)) )
var/breakout_time = 2 //2 minutes by default
var/obj/structure/closet/C = L.loc
if(C.opened)
return //Door's open... wait, why are you in it's contents then?
if(istype(L.loc, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = L.loc
if(!SC.locked && !SC.welded)
return //It's a secure closet, but isn't locked. Easily escapable from, no need to 'resist'
else
if(!C.welded)
return //closed but not welded...
// else Meh, lets just keep it at 2 minutes for now
// breakout_time++ //Harder to get out of welded lockers than locked lockers
//okay, so the closet is either welded or locked... resist!!!
usr.next_move = world.time + 100
L.last_special = world.time + 100
L << "\red You lean on the back of \the [C] and start pushing the door open. (this will take about [breakout_time] minutes)"
for(var/mob/O in viewers(usr.loc))
O.show_message("\red <B>The [L.loc] begins to shake violently!</B>", 1)
spawn(0)
if(do_after(usr,(breakout_time*60*10))) //minutes * 60seconds * 10deciseconds
if(!C || !L || L.stat != CONSCIOUS || L.loc != C || C.opened) //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
return
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
if(istype(L.loc, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = L.loc
if(!SC.locked && !SC.welded)
return
else
if(!C.welded)
return
//Well then break it!
if(istype(usr.loc, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = L.loc
SC.desc = "It appears to be broken."
SC.icon_state = SC.icon_off
flick(SC.icon_broken, SC)
sleep(10)
flick(SC.icon_broken, SC)
sleep(10)
SC.broken = 1
SC.locked = 0
usr << "\red You successfully break out!"
for(var/mob/O in viewers(L.loc))
O.show_message("\red <B>\the [usr] successfully broke out of \the [SC]!</B>", 1)
if(istype(SC.loc, /obj/structure/bigDelivery)) //Do this to prevent contents from being opened into nullspace (read: bluespace)
var/obj/structure/bigDelivery/BD = SC.loc
BD.attack_hand(usr)
SC.open()
else
C.welded = 0
usr << "\red You successfully break out!"
for(var/mob/O in viewers(L.loc))
O.show_message("\red <B>\the [usr] successfully broke out of \the [C]!</B>", 1)
if(istype(C.loc, /obj/structure/bigDelivery)) //nullspace ect.. read the comment above
var/obj/structure/bigDelivery/BD = C.loc
BD.attack_hand(usr)
C.open()
//breaking out of handcuffs
else if(iscarbon(L))
var/mob/living/carbon/CM = L
if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time))
CM.next_move = world.time + 100
CM.last_special = world.time + 100
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
usr << "\red You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)"
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] is trying to break the handcuffs!</B>", CM), 1)
spawn(0)
if(do_after(CM, 50))
if(!CM.handcuffed || CM.buckled)
return
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] manages to break the handcuffs!</B>", CM), 1)
CM << "\red You successfully break your handcuffs."
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
del(CM.handcuffed)
CM.handcuffed = null
CM.update_inv_handcuffed()
else
var/obj/item/weapon/handcuffs/HC = CM.handcuffed
var/breakouttime = 1200 //A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/handcuffs type
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
if(istype(HC)) //If you are handcuffed with actual handcuffs... Well what do I know, maybe someone will want to handcuff you with toilet paper in the future...
breakouttime = HC.breakouttime
displaytime = breakouttime / 600 //Minutes
CM << "\red You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)"
for(var/mob/O in viewers(CM))
O.show_message( "\red <B>[usr] attempts to remove \the [HC]!</B>", 1)
spawn(0)
if(do_after(CM, breakouttime))
if(!CM.handcuffed || CM.buckled)
return // time leniency for lag which also might make this whole thing pointless but the server
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
O.show_message("\red <B>[CM] manages to remove the handcuffs!</B>", 1)
CM << "\blue You successfully remove \the [CM.handcuffed]."
CM.handcuffed.loc = usr.loc
CM.handcuffed = null
CM.update_inv_handcuffed()
else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time))
CM.next_move = world.time + 100
CM.last_special = world.time + 100
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
usr << "\red You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)"
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] is trying to break the legcuffs!</B>", CM), 1)
spawn(0)
if(do_after(CM, 50))
if(!CM.legcuffed || CM.buckled)
return
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] manages to break the legcuffs!</B>", CM), 1)
CM << "\red You successfully break your legcuffs."
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
del(CM.legcuffed)
CM.legcuffed = null
CM.update_inv_legcuffed()
else
var/obj/item/weapon/legcuffs/HC = CM.legcuffed
var/breakouttime = 1200 //A default in case you are somehow legcuffed with something that isn't an obj/item/weapon/legcuffs type
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
if(istype(HC)) //If you are legcuffed with actual legcuffs... Well what do I know, maybe someone will want to legcuff you with toilet paper in the future...
breakouttime = HC.breakouttime
displaytime = breakouttime / 600 //Minutes
CM << "\red You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)"
for(var/mob/O in viewers(CM))
O.show_message( "\red <B>[usr] attempts to remove \the [HC]!</B>", 1)
spawn(0)
if(do_after(CM, breakouttime))
if(!CM.legcuffed || CM.buckled)
return // time leniency for lag which also might make this whole thing pointless but the server
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
O.show_message("\red <B>[CM] manages to remove the legcuffs!</B>", 1)
CM << "\blue You successfully remove \the [CM.legcuffed]."
CM.legcuffed.loc = usr.loc
CM.legcuffed = null
CM.update_inv_legcuffed()
/mob/living/verb/lay_down()
set name = "Rest"
set category = "IC"
resting = !resting
src << "\blue You are now [resting ? "resting" : "getting up"]"

View File

@@ -88,7 +88,6 @@ var/list/department_radio_keys = list(
*/
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
message = capitalize(message)
/*
Sanity checking and speech failure.
@@ -174,6 +173,8 @@ var/list/department_radio_keys = list(
if(src.stunned > 2 || (traumatic_shock > 61 && prob(50)))
message_mode = null //Stunned people shouldn't be able to physically turn on their radio/hold down the button to speak into it
message = capitalize(message)
if (!message)
return

View File

@@ -134,7 +134,7 @@ var/list/ai_list = list()
for(var/line in lines)
// split & clean up
var/list/Entry = text2list(line, "-")
var/list/Entry = text2list(line, ":")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
@@ -429,16 +429,6 @@ var/list/ai_list = list()
O.show_message(text("\red <B>[] took a swipe at []!</B>", M, src), 1)
return
/mob/living/silicon/ai/attack_hand(mob/living/carbon/M as mob)
if(ishuman(M))//Checks to see if they are ninja
if(istype(M:gloves, /obj/item/clothing/gloves/space_ninja)&&M:gloves:candrain&&!M:gloves:draining)
if(M:wear_suit:s_control)
M:wear_suit:transfer_ai("AICORE", "NINJASUIT", src, M)
else
M << "\red <b>ERROR</b>: \black Remote access channel disabled."
return
/mob/living/silicon/ai/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")

View File

@@ -83,18 +83,6 @@
AI.cameraFollow = null
AI.eyeobj.setLoc(src)
/mob/living/Click()
if(isAI(usr))
return
..()
/mob/living/DblClick()
if(isAI(usr) && usr != src)
var/mob/living/silicon/ai/A = usr
A.ai_actual_track(src)
return
..()
// This will move the AIEye. It will also cause lights near the eye to light up, if toggled.
// This is handled in the proc below this one.

View File

@@ -1,2 +0,0 @@
/datum/hud/proc/ai_hud()
return

View File

@@ -1,171 +0,0 @@
/datum/hud/proc/robot_hud()
src.adding = list()
src.other = list()
var/obj/screen/using
//Radio
using = new /obj/screen()
using.name = "radio"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "radio"
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
//Module select
using = new /obj/screen()
using.name = "module1"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "inv1"
using.screen_loc = ui_inv1
using.layer = 20
src.adding += using
mymob:inv1 = using
using = new /obj/screen()
using.name = "module2"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "inv2"
using.screen_loc = ui_inv2
using.layer = 20
src.adding += using
mymob:inv2 = using
using = new /obj/screen()
using.name = "module3"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "inv3"
using.screen_loc = ui_inv3
using.layer = 20
src.adding += using
mymob:inv3 = using
//End of module select
//Intent
using = new /obj/screen()
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
//Cell
mymob:cells = new /obj/screen()
mymob:cells.icon = 'icons/mob/screen1_robot.dmi'
mymob:cells.icon_state = "charge-empty"
mymob:cells.name = "cell"
mymob:cells.screen_loc = ui_toxin
//Health
mymob.healths = new /obj/screen()
mymob.healths.icon = 'icons/mob/screen1_robot.dmi'
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_borg_health
//Installed Module
mymob.hands = new /obj/screen()
mymob.hands.icon = 'icons/mob/screen1_robot.dmi'
mymob.hands.icon_state = "nomod"
mymob.hands.name = "module"
mymob.hands.screen_loc = ui_borg_module
//Module Panel
using = new /obj/screen()
using.name = "panel"
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "panel"
using.screen_loc = ui_borg_panel
using.layer = 19
src.adding += using
//Store
mymob.throw_icon = new /obj/screen()
mymob.throw_icon.icon = 'icons/mob/screen1_robot.dmi'
mymob.throw_icon.icon_state = "store"
mymob.throw_icon.name = "store"
mymob.throw_icon.screen_loc = ui_borg_store
//Temp
mymob.bodytemp = new /obj/screen()
mymob.bodytemp.icon_state = "temp0"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.oxygen = new /obj/screen()
mymob.oxygen.icon = 'icons/mob/screen1_robot.dmi'
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.fire = new /obj/screen()
mymob.fire.icon = 'icons/mob/screen1_robot.dmi'
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.pullin = new /obj/screen()
mymob.pullin.icon = 'icons/mob/screen1_robot.dmi'
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_borg_pull
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen()
mymob.flash.icon = 'icons/mob/screen1_robot.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = 'icons/mob/screen1_robot.dmi'
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
//Handle the gun settings buttons
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.dir = 2
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
if (mymob.client.target_can_click)
mymob.item_use_icon.dir = 1
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
mymob.gun_move_icon.dir = 1
mymob.gun_run_icon = new /obj/screen/gun/run(null)
if (mymob.client.target_can_run)
mymob.gun_run_icon.dir = 1
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
mymob.client.screen = null
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other
return

View File

@@ -76,4 +76,124 @@
return 1
else
return 0
updateicon()
updateicon()
//Helper procs for cyborg modules on the UI.
//These are hackish but they help clean up code elsewhere.
//module_selected(module) - Checks whether the module slot specified by "module" is currently selected.
/mob/living/silicon/robot/proc/module_selected(var/module) //Module is 1-3
return module == get_selected_module()
//module_active(module) - Checks whether there is a module active in the slot specified by "module".
/mob/living/silicon/robot/proc/module_active(var/module) //Module is 1-3
if(module < 1 || module > 3) return 0
switch(module)
if(1)
if(module_state_1)
return 1
if(2)
if(module_state_2)
return 1
if(3)
if(module_state_3)
return 1
return 0
//get_selected_module() - Returns the slot number of the currently selected module. Returns 0 if no modules are selected.
/mob/living/silicon/robot/proc/get_selected_module()
if(module_state_1 && module_active == module_state_1)
return 1
else if(module_state_2 && module_active == module_state_2)
return 2
else if(module_state_3 && module_active == module_state_3)
return 3
return 0
//select_module(module) - Selects the module slot specified by "module"
/mob/living/silicon/robot/proc/select_module(var/module) //Module is 1-3
if(module < 1 || module > 3) return
if(!module_active(module)) return
switch(module)
if(1)
if(module_active != module_state_1)
inv1.icon_state = "inv1 +a"
inv2.icon_state = "inv2"
inv3.icon_state = "inv3"
module_active = module_state_1
return
if(2)
if(module_active != module_state_2)
inv1.icon_state = "inv1"
inv2.icon_state = "inv2 +a"
inv3.icon_state = "inv3"
module_active = module_state_2
return
if(3)
if(module_active != module_state_3)
inv1.icon_state = "inv1"
inv2.icon_state = "inv2"
inv3.icon_state = "inv3 +a"
module_active = module_state_3
return
return
//deselect_module(module) - Deselects the module slot specified by "module"
/mob/living/silicon/robot/proc/deselect_module(var/module) //Module is 1-3
if(module < 1 || module > 3) return
switch(module)
if(1)
if(module_active == module_state_1)
inv1.icon_state = "inv1"
module_active = null
return
if(2)
if(module_active == module_state_2)
inv2.icon_state = "inv2"
module_active = null
return
if(3)
if(module_active == module_state_3)
inv3.icon_state = "inv3"
module_active = null
return
return
//toggle_module(module) - Toggles the selection of the module slot specified by "module".
/mob/living/silicon/robot/proc/toggle_module(var/module) //Module is 1-3
if(module < 1 || module > 3) return
if(module_selected(module))
deselect_module(module)
else
if(module_active(module))
select_module(module)
else
deselect_module(get_selected_module()) //If we can't do select anything, at least deselect the current module.
return
//cycle_modules() - Cycles through the list of selected modules.
/mob/living/silicon/robot/proc/cycle_modules()
var/slot_start = get_selected_module()
if(slot_start) deselect_module(slot_start) //Only deselect if we have a selected slot.
var/slot_num
if(slot_start == 0)
slot_num = 1
slot_start = 2
else
slot_num = slot_start + 1
while(slot_start != slot_num) //If we wrap around without finding any free slots, just give up.
if(module_active(slot_num))
select_module(slot_num)
return
slot_num++
if(slot_num > 3) slot_num = 1 //Wrap around.
return

View File

@@ -948,11 +948,6 @@
user << "You remove \the [broken_device]."
user.put_in_active_hand(broken_device)
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("CYBORG",src,user:wear_suit)
return
/mob/living/silicon/robot/proc/allowed(mob/M)
//check if it doesn't require any access at all
if(check_access(null))

View File

@@ -68,7 +68,7 @@
//Removing from inventory
if(href_list["remove_inv"])
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
return
var/remove_from = href_list["remove_inv"]
switch(remove_from)
@@ -99,7 +99,7 @@
//Adding things to inventory
else if(href_list["add_inv"])
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
return
var/add_to = href_list["add_inv"]
if(!usr.get_active_hand())

View File

@@ -80,39 +80,6 @@
M.show_message( message, 1, blind_message, 2)
//This is awful
/mob/attackby(obj/item/weapon/W as obj, mob/user as mob)
//Holding a balloon will shield you from an item that is_sharp() ... cause that makes sense
if (user.intent != "harm")
if (istype(src.l_hand,/obj/item/latexballon) && src.l_hand:air_contents && is_sharp(W))
return src.l_hand.attackby(W)
if (istype(src.r_hand,/obj/item/latexballon) && src.r_hand:air_contents && is_sharp(W))
return src.r_hand.attackby(W)
//If src is grabbing someone and facing the attacker, the src will use the grabbed person as a shield
var/shielded = 0
if (locate(/obj/item/weapon/grab, src))
var/mob/safe = null
if (istype(src.l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = src.l_hand
if ((G.state == 3 && get_dir(src, user) == src.dir))
safe = G.affecting
if (istype(src.r_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = src.r_hand
if ((G.state == 3 && get_dir(src, user) == src.dir))
safe = G.affecting
if (safe)
return safe.attackby(W, user)
//If the mob is not wearing a shield or otherwise is not shielded
if ((!( shielded ) || !( W.flags ) & NOSHIELD))
spawn( 0 )
if (W && istype(W, /obj/item)) //The istype is necessary for things like bodybags which are structures that do not have an attack() proc.
W.attack(src, user)
return
return
/mob/proc/findname(msg)
for(var/mob/M in mob_list)
if (M.real_name == text("[]", msg))
@@ -134,7 +101,6 @@
//This proc is called whenever someone clicks an inventory ui slot.
/mob/proc/attack_ui(slot)
var/obj/item/W = get_active_hand()
if(istype(W))
equip_to_slot_if_possible(W, slot)
@@ -271,7 +237,7 @@ var/list/slot_equipment_priority = list( \
/mob/verb/mode()
set name = "Activate Held Object"
set category = "IC"
set category = "Object"
set src = usr
if(hand)
@@ -284,6 +250,8 @@ var/list/slot_equipment_priority = list( \
if (W)
W.attack_self(src)
update_inv_r_hand()
if(next_move < world.time)
next_move = world.time + 2
return
/*
@@ -569,9 +537,8 @@ var/list/slot_equipment_priority = list( \
..()
if(M != usr) return
if(usr == src) return
if(get_dist(usr,src) > 1) return
if(!Adjacent(usr)) return
if(istype(M,/mob/living/silicon/ai)) return
if(LinkBlocked(usr.loc,loc)) return
show_inv(usr)
@@ -731,6 +698,15 @@ note dizziness decrements automatically in the mob's Life() proc.
else
stat(null,"MasterController-ERROR")
if(listed_turf && client)
if(get_dist(listed_turf,src) > 1)
listed_turf = null
else
statpanel(listed_turf.name, null, listed_turf)
for(var/atom/A in listed_turf)
if(A.invisibility > see_invisible)
continue
statpanel(listed_turf.name, null, A)
if(spell_list && spell_list.len)
for(var/obj/effect/proc_holder/spell/S in spell_list)

View File

@@ -55,7 +55,6 @@
var/disabilities = 0 //Carbon
var/atom/movable/pulling = null
var/next_move = null
var/prev_move = null
var/monkeyizing = null //Carbon
var/other = 0.0
var/hand = null
@@ -116,7 +115,6 @@
var/a_intent = "help"//Living
var/m_int = null//Living
var/m_intent = "run"//Living
var/lastDblClick = 0
var/lastKnownIP = null
var/obj/structure/stool/bed/buckled = null//Living
var/obj/item/l_hand = null//Living
@@ -216,3 +214,5 @@
var/can_stand = 1 //Whether this mob have ability to stand
var/immune_to_ssd = 0
var/turf/listed_turf = null //the current turf being examined in the stat panel

View File

@@ -1,94 +1,79 @@
#define UPGRADE_COOLDOWN 40
#define UPGRADE_KILL_TIMER 100
/obj/item/weapon/grab
name = "grab"
icon = 'icons/mob/screen1.dmi'
icon_state = "grabbed"
var/obj/screen/grab/hud1 = null
flags = NOBLUDGEON
var/obj/screen/grab/hud = null
var/mob/affecting = null
var/atom/movable/structure = null // if the grab is not grabbing a mob
var/mob/assailant = null
var/state = 1.0
var/state = GRAB_PASSIVE
var/killing = 0.0 // 1 = about to kill, 2 = killing
var/kill_loc = null
var/allow_upgrade = 1.0
var/last_suffocate = 1.0
var/allow_upgrade = 1
var/last_upgrade = 0
layer = 21
abstract = 1.0
abstract = 1
item_state = "nothing"
w_class = 5.0
/obj/item/weapon/grab/proc/throw()
/obj/item/weapon/grab/New(mob/user, mob/victim)
..()
loc = user
assailant = user
affecting = victim
if(affecting)
if(state >= 2)
var/grabee = affecting
spawn(1)
del(src)
return grabee
else
spawn(1)
del(src)
return null
else if(structure)
var/grabee = structure
spawn(1)
del(src)
return grabee
return null
/obj/item/weapon/grab/proc/synch()
if(affecting)
if(affecting.anchored)//This will prevent from grabbing people that are anchored.
del(src)
if (assailant.r_hand == src)
hud1.screen_loc = ui_rhand
else
hud1.screen_loc = ui_lhand
return
/obj/item/weapon/grab/process()
if(!assailant || (!affecting && !structure))
if(affecting.anchored)
del(src)
return
if(affecting && !structure)
if ((!( isturf(assailant.loc) ) || (!( isturf(affecting.loc) ) || (assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1))))
//SN src = null
del(src)
return
else if(!affecting && structure)
if (!isturf(structure.loc) || !isturf(structure.loc) || (assailant.loc != structure.loc && get_dist(assailant, structure) > 1))
del(src)
return
hud = new /obj/screen/grab(src)
hud.icon_state = "reinforce"
hud.name = "reinforce grab"
hud.master = src
if (assailant.client)
assailant.client.screen -= hud1
assailant.client.screen += hud1
if (assailant.pulling == affecting || assailant.pulling == structure)
//Used by throw code to hand over the mob, instead of throwing the grab. The grab is then deleted by the throw code.
/obj/item/weapon/grab/proc/throw()
if(affecting)
if(affecting.buckled)
return null
if(state >= GRAB_AGGRESSIVE)
return affecting
return null
//This makes sure that the grab screen object is displayed in the correct hand.
/obj/item/weapon/grab/proc/synch()
if(affecting)
if(assailant.r_hand == src)
hud.screen_loc = ui_rhand
else
hud.screen_loc = ui_lhand
/obj/item/weapon/grab/process()
confirm()
if(assailant.client)
assailant.client.screen -= hud
assailant.client.screen += hud
if(assailant.pulling == affecting)
assailant.stop_pulling()
if (structure)
structure.loc = assailant.loc
structure.layer = assailant.layer + 1
if (state <= 2)
if(state <= GRAB_AGGRESSIVE)
allow_upgrade = 1
if ((assailant.l_hand && assailant.l_hand != src && istype(assailant.l_hand, /obj/item/weapon/grab)))
if((assailant.l_hand && assailant.l_hand != src && istype(assailant.l_hand, /obj/item/weapon/grab)))
var/obj/item/weapon/grab/G = assailant.l_hand
if (G.affecting != affecting)
if(G.affecting != affecting)
allow_upgrade = 0
if ((assailant.r_hand && assailant.r_hand != src && istype(assailant.r_hand, /obj/item/weapon/grab)))
if((assailant.r_hand && assailant.r_hand != src && istype(assailant.r_hand, /obj/item/weapon/grab)))
var/obj/item/weapon/grab/G = assailant.r_hand
if (G.affecting != affecting)
if(G.affecting != affecting)
allow_upgrade = 0
if (state == 2)
if(state == GRAB_AGGRESSIVE)
var/h = affecting.hand
affecting.hand = 0
affecting.drop_item()
@@ -96,185 +81,124 @@
affecting.drop_item()
affecting.hand = h
for(var/obj/item/weapon/grab/G in affecting.grabbed_by)
if (G.state == 2)
if(G == src) continue
if(G.state == GRAB_AGGRESSIVE)
allow_upgrade = 0
if (allow_upgrade)
hud1.icon_state = "reinforce"
if(allow_upgrade)
hud.icon_state = "reinforce"
else
hud1.icon_state = "!reinforce"
hud.icon_state = "!reinforce"
else
if (!( affecting.buckled ))
if(!affecting.buckled)
affecting.loc = assailant.loc
if ((killing == 2 && state == 3))
if(assailant.loc != kill_loc)
assailant.visible_message("\red [assailant] lost \his tightened grip on [affecting]'s neck!")
killing = 0
hud1.icon_state = "disarm/kill"
return
if(ishuman(affecting))
var/mob/living/carbon/human/H = affecting
var/datum/organ/external/head = H.get_organ("head")
head.add_autopsy_data("Strangulation", 0)
if(state >= GRAB_NECK)
affecting.Stun(5) //It will hamper your voice, being choked and all.
if(isliving(affecting))
var/mob/living/L = affecting
L.adjustOxyLoss(1)
affecting.Weaken(5) // Should keep you down unless you get help.
affecting.Stun(5) // It will hamper your voice, being choked and all.
if(state >= GRAB_KILL)
affecting.Weaken(5) //Should keep you down unless you get help.
affecting.losebreath = min(affecting.losebreath + 2, 3)
return
/obj/item/weapon/grab/proc/s_click(obj/screen/S as obj)
if (!affecting)
/obj/item/weapon/grab/proc/s_click(obj/screen/S)
if(!affecting)
return
if(killing)
if(state == GRAB_UPGRADING)
return
if (assailant.next_move > world.time)
if(assailant.next_move > world.time)
return
if ((!( assailant.canmove ) || assailant.lying))
//SN src = null
if(world.time < (last_upgrade + UPGRADE_COOLDOWN))
return
if(!assailant.canmove || assailant.lying)
del(src)
return
switch(S.id)
if(1.0)
if (state >= 3)
if (!( killing ))
assailant.visible_message("\red [assailant] has temporarily tightened \his grip on [affecting]!")
//Foreach goto(97)
assailant.next_move = world.time + 10
//affecting.stunned = max(2, affecting.stunned)
//affecting.paralysis = max(1, affecting.paralysis)
affecting.losebreath = min(affecting.losebreath + 1, 3)
last_suffocate = world.time
flick("disarm/killf", S)
last_upgrade = world.time
if(state < GRAB_AGGRESSIVE)
if(!allow_upgrade)
return
assailant.visible_message("<span class='warning'>[assailant] has grabbed [affecting] aggressively (now hands)!</span>")
state = GRAB_AGGRESSIVE
icon_state = "grabbed1"
else
if(state < GRAB_NECK)
if(isslime(affecting))
assailant << "<span class='notice'>You squeeze [affecting], but nothing interesting happens.</span>"
return
assailant.visible_message("<span class='warning'>[assailant] has reinforced \his grip on [affecting] (now neck)!</span>")
state = GRAB_NECK
icon_state = "grabbed+1"
if(!affecting.buckled)
affecting.loc = assailant.loc
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has had their neck grabbed by [assailant.name] ([assailant.ckey])</font>"
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Grabbed the neck of [affecting.name] ([affecting.ckey])</font>"
log_attack("<font color='red'>[assailant.name] ([assailant.ckey]) grabbed the neck of [affecting.name] ([affecting.ckey])</font>")
hud.icon_state = "disarm/kill"
hud.name = "disarm/kill"
else
return
/obj/item/weapon/grab/proc/s_dbclick(obj/screen/S as obj)
//if ((assailant.next_move > world.time && !( last_suffocate < world.time + 2 )))
// return
if (!affecting)
return
if ((!( assailant.canmove ) || assailant.lying))
del(src)
return
if(killing)
return
switch(S.id)
if(1.0)
if (state < 2)
if (!( allow_upgrade ))
return
assailant.visible_message("\red [assailant] has grabbed [affecting] aggressively (now hands)!")
state = 2
icon_state = "grabbed1"
/*if (prob(75))
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has grabbed [] aggressively (now hands)!", assailant, affecting), 1)
state = 2
icon_state = "grabbed1"
else
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has failed to grab [] aggressively!", assailant, affecting), 1)
del(src)
return*/
else
if (state < 3)
if(istype(affecting, /mob/living/carbon/human))
var/mob/living/carbon/human/H = affecting
if(FAT in H.mutations)
assailant << "\blue You can't strangle [affecting] through all that fat!"
return
/*Hrm might want to add this back in
//we should be able to strangle the Captain if he is wearing a hat
for(var/obj/item/clothing/C in list(H.head, H.wear_suit, H.wear_mask, H.w_uniform))
if(C.body_parts_covered & HEAD)
assailant << "\blue You have to take off [affecting]'s [C.name] first!"
return
if(istype(H.wear_suit, /obj/item/clothing/suit/space) || istype(H.wear_suit, /obj/item/clothing/suit/armor) || istype(H.wear_suit, /obj/item/clothing/suit/bio_suit) || istype(H.wear_suit, /obj/item/clothing/suit/swat_suit))
assailant << "\blue You can't strangle [affecting] through their suit collar!"
return
*/
if(istype(affecting, /mob/living/carbon/slime))
assailant << "\blue You squeeze [affecting], but nothing interesting happens."
if(state < GRAB_UPGRADING)
assailant.visible_message("<span class='danger'>[assailant] starts to tighten \his grip on [affecting]'s neck!</span>")
hud.icon_state = "disarm/kill1"
state = GRAB_UPGRADING
if(do_after(assailant, UPGRADE_KILL_TIMER))
if(state == GRAB_KILL)
return
if(!affecting)
del(src)
return
if(!assailant.canmove || assailant.lying)
del(src)
return
state = GRAB_KILL
assailant.visible_message("<span class='danger'>[assailant] has tightened \his grip on [affecting]'s neck!</span>")
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>"
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>"
log_attack("<font color='red'>[assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
assailant.visible_message("\red [assailant] has reinforced \his grip on [affecting] (now neck)!")
state = 3
icon_state = "grabbed+1"
if (!( affecting.buckled ))
affecting.loc = assailant.loc
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their neck grabbed by [assailant.name] ([assailant.ckey])</font>")
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Grabbed the neck of [affecting.name] ([affecting.ckey])</font>")
msg_admin_attack("[assailant.name] ([assailant.ckey]) grabbed the neck of [affecting.name] ([affecting.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[assailant.x];Y=[assailant.y];Z=[assailant.z]'>JMP</a>)")
hud1.icon_state = "disarm/kill"
hud1.name = "disarm/kill"
assailant.next_move = world.time + 10
affecting.losebreath += 1
else
if (state >= 3 && !killing)
assailant.visible_message("\red [assailant] starts to tighten \his grip on [affecting]'s neck!")
hud1.icon_state = "disarm/kill1"
killing = 1
if(do_after(assailant, 40))
if(killing == 2)
return
if(!affecting)
del(src)
return
if ((!( assailant.canmove ) || assailant.lying))
del(src)
return
killing = 2
kill_loc = assailant.loc
assailant.visible_message("\red [assailant] has tightened \his grip on [affecting]'s neck!")
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>")
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
msg_admin_attack("[assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[assailant.x];Y=[assailant.y];Z=[assailant.z]'>JMP</a>)")
assailant.next_move = world.time + 10
affecting.losebreath += 1
else
assailant.visible_message("\red [assailant] was unable to tighten \his grip on [affecting]'s neck!")
killing = 0
hud1.icon_state = "disarm/kill"
return
assailant.visible_message("<span class='warning'>[assailant] was unable to tighten \his grip on [affecting]'s neck!</span>")
hud.icon_state = "disarm/kill"
state = GRAB_NECK
/obj/item/weapon/grab/New(var/location, mob/user as mob, mob/affected as mob)
..()
src.loc = location
src.assailant = user
src.affecting = affected
// HUD
hud1 = new /obj/screen/grab( src )
hud1.icon_state = "reinforce"
hud1.name = "Reinforce Grab"
hud1.id = 1
hud1.master = src
return
//This is used to make sure the victim hasn't managed to yackety sax away before using the grab.
/obj/item/weapon/grab/proc/confirm()
if(!assailant || !affecting)
del(src)
return 0
if(affecting)
if(!isturf(assailant.loc) || ( !isturf(affecting.loc) || assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1) )
del(src)
return 0
return 1
/obj/item/weapon/grab/attack(mob/M as mob, mob/user as mob)
if(!affecting) return
if (M == affecting)
if (state < 3)
s_dbclick(hud1)
else
s_click(hud1)
/obj/item/weapon/grab/attack(mob/M, mob/user)
if(!affecting)
return
if(M == assailant && state >= 2)
if( ( ishuman(user) && (FAT in user.mutations) && ismonkey(affecting) ) || ( isalien(user) && iscarbon(affecting) ) )
if(M == affecting)
s_click(hud)
return
if(M == assailant && state >= GRAB_AGGRESSIVE)
if( (ishuman(user) && (FAT in user.mutations) && ismonkey(affecting) ) || ( isalien(user) && iscarbon(affecting) ) )
var/mob/living/carbon/attacker = user
user.visible_message("\red <B>[user] is attempting to devour [affecting]!</B>")
user.visible_message("<span class='danger'>[user] is attempting to devour [affecting]!</span>")
if(istype(user, /mob/living/carbon/alien/humanoid/hunter))
if(!do_mob(user, affecting)||!do_after(user, 30)) return
else
if(!do_mob(user, affecting)||!do_after(user, 100)) return
user.visible_message("\red <B>[user] devours [affecting]!</B>")
user.visible_message("<span class='danger'>[user] devours [affecting]!</span>")
affecting.loc = user
attacker.stomach_contents.Add(affecting)
del(src)
@@ -282,10 +206,7 @@
/obj/item/weapon/grab/dropped()
del(src)
return
/obj/item/weapon/grab/Del()
del(hud1)
del(hud)
..()
return

View File

@@ -358,57 +358,6 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
return 0
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
/mob/verb/button_pressed_F12()
set name = "F12"
set hidden = 1
if(hud_used)
if(ishuman(src))
if(!src.client) return
if(hud_used.hud_shown)
hud_used.hud_shown = 0
if(src.hud_used.adding)
src.client.screen -= src.hud_used.adding
if(src.hud_used.other)
src.client.screen -= src.hud_used.other
if(src.hud_used.hotkeybuttons)
src.client.screen -= src.hud_used.hotkeybuttons
if(src.hud_used.item_action_list)
src.client.screen -= src.hud_used.item_action_list
//Due to some poor coding some things need special treatment:
//These ones are a part of 'adding', 'other' or 'hotkeybuttons' but we want them to stay
src.client.screen += src.hud_used.l_hand_hud_object //we want the hands to be visible
src.client.screen += src.hud_used.r_hand_hud_object //we want the hands to be visible
src.client.screen += src.hud_used.action_intent //we want the intent swticher visible
src.hud_used.action_intent.screen_loc = ui_acti_alt //move this to the alternative position, where zone_select usually is.
//These ones are not a part of 'adding', 'other' or 'hotkeybuttons' but we want them gone.
src.client.screen -= src.zone_sel //zone_sel is a mob variable for some reason.
else
hud_used.hud_shown = 1
if(src.hud_used.adding)
src.client.screen += src.hud_used.adding
if(src.hud_used.other && src.hud_used.inventory_shown)
src.client.screen += src.hud_used.other
if(src.hud_used.hotkeybuttons && !src.hud_used.hotkey_ui_hidden)
src.client.screen += src.hud_used.hotkeybuttons
src.hud_used.action_intent.screen_loc = ui_acti //Restore intent selection to the original position
src.client.screen += src.zone_sel //This one is a special snowflake
hud_used.hidden_inventory_update()
hud_used.persistant_inventory_update()
update_action_buttons()
else
usr << "\red Inventory hiding is currently only supported for human mobs, sorry."
else
usr << "\red This mob type does not use a HUD."
//converts intent-strings into numbers and back
var/list/intents = list("help","disarm","grab","hurt")
/proc/intent_numeric(argument)

View File

@@ -70,73 +70,9 @@
set hidden = 1
if(istype(mob, /mob/living/carbon))
mob:swap_hand()
if(istype(mob,/mob/living/silicon/robot))//Oh nested logic loops, is there anything you can't do? -Sieve
if(istype(mob,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = mob
if(!R.module_active)
if(!R.module_state_1)
if(!R.module_state_2)
if(!R.module_state_3)
return
else
R:inv1.icon_state = "inv1"
R:inv2.icon_state = "inv2"
R:inv3.icon_state = "inv3 +a"
R:module_active = R:module_state_3
else
R:inv1.icon_state = "inv1"
R:inv2.icon_state = "inv2 +a"
R:inv3.icon_state = "inv3"
R:module_active = R:module_state_2
else
R:inv1.icon_state = "inv1 +a"
R:inv2.icon_state = "inv2"
R:inv3.icon_state = "inv3"
R:module_active = R:module_state_1
else
if(R.module_active == R.module_state_1)
if(!R.module_state_2)
if(!R.module_state_3)
return
else
R:inv1.icon_state = "inv1"
R:inv2.icon_state = "inv2"
R:inv3.icon_state = "inv3 +a"
R:module_active = R:module_state_3
else
R:inv1.icon_state = "inv1"
R:inv2.icon_state = "inv2 +a"
R:inv3.icon_state = "inv3"
R:module_active = R:module_state_2
else if(R.module_active == R.module_state_2)
if(!R.module_state_3)
if(!R.module_state_1)
return
else
R:inv1.icon_state = "inv1 +a"
R:inv2.icon_state = "inv2"
R:inv3.icon_state = "inv3"
R:module_active = R:module_state_1
else
R:inv1.icon_state = "inv1"
R:inv2.icon_state = "inv2"
R:inv3.icon_state = "inv3 +a"
R:module_active = R:module_state_3
else if(R.module_active == R.module_state_3)
if(!R.module_state_1)
if(!R.module_state_2)
return
else
R:inv1.icon_state = "inv1"
R:inv2.icon_state = "inv2 +a"
R:inv3.icon_state = "inv3"
R:module_active = R:module_state_2
else
R:inv1.icon_state = "inv1 +a"
R:inv2.icon_state = "inv2"
R:inv3.icon_state = "inv3"
R:module_active = R:module_state_1
else
return
R.cycle_modules()
return
@@ -176,7 +112,7 @@
/atom/movable/Move(NewLoc, direct)
if (direct & direct - 1)
if (direct & (direct - 1))
if (direct & 1)
if (direct & 4)
if (step(src, NORTH))
@@ -276,9 +212,12 @@
if(mob.restrained())//Why being pulled while cuffed prevents you from moving
for(var/mob/M in range(mob, 1))
if(M.pulling == mob && !M.restrained() && M.stat == 0 && M.canmove)
src << "\blue You're restrained! You can't move!"
return 0
if(M.pulling == mob)
if(!M.restrained() && M.stat == 0 && M.canmove && mob.Adjacent(M))
src << "\blue You're restrained! You can't move!"
return 0
else
M.stop_pulling()
if(mob.pinned.len)
src << "\blue You're pinned to a wall by [mob.pinned[1]]!"

View File

@@ -1,3 +0,0 @@
/datum/hud/proc/unplayer_hud()
return

View File

@@ -119,12 +119,17 @@
var/obj/O = locate("landmark*Observer-Start")
src << "\blue Now teleporting."
observer.loc = O.loc
observer.timeofdeath = world.time // Set the time of death so that the respawn timer works correctly.
client.prefs.update_preview_icon()
observer.icon = client.prefs.preview_icon
observer.alpha = 127
if(client.prefs.be_random_name)
client.prefs.real_name = random_name(client.prefs.gender)
observer.real_name = client.prefs.real_name
observer.name = observer.real_name
observer.key = key
del(src)
return 1

View File

@@ -131,7 +131,7 @@ datum/preferences
proc/update_preview_icon() //seriously. This is horrendous.
del(preview_icon_front)
del(preview_icon_side)
var/icon/preview_icon = null
del(preview_icon)
var/g = "m"
if(gender == FEMALE) g = "f"
@@ -566,6 +566,5 @@ datum/preferences
preview_icon_front = new(preview_icon, dir = SOUTH)
preview_icon_side = new(preview_icon, dir = WEST)
del(preview_icon)
del(eyes_s)
del(clothes_s)

View File

@@ -1,834 +0,0 @@
/obj/screen
name = ""
icon = 'icons/mob/screen1.dmi'
layer = 20.0
unacidable = 1
var/id = 0.0
var/obj/master
var/gun_click_time = -100 //I'm lazy.
/obj/screen/text
icon = null
icon_state = null
mouse_opacity = 0
screen_loc = "CENTER-7,CENTER-7"
maptext_height = 480
maptext_width = 480
/obj/screen/inventory
var/slot_id
/obj/screen/close
name = "close"
master = null
/obj/screen/close/DblClick()
if (src.master)
src.master:close(usr)
return
/obj/screen/item_action
var/obj/item/owner
/obj/screen/item_action/DblClick()
if(!usr || !owner)
return
if(usr.stat || usr.restrained() || usr.stunned || usr.lying)
return
if(!(owner in usr))
return
spawn()
owner.ui_action_click()
switch(owner.icon_action_button)
if("action_hardhat", "action_welding")
usr.update_inv_head()
if("action_welding_g")
usr.update_inv_glasses()
if("action_jetpack")
usr.update_inv_back()
//This is the proc used to update all the action buttons. It just returns for all mob types except humans.
/mob/proc/update_action_buttons()
return
/obj/screen/grab
name = "grab"
master = null
/obj/screen/storage
name = "storage"
master = null
/obj/screen/storage/attack_hand(mob/user)
if(master)
var/obj/item/I = user.get_active_hand()
if(I)
master.attackby(I, user)
/obj/screen/zone_sel
name = "Damage Zone"
icon = 'icons/mob/screen1.dmi'
icon_state = "zone_sel"
var/selecting = "chest"
screen_loc = ui_zonesel
/obj/screen/gun
name = "gun"
icon = 'icons/mob/screen1.dmi'
master = null
dir = 2
move
name = "Allow Walking"
icon_state = "no_walk0"
screen_loc = ui_gun2
run
name = "Allow Running"
icon_state = "no_run0"
screen_loc = ui_gun3
item
name = "Allow Item Use"
icon_state = "no_item0"
screen_loc = ui_gun1
mode
name = "Toggle Gun Mode"
icon_state = "gun0"
screen_loc = ui_gun_select
//dir = 1
/obj/screen/zone_sel/MouseDown(location, control,params)
// Changes because of 4.0
var/list/PL = params2list(params)
var/icon_x = text2num(PL["icon-x"])
var/icon_y = text2num(PL["icon-y"])
if (icon_y < 2)
return
else if (icon_y < 5)
if ((icon_x > 9 && icon_x < 23))
if (icon_x < 16)
selecting = "r_foot"
else
selecting = "l_foot"
else if (icon_y < 11)
if ((icon_x > 11 && icon_x < 21))
if (icon_x < 16)
selecting = "r_leg"
else
selecting = "l_leg"
else if (icon_y < 12)
if ((icon_x > 11 && icon_x < 21))
if (icon_x < 14)
selecting = "r_leg"
else if (icon_x < 19)
selecting = "groin"
else
selecting = "l_leg"
else
return
else if (icon_y < 13)
if ((icon_x > 7 && icon_x < 25))
if (icon_x < 12)
selecting = "r_hand"
else if (icon_x < 13)
selecting = "r_leg"
else if (icon_x < 20)
selecting = "groin"
else if (icon_x < 21)
selecting = "l_leg"
else
selecting = "l_hand"
else
return
else if (icon_y < 14)
if ((icon_x > 7 && icon_x < 25))
if (icon_x < 12)
selecting = "r_hand"
else if (icon_x < 21)
selecting = "groin"
else
selecting = "l_hand"
else
return
else if (icon_y < 16)
if ((icon_x > 7 && icon_x < 25))
if (icon_x < 13)
selecting = "r_hand"
else if (icon_x < 20)
selecting = "chest"
else
selecting = "l_hand"
else
return
else if (icon_y < 23)
if ((icon_x > 7 && icon_x < 25))
if (icon_x < 12)
selecting = "r_arm"
else if (icon_x < 21)
selecting = "chest"
else
selecting = "l_arm"
else
return
else if (icon_y < 24)
if ((icon_x > 11 && icon_x < 21))
selecting = "chest"
else
return
else if (icon_y < 25)
if ((icon_x > 11 && icon_x < 21))
if (icon_x < 16)
selecting = "head"
else if (icon_x < 17)
selecting = "mouth"
else
selecting = "head"
else
return
else if (icon_y < 26)
if ((icon_x > 11 && icon_x < 21))
if (icon_x < 15)
selecting = "head"
else if (icon_x < 18)
selecting = "mouth"
else
selecting = "head"
else
return
else if (icon_y < 27)
if ((icon_x > 11 && icon_x < 21))
if (icon_x < 15)
selecting = "head"
else if (icon_x < 16)
selecting = "eyes"
else if (icon_x < 17)
selecting = "mouth"
else if (icon_x < 18)
selecting = "eyes"
else
selecting = "head"
else
return
else if (icon_y < 28)
if ((icon_x > 11 && icon_x < 21))
if (icon_x < 14)
selecting = "head"
else if (icon_x < 19)
selecting = "eyes"
else
selecting = "head"
else
return
else if (icon_y < 29)
if ((icon_x > 11 && icon_x < 21))
if (icon_x < 15)
selecting = "head"
else if (icon_x < 16)
selecting = "eyes"
else if (icon_x < 17)
selecting = "head"
else if (icon_x < 18)
selecting = "eyes"
else
selecting = "head"
else
return
else if (icon_y < 31)
if ((icon_x > 11 && icon_x < 21))
selecting = "head"
else
return
else
return
overlays.Cut()
overlays += image('icons/mob/zone_sel.dmi', "[selecting]")
return
/obj/screen/grab/Click()
master:s_click(src)
return
/obj/screen/grab/DblClick()
master:s_dbclick(src)
return
/obj/screen/grab/attack_hand()
return
/obj/screen/grab/attackby()
return
/*
/obj/screen/MouseEntered(object,location,control,params)
if(!ishuman(usr) && !istype(usr,/mob/living/carbon/alien/humanoid) && !islarva(usr) && !ismonkey(usr))
return
switch(name)
if("act_intent")
if(ishuman(usr) || istype(usr,/mob/living/carbon/alien/humanoid) || islarva(usr))
usr.hud_used.action_intent.icon_state = "intent_[usr.a_intent]"
/obj/screen/MouseExited(object,location,control,params)
if(!ishuman(usr) && !istype(usr,/mob/living/carbon/alien/humanoid) && !islarva(usr) && !ismonkey(usr))
return
switch(name)
if("act_intent")
if(ishuman(usr) || istype(usr,/mob/living/carbon/alien/humanoid) || islarva(usr))
var/intent = usr.a_intent
if(intent == "hurt")
intent = "harm" //hurt and harm have different sprite names for some reason.
usr.hud_used.action_intent.icon_state = "[intent]"
*/
/obj/screen/Click(location, control, params)
if(!usr) return
switch(name)
if("map")
usr.clearmap()
if("other")
if (usr.hud_used.inventory_shown)
usr.hud_used.inventory_shown = 0
usr.client.screen -= usr.hud_used.other
else
usr.hud_used.inventory_shown = 1
usr.client.screen += usr.hud_used.other
usr.hud_used.hidden_inventory_update()
if("equip")
usr.quick_equip()
if("resist")
if(isliving(usr))
var/mob/living/L = usr
L.resist()
if("maprefresh")
var/obj/machinery/computer/security/seccomp = usr.machine
if(seccomp!=null)
seccomp.drawmap(usr)
else
usr.clearmap()
if("mov_intent")
if(iscarbon(usr))
var/mob/living/carbon/C = usr
if(C.legcuffed)
C << "\red You are legcuffed! You cannot run until you get your cuffs removed!"
C.m_intent = "walk" //Just incase
C.hud_used.move_intent.icon_state = "walking"
return
switch(usr.m_intent)
if("run")
usr.m_intent = "walk"
usr.hud_used.move_intent.icon_state = "walking"
if("walk")
usr.m_intent = "run"
usr.hud_used.move_intent.icon_state = "running"
if(istype(usr,/mob/living/carbon/alien/humanoid)) usr.update_icons()
if("m_intent")
if (!( usr.m_int ))
switch(usr.m_intent)
if("run")
usr.m_int = "13,14"
if("walk")
usr.m_int = "14,14"
if("face")
usr.m_int = "15,14"
else
usr.m_int = null
if("walk")
usr.m_intent = "walk"
usr.m_int = "14,14"
if("face")
usr.m_intent = "face"
usr.m_int = "15,14"
if("run")
usr.m_intent = "run"
usr.m_int = "13,14"
if("Reset Machine")
usr.unset_machine()
if("internal")
if (( !usr.stat && !usr.stunned && !usr.paralysis && !usr.restrained() ))
if (usr.internal)
usr.internal = null
usr << "\blue No longer running on internals."
if (usr.internals)
usr.internals.icon_state = "internal0"
else
if(ishuman(usr))
if (!( istype(usr.wear_mask, /obj/item/clothing/mask) ))
usr << "\red You are not wearing a mask"
return
else
if (ishuman(usr) && istype(usr:s_store, /obj/item/weapon/tank))
usr << "\blue You are now running on internals from the [usr:s_store] on your [usr:wear_suit]."
usr.internal = usr:s_store
else if (ishuman(usr) && istype(usr:belt, /obj/item/weapon/tank))
usr << "\blue You are now running on internals from the [usr:belt] on your belt."
usr.internal = usr:belt
else if (istype(usr:l_store, /obj/item/weapon/tank))
usr << "\blue You are now running on internals from the [usr:l_store] in your left pocket."
usr.internal = usr:l_store
else if (istype(usr:r_store, /obj/item/weapon/tank))
usr << "\blue You are now running on internals from the [usr:r_store] in your right pocket."
usr.internal = usr:r_store
else if (istype(usr.back, /obj/item/weapon/tank))
usr << "\blue You are now running on internals from the [usr.back] on your back."
usr.internal = usr.back
else if (istype(usr.l_hand, /obj/item/weapon/tank))
usr << "\blue You are now running on internals from the [usr.l_hand] on your left hand."
usr.internal = usr.l_hand
else if (istype(usr.r_hand, /obj/item/weapon/tank))
usr << "\blue You are now running on internals from the [usr.r_hand] on your right hand."
usr.internal = usr.r_hand
if (usr.internal)
//for(var/mob/M in viewers(usr, 1))
// M.show_message(text("[] is now running on internals.", usr), 1)
if (usr.internals)
usr.internals.icon_state = "internal1"
else
usr << "\blue You don't have an oxygen tank."
if("act_intent")
if(issilicon(usr))
if(usr.a_intent == "help")
usr.a_intent = "hurt"
usr.hud_used.action_intent.icon_state = "harm"
else
usr.a_intent = "help"
usr.hud_used.action_intent.icon_state = "help"
else
usr.a_intent_change("right")
if("help")
usr.a_intent = "help"
usr.hud_used.action_intent.icon_state = "intent_help"
if("harm")
usr.a_intent = "hurt"
usr.hud_used.action_intent.icon_state = "intent_hurt"
if("grab")
usr.a_intent = "grab"
usr.hud_used.action_intent.icon_state = "intent_grab"
if("disarm")
usr.a_intent = "disarm"
usr.hud_used.action_intent.icon_state = "intent_disarm"
if("pull")
usr.stop_pulling()
if("throw")
if (!usr.stat && isturf(usr.loc) && !usr.restrained())
usr:toggle_throw_mode()
if("drop")
usr.drop_item_v()
if("swap")
usr:swap_hand()
if("hand")
usr:swap_hand()
if("r_hand")
if(iscarbon(usr))
var/mob/living/carbon/C = usr
C.activate_hand("r")
if("l_hand")
if(iscarbon(usr))
var/mob/living/carbon/C = usr
C.activate_hand("l")
if("module")
if(issilicon(usr))
if(usr:module)
return
usr:pick_module()
if("radio")
if(issilicon(usr))
usr:radio_menu()
if("panel")
if(issilicon(usr))
usr:installed_modules()
if("store")
if(issilicon(usr))
usr:uneq_active()
if("module1")
if(usr:module_state_1)
if(usr:module_active != usr:module_state_1)
usr:inv1.icon_state = "inv1 +a"
usr:inv2.icon_state = "inv2"
usr:inv3.icon_state = "inv3"
usr:module_active = usr:module_state_1
else
usr:inv1.icon_state = "inv1"
usr:module_active = null
if("module2")
if(usr:module_state_2)
if(usr:module_active != usr:module_state_2)
usr:inv1.icon_state = "inv1"
usr:inv2.icon_state = "inv2 +a"
usr:inv3.icon_state = "inv3"
usr:module_active = usr:module_state_2
else
usr:inv2.icon_state = "inv2"
usr:module_active = null
if("module3")
if(usr:module_state_3)
if(usr:module_active != usr:module_state_3)
usr:inv1.icon_state = "inv1"
usr:inv2.icon_state = "inv2"
usr:inv3.icon_state = "inv3 +a"
usr:module_active = usr:module_state_3
else
usr:inv3.icon_state = "inv3"
usr:module_active = null
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))
usr << "You need your gun in your active hand to do that!"
return
usr.client.AllowTargetMove()
gun_click_time = world.time
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))
usr << "You need your gun in your active hand to do that!"
return
usr.client.AllowTargetMove()
gun_click_time = world.time
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))
usr << "You need your gun in your active hand to do that!"
return
usr.client.AllowTargetRun()
gun_click_time = world.time
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))
usr << "You need your gun in your active hand to do that!"
return
usr.client.AllowTargetRun()
gun_click_time = world.time
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))
usr << "You need your gun in your active hand to do that!"
return
usr.client.AllowTargetClick()
gun_click_time = world.time
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))
usr << "You need your gun in your active hand to do that!"
return
usr.client.AllowTargetClick()
gun_click_time = world.time
if("Toggle Gun Mode")
usr.client.ToggleGunMode()
else
DblClick()
return
/obj/screen/inventory/attack_hand(mob/user as mob)
user.attack_ui(slot_id)
user.update_inv_l_hand(0)
user.update_inv_r_hand()
return
/obj/screen/inventory/attack_paw(mob/user as mob)
user.attack_ui(slot_id)
user.update_inv_l_hand(0)
user.update_inv_r_hand()
return
/mob/living/carbon/verb/mob_sleep()
set name = "Sleep"
set category = "IC"
if(usr.sleeping)
usr << "\red You are already sleeping"
return
else
if(alert(src,"You sure you want to sleep for a while?","Sleep","Yes","No") == "Yes")
usr.sleeping = 20 //Short nap
/mob/living/verb/lay_down()
set name = "Rest"
set category = "IC"
resting = !resting
src << "\blue You are now [resting ? "resting" : "getting up"]"
/mob/verb/quick_equip()
set name = "quick-equip"
set hidden = 1
var/obj/item/I = usr.get_active_hand()
if(!I)
usr << "\blue You are not holding anything to equip."
return
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
H.equip_to_appropriate_slot(I)
H.update_inv_l_hand(0)
H.update_inv_r_hand()
/mob/living/verb/resist()
set name = "Resist"
set category = "IC"
if(!isliving(usr) || usr.next_move > world.time)
return
usr.next_move = world.time + 20
var/mob/living/L = usr
//Resisting control by an alien mind.
if(istype(src.loc,/mob/living/simple_animal/borer))
var/mob/living/simple_animal/borer/B = src.loc
var/mob/living/captive_brain/H = src
H << "\red <B>You begin doggedly resisting the parasite's control (this will take approximately sixty seconds).</B>"
B.host << "\red <B>You feel the captive mind of [src] begin to resist your control.</B>"
spawn(rand(350,450)+B.host.brainloss)
if(!B || !B.controlling)
return
B.host.adjustBrainLoss(rand(5,10))
H << "\red <B>With an immense exertion of will, you regain control of your body!</B>"
B.host << "\red <B>You feel control of the host brain ripped from your grasp, and retract your probosci before the wild neural impulses can damage you.</b>"
B.controlling = 0
B.ckey = B.host.ckey
B.host.ckey = H.ckey
H.ckey = null
H.name = "host brain"
H.real_name = "host brain"
verbs -= /mob/living/carbon/proc/release_control
verbs -= /mob/living/carbon/proc/punish_host
verbs -= /mob/living/carbon/proc/spawn_larvae
return
//resisting grabs (as if it helps anyone...)
if ((!( L.stat ) && L.canmove && !( L.restrained() )))
var/resisting = 0
for(var/obj/O in L.requests)
L.requests.Remove(O)
del(O)
resisting++
for(var/obj/item/weapon/grab/G in usr.grabbed_by)
resisting++
if (G.state == 1)
del(G)
else
if (G.state == 2)
if (prob(25))
for(var/mob/O in viewers(L, null))
O.show_message(text("\red [] has broken free of []'s grip!", L, G.assailant), 1)
del(G)
else
if (G.state == 3)
if (prob(5))
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red [] has broken free of []'s headlock!", L, G.assailant), 1)
del(G)
if(resisting)
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red <B>[] resists!</B>", L), 1)
//unbuckling yourself
if(L.buckled && (L.last_special <= world.time) )
if(iscarbon(L))
var/mob/living/carbon/C = L
if( C.handcuffed )
C.next_move = world.time + 100
C.last_special = world.time + 100
C << "\red You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)"
for(var/mob/O in viewers(L))
O.show_message("\red <B>[usr] attempts to unbuckle themself!</B>", 1)
spawn(0)
if(do_after(usr, 1200))
if(!C.buckled)
return
for(var/mob/O in viewers(C))
O.show_message("\red <B>[usr] manages to unbuckle themself!</B>", 1)
C << "\blue You successfully unbuckle yourself."
C.buckled.manual_unbuckle(C)
else
L.buckled.manual_unbuckle(L)
//Breaking out of a locker?
else if( src.loc && (istype(src.loc, /obj/structure/closet)) )
var/breakout_time = 2 //2 minutes by default
var/obj/structure/closet/C = L.loc
if(C.opened)
return //Door's open... wait, why are you in it's contents then?
if(istype(L.loc, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = L.loc
if(!SC.locked && !SC.welded)
return //It's a secure closet, but isn't locked. Easily escapable from, no need to 'resist'
else
if(!C.welded)
return //closed but not welded...
// else Meh, lets just keep it at 2 minutes for now
// breakout_time++ //Harder to get out of welded lockers than locked lockers
//okay, so the closet is either welded or locked... resist!!!
usr.next_move = world.time + 100
L.last_special = world.time + 100
L << "\red You lean on the back of \the [C] and start pushing the door open. (this will take about [breakout_time] minutes)"
for(var/mob/O in viewers(usr.loc))
O.show_message("\red <B>The [L.loc] begins to shake violently!</B>", 1)
spawn(0)
if(do_after(usr,(breakout_time*60*10))) //minutes * 60seconds * 10deciseconds
if(!C || !L || L.stat != CONSCIOUS || L.loc != C || C.opened) //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
return
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
if(istype(L.loc, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = L.loc
if(!SC.locked && !SC.welded)
return
else
if(!C.welded)
return
//Well then break it!
if(istype(usr.loc, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = L.loc
SC.desc = "It appears to be broken."
SC.icon_state = SC.icon_off
flick(SC.icon_broken, SC)
sleep(10)
flick(SC.icon_broken, SC)
sleep(10)
SC.broken = 1
SC.locked = 0
usr << "\red You successfully break out!"
for(var/mob/O in viewers(L.loc))
O.show_message("\red <B>\the [usr] successfully broke out of \the [SC]!</B>", 1)
if(istype(SC.loc, /obj/structure/bigDelivery)) //Do this to prevent contents from being opened into nullspace (read: bluespace)
var/obj/structure/bigDelivery/BD = SC.loc
BD.attack_hand(usr)
SC.open()
else
C.welded = 0
usr << "\red You successfully break out!"
for(var/mob/O in viewers(L.loc))
O.show_message("\red <B>\the [usr] successfully broke out of \the [C]!</B>", 1)
if(istype(C.loc, /obj/structure/bigDelivery)) //nullspace ect.. read the comment above
var/obj/structure/bigDelivery/BD = C.loc
BD.attack_hand(usr)
C.open()
//breaking out of handcuffs
else if(iscarbon(L))
var/mob/living/carbon/CM = L
if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time))
CM.next_move = world.time + 100
CM.last_special = world.time + 100
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
usr << "\red You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)"
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] is trying to break the handcuffs!</B>", CM), 1)
spawn(0)
if(do_after(CM, 50))
if(!CM.handcuffed || CM.buckled)
return
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] manages to break the handcuffs!</B>", CM), 1)
CM << "\red You successfully break your handcuffs."
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
del(CM.handcuffed)
CM.handcuffed = null
CM.update_inv_handcuffed()
else
var/obj/item/weapon/handcuffs/HC = CM.handcuffed
var/breakouttime = 1200 //A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/handcuffs type
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
if(istype(HC)) //If you are handcuffed with actual handcuffs... Well what do I know, maybe someone will want to handcuff you with toilet paper in the future...
breakouttime = HC.breakouttime
displaytime = breakouttime / 600 //Minutes
CM << "\red You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)"
for(var/mob/O in viewers(CM))
O.show_message( "\red <B>[usr] attempts to remove \the [HC]!</B>", 1)
spawn(0)
if(do_after(CM, breakouttime))
if(!CM.handcuffed || CM.buckled)
return // time leniency for lag which also might make this whole thing pointless but the server
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
O.show_message("\red <B>[CM] manages to remove the handcuffs!</B>", 1)
CM << "\blue You successfully remove \the [CM.handcuffed]."
CM.handcuffed.loc = usr.loc
CM.handcuffed = null
CM.update_inv_handcuffed()
else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time))
CM.next_move = world.time + 100
CM.last_special = world.time + 100
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
usr << "\red You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)"
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] is trying to break the legcuffs!</B>", CM), 1)
spawn(0)
if(do_after(CM, 50))
if(!CM.legcuffed || CM.buckled)
return
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] manages to break the legcuffs!</B>", CM), 1)
CM << "\red You successfully break your legcuffs."
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
del(CM.legcuffed)
CM.legcuffed = null
CM.update_inv_legcuffed()
else
var/obj/item/weapon/legcuffs/HC = CM.legcuffed
var/breakouttime = 1200 //A default in case you are somehow legcuffed with something that isn't an obj/item/weapon/legcuffs type
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
if(istype(HC)) //If you are legcuffed with actual legcuffs... Well what do I know, maybe someone will want to legcuff you with toilet paper in the future...
breakouttime = HC.breakouttime
displaytime = breakouttime / 600 //Minutes
CM << "\red You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)"
for(var/mob/O in viewers(CM))
O.show_message( "\red <B>[usr] attempts to remove \the [HC]!</B>", 1)
spawn(0)
if(do_after(CM, breakouttime))
if(!CM.legcuffed || CM.buckled)
return // time leniency for lag which also might make this whole thing pointless but the server
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
O.show_message("\red <B>[CM] manages to remove the legcuffs!</B>", 1)
CM << "\blue You successfully remove \the [CM.legcuffed]."
CM.legcuffed.loc = usr.loc
CM.legcuffed = null
CM.update_inv_legcuffed()

View File

@@ -181,8 +181,31 @@
var/result = update_icon()
return result
/*
This function completely restores a damaged organ to perfect condition.
*/
/datum/organ/external/proc/rejuvenate()
damage_state = "00"
status = 0
perma_injury = 0
brute_dam = 0
burn_dam = 0
// handle internal organs
for(var/datum/organ/internal/current_organ in internal_organs)
current_organ.rejuvenate()
// remove embedded objects and drop them on the floor
for(var/obj/implanted_object in implants)
if(!istype(implanted_object,/obj/item/weapon/implant)) // We don't want to remove REAL implants. Just shrapnel etc.
implanted_object.loc = owner.loc
implants -= implanted_object
owner.updatehealth()
update_icon()
/datum/organ/external/proc/createwound(var/type = CUT, var/damage)
if(damage == 0) return

View File

@@ -11,6 +11,9 @@
var/min_broken_damage = 30
var/parent_organ = "chest"
/datum/organ/internal/proc/rejuvenate()
damage=0
/datum/organ/internal/proc/is_bruised()
return damage >= min_bruised_damage

View File

@@ -83,7 +83,7 @@ mob/living/carbon/human/proc/handle_pain()
for(var/datum/organ/external/E in organs)
// amputated limbs don't cause pain
if(E.amputated) continue
if(E.status & ORGAN_DEAD) continue
var/dam = E.get_damage()
// make the choice of the organ depend on damage,
// but also sometimes use one of the less damaged ones

View File

@@ -66,6 +66,22 @@
return
/obj/structure/filingcabinet/attack_tk(mob/user)
if(anchored)
attack_self_tk(user)
else
..()
/obj/structure/filingcabinet/attack_self_tk(mob/user)
if(contents.len)
if(prob(40 + contents.len * 5))
var/obj/item/I = pick(contents)
I.loc = loc
if(prob(25))
step_rand(I)
user << "<span class='notice'>You pull \a [I] out of [src] at random.</span>"
return
user << "<span class='notice'>You find nothing in [src].</span>"
/obj/structure/filingcabinet/Topic(href, href_list)
if(href_list["retrieve"])
@@ -88,7 +104,7 @@
var/virgin = 1
/obj/structure/filingcabinet/security/attack_hand(mob/user as mob)
/obj/structure/filingcabinet/security/proc/populate()
if(virgin)
for(var/datum/data/record/G in data_core.general)
var/datum/data/record/S
@@ -110,6 +126,13 @@
//before the records have been generated, so we do this inside the loop.
..()
/obj/structure/filingcabinet/security/attack_hand()
populate()
..()
/obj/structure/filingcabinet/security/attack_tk()
populate()
..()
/*
* Medical Record Cabinets
@@ -117,7 +140,7 @@
/obj/structure/filingcabinet/medical
var/virgin = 1
/obj/structure/filingcabinet/medical/attack_hand(mob/user as mob)
/obj/structure/filingcabinet/medical/proc/populate()
if(virgin)
for(var/datum/data/record/G in data_core.general)
var/datum/data/record/M
@@ -138,3 +161,11 @@
virgin = 0 //tabbing here is correct- it's possible for people to try and use it
//before the records have been generated, so we do this inside the loop.
..()
/obj/structure/filingcabinet/medical/attack_hand()
populate()
..()
/obj/structure/filingcabinet/medical/attack_tk()
populate()
..()

View File

@@ -7,7 +7,8 @@
var/labels_left = 30
var/mode = 0 //off or on.
/obj/item/weapon/hand_labeler/afterattack(atom/A, mob/user as mob)
/obj/item/weapon/hand_labeler/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(!mode) //if it's off, give up.
return
if(A == loc) // if placing the labeller into something (e.g. backpack)

View File

@@ -16,7 +16,7 @@
pressure_resistance = 1
slot_flags = SLOT_HEAD
body_parts_covered = HEAD
attack_verb = list("")
attack_verb = list("bapped")
var/info //What's actually written on the paper.
var/info_links //A different version of the paper which includes html links at fields and EOF

View File

@@ -116,7 +116,7 @@
icon_state = "camera"
item_state = "electropack"
w_class = 2.0
flags = FPRINT | CONDUCT | USEDELAY | TABLEPASS
flags = FPRINT | CONDUCT | TABLEPASS
slot_flags = SLOT_BELT
m_amt = 2000
var/pictures_max = 10

View File

@@ -468,10 +468,6 @@
if(stat & (BROKEN|MAINT))
return
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("APC",src,user:wear_suit)
return
// do APC interaction
user.set_machine(src)
src.interact(user)

View File

@@ -67,10 +67,7 @@
/obj/structure/cable/proc/get_powernet() //TODO: remove this as it is obsolete
return powernet
/obj/structure/cable/attack_hand(mob/user)
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("WIRE",src,user:wear_suit)
/obj/structure/cable/attack_tk(mob/user)
return
/obj/structure/cable/attackby(obj/item/W, mob/user)
@@ -167,7 +164,7 @@
throw_range = 5
m_amt = 50
g_amt = 20
flags = TABLEPASS | USEDELAY | FPRINT | CONDUCT
flags = TABLEPASS | FPRINT | CONDUCT
slot_flags = SLOT_BELT
item_state = "coil_red"
attack_verb = list("whipped", "lashed", "disciplined", "flogged")

View File

@@ -63,8 +63,11 @@
/obj/item/weapon/cell/attack_self(mob/user as mob)
src.add_fingerprint(user)
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("CELL",src,user:wear_suit)
var/mob/living/carbon/human/H = user
var/obj/item/clothing/gloves/space_ninja/SNG = H.gloves
if(!istype(SNG) || !SNG.candrain || !SNG.draining) return
SNG.drain("CELL",src,H.wear_suit)
return
/obj/item/weapon/cell/attackby(obj/item/W, mob/user)

View File

@@ -501,9 +501,13 @@
if(prot > 0 || (COLD_RESISTANCE in user.mutations))
user << "You remove the light [fitting]"
else if(TK in user.mutations)
user << "You telekinetically remove the light [fitting]."
else
user << "You try to remove the light [fitting], but it's too hot and you don't want to burn your hand."
return // if burned, don't remove the light
else
user << "You remove the light [fitting]."
// create a light tube/bulb item and put it in the user's hand
var/obj/item/weapon/light/L = new light_type()
@@ -523,6 +527,30 @@
status = LIGHT_EMPTY
update()
/obj/machinery/light/attack_tk(mob/user)
if(status == LIGHT_EMPTY)
user << "There is no [fitting] in this light."
return
user << "You telekinetically remove the light [fitting]."
// create a light tube/bulb item and put it in the user's hand
var/obj/item/weapon/light/L = new light_type()
L.status = status
L.rigged = rigged
L.brightness = brightness
// light item inherits the switchcount, then zero it
L.switchcount = switchcount
switchcount = 0
L.update()
L.add_fingerprint(user)
L.loc = loc
status = LIGHT_EMPTY
update()
// break the light and make sparks if was on
/obj/machinery/light/proc/broken(var/skip_sound_and_sparks = 0)
@@ -706,7 +734,8 @@
// shatter light, unless it was an attempt to put it in a light socket
// now only shatter if the intent was harm
/obj/item/weapon/light/afterattack(atom/target, mob/user)
/obj/item/weapon/light/afterattack(atom/target, mob/user, proximity)
if(!proximity) return
if(istype(target, /obj/machinery/light))
return
if(user.a_intent != "hurt")

View File

@@ -168,11 +168,6 @@
/obj/machinery/power/smes/attack_hand(mob/user)
add_fingerprint(user)
if(stat & BROKEN) return
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("SMES",src,user:wear_suit)
return
interact(user)

View File

@@ -4,7 +4,7 @@
icon = 'icons/obj/gun.dmi'
icon_state = "detective"
item_state = "gun"
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
m_amt = 2000
w_class = 3.0
@@ -51,7 +51,7 @@
O.emp_act(severity)
/obj/item/weapon/gun/afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
if(flag) return //we're placing gun on a table or in backpack
if(flag) return //It's adjacent, is the user, or is on the user's person
if(istype(target, /obj/machinery/recharger) && istype(src, /obj/item/weapon/gun/energy)) return//Shouldnt flag take care of this?
if(user && user.client && user.client.gun_mode && !(A in target))
PreFire(A,user,params) //They're using the new gun system, locate what they're aiming at.

View File

@@ -5,7 +5,7 @@
fire_sound = 'sound/weapons/Laser.ogg'
origin_tech = "combat=2;magnets=4"
w_class = 4.0
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BACK
charge_cost = 100
projectile_type = "/obj/item/projectile/ion"
@@ -33,7 +33,7 @@ obj/item/weapon/gun/energy/staff
icon_state = "staffofchange"
item_state = "staffofchange"
fire_sound = 'sound/weapons/emitter.ogg'
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BACK
w_class = 4.0
charge_cost = 200

View File

@@ -43,7 +43,7 @@
icon_state = "crossbow"
item_state = "crossbow-solid"
w_class = 5.0
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT | SLOT_BACK
w_class = 3.0

View File

@@ -5,7 +5,7 @@
icon_state = "pneumatic"
item_state = "pneumatic"
w_class = 5.0
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
max_w_class = 3
max_combined_w_class = 20

View File

@@ -6,7 +6,7 @@
max_shells = 4
w_class = 4.0
force = 10
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BACK
caliber = "shotgun"
origin_tech = "combat=4;materials=2"
@@ -66,7 +66,7 @@
max_shells = 2
w_class = 4.0
force = 10
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BACK
caliber = "shotgun"
origin_tech = "combat=3;materials=1"

View File

@@ -71,13 +71,13 @@ var/list/beam_master = list()
..()
proc/cleanup(reference) //Waits .3 seconds then removes the overlay.
src = null
sleep(3)
var/list/turf_master = beam_master[reference]
for(var/laser_state in turf_master)
var/list/turfs = turf_master[laser_state]
for(var/turf/T in turfs)
T.overlays -= beam_master[laser_state]
src = null //we're getting deleted! this will keep the code running
spawn(3)
var/list/turf_master = beam_master[reference]
for(var/laser_state in turf_master)
var/list/turfs = turf_master[laser_state]
for(var/turf/T in turfs)
T.overlays -= beam_master[laser_state]
return
/obj/item/projectile/beam/practice

View File

@@ -116,7 +116,7 @@ datum
if(method == TOUCH)
infect_virus2(M,self.data["virus2"])
else
infect_virus2(M,self.data["virus2"],1)
infect_virus2(M,self.data["virus2"],1) //injected, force infection!
if(self.data && self.data["antibodies"] && istype(M, /mob/living/carbon))//... and curing
var/mob/living/carbon/C = M
C.antibodies |= self.data["antibodies"]
@@ -3476,4 +3476,4 @@ datum
return
// Undefine the alias for REAGENTS_EFFECT_MULTIPLER
#undef REM
#undef REM

View File

@@ -65,7 +65,8 @@
return 0
afterattack(obj/target, mob/user , flag)
afterattack(obj/target, mob/user, proximity)
if(!proximity) return
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.

View File

@@ -96,15 +96,9 @@
return 0
/obj/item/weapon/reagent_containers/food/snacks/afterattack(obj/target, mob/user , flag)
/obj/item/weapon/reagent_containers/food/snacks/afterattack(obj/target, mob/user, proximity)
return
/obj/item/weapon/reagent_containers/food/snacks/examine()
set src in view()
..()
@@ -1339,7 +1333,8 @@
..()
reagents.add_reagent("nutriment",10)
afterattack(obj/O as obj, mob/user as mob)
afterattack(obj/O as obj, mob/user as mob, proximity)
if(!proximity) return
if(istype(O,/obj/structure/sink) && !wrapped)
user << "You place \the [name] under a stream of water..."
loc = get_turf(O)

View File

@@ -886,7 +886,7 @@
user.SetLuminosity(round(user.luminosity + (potency/10),1))
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/dropped(mob/user)
user.SetLuminosity(round(user.luminosity + (potency/10),1))
user.SetLuminosity(round(user.luminosity - (potency/10),1))
SetLuminosity(round(potency/10,1))

View File

@@ -64,7 +64,8 @@
flags |= OPENCONTAINER
update_icon()
afterattack(obj/target, mob/user , flag)
afterattack(obj/target, mob/user, proximity)
if(!proximity) return
if (!is_open_container())
return

View File

@@ -57,7 +57,8 @@
return 0
afterattack(obj/target, mob/user , flag)
afterattack(obj/target, mob/user, proximity)
if(!proximity) return
if(target.is_open_container() != 0 && target.reagents)
if(!target.reagents.total_volume)

View File

@@ -4,7 +4,7 @@
icon = 'icons/obj/janitor.dmi'
icon_state = "cleaner"
item_state = "cleaner"
flags = TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY
flags = TABLEPASS|OPENCONTAINER|FPRINT|NOBLUDGEON
slot_flags = SLOT_BELT
throwforce = 3
w_class = 2.0
@@ -243,7 +243,9 @@
reagents.add_reagent("plantbgone", 100)
/obj/item/weapon/reagent_containers/spray/plantbgone/afterattack(atom/A as mob|obj, mob/user as mob)
/obj/item/weapon/reagent_containers/spray/plantbgone/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
if(!proximity) return
if (istype(A, /obj/machinery/hydroponics)) // We are targeting hydrotray
return

View File

@@ -50,7 +50,8 @@
return
afterattack(obj/target, mob/user , flag)
afterattack(obj/target, mob/user, proximity)
if(!proximity) return
if(!target.reagents) return
if(mode == SYRINGE_BROKEN)

View File

@@ -456,7 +456,7 @@
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if (istype(mover,/obj/item) && mover.throwing)
var/obj/item/I = mover
if(istype(I, /obj/item/weapon/dummy) || istype(I, /obj/item/projectile))
if(istype(I, /obj/item/projectile))
return
if(prob(75))
I.loc = src

View File

@@ -6,7 +6,7 @@
var/obj/wrapped = null
density = 1
var/sortTag = 0
flags = FPRINT
flags = FPRINT | NOBLUDGEON
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
attack_hand(mob/user as mob)
@@ -88,11 +88,11 @@
var/amount = 25.0
afterattack(var/obj/target as obj, mob/user as mob)
afterattack(var/obj/target as obj, mob/user as mob, proximity)
if(!proximity) return
if(!istype(target)) //this really shouldn't be necessary (but it is). -Pete
return
if(istype(target, /obj/structure/table) || istype(target, /obj/structure/rack) \
|| istype(target, /obj/item/smallDelivery) || istype(target,/obj/structure/bigDelivery) \
if(istype(target, /obj/item/smallDelivery) || istype(target,/obj/structure/bigDelivery) \
|| istype(target, /obj/item/weapon/gift) || istype(target, /obj/item/weapon/evidencebag))
return
if(target.anchored)
@@ -218,7 +218,7 @@
return
Bumped(var/atom/movable/AM) //Go straight into the chute
if(istype(AM, /obj/item/projectile) || istype(AM, /obj/item/weapon/dummy)) return
if(istype(AM, /obj/item/projectile)) return
switch(dir)
if(NORTH)
if(AM.loc.y != src.loc.y+1) return

View File

@@ -550,11 +550,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(stat & (BROKEN|NOPOWER))
return
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("RESEARCH",src,user:wear_suit)
return
user.set_machine(src)
var/dat = ""
files.RefreshResearch()

View File

@@ -154,9 +154,6 @@
return
if (shocked)
shock(user,50)
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("RESEARCH",src,user:wear_suit)
return

View File

@@ -122,8 +122,8 @@
return ..() && target.brain_op_stage == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts taking out bone chips and out of [target]'s brain with \the [tool].", \
"You start taking out bone chips and out of [target]'s brain with \the [tool].")
user.visible_message("[user] starts taking out bone chips out of [target]'s brain with \the [tool].", \
"You start taking out bone chips out of [target]'s brain with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)

View File

@@ -1,7 +1,7 @@
/datum/disease2/disease
var/infectionchance = 10
var/infectionchance = 70
var/speed = 1
var/spreadtype = "Blood" // Can also be "Airborne"
var/spreadtype = "Contact" // Can also be "Airborne"
var/stage = 1
var/stageprob = 10
var/dead = 0
@@ -25,10 +25,10 @@
holder.getrandomeffect()
effects += holder
uniqueID = rand(0,10000)
infectionchance = rand(1,10)
infectionchance = rand(60,90)
antigen |= text2num(pick(ANTIGENS))
antigen |= text2num(pick(ANTIGENS))
spreadtype = "Airborne"
spreadtype = prob(70) ? "Airborne" : "Contact"
/datum/disease2/disease/proc/activate(var/mob/living/carbon/mob)
if(dead)
@@ -38,9 +38,9 @@
if(mob.stat == 2)
return
if(stage <= 1 && clicks == 0) // with a certain chance, the mob may become immune to the disease before it starts properly
if(prob(20))
if(prob(5))
mob.antibodies |= antigen // 20% immunity is a good chance IMO, because it allows finding an immune person easily
else
if(mob.radiation > 50)
if(prob(1))
majormutate()
@@ -65,6 +65,12 @@
for(var/datum/disease2/effectholder/e in effects)
e.runeffect(mob,stage)
//Short airborne spread
if(src.spreadtype == "Airborne")
for(var/mob/living/carbon/M in oview(1,mob))
if(airborne_can_reach(get_turf(mob), get_turf(M)))
infect_virus2(M,src)
//fever
mob.bodytemperature = max(mob.bodytemperature, min(310+5*stage ,mob.bodytemperature+5*stage))
clicks+=speed
@@ -75,10 +81,10 @@
mob.virus2.Remove("[uniqueID]")
/datum/disease2/disease/proc/minormutate()
uniqueID = rand(0,10000)
//uniqueID = rand(0,10000)
var/datum/disease2/effectholder/holder = pick(effects)
holder.minormutate()
infectionchance = min(10,infectionchance + rand(0,1))
infectionchance = min(50,infectionchance + rand(0,10))
/datum/disease2/disease/proc/majormutate()
uniqueID = rand(0,10000)

View File

@@ -134,10 +134,13 @@
activate(var/mob/living/carbon/mob,var/multiplier)
if(istype(mob, /mob/living/carbon/human))
var/mob/living/carbon/human/H = mob
var/datum/organ/external/E = pick(H.organs)
var/organ = pick(list("r_arm","l_arm","r_leg","r_leg"))
var/datum/organ/external/E = H.organs_by_name[organ]
if (!(E.status & ORGAN_DEAD))
E.status |= ORGAN_DEAD
H << "<span class='notice'>You can't feel your [E.display_name] anymore...</span>"
for (var/datum/organ/external/C in E.children)
C.status |= ORGAN_DEAD
mob.adjustToxLoss(15*multiplier)
deactivate(var/mob/living/carbon/mob,var/multiplier)
@@ -145,6 +148,8 @@
var/mob/living/carbon/human/H = mob
for (var/datum/organ/external/E in H.organs)
E.status &= ~ORGAN_DEAD
for (var/datum/organ/external/C in E.children)
C.status &= ~ORGAN_DEAD
/datum/disease2/effect/immortal
name = "Longevity Syndrome"
@@ -285,11 +290,8 @@
stage = 2
activate(var/mob/living/carbon/mob,var/multiplier)
mob.say("*cough")
for(var/mob/living/carbon/M in view(1,mob))
if(airborne_can_reach(get_turf(mob), get_turf(M)))
for (var/datum/disease2/disease/V in mob.virus2)
if(V.spreadtype == "Airborne")
infect_virus2(M,V)
for(var/mob/living/carbon/M in oview(2,mob))
mob.spread_disease_to(M)
/datum/disease2/effect/hungry
name = "Appetiser Effect"
@@ -320,8 +322,8 @@
stage = 2
activate(var/mob/living/carbon/mob,var/multiplier)
mob << "<span class='notice'>You feel a rush of energy inside you!</span>"
if (mob.reagents.get_reagent_amount("hyperzine") < 30)
mob.reagents.add_reagent("hyperzine", 10)
if (mob.reagents.get_reagent_amount("hyperzine") < 10)
mob.reagents.add_reagent("hyperzine", 4)
if (prob(30))
mob.jitteriness += 10

View File

@@ -1,21 +1,28 @@
//Returns 1 if mob can be infected, 0 otherwise. Checks his clothing.
proc/get_infection_chance(var/mob/living/carbon/M)
proc/get_infection_chance(var/mob/living/carbon/M, var/vector = "Airborne")
var/score = 0
if (!istype(M))
return 0
if(istype(M, /mob/living/carbon/human))
if(M:gloves)
score += 5
if(istype(M:wear_suit, /obj/item/clothing/suit/space)) score += 10
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
if(istype(M:head, /obj/item/clothing/head/helmet/space)) score += 5
if(istype(M:head, /obj/item/clothing/head/bio_hood)) score += 5
if(M.wear_mask)
score += 5
if(istype(M:wear_mask, /obj/item/clothing/mask/surgical) && !M.internal)
score += 10
if(M.internal)
score += 10
if (vector == "Airborne")
if(M.internal) //not breathing infected air helps greatly
score = 30
if(M.wear_mask)
score += 5
if(istype(M:wear_mask, /obj/item/clothing/mask/surgical) && !M.internal)
score += 10
if(istype(M:wear_suit, /obj/item/clothing/suit/space) && istype(M:head, /obj/item/clothing/head/helmet/space)) score += 15
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit) && istype(M:head, /obj/item/clothing/head/bio_hood)) score += 15
if (vector == "Contact")
if(M:gloves) score += 15
if(istype(M:wear_suit, /obj/item/clothing/suit/space)) score += 10
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
// log_debug("[M]'s resistance to [vector] viruses: [score]")
if(score >= 30)
return 0
@@ -29,6 +36,7 @@ proc/get_infection_chance(var/mob/living/carbon/M)
return 0
else if(score == 5 && prob(35))
return 0
// log_debug("Infection got through")
return 1
//Checks if table-passing table can reach target (5 tile radius)
@@ -46,8 +54,10 @@ proc/airborne_can_reach(turf/source, turf/target)
//Attemptes to infect mob M with virus. Set forced to 1 to ignore protective clothnig
/proc/infect_virus2(var/mob/living/carbon/M,var/datum/disease2/disease/disease,var/forced = 0)
if(!istype(disease))
// log_debug("Bad virus")
return
if(!istype(M))
// log_debug("Bad mob")
return
if ("[disease.uniqueID]" in M.virus2)
return
@@ -55,13 +65,16 @@ proc/airborne_can_reach(turf/source, turf/target)
if(M.antibodies & disease.antigen != 0)
return
// log_debug("Infecting [M]")
if(prob(disease.infectionchance) || forced)
// certain clothes can prevent an infection
if(!forced && !get_infection_chance(M))
if(!forced && !get_infection_chance(M, disease.spreadtype))
return
var/datum/disease2/disease/D = disease.getcopy()
D.minormutate()
// log_debug("Adding virus")
M.virus2["[D.uniqueID]"] = D
//Infects mob M with random lesser disease, if he doesn't have one
@@ -80,3 +93,45 @@ proc/airborne_can_reach(turf/source, turf/target)
//Fancy prob() function.
/proc/dprob(var/p)
return(prob(sqrt(p)) && prob(sqrt(p)))
/mob/living/carbon/proc/spread_disease_to(var/mob/living/carbon/victim, var/vector = "Airborne")
if (src == victim)
return "retardation"
// log_debug("Spreading [vector] diseases from [src] to [victim]")
if (virus2.len > 0)
for (var/ID in virus2)
log_debug("Attempting virus [ID]")
var/datum/disease2/disease/V = virus2[ID]
if(V.spreadtype != vector) continue
if (vector == "Airborne")
if(airborne_can_reach(get_turf(src), get_turf(victim)))
// log_debug("In range, infecting")
infect_virus2(victim,V)
else
// log_debug("Could not reach target")
if (vector == "Contact")
if (in_range(src, victim))
// log_debug("In range, infecting")
infect_virus2(victim,V)
//contact goes both ways
if (victim.virus2.len > 0 && vector == "Contact")
// log_debug("Spreading [vector] diseases from [victim] to [src]")
var/nudity = 1
if (ishuman(victim))
var/mob/living/carbon/human/H = victim
var/datum/organ/external/select_area = H.get_organ(src.zone_sel.selecting)
var/list/clothes = list(H.head, H.wear_mask, H.wear_suit, H.w_uniform, H.gloves, H.shoes)
for(var/obj/item/clothing/C in clothes )
if(C && istype(C))
if(C.body_parts_covered & select_area.body_part)
nudity = 0
if (nudity)
for (var/ID in victim.virus2)
var/datum/disease2/disease/V = victim.virus2[ID]
if(V && V.spreadtype != vector) continue
infect_virus2(src,V)

View File

@@ -10,7 +10,7 @@
icon_state = "health"
w_class = 2.0
item_state = "electronic"
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
flags = FPRINT | TABLEPASS | CONDUCT
/obj/item/device/antibody_scanner/attack(mob/living/carbon/M as mob, mob/user as mob)
@@ -53,8 +53,8 @@
if(prob(50))
user << "The dish shatters"
if(virus2.infectionchance > 0)
for(var/mob/living/carbon/target in view(null, src))
if(airborne_can_reach(src.loc, target.loc))
for(var/mob/living/carbon/target in view(1, get_turf(src)))
if(airborne_can_reach(get_turf(src), get_turf(target)))
if(get_infection_chance(target))
infect_virus2(target,src.virus2)
del src