mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
TG: - Some runtime-prevention tweaks so that impatient coders don't just break
everything somewhere down the line. Revision: r3665 Author: baloh.matevz
This commit is contained in:
+14
-1
@@ -422,7 +422,6 @@
|
||||
var/burning = null
|
||||
var/hitsound = null
|
||||
var/w_class = 3.0
|
||||
var/protective_temperature = 0 // Placing this here to avoid runtime errors, due to tiny items being allowed on ears and being queried for this variable
|
||||
flags = FPRINT | TABLEPASS
|
||||
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
|
||||
pass_flags = PASSTABLE
|
||||
@@ -430,6 +429,20 @@
|
||||
// causeerrorheresoifixthis
|
||||
var/obj/item/master = null
|
||||
|
||||
//Since any item can now be a piece of clothing, this has to be put here so all items share it.
|
||||
var/see_face = 1.0
|
||||
var/color = null
|
||||
var/body_parts_covered = 0 //see setup.dm for appropriate bit flags
|
||||
var/protective_temperature = 0
|
||||
var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible
|
||||
var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets)
|
||||
var/permeability_coefficient = 1 // for chemicals/diseases
|
||||
var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit)
|
||||
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
|
||||
var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N
|
||||
var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
var/list/allowed = null //suit storage stuff.
|
||||
|
||||
/obj/item/device
|
||||
icon = 'device.dmi'
|
||||
|
||||
|
||||
@@ -4,19 +4,7 @@
|
||||
name = "clothing"
|
||||
// var/obj/item/clothing/master = null
|
||||
|
||||
var/see_face = 1.0
|
||||
var/color = null
|
||||
|
||||
var/body_parts_covered = 0 //see setup.dm for appropriate bit flags
|
||||
|
||||
var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible
|
||||
var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets)
|
||||
var/permeability_coefficient = 1 // for chemicals/diseases
|
||||
var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit)
|
||||
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
|
||||
var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N
|
||||
|
||||
var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
|
||||
|
||||
|
||||
+10
-10
@@ -386,7 +386,7 @@
|
||||
origin_tech = "combat=3"
|
||||
|
||||
/obj/item/weapon/melee/energy/sword
|
||||
var/color
|
||||
color
|
||||
name = "energy sword"
|
||||
desc = "It cuts AND cooks at the same time!"
|
||||
icon_state = "sword0"
|
||||
@@ -476,7 +476,7 @@
|
||||
w_class = 1.0
|
||||
throw_speed = 2
|
||||
throw_range = 10
|
||||
var/color = "white"
|
||||
color = "white"
|
||||
|
||||
/obj/item/weapon/bedsheet/blue
|
||||
icon_state = "sheetblue"
|
||||
@@ -763,7 +763,7 @@
|
||||
icon = 'power.dmi'
|
||||
icon_state = "coil_red"
|
||||
var/amount = MAXCOIL
|
||||
var/color = "red"
|
||||
color = "red"
|
||||
desc = "A coil of power cable."
|
||||
throwforce = 10
|
||||
w_class = 2.0
|
||||
@@ -1026,12 +1026,12 @@
|
||||
throw_range = 15
|
||||
layer = 4
|
||||
var/list/stamped
|
||||
var/see_face = 1
|
||||
var/body_parts_covered = HEAD
|
||||
var/heat_transfer_coefficient = 0.99
|
||||
var/gas_transfer_coefficient = 1
|
||||
var/permeability_coefficient = 0.99
|
||||
var/siemens_coefficient = 0.80
|
||||
see_face = 1
|
||||
body_parts_covered = HEAD
|
||||
heat_transfer_coefficient = 0.99
|
||||
gas_transfer_coefficient = 1
|
||||
permeability_coefficient = 0.99
|
||||
siemens_coefficient = 0.80
|
||||
var/iteration
|
||||
|
||||
/obj/item/weapon/directions
|
||||
@@ -1701,7 +1701,7 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
|
||||
throw_speed = 7
|
||||
throw_range = 15
|
||||
m_amt = 60
|
||||
var/color = "cargo"
|
||||
color = "cargo"
|
||||
|
||||
/obj/item/weapon/stamp/captain
|
||||
name = "captain's rubber stamp"
|
||||
|
||||
@@ -3,22 +3,31 @@
|
||||
desc = "An implant. Not usually seen outside a body."
|
||||
icon = 'items.dmi'
|
||||
icon_state = "implant"
|
||||
var
|
||||
implanted = null
|
||||
mob/imp_in = null
|
||||
color = "b"
|
||||
allow_reagents = 0
|
||||
proc
|
||||
trigger(emote, source as mob)
|
||||
activate()
|
||||
implanted(source as mob)
|
||||
get_data()
|
||||
hear(message, source as mob)
|
||||
var/implanted = null
|
||||
var/mob/imp_in = null
|
||||
color = "b"
|
||||
var/allow_reagents = 0
|
||||
|
||||
proc/trigger(emote, source as mob)
|
||||
return
|
||||
|
||||
proc/activate()
|
||||
return
|
||||
|
||||
proc/implanted(source as mob)
|
||||
return
|
||||
|
||||
proc/get_data()
|
||||
return
|
||||
|
||||
proc/hear(message, source as mob)
|
||||
return
|
||||
|
||||
|
||||
trigger(emote, source as mob)
|
||||
return
|
||||
|
||||
|
||||
activate()
|
||||
return
|
||||
|
||||
@@ -37,6 +46,7 @@
|
||||
implanted(source as mob)
|
||||
return
|
||||
|
||||
|
||||
get_data()
|
||||
return "No information available"
|
||||
|
||||
@@ -48,9 +58,8 @@
|
||||
/obj/item/weapon/implant/uplink
|
||||
name = "uplink implant"
|
||||
desc = "A micro-telecrystal implant which allows for instant transportation of equipment."
|
||||
var
|
||||
activation_emote = "chuckle"
|
||||
obj/item/device/uplink/radio/uplink = null
|
||||
var/activation_emote = "chuckle"
|
||||
var/obj/item/device/uplink/radio/uplink = null
|
||||
|
||||
|
||||
New()
|
||||
@@ -77,8 +86,7 @@
|
||||
/obj/item/weapon/implant/tracking
|
||||
name = "tracking implant"
|
||||
desc = "An implant which relays information to the appropriate tracking computer."
|
||||
var
|
||||
id = 1.0
|
||||
var/id = 1.0
|
||||
|
||||
|
||||
get_data()
|
||||
|
||||
@@ -63,14 +63,13 @@ var/global/list/cached_icons = list()
|
||||
|
||||
remover
|
||||
paint_type = "remover"
|
||||
|
||||
/*
|
||||
/obj/item/weapon/paint
|
||||
name = "Paint Can"
|
||||
desc = "Used to recolor floors and walls. Can not be removed by the janitor."
|
||||
icon = 'items.dmi'
|
||||
icon_state = "paint_neutral"
|
||||
var/color = "FFFFFF"
|
||||
color = "FFFFFF"
|
||||
item_state = "paintcan"
|
||||
w_class = 3.0
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
g_amt = 0
|
||||
m_amt = 75
|
||||
subspace_transmission = 1
|
||||
protective_temperature = 0
|
||||
canhear_range = 1 // can't hear headsets from very far away
|
||||
|
||||
slot_flags = SLOT_EARS
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
atom/var/list/suit_fibers
|
||||
|
||||
atom/proc/add_fibers(mob/living/carbon/human/M)
|
||||
if(M.gloves)
|
||||
if(M.gloves.transfer_blood) //bloodied gloves transfer blood to touched objects
|
||||
if(add_blood(M.gloves.bloody_hands_mob)) //only reduces the bloodiness of our gloves if the item wasn't already bloody
|
||||
M.gloves.transfer_blood--
|
||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/))
|
||||
var/obj/item/clothing/gloves/G = M.gloves
|
||||
if(G.transfer_blood) //bloodied gloves transfer blood to touched objects
|
||||
if(add_blood(G.bloody_hands_mob)) //only reduces the bloodiness of our gloves if the item wasn't already bloody
|
||||
G.transfer_blood--
|
||||
else if(M.bloody_hands)
|
||||
if(add_blood(M.bloody_hands_mob))
|
||||
M.bloody_hands--
|
||||
@@ -613,10 +614,11 @@ turf/Exited(mob/living/carbon/human/M)
|
||||
M.track_blood--
|
||||
src.add_bloody_footprints(M.track_blood_mob,1,M.dir,get_tracks(M),M.track_blood_type)
|
||||
else if(istype(M,/mob/living/carbon/human))
|
||||
if(M.shoes)
|
||||
if(M.shoes.track_blood > 0)
|
||||
M.shoes.track_blood--
|
||||
src.add_bloody_footprints(M.shoes.track_blood_mob,1,M.dir,M.shoes.name,M.shoes.track_blood_type) // And bloody tracks end here
|
||||
if(M.shoes && istype(M.shoes,/obj/item/clothing/shoes))
|
||||
var/obj/item/clothing/shoes/S = M.shoes
|
||||
if(S.track_blood > 0)
|
||||
S.track_blood--
|
||||
src.add_bloody_footprints(S.track_blood_mob,1,M.dir,S.name,S.track_blood_type) // And bloody tracks end here
|
||||
. = ..()
|
||||
turf/Entered(mob/living/carbon/human/M)
|
||||
if(istype(M,/mob/living) && !istype(M,/mob/living/carbon/metroid))
|
||||
@@ -631,10 +633,11 @@ turf/Entered(mob/living/carbon/human/M)
|
||||
M.track_blood--
|
||||
src.add_bloody_footprints(M.track_blood_mob,0,M.dir,get_tracks(M),M.track_blood_type)
|
||||
else if(istype(M,/mob/living/carbon/human))
|
||||
if(M.shoes && !istype(src,/turf/space))
|
||||
if(M.shoes.track_blood > 0)
|
||||
M.shoes.track_blood--
|
||||
src.add_bloody_footprints(M.shoes.track_blood_mob,0,M.dir,M.shoes.name,M.shoes.track_blood_type)
|
||||
if(M.shoes && istype(M.shoes,/obj/item/clothing/shoes) && !istype(src,/turf/space))
|
||||
var/obj/item/clothing/shoes/S = M.shoes
|
||||
if(S.track_blood > 0)
|
||||
S.track_blood--
|
||||
src.add_bloody_footprints(S.track_blood_mob,0,M.dir,S.name,S.track_blood_type)
|
||||
|
||||
|
||||
for(var/obj/effect/decal/cleanable/B in src)
|
||||
@@ -649,11 +652,12 @@ turf/Entered(mob/living/carbon/human/M)
|
||||
track_type = "oil"
|
||||
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
if(M.shoes)
|
||||
M.shoes.add_blood(B.blood_owner)
|
||||
M.shoes.track_blood_mob = B.blood_owner
|
||||
M.shoes.track_blood = max(M.shoes.track_blood,8)
|
||||
M.shoes.track_blood_type = track_type
|
||||
if(M.shoes && istype(M.shoes,/obj/item/clothing/shoes))
|
||||
var/obj/item/clothing/shoes/S = M.shoes
|
||||
S.add_blood(B.blood_owner)
|
||||
S.track_blood_mob = B.blood_owner
|
||||
S.track_blood = max(S.track_blood,8)
|
||||
S.track_blood_type = track_type
|
||||
else
|
||||
M.add_blood(B.blood_owner)
|
||||
M.track_blood_mob = B.blood_owner
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
icon = 'hats.dmi'
|
||||
body_parts_covered = HEAD
|
||||
slot_flags = SLOT_HEAD
|
||||
var/list/allowed = list()
|
||||
|
||||
/obj/item/clothing/head/cakehat
|
||||
name = "cake-hat"
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
name = "suit"
|
||||
var/fire_resist = T0C+100
|
||||
flags = FPRINT | TABLEPASS
|
||||
var/list/allowed = list(/obj/item/weapon/tank/emergency_oxygen)
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
slot_flags = SLOT_OCLOTHING
|
||||
|
||||
@@ -601,11 +601,12 @@
|
||||
|
||||
..()
|
||||
|
||||
if(M.gloves)
|
||||
if(M.gloves.cell)
|
||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = M.gloves
|
||||
if(G.cell)
|
||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||
if(M.gloves.cell.charge >= 2500)
|
||||
M.gloves.cell.charge -= 2500
|
||||
if(G.cell.charge >= 2500)
|
||||
G.cell.charge -= 2500
|
||||
|
||||
Weaken(5)
|
||||
if (stuttering < 5)
|
||||
|
||||
@@ -367,11 +367,12 @@
|
||||
|
||||
..()
|
||||
|
||||
if(M.gloves)
|
||||
if(M.gloves.cell)
|
||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = M.gloves
|
||||
if(G.cell)
|
||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||
if(M.gloves.cell.charge >= 2500)
|
||||
M.gloves.cell.charge -= 2500
|
||||
if(G.cell.charge >= 2500)
|
||||
G.cell.charge -= 2500
|
||||
|
||||
Weaken(5)
|
||||
if (stuttering < 5)
|
||||
|
||||
@@ -27,19 +27,19 @@
|
||||
var/list/skills = null
|
||||
// var/b_type
|
||||
|
||||
var/obj/item/clothing/suit/wear_suit = null
|
||||
var/obj/item/clothing/under/w_uniform = null
|
||||
var/obj/item/clothing/shoes/shoes = null
|
||||
var/obj/item/weapon/belt = null
|
||||
var/obj/item/clothing/gloves/gloves = null
|
||||
var/obj/item/clothing/glasses/glasses = null
|
||||
var/obj/item/clothing/head/head = null
|
||||
var/obj/item/clothing/ears/l_ear = null
|
||||
var/obj/item/clothing/ears/r_ear = null
|
||||
var/obj/item/wear_suit = null
|
||||
var/obj/item/w_uniform = null
|
||||
var/obj/item/shoes = null
|
||||
var/obj/item/belt = null
|
||||
var/obj/item/gloves = null
|
||||
var/obj/item/glasses = null
|
||||
var/obj/item/head = null
|
||||
var/obj/item/l_ear = null
|
||||
var/obj/item/r_ear = null
|
||||
var/obj/item/weapon/card/id/wear_id = null
|
||||
var/obj/item/weapon/r_store = null
|
||||
var/obj/item/weapon/l_store = null
|
||||
var/obj/item/weapon/s_store = null
|
||||
var/obj/item/r_store = null
|
||||
var/obj/item/l_store = null
|
||||
var/obj/item/s_store = null
|
||||
|
||||
var/icon/stand_icon = null
|
||||
var/icon/lying_icon = null
|
||||
|
||||
@@ -9,11 +9,13 @@
|
||||
visible_message("\red <B>[M] attempted to touch [src]!</B>")
|
||||
return 0
|
||||
|
||||
if(M.gloves)
|
||||
if(M.gloves.cell)
|
||||
if(M.a_intent == "hurt")
|
||||
if(M.gloves.cell.charge >= 2500)
|
||||
M.gloves.cell.charge -= 2500
|
||||
|
||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = M.gloves
|
||||
if(G.cell)
|
||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||
if(G.cell.charge >= 2500)
|
||||
G.cell.charge -= 2500
|
||||
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Stungloved [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stungloved by [M.name] ([M.ckey])</font>")
|
||||
|
||||
@@ -153,10 +153,11 @@ emp_act
|
||||
if(H.wear_suit) H.wear_suit.add_blood(src)
|
||||
else if(H.w_uniform) H.w_uniform.add_blood(src)
|
||||
if(H.shoes) H.shoes.add_blood(src)
|
||||
if (H.gloves)
|
||||
H.gloves.add_blood(H)
|
||||
H.gloves.transfer_blood = 2
|
||||
H.gloves.bloody_hands_mob = H
|
||||
if (H.gloves && istype(H.gloves,/obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = H.gloves
|
||||
G.add_blood(H)
|
||||
G.transfer_blood = 2
|
||||
G.bloody_hands_mob = H
|
||||
else
|
||||
H.add_blood(H)
|
||||
H.bloody_hands = 2
|
||||
|
||||
@@ -1334,8 +1334,20 @@
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if ((disabilities & 1 && ((glasses && !glasses.prescription) || !glasses)) || (glasses && glasses.prescription && !(disabilities & 1)))
|
||||
client.screen += hud_used.vimpaired
|
||||
if(disabilities & 1)
|
||||
if(!glasses)
|
||||
client.screen += hud_used.vimpaired
|
||||
else if (glasses && istype(glasses,/obj/item/clothing/glasses))
|
||||
var/obj/item/clothing/glasses/G = glasses
|
||||
if(!G.prescription)
|
||||
client.screen += hud_used.vimpaired
|
||||
else
|
||||
client.screen += hud_used.vimpaired
|
||||
else
|
||||
if(glasses && istype(glasses,/obj/item/clothing/glasses))
|
||||
var/obj/item/clothing/glasses/G = glasses
|
||||
if(G.prescription)
|
||||
client.screen += hud_used.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += hud_used.blurry
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
|
||||
bruteloss += rand(1, 3)
|
||||
adjustBruteLoss(rand(1, 3))
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
@@ -463,11 +463,13 @@
|
||||
|
||||
|
||||
|
||||
if(M.gloves)
|
||||
if(M.gloves.cell)
|
||||
|
||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = M.gloves
|
||||
if(G.cell)
|
||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||
if(M.gloves.cell.charge >= 2500)
|
||||
M.gloves.cell.charge -= 2500
|
||||
if(G.cell.charge >= 2500)
|
||||
G.cell.charge -= 2500
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall.", 2)
|
||||
|
||||
@@ -210,11 +210,13 @@
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
if(M.gloves)
|
||||
if(M.gloves.cell)
|
||||
if(M.a_intent == "hurt")
|
||||
if(M.gloves.cell.charge >= 2500)
|
||||
M.gloves.cell.charge -= 2500
|
||||
|
||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = M.gloves
|
||||
if(G.cell)
|
||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||
if(G.cell.charge >= 2500)
|
||||
G.cell.charge -= 2500
|
||||
Weaken(5)
|
||||
if (stuttering < 5)
|
||||
stuttering = 5
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
throw_speed = 7
|
||||
throw_range = 15
|
||||
m_amt = 60
|
||||
var/color = "cargo"
|
||||
color = "cargo"
|
||||
pressure_resistance = 5
|
||||
|
||||
/obj/item/weapon/stamp/captain
|
||||
|
||||
Reference in New Issue
Block a user