var/obj/item/weapon/back
var/obj/item/clothing/mask/wear_mask
var/obj/item/weapon/tank/internal

from /mob to /mob/living/carbon.

/mob/proc/abiotic() no longer does any extra checks even if full_body == 1.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5722 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2013-02-17 18:53:09 +00:00
parent e223081f37
commit 58c7f79398
20 changed files with 144 additions and 253 deletions

View File

@@ -41,46 +41,46 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
var/centcomm_cancast = 1 //Whether or not the spell should be allowed on z2
/obj/effect/proc_holder/spell/proc/cast_check(skipcharge = 0,mob/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell
if(!(src in usr.spell_list))
usr << "\red You shouldn't have this spell! Something's wrong."
if(!ishuman(user))
return 0
if(usr.z == 2 && !centcomm_cancast) //Certain spells are not allowed on the centcomm zlevel
var/mob/living/carbon/human/H = user
if(!(src in H.spell_list))
H << "<span class='warning'>You shouldn't have this spell! Something's wrong.</span>"
return 0
if(H.z == 2 && !centcomm_cancast) //Certain spells are not allowed on the centcomm zlevel
return 0
if(!skipcharge)
switch(charge_type)
if("recharge")
if(charge_counter < charge_max)
usr << "[name] is still recharging."
H << "<span class='notice'>[name] is still recharging.</span>"
return 0
if("charges")
if(!charge_counter)
usr << "[name] has no charges left."
H << "<span class='notice'>[name] has no charges left.</span>"
return 0
if(usr.stat && !stat_allowed)
usr << "Not when you're incapacitated."
if(H.stat && !stat_allowed)
H << "<span class='notice'>Not when you're incapacitated.</span>"
return 0
if(ishuman(usr) || ismonkey(usr))
if(istype(usr.wear_mask, /obj/item/clothing/mask/muzzle))
usr << "Mmmf mrrfff!"
return 0
if(istype(H.wear_mask, /obj/item/clothing/mask/muzzle))
user << "<span class='notice'>You can't get the words out!</span>"
return 0
if(clothes_req) //clothes check
if(!istype(usr, /mob/living/carbon/human))
usr << "You aren't a human, Why are you trying to cast a human spell, silly non-human? Casting human spells is for humans."
if(!istype(H.wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(H.wear_suit, /obj/item/clothing/suit/space/rig/wizard))
H << "<span class='notice'>I don't feel strong enough without my robe.</span>"
return 0
if(!istype(usr:wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(user:wear_suit, /obj/item/clothing/suit/space/rig/wizard))
usr << "I don't feel strong enough without my robe."
if(!istype(H.shoes, /obj/item/clothing/shoes/sandal))
H << "<span class='notice'>I don't feel strong enough without my sandals.</span>"
return 0
if(!istype(usr:shoes, /obj/item/clothing/shoes/sandal))
usr << "I don't feel strong enough without my sandals."
return 0
if(!istype(usr:head, /obj/item/clothing/head/wizard) && !istype(user:head, /obj/item/clothing/head/helmet/space/rig/wizard))
usr << "I don't feel strong enough without my hat."
if(!istype(H.head, /obj/item/clothing/head/wizard) && !istype(H.head, /obj/item/clothing/head/helmet/space/rig/wizard))
H << "<span class='notice'>I don't feel strong enough without my hat.</span>"
return 0
if(!skipcharge)
@@ -95,22 +95,17 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
return 1
/obj/effect/proc_holder/spell/proc/invocation(mob/user = usr) //spelling the spell out and setting it on recharge/reducing charges amount
switch(invocation_type)
if("shout")
if(prob(50))//Auto-mute? Fuck that noise
usr.say(invocation)
user.say(invocation)
else
usr.say(replacetext(invocation," ","`"))
if(usr.gender==MALE)
playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
else
playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
user.say(replacetext(invocation," ","`"))
if("whisper")
if(prob(50))
usr.whisper(invocation)
user.whisper(invocation)
else
usr.whisper(replacetext(invocation," ","`"))
user.whisper(replacetext(invocation," ","`"))
/obj/effect/proc_holder/spell/New()
..()

View File

@@ -125,11 +125,11 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/tome) && iscultist(user))
user << "You retrace your steps, carefully undoing the lines of the rune."
user << "<span class='notice'>You retrace your steps, carefully undoing the lines of the rune.</span>"
del(src)
return
else if(istype(I, /obj/item/weapon/nullrod))
user << "\blue You disrupt the vile magic with the deadening field of the null rod!"
user << "<span class='notice'>You disrupt the vile magic with the deadening field of the null rod!</span>"
del(src)
return
return
@@ -137,11 +137,13 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
attack_hand(mob/living/user as mob)
if(!iscultist(user))
user << "You can't mouth the arcane scratchings without fumbling over them."
return
if(istype(user.wear_mask, /obj/item/clothing/mask/muzzle))
user << "You are unable to speak the words of the rune."
user << "<span class='notice'>You can't mouth the arcane scratchings without fumbling over them.</span>"
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(istype(H.wear_mask, /obj/item/clothing/mask/muzzle))
H << "<span class='notice'>You are unable to speak the words of the rune.</span>"
return
if(!word1 || !word2 || !word3 || prob(user.getBrainLoss()))
return fizzle()
// if(!src.visibility)

View File

@@ -602,93 +602,6 @@ steam.start() -- spawns the effect
del(smoke)
src.total_smoke--
/////////////////////////////////////////////
// Mustard Gas
/////////////////////////////////////////////
/obj/effect/effect/mustard_gas
name = "mustard gas"
icon_state = "mustard"
opacity = 1
anchored = 0.0
mouse_opacity = 0
var/amount = 6.0
/obj/effect/effect/mustard_gas/New()
..()
spawn (100)
del(src)
return
/obj/effect/effect/mustard_gas/Move()
..()
for(var/mob/living/carbon/human/R in get_turf(src))
if (R.internal != null && usr.wear_mask && (R.wear_mask.flags & MASKINTERNALS) && R.wear_suit != null && !istype(R.wear_suit, /obj/item/clothing/suit/labcoat) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket && !istype(R.wear_suit, /obj/item/clothing/suit/armor)))
else
R.burn_skin(0.75)
if (R.coughedtime != 1)
R.coughedtime = 1
R.emote("gasp")
spawn (20)
R.coughedtime = 0
R.updatehealth()
return
/obj/effect/effect/mustard_gas/HasEntered(mob/living/carbon/human/R as mob )
..()
if (istype(R, /mob/living/carbon/human))
if (R.internal != null && usr.wear_mask && (R.wear_mask.flags & MASKINTERNALS) && R.wear_suit != null && !istype(R.wear_suit, /obj/item/clothing/suit/labcoat) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket && !istype(R.wear_suit, /obj/item/clothing/suit/armor)))
return
R.burn_skin(0.75)
if (R.coughedtime != 1)
R.coughedtime = 1
R.emote("gasp")
spawn (20)
R.coughedtime = 0
R.updatehealth()
return
/datum/effect/effect/system/mustard_gas_spread
var/total_smoke = 0 // To stop it being spammed and lagging!
var/direction
set_up(n = 5, c = 0, loca, direct)
if(n > 20)
n = 20
number = n
cardinals = c
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
if(direct)
direction = direct
start()
var/i = 0
for(i=0, i<src.number, i++)
if(src.total_smoke > 20)
return
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/mustard_gas/smoke = new /obj/effect/effect/mustard_gas(src.location)
src.total_smoke++
var/direction = src.direction
if(!direction)
if(src.cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
for(i=0, i<pick(0,1,1,1,2,2,2,3), i++)
sleep(10)
step(smoke,direction)
spawn(100)
del(smoke)
src.total_smoke--
/////////////////////////////////////////////
//////// Attach an Ion trail to any object, that spawns when it moves (like for the jetpack)

View File

@@ -11,10 +11,12 @@
m_amt = 10000
var/code = 2
/obj/item/device/radio/electropack/attack_hand(mob/user as mob)
if(src == user.back)
user << "<span class='notice'>You need help taking this off!</span>"
return
/obj/item/device/radio/electropack/attack_hand(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
if(src == C.back)
user << "<span class='notice'>You need help taking this off!</span>"
return
..()
/obj/item/device/radio/electropack/attackby(obj/item/weapon/W as obj, mob/user as mob)

View File

@@ -67,7 +67,11 @@
swirlie = GM
if(do_after(user, 30, 5, 0))
user.visible_message("<span class='danger'>[user] gives [GM.name] a swirlie!</span>", "<span class='notice'>You give [GM.name] a swirlie!</span>", "You hear a toilet flushing.")
if(!GM.internal)
if(iscarbon(GM))
var/mob/living/carbon/C = GM
if(!C.internal)
C.adjustOxyLoss(5)
else
GM.adjustOxyLoss(5)
swirlie = null
else

View File

@@ -7,13 +7,13 @@
w_class = 2
gas_transfer_coefficient = 0.90
//Monkeys can not take the muzzle off of themself! Call PETA!
/obj/item/clothing/mask/muzzle/attack_paw(mob/user as mob)
if (src == user.wear_mask)
return
else
..()
return
/obj/item/clothing/mask/muzzle/attack_paw(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
if(src == C.wear_mask)
user << "<span class='notice'>You need help taking this off!</span>"
return
..()
/obj/item/clothing/mask/surgical

View File

@@ -159,12 +159,6 @@
else if (W == l_hand)
l_hand = null
update_inv_l_hand(0)
else if (W == back)
back = null
update_inv_back(0)
else if (W == wear_mask)
wear_mask = null
update_inv_wear_mask(0)
return

View File

@@ -143,22 +143,14 @@
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))
/mob/living/carbon/alien/humanoid/hand_p(mob/living/carbon/user)
if(user.a_intent == "hurt")
if(istype(user.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)
if(health > 0)
visible_message("<span class='danger'>[user] has bit [src]!</span>")
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.

View File

@@ -149,27 +149,15 @@
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))
/mob/living/carbon/alien/larva/hand_p(mob/living/carbon/user)
if(user.a_intent == "hurt")
if(istype(user.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)
if(health > 0)
visible_message("<span class='danger'>[user] has bit [src]!</span>")
adjustBruteLoss(rand(1, 3))
updatehealth()
return
/mob/living/carbon/alien/larva/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)

