mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-21 19:16:22 +01:00
@@ -99,14 +99,14 @@
|
||||
/obj/item/stack/proc/produce_recipe(datum/stack_recipe/recipe, var/quantity, mob/user)
|
||||
var/required = quantity*recipe.req_amount
|
||||
var/produced = min(quantity*recipe.res_amount, recipe.max_res_amount)
|
||||
|
||||
|
||||
if (!can_use(required))
|
||||
if (produced>1)
|
||||
user << "\red You haven't got enough [src] to build \the [produced] [recipe.title]\s!"
|
||||
else
|
||||
user << "\red You haven't got enough [src] to build \the [recipe.title]!"
|
||||
return
|
||||
|
||||
|
||||
if (recipe.one_per_turf && (locate(recipe.result_type) in user.loc))
|
||||
user << "\red There is another [recipe.title] here!"
|
||||
return
|
||||
@@ -114,21 +114,21 @@
|
||||
if (recipe.on_floor && !isfloor(user.loc))
|
||||
user << "\red \The [recipe.title] must be constructed on the floor!"
|
||||
return
|
||||
|
||||
|
||||
if (recipe.time)
|
||||
user << "\blue Building [recipe.title] ..."
|
||||
if (!do_after(user, recipe.time))
|
||||
return
|
||||
|
||||
|
||||
if (use(required))
|
||||
var/atom/O = new recipe.result_type(user.loc)
|
||||
O.set_dir(user.dir)
|
||||
O.add_fingerprint(user)
|
||||
|
||||
|
||||
if (istype(O, /obj/item/stack))
|
||||
var/obj/item/stack/S = O
|
||||
S.amount = produced
|
||||
|
||||
|
||||
if (istype(O, /obj/item/weapon/storage)) //BubbleWrap - so newly formed boxes are empty
|
||||
for (var/obj/item/I in O)
|
||||
del(I)
|
||||
@@ -148,12 +148,12 @@
|
||||
if (href_list["sublist"])
|
||||
var/datum/stack_recipe_list/srl = recipes_list[text2num(href_list["sublist"])]
|
||||
recipes_list = srl.recipes
|
||||
|
||||
|
||||
var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])]
|
||||
var/multiplier = text2num(href_list["multiplier"])
|
||||
if (!multiplier || (multiplier <= 0)) //href exploit protection
|
||||
return
|
||||
|
||||
|
||||
src.produce_recipe(R, multiplier, usr)
|
||||
|
||||
if (src && usr.machine==src) //do not reopen closed window
|
||||
@@ -189,7 +189,7 @@
|
||||
return 1
|
||||
|
||||
/*
|
||||
The transfer and split procs work differently than use() and add().
|
||||
The transfer and split procs work differently than use() and add().
|
||||
Whereas those procs take no action if the desired amount cannot be added or removed these procs will try to transfer whatever they can.
|
||||
They also remove an equal amount from the source stack.
|
||||
*/
|
||||
@@ -209,7 +209,10 @@
|
||||
if (transfer && src.use(transfer))
|
||||
S.add(transfer)
|
||||
if (prob(transfer/orig_amount * 100))
|
||||
S.copy_evidences(src)
|
||||
transfer_fingerprints_to(S)
|
||||
if(blood_DNA)
|
||||
S.blood_DNA |= blood_DNA
|
||||
//todo bloody overlay
|
||||
return transfer
|
||||
return 0
|
||||
|
||||
@@ -217,14 +220,16 @@
|
||||
/obj/item/stack/proc/split(var/tamount)
|
||||
if (!amount)
|
||||
return null
|
||||
|
||||
|
||||
var/transfer = max(min(tamount, src.amount, initial(max_amount)), 0)
|
||||
|
||||
|
||||
var/orig_amount = src.amount
|
||||
if (transfer && src.use(transfer))
|
||||
var/obj/item/stack/newstack = new src.type(loc, transfer)
|
||||
if (prob(transfer/orig_amount * 100))
|
||||
newstack.copy_evidences(src)
|
||||
transfer_fingerprints_to(newstack)
|
||||
if(blood_DNA)
|
||||
newstack.blood_DNA |= blood_DNA
|
||||
return newstack
|
||||
return null
|
||||
|
||||
@@ -272,13 +277,6 @@
|
||||
src.interact(usr)
|
||||
else return ..()
|
||||
|
||||
/obj/item/stack/proc/copy_evidences(obj/item/stack/from as obj)
|
||||
src.blood_DNA |= from.blood_DNA
|
||||
src.fingerprints |= from.fingerprints
|
||||
src.fingerprintshidden |= from.fingerprintshidden
|
||||
src.fingerprintslast = from.fingerprintslast
|
||||
//TODO bloody overlay
|
||||
|
||||
/*
|
||||
* Recipe datum
|
||||
*/
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
/obj/item/weapon/melee/energy/proc/activate(mob/living/user)
|
||||
anchored = 1
|
||||
if(active)
|
||||
return
|
||||
active = 1
|
||||
force = active_force
|
||||
throwforce = active_throwforce
|
||||
@@ -19,13 +21,15 @@
|
||||
|
||||
/obj/item/weapon/melee/energy/proc/deactivate(mob/living/user)
|
||||
anchored = 0
|
||||
if(!active)
|
||||
return
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
|
||||
active = 0
|
||||
force = initial(force)
|
||||
throwforce = initial(throwforce)
|
||||
sharp = initial(sharp)
|
||||
edge = initial(edge)
|
||||
w_class = initial(w_class)
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
|
||||
|
||||
/obj/item/weapon/melee/energy/attack_self(mob/living/user as mob)
|
||||
if (active)
|
||||
|
||||
@@ -169,6 +169,16 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/rig/proc/reset()
|
||||
offline = 2
|
||||
canremove = 1
|
||||
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
|
||||
if(!piece) continue
|
||||
piece.icon_state = "[initial(icon_state)]"
|
||||
piece.flags &= ~STOPSPRESSUREDMAGE
|
||||
piece.flags &= ~AIRTIGHT
|
||||
update_icon(1)
|
||||
|
||||
/obj/item/weapon/rig/proc/toggle_seals(var/mob/living/carbon/human/M,var/instant)
|
||||
|
||||
if(sealing) return
|
||||
@@ -281,10 +291,6 @@
|
||||
piece.flags |= AIRTIGHT
|
||||
update_icon(1)
|
||||
|
||||
if(instant && air_supply)
|
||||
wearer.internals = air_supply
|
||||
wearer.internals.icon_state = "internal1"
|
||||
|
||||
/obj/item/weapon/rig/process()
|
||||
|
||||
// If we've lost any parts, grab them back.
|
||||
|
||||
@@ -557,8 +557,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
if(src.invisibility != 0)
|
||||
user.visible_message( \
|
||||
"<span class='warning'>[user] drags ghost, [src], to our plan of reality!</span>", \
|
||||
"<span class='warning'>You drag [src] to our plan of reality!</span>" \
|
||||
"<span class='warning'>[user] drags ghost, [src], to our plane of reality!</span>", \
|
||||
"<span class='warning'>You drag [src] to our plane of reality!</span>" \
|
||||
)
|
||||
toggle_visibility(1)
|
||||
else
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
grabbed_by += G
|
||||
G.affecting = src
|
||||
G.synch()
|
||||
|
||||
LAssailant = M
|
||||
|
||||
@@ -14,4 +14,21 @@
|
||||
|
||||
..()
|
||||
species = all_species["Diona"]
|
||||
verbs += /mob/living/carbon/alien/diona/proc/merge
|
||||
verbs += /mob/living/carbon/alien/diona/proc/merge
|
||||
|
||||
/mob/living/carbon/alien/diona/start_pulling(var/atom/movable/AM)
|
||||
//TODO: Collapse these checks into one proc (see pai and drone)
|
||||
if(istype(AM,/obj/item))
|
||||
var/obj/item/O = AM
|
||||
if(O.w_class > 2)
|
||||
src << "<span class='warning'>You are too small to pull that.</span>"
|
||||
return
|
||||
else
|
||||
..()
|
||||
else
|
||||
src << "<span class='warning'>You are too small to pull that.</span>"
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/diona/put_in_hands(var/obj/item/W) // No hands.
|
||||
W.loc = get_turf(src)
|
||||
return 1
|
||||
@@ -946,12 +946,13 @@
|
||||
// This will ignore any prosthetics in the prefs currently.
|
||||
species.create_organs(src)
|
||||
|
||||
for (var/obj/item/organ/brain/H in world)
|
||||
if(H.brainmob)
|
||||
if(H.brainmob.real_name == src.real_name)
|
||||
if(H.brainmob.mind)
|
||||
H.brainmob.mind.transfer_to(src)
|
||||
del(H)
|
||||
if(!client || !key) //Don't boot out anyone already in the mob.
|
||||
for (var/obj/item/organ/brain/H in world)
|
||||
if(H.brainmob)
|
||||
if(H.brainmob.real_name == src.real_name)
|
||||
if(H.brainmob.mind)
|
||||
H.brainmob.mind.transfer_to(src)
|
||||
del(H)
|
||||
|
||||
for(var/datum/organ/internal/I in internal_organs)
|
||||
I.damage = 0
|
||||
|
||||
@@ -417,8 +417,55 @@
|
||||
for(var/mob/O in viewers(target, null))
|
||||
O.show_message("\red <B>[source] is trying to put \a [item] on [target]</B>", 1)
|
||||
else
|
||||
var/message=null
|
||||
|
||||
var/target_part = null
|
||||
var/obj/item/target_item = null
|
||||
var/message = null
|
||||
|
||||
switch(place)
|
||||
if("mask")
|
||||
target_part = "head"
|
||||
target_item = target.wear_mask
|
||||
if("l_hand")
|
||||
target_part = "left hand"
|
||||
target_item = target.l_hand
|
||||
if("r_hand")
|
||||
target_part = "right hand"
|
||||
target_item = target.r_hand
|
||||
if("gloves")
|
||||
target_part = "hands"
|
||||
target_item = target.gloves
|
||||
if("eyes")
|
||||
target_part = "eyes"
|
||||
target_item = target.glasses
|
||||
if("l_ear")
|
||||
target_part = "left ear"
|
||||
target_item = target.l_ear
|
||||
if("r_ear")
|
||||
target_part = "right ear"
|
||||
target_item = target.r_ear
|
||||
if("head")
|
||||
target_part = "head"
|
||||
target_item = target.head
|
||||
if("shoes")
|
||||
target_part = "feet"
|
||||
target_item = target.shoes
|
||||
if("belt")
|
||||
target_part = "waist"
|
||||
target_item = target.belt
|
||||
if("suit")
|
||||
target_part = "body"
|
||||
target_item = target.wear_suit
|
||||
if("back")
|
||||
target_part = "back"
|
||||
target_item = target.back
|
||||
if("s_store")
|
||||
target_part = "suit"
|
||||
target_item = target.s_store
|
||||
if("id")
|
||||
target_part = "uniform"
|
||||
target_item = target.wear_id
|
||||
|
||||
if("syringe")
|
||||
message = "\red <B>[source] is trying to inject [target]!</B>"
|
||||
if("pill")
|
||||
@@ -427,86 +474,17 @@
|
||||
message = "\red <B>[source] is trying to force [target] to swallow a gulp of [item]!</B>"
|
||||
if("dnainjector")
|
||||
message = "\red <B>[source] is trying to inject [target] with the [item]!</B>"
|
||||
if("mask")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had their mask removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) mask</font>")
|
||||
if(target.wear_mask && !target.wear_mask.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.wear_mask] from [target]'s head!</B>"
|
||||
if("uniform")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their uniform ([target.w_uniform]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) uniform ([target.w_uniform])</font>")
|
||||
if(target.w_uniform && !target.w_uniform.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.w_uniform] from [target]'s body!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off \a [target.wear_mask] from [target]'s head!</B>"
|
||||
if("l_hand")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their left hand item ([target.l_hand]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) left hand item ([target.l_hand])</font>")
|
||||
message = "\red <B>[source] is trying to take off \a [target.l_hand] from [target]'s left hand!</B>"
|
||||
if("r_hand")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their right hand item ([target.r_hand]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) right hand item ([target.r_hand])</font>")
|
||||
message = "\red <B>[source] is trying to take off \a [target.r_hand] from [target]'s right hand!</B>"
|
||||
if("gloves")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their gloves ([target.gloves]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) gloves ([target.gloves])</font>")
|
||||
if(target.gloves && !target.gloves.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.gloves] from [target]'s hands!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.gloves] from [target]'s hands!</B>"
|
||||
if("eyes")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their eyewear ([target.glasses]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) eyewear ([target.glasses])</font>")
|
||||
if(target.glasses && !target.glasses.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.glasses] from [target]'s eyes!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.glasses] from [target]'s eyes!</B>"
|
||||
if("l_ear")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their left ear item ([target.l_ear]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) left ear item ([target.l_ear])</font>")
|
||||
if(target.l_ear && !target.l_ear.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.l_ear] from [target]'s left ear!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.l_ear] from [target]'s left ear!</B>"
|
||||
if("r_ear")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their right ear item ([target.r_ear]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) right ear item ([target.r_ear])</font>")
|
||||
if(target.r_ear && !target.r_ear.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.r_ear] from [target]'s right ear!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.r_ear] from [target]'s right ear!</B>"
|
||||
if("head")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their hat ([target.head]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) hat ([target.head])</font>")
|
||||
if(target.head && !target.head.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.head] from [target]'s head!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.head] from [target]'s head!</B>"
|
||||
if("shoes")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their shoes ([target.shoes]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) shoes ([target.shoes])</font>")
|
||||
if(target.shoes && !target.shoes.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.shoes] from [target]'s feet!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.shoes] from [target]'s feet!</B>"
|
||||
if("belt")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their belt item ([target.belt]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) belt item ([target.belt])</font>")
|
||||
message = "\red <B>[source] is trying to take off the [target.belt] from [target]'s belt!</B>"
|
||||
if("suit")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their suit ([target.wear_suit]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) suit ([target.wear_suit])</font>")
|
||||
if(target.wear_suit && !target.wear_suit.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.wear_suit] from [target]'s body!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off \a [target.wear_suit] from [target]'s body!</B>"
|
||||
if("back")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their back item ([target.back]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) back item ([target.back])</font>")
|
||||
message = "\red <B>[source] is trying to take off \a [target.back] from [target]'s back!</B>"
|
||||
message = "\red <B>[source] is trying to take off \a [target.w_uniform] from [target]'s body!</B>"
|
||||
for(var/obj/item/I in list(target.l_store, target.r_store))
|
||||
if(I.on_found(source))
|
||||
return
|
||||
if("handcuff")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Was unhandcuffed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to unhandcuff [target.name]'s ([target.ckey])</font>")
|
||||
@@ -515,17 +493,6 @@
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Was unlegcuffed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to unlegcuff [target.name]'s ([target.ckey])</font>")
|
||||
message = "\red <B>[source] is trying to unlegcuff [target]!</B>"
|
||||
if("uniform")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their uniform ([target.w_uniform]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) uniform ([target.w_uniform])</font>")
|
||||
for(var/obj/item/I in list(target.l_store, target.r_store))
|
||||
if(I.on_found(source))
|
||||
return
|
||||
if(target.w_uniform && !target.w_uniform.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.w_uniform] from [target]'s body!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off \a [target.w_uniform] from [target]'s body!</B>"
|
||||
if("tie")
|
||||
var/obj/item/clothing/under/suit = target.w_uniform
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their accessory ([suit.hastie]) removed by [source.name] ([source.ckey])</font>")
|
||||
@@ -537,10 +504,6 @@
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off \a [suit.hastie] from [target]'s suit!</B>"
|
||||
if("s_store")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their suit storage item ([target.s_store]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) suit storage item ([target.s_store])</font>")
|
||||
message = "\red <B>[source] is trying to take off \a [target.s_store] from [target]'s suit!</B>"
|
||||
if("pockets")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their pockets emptied by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to empty [target.name]'s ([target.ckey]) pockets</font>")
|
||||
@@ -553,10 +516,6 @@
|
||||
del(src)
|
||||
target.cpr_time = 0
|
||||
message = "\red <B>[source] is trying perform CPR on [target]!</B>"
|
||||
if("id")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their ID ([target.wear_id]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) ID ([target.wear_id])</font>")
|
||||
message = "\red <B>[source] is trying to take off [target.wear_id] from [target]'s uniform!</B>"
|
||||
if("internal")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their internals toggled by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to toggle [target.name]'s ([target.ckey]) internals</font>")
|
||||
@@ -575,8 +534,18 @@
|
||||
return
|
||||
message = "\red <B>[source] is trying to set [target]'s suit sensors!</B>"
|
||||
|
||||
for(var/mob/M in viewers(target, null))
|
||||
M.show_message(message, 1)
|
||||
if(target_item)
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had their [target_item] removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) [target_item]</font>")
|
||||
|
||||
if(target_item.canremove)
|
||||
message = "<span class='danger'>[source] is trying to take off \a [target_item] from [target]'s [target_part]!</span>"
|
||||
else
|
||||
source.visible_message("<span class='danger'>[source] fails to take off \a [target_item] from [target]'s [target_part]!</span>")
|
||||
return
|
||||
|
||||
source.visible_message(message)
|
||||
|
||||
spawn( HUMAN_STRIP_DELAY )
|
||||
done()
|
||||
return
|
||||
|
||||
@@ -12,8 +12,14 @@
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
|
||||
if(stat == 2)
|
||||
return say_dead(message)
|
||||
if(stat)
|
||||
if(stat == 2)
|
||||
return say_dead(message)
|
||||
return
|
||||
|
||||
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
|
||||
return
|
||||
|
||||
var/message_mode = parse_message_mode(message, "headset")
|
||||
|
||||
@@ -52,9 +58,6 @@
|
||||
if(ending=="?")
|
||||
verb="asks"
|
||||
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
|
||||
message = trim(message)
|
||||
|
||||
if(speech_problem_flag)
|
||||
@@ -63,7 +66,7 @@
|
||||
verb = handle_r[2]
|
||||
speech_problem_flag = handle_r[3]
|
||||
|
||||
if(!message || stat)
|
||||
if(!message || message == "")
|
||||
return
|
||||
|
||||
var/list/obj/item/used_radios = new
|
||||
@@ -265,45 +268,46 @@
|
||||
return verb
|
||||
|
||||
/mob/living/carbon/human/proc/handle_speech_problems(var/message)
|
||||
|
||||
var/list/returns[3]
|
||||
var/verb = "says"
|
||||
var/handled = 0
|
||||
if(silent)
|
||||
if(silent || (sdisabilities & MUTE))
|
||||
message = ""
|
||||
handled = 1
|
||||
if(sdisabilities & MUTE)
|
||||
message = ""
|
||||
handled = 1
|
||||
if(wear_mask)
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
|
||||
var/obj/item/clothing/mask/horsehead/hoers = wear_mask
|
||||
if(hoers.voicechange)
|
||||
if(mind && mind.changeling && department_radio_keys[copytext(message, 1, 3)] != "changeling")
|
||||
message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
|
||||
verb = pick("whinnies","neighs", "says")
|
||||
handled = 1
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
|
||||
var/obj/item/clothing/mask/horsehead/hoers = wear_mask
|
||||
if(hoers.voicechange)
|
||||
if(mind && mind.changeling && department_radio_keys[copytext(message, 1, 3)] != "changeling")
|
||||
message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
|
||||
verb = pick("whinnies","neighs", "says")
|
||||
handled = 1
|
||||
|
||||
if((HULK in mutations) && health >= 25 && length(message))
|
||||
message = "[uppertext(message)]!!!"
|
||||
verb = pick("yells","roars","hollers")
|
||||
handled = 1
|
||||
if(slurring)
|
||||
message = slur(message)
|
||||
verb = pick("stammers","stutters")
|
||||
handled = 1
|
||||
|
||||
var/braindam = getBrainLoss()
|
||||
if(braindam >= 60)
|
||||
handled = 1
|
||||
if(prob(braindam/4))
|
||||
if(message != "")
|
||||
if((HULK in mutations) && health >= 25 && length(message))
|
||||
message = "[uppertext(message)]!!!"
|
||||
verb = pick("yells","roars","hollers")
|
||||
handled = 1
|
||||
if(slurring)
|
||||
message = slur(message)
|
||||
verb = pick("slobbers","slurs")
|
||||
handled = 1
|
||||
if(stuttering)
|
||||
message = stutter(message)
|
||||
verb = pick("stammers", "stutters")
|
||||
if(prob(braindam))
|
||||
message = uppertext(message)
|
||||
verb = pick("yells like an idiot","says rather loudly")
|
||||
verb = pick("stammers","stutters")
|
||||
handled = 1
|
||||
|
||||
var/braindam = getBrainLoss()
|
||||
if(braindam >= 60)
|
||||
handled = 1
|
||||
if(prob(braindam/4))
|
||||
message = stutter(message)
|
||||
verb = pick("stammers", "stutters")
|
||||
if(prob(braindam))
|
||||
message = uppertext(message)
|
||||
verb = "yells loudly"
|
||||
|
||||
returns[1] = message
|
||||
returns[2] = verb
|
||||
returns[3] = handled
|
||||
|
||||
return returns
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
return
|
||||
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
log_whisper("[src.name]/[src.key] : [message]")
|
||||
|
||||
@@ -36,6 +36,11 @@
|
||||
|
||||
//This is used by both the whisper verb and human/say() to handle whispering
|
||||
/mob/living/carbon/human/proc/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/verb="whispers")
|
||||
|
||||
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
|
||||
return
|
||||
|
||||
var/message_range = 1
|
||||
var/eavesdropping_range = 2
|
||||
var/watching_range = 5
|
||||
@@ -55,17 +60,19 @@
|
||||
|
||||
message = capitalize(trim(message))
|
||||
|
||||
//TODO: handle_speech_problems for silent
|
||||
if (!message || silent || miming)
|
||||
return
|
||||
if(speech_problem_flag)
|
||||
var/list/handle_r = handle_speech_problems(message)
|
||||
message = handle_r[1]
|
||||
verb = handle_r[2]
|
||||
if(verb == "yells loudly")
|
||||
verb = "slurs emphatically"
|
||||
else
|
||||
var/adverb = pick("quietly", "softly")
|
||||
verb = "[verb] [adverb]"
|
||||
|
||||
// Mute disability
|
||||
//TODO: handle_speech_problems
|
||||
if (src.sdisabilities & MUTE)
|
||||
return
|
||||
speech_problem_flag = handle_r[3]
|
||||
|
||||
//TODO: handle_speech_problems
|
||||
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
if(!message || message=="")
|
||||
return
|
||||
|
||||
//looks like this only appears in whisper. Should it be elsewhere as well? Maybe handle_speech_problems?
|
||||
@@ -102,10 +109,6 @@
|
||||
message = replacetext(message, "u", "µ")
|
||||
message = replacetext(message, "b", "ß")
|
||||
|
||||
//TODO: handle_speech_problems
|
||||
if (src.stuttering)
|
||||
message = stutter(message)
|
||||
|
||||
var/list/listening = hearers(message_range, src)
|
||||
listening |= src
|
||||
|
||||
|
||||
@@ -390,6 +390,9 @@
|
||||
..()
|
||||
else
|
||||
src << "<span class='warning'>You are too small to pull that.</span>"
|
||||
else
|
||||
src << "<span class='warning'>You are too small to pull that.</span>"
|
||||
return
|
||||
|
||||
// No binary for pAIs.
|
||||
/mob/living/silicon/pai/binarycheck()
|
||||
|
||||
@@ -372,3 +372,7 @@
|
||||
message = capitalize(trim_left(message))
|
||||
|
||||
..(message, null, verb)
|
||||
|
||||
/mob/living/simple_animal/put_in_hands(var/obj/item/W) // No hands.
|
||||
W.loc = get_turf(src)
|
||||
return 1
|
||||
@@ -844,7 +844,6 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
if(stat==2) return 0
|
||||
if(anchored) return 0
|
||||
if(monkeyizing) return 0
|
||||
if(restrained()) return 0
|
||||
return 1
|
||||
|
||||
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
|
||||
|
||||
@@ -769,7 +769,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
return 0 //ORGAN_BROKEN doesn't have the same meaning for robot limbs
|
||||
if(brute_dam > min_broken_damage * config.organ_health_multiplier)
|
||||
return 0 //will just immediately fracture again
|
||||
|
||||
|
||||
status &= ~ORGAN_BROKEN
|
||||
return 1
|
||||
|
||||
@@ -1131,7 +1131,9 @@ obj/item/weapon/organ/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/hemostat))
|
||||
if(contents.len)
|
||||
var/obj/item/removing = pick(contents)
|
||||
removing.loc = src.loc
|
||||
removing.loc = get_turf(user.loc)
|
||||
if(!(user.l_hand && user.r_hand))
|
||||
user.put_in_hands(removing)
|
||||
if(istype(removing,/obj/item/organ))
|
||||
var/obj/item/organ/removed_organ = removing
|
||||
organs_internal -= removed_organ.organ_data
|
||||
|
||||
@@ -198,12 +198,13 @@
|
||||
if(worm.controlling)
|
||||
target.release_control()
|
||||
worm.detatch()
|
||||
|
||||
obj.loc = get_turf(target)
|
||||
if(istype(obj,/obj/item/weapon/implant))
|
||||
var/obj/item/weapon/implant/imp = obj
|
||||
imp.imp_in = null
|
||||
imp.implanted = 0
|
||||
worm.leave_host()
|
||||
else
|
||||
obj.loc = get_turf(target)
|
||||
if(istype(obj,/obj/item/weapon/implant))
|
||||
var/obj/item/weapon/implant/imp = obj
|
||||
imp.imp_in = null
|
||||
imp.implanted = 0
|
||||
else
|
||||
user.visible_message("\blue [user] removes \the [tool] from [target]'s [affected.display_name].", \
|
||||
"\blue There's something inside [target]'s [affected.display_name], but you just missed it this time." )
|
||||
|
||||
@@ -169,3 +169,43 @@
|
||||
"\red Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!")
|
||||
|
||||
//no damage or anything, just wastes medicine
|
||||
|
||||
/datum/surgery_step/hardsuit
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/weldingtool = 80,
|
||||
/obj/item/weapon/circular_saw = 60,
|
||||
/obj/item/weapon/pickaxe/plasmacutter = 100
|
||||
)
|
||||
|
||||
can_infect = 0
|
||||
blood_level = 0
|
||||
|
||||
min_duration = 120
|
||||
max_duration = 180
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!istype(target))
|
||||
return 0
|
||||
if(istype(tool,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/welder = tool
|
||||
if(!welder.isOn())
|
||||
return 0
|
||||
return (target_zone == "chest") && istype(target.back, /obj/item/weapon/rig) && !(target.back.canremove)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts cutting through the support systems of [target]'s [target.back] with \the [tool]." , \
|
||||
"You start cutting through the support systems of [target]'s [target.back] with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
var/obj/item/weapon/rig/rig = target.back
|
||||
if(!istype(rig))
|
||||
return
|
||||
rig.reset()
|
||||
user.visible_message("<span class='notice'>[user] has cut through the support systems of [target]'s [rig] with \the [tool].</span>", \
|
||||
"<span class='notice'>You have cut through the support systems of [target]'s [rig] with \the [tool].</span>")
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='danger'>[user]'s [tool] can't quite seem to get through the metal...</span>", \
|
||||
"<span class='danger'>Your [tool] can't quite seem to get through the metal. It's weakening, though - try again.</span>")
|
||||
@@ -56,6 +56,15 @@ should be listed in the changelog upon commit though. Thanks. -->
|
||||
|
||||
<!-- DO NOT REMOVE, MOVE, OR COPY THIS COMMENT! THIS MUST BE THE LAST NON-EMPTY LINE BEFORE THE LOGS #ADDTOCHANGELOGMARKER# -->
|
||||
|
||||
<div class='commit sansserif'>
|
||||
<h2 class='date'>1 September 2015</h2>
|
||||
<h3 class='author'> updated:</h3>
|
||||
<ul class='changes bgimages16'>
|
||||
<li class='tweak'>Voice changers no longer use ID cards. They have Toggle and Set Voice verbs on the actual mask object now.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='commit sansserif'>
|
||||
<h2 class='date'>22 November 2014</h2>
|
||||
<h3 class='author'>Zuhayr updated:</h3>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Reference in New Issue
Block a user