View File

@@ -145,10 +145,8 @@ var/const/MAX_ACTIVE_TIME = 400
if(!sterile) L.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
else if (iscorgi(M))
var/mob/living/simple_animal/corgi/C = M
src.loc = C
loc = C
C.facehugger = src
C.wear_mask = src
//C.regenerate_icons()
GoIdle() //so it doesn't jump the people that tear it off
@@ -158,9 +156,14 @@ var/const/MAX_ACTIVE_TIME = 400
return
/obj/item/clothing/mask/facehugger/proc/Impregnate(mob/living/target as mob)
if(!target || target.wear_mask != src || target.stat == DEAD) //was taken off or something
if(!target || target.stat == DEAD) //was taken off or something
return
if(iscarbon(target))
var/mob/living/carbon/C = target
if(C.wear_mask != src)
return
if(!sterile)
//target.contract_disease(new /datum/disease/alien_embryo(0)) //so infection chance is same as virus infection chance
new /obj/item/alien_embryo(target)

View File

@@ -10,3 +10,8 @@
var/obj/item/handcuffed = null //Whether or not the mob is handcuffed
var/obj/item/legcuffed = null //Same as handcuffs but for legs. Bear traps use this.
//inventory slots
var/obj/item/weapon/back = null
var/obj/item/clothing/mask/wear_mask = null
var/obj/item/weapon/tank/internal = null

View File

@@ -361,7 +361,7 @@
message = "\red <B>[source] fails to take off \a [target.wear_mask] from [target]'s head!</B>"
return
else
message = "\red <B>[source] is trying to take off \a [source.wear_mask] from [target]'s head!</B>"
message = "\red <B>[source] is trying to take off \a [target.wear_mask] from [target]'s head!</B>"
if("l_hand")
message = "\red <B>[source] is trying to take off \a [target.l_hand] from [target]'s left hand!</B>"
if("r_hand")

View File

@@ -97,9 +97,6 @@ var/list/department_radio_keys = list(
if (sdisabilities & MUTE)
return
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
// emotes
if (copytext(message, 1, 2) == "*" && !stat)
return emote(copytext(message, 2))

View File

@@ -55,6 +55,8 @@
var/speed = 0 //Cause sec borgs gotta go fast //No they dont!
var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
var/obj/item/weapon/tank/internal = null //Hatred. Used if a borg has a jetpack.
/mob/living/silicon/robot/New(loc,var/syndie = 0)
spark_system = new /datum/effect/effect/system/spark_spread()

View File

@@ -232,11 +232,8 @@ var/list/slot_equipment_priority = list( \
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR>
<BR><B>Head(Mask):</B> <A href='?src=\ref[src];item=mask'>[(wear_mask ? wear_mask : "Nothing")]</A>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? l_hand : "Nothing")]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? r_hand : "Nothing")]</A>
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>

View File

@@ -105,10 +105,7 @@
var/obj/structure/stool/bed/buckled = null//Living
var/obj/item/l_hand = null//Living
var/obj/item/r_hand = null//Living
var/obj/item/weapon/back = null//Human/Monkey
var/obj/item/weapon/tank/internal = null//Human/Monkey
var/obj/item/weapon/storage/s_active = null//Carbon
var/obj/item/clothing/mask/wear_mask = null//Carbon
var/seer = 0 //for cult//Carbon, probably Human

View File

@@ -275,15 +275,12 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
return 0
/mob/proc/abiotic(var/full_body = 0)
if(full_body && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask)))
/mob/proc/abiotic(full_body = 0)
if(l_hand && !l_hand.abstract || r_hand && !r_hand.abstract)
return 1
if((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )))
return 1
return 0
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
/mob/verb/button_pressed_F12()
set name = "F12"

View File

@@ -334,46 +334,47 @@
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"
if(iscarbon(usr))
var/mob/living/carbon/C = usr
if(!C.stat && !C.stunned && !C.paralysis && !C.restrained())
if(C.internal)
C.internal = null
C << "<span class='notice'>No longer running on internals.</span>"
if(C.internals)
C.internals.icon_state = "internal0"
else
if(!istype(C.wear_mask, /obj/item/clothing/mask))
C << "<span class='notice'>You are not wearing a mask.</span>"
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"
if(istype(C.back, /obj/item/weapon/tank))
C << "<span class='notice'>You are now running on internals from the [C.back] on your back.</span>"
C.internal = C.back
else if(istype(C.l_hand, /obj/item/weapon/tank))
C << "<span class='notice'>You are now running on internals from the [C.l_hand] on your left hand.</span>"
C.internal = C.l_hand
else if(istype(C.r_hand, /obj/item/weapon/tank))
C << "<span class='notice'>You are now running on internals from the [C.r_hand] on your right hand.</span>"
C.internal = C.r_hand
else if(ishuman(C))
var/mob/living/carbon/human/H = C
if(istype(H.s_store, /obj/item/weapon/tank))
H << "<span class='notice'>You are now running on internals from the [H.s_store] on your [H.wear_suit].</span>"
H.internal = H.s_store
else if(istype(H.belt, /obj/item/weapon/tank))
H << "<span class='notice'>You are now running on internals from the [H.belt] on your belt.</span>"
H.internal = H.belt
else if(istype(H.l_store, /obj/item/weapon/tank))
H << "<span class='notice'>You are now running on internals from the [H.l_store] in your left pocket.</span>"
H.internal = H.l_store
else if(istype(H.r_store, /obj/item/weapon/tank))
H << "<span class='notice'>You are now running on internals from the [H.r_store] in your right pocket.</span>"
H.internal = H.r_store
if(C.internal)
if(C.internals)
C.internals.icon_state = "internal1"
else
usr << "\blue You don't have an oxygen tank."
C << "<span class='notice'>You don't have an oxygen tank.</span>"
if("act_intent")
usr.a_intent_change("right")
/* if("help")

View File

@@ -79,35 +79,33 @@
* photo album *
**************/
/obj/item/weapon/storage/photo_album
name = "Photo album"
name = "photo album"
icon = 'icons/obj/items.dmi'
icon_state = "album"
item_state = "briefcase"
can_hold = list("/obj/item/weapon/photo",)
/obj/item/weapon/storage/photo_album/MouseDrop(obj/over_object as obj)
var/mob/M = usr
if(!istype(over_object, /obj/screen))
return ..()
playsound(loc, "rustle", 50, 1, -5)
if(!M.restrained() && M.stat == CONSCIOUS)
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.put_in_l_hand(src)
add_fingerprint(usr)
return
if(over_object == M && in_range(src, M) || M.contents.Find(src))
if(M.s_active)
M.s_active.close(usr)
show_to(M)
if((istype(usr, /mob/living/carbon/human) || (ticker && ticker.mode.name == "monkey")))
var/mob/M = usr
if(!( istype(over_object, /obj/screen) ))
return ..()
playsound(loc, "rustle", 50, 1, -5)
if((!( M.restrained() ) && !( M.stat ) && M.back == src))
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.put_in_l_hand(src)
add_fingerprint(usr)
return
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
if(usr.s_active)
usr.s_active.close(usr)
show_to(usr)
return
return
/*********
* camera *

View File

@@ -25,3 +25,7 @@
icon_state = "appendixinflamed"
else
icon_state = "appendix"
//Looking for brains?
//Try code/modules/mob/living/carbon/brain/brain_item.dm