mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 20:13:45 +01:00
ABSTRACT flag addition & handling
- Adds ABSTRACT flag to relevant items, removes abstract var. - Adds checks for ABSTRACT where relevant. - Also removes extra define of golem gas mask. - Adds NODROP to changeling mutations so I don't have to do that later.
This commit is contained in:
@@ -22,8 +22,10 @@
|
||||
|
||||
//Puts the item into your l_hand if possible and calls all necessary triggers/updates. returns 1 on success.
|
||||
/mob/proc/put_in_l_hand(var/obj/item/W)
|
||||
if(lying) return 0
|
||||
if(!istype(W)) return 0
|
||||
if(lying && !(W.flags & ABSTRACT))
|
||||
return 0
|
||||
if(!istype(W))
|
||||
return 0
|
||||
if(!l_hand)
|
||||
W.loc = src //TODO: move to equipped?
|
||||
l_hand = W
|
||||
@@ -38,8 +40,10 @@
|
||||
|
||||
//Puts the item into your r_hand if possible and calls all necessary triggers/updates. returns 1 on success.
|
||||
/mob/proc/put_in_r_hand(var/obj/item/W)
|
||||
if(lying) return 0
|
||||
if(!istype(W)) return 0
|
||||
if(lying && !(W.flags & ABSTRACT))
|
||||
return 0
|
||||
if(!istype(W))
|
||||
return 0
|
||||
if(!r_hand)
|
||||
W.loc = src
|
||||
r_hand = W
|
||||
|
||||
@@ -473,9 +473,9 @@
|
||||
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>Head(Mask):</B> <A href='?src=\ref[src];item=mask'>[(wear_mask && !(wear_mask.flags & ABSTRACT)) ? wear_mask : "Nothing"]</A>
|
||||
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand && !(l_hand.flags & ABSTRACT)) ? l_hand : "Nothing"]</A>
|
||||
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand && !(r_hand.flags & ABSTRACT)) ? 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>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
|
||||
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
|
||||
|
||||
@@ -104,14 +104,14 @@
|
||||
msg += "[t_He] [t_has] \icon[back] \a [back] on [t_his] back.\n"
|
||||
|
||||
//left hand
|
||||
if(l_hand)
|
||||
if(l_hand && !(l_hand.flags & ABSTRACT))
|
||||
if(l_hand.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] holding \icon[l_hand] [l_hand.gender==PLURAL?"some":"a"] blood-stained [l_hand.name] in [t_his] left hand!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] holding \icon[l_hand] \a [l_hand] in [t_his] left hand.\n"
|
||||
|
||||
//right hand
|
||||
if(r_hand)
|
||||
if(r_hand && !(r_hand.flags & ABSTRACT))
|
||||
if(r_hand.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] holding \icon[r_hand] [r_hand.gender==PLURAL?"some":"a"] blood-stained [r_hand.name] in [t_his] right hand!</span>\n"
|
||||
else
|
||||
|
||||
@@ -496,24 +496,24 @@
|
||||
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>Gloves:</B> <A href='?src=\ref[src];item=gloves'>[(gloves ? gloves : "Nothing")]</A>
|
||||
<BR><B>Eyes:</B> <A href='?src=\ref[src];item=eyes'>[(glasses ? glasses : "Nothing")]</A>
|
||||
<BR><B>Left Ear:</B> <A href='?src=\ref[src];item=l_ear'>[(l_ear ? l_ear : "Nothing")]</A>
|
||||
<BR><B>Right Ear:</B> <A href='?src=\ref[src];item=r_ear'>[(r_ear ? r_ear : "Nothing")]</A>
|
||||
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? head : "Nothing")]</A>
|
||||
<BR><B>Shoes:</B> <A href='?src=\ref[src];item=shoes'>[(shoes ? shoes : "Nothing")]</A>
|
||||
<BR><B>Belt:</B> <A href='?src=\ref[src];item=belt'>[(belt ? belt : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(belt, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
|
||||
<BR><B>Uniform:</B> <A href='?src=\ref[src];item=uniform'>[(w_uniform ? w_uniform : "Nothing")]</A> [(suit) ? ((suit.has_sensor == 1) ? text(" <A href='?src=\ref[];item=sensor'>Sensors</A>", src) : "") :]
|
||||
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? wear_suit : "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><B>ID:</B> <A href='?src=\ref[src];item=id'>[(wear_id ? wear_id : "Nothing")]</A>
|
||||
<BR><B>PDA:</B> <A href='?src=\ref[src];item=pda'>[(wear_pda ? wear_pda : "Nothing")]</A>
|
||||
<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=s_store'>[(s_store ? s_store : "Nothing")]</A>
|
||||
<BR><BR><A href='?src=\ref[src];pockets=left'>Left Pocket ([l_store ? (pickpocket ? l_store.name : "Full") : "Empty"])</A>
|
||||
<BR><A href='?src=\ref[src];pockets=right'>Right Pocket ([r_store ? (pickpocket ? r_store.name : "Full") : "Empty"])</A>
|
||||
<BR><B>Head(Mask):</B> <A href='?src=\ref[src];item=mask'>[(wear_mask && !(wear_mask.flags & ABSTRACT)) ? wear_mask : "Nothing"]</A>
|
||||
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand && !(l_hand.flags & ABSTRACT)) ? l_hand : "Nothing"]</A>
|
||||
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand && !(r_hand.flags&ABSTRACT)) ? r_hand : "Nothing"]</A>
|
||||
<BR><B>Gloves:</B> <A href='?src=\ref[src];item=gloves'>[(gloves && !(gloves.flags & ABSTRACT)) ? gloves : "Nothing"]</A>
|
||||
<BR><B>Eyes:</B> <A href='?src=\ref[src];item=eyes'>[(glasses && !(glasses.flags & ABSTRACT)) ? glasses : "Nothing"]</A>
|
||||
<BR><B>Left Ear:</B> <A href='?src=\ref[src];item=l_ear'>[(l_ear && !(l_ear.flags & ABSTRACT)) ? l_ear : "Nothing"]</A>
|
||||
<BR><B>Right Ear:</B> <A href='?src=\ref[src];item=r_ear'>[(r_ear && !(r_ear.flags & ABSTRACT)) ? r_ear : "Nothing"]</A>
|
||||
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head && !(head.flags & ABSTRACT)) ? head : "Nothing"]</A>
|
||||
<BR><B>Shoes:</B> <A href='?src=\ref[src];item=shoes'>[(shoes && !(shoes.flags & ABSTRACT)) ? shoes : "Nothing"]</A>
|
||||
<BR><B>Belt:</B> <A href='?src=\ref[src];item=belt'>[(belt && !(belt.flags & ABSTRACT)) ? belt : "Nothing"]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(belt, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
|
||||
<BR><B>Uniform:</B> <A href='?src=\ref[src];item=uniform'>[(w_uniform && !(w_uniform.flags & ABSTRACT)) ? w_uniform : "Nothing"]</A> [(suit) ? ((suit.has_sensor == 1) ? text(" <A href='?src=\ref[];item=sensor'>Sensors</A>", src) : "") :]
|
||||
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit && !(wear_suit.flags & ABSTRACT)) ? wear_suit : "Nothing"]</A>
|
||||
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back && !(back.flags & ABSTRACT)) ? 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><B>ID:</B> <A href='?src=\ref[src];item=id'>[(wear_id && !(wear_id.flags & ABSTRACT)) ? wear_id : "Nothing"]</A>
|
||||
<BR><B>PDA:</B> <A href='?src=\ref[src];item=pda'>[(wear_pda && !(wear_pda.flags & ABSTRACT)) ? wear_pda : "Nothing"]</A>
|
||||
<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=s_store'>[(s_store && !(s_store.flags & ABSTRACT)) ? s_store : "Nothing"]</A>
|
||||
<BR><BR><A href='?src=\ref[src];pockets=left'>Left Pocket ([(l_store && !(l_store.flags & ABSTRACT)) ? (pickpocket ? l_store.name : "Full") : "Empty"])</A>
|
||||
<BR><A href='?src=\ref[src];pockets=right'>Right Pocket ([(r_store && !(r_store.flags & ABSTRACT)) ? (pickpocket ? r_store.name : "Full") : "Empty"])</A>
|
||||
<BR><A href='?src=\ref[src];item=pockets'>Empty Both Pockets</A>
|
||||
<BR><BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
|
||||
<BR>[(legcuffed ? text("<A href='?src=\ref[src];item=legcuff'>Legcuffed</A>") : text(""))]
|
||||
@@ -640,9 +640,9 @@
|
||||
var/obj/item/pocket_item = (pocket_id == slot_r_store ? src.r_store : src.l_store)
|
||||
var/obj/item/place_item = usr.get_active_hand() // Item to place in the pocket, if it's empty
|
||||
|
||||
if(pocket_item)
|
||||
if(pocket_item && !(pocket_item.flags & ABSTRACT))
|
||||
usr << "<span class='notice'>You try to empty [src]'s [pocket_side] pocket.</span>"
|
||||
else if(place_item && place_item.mob_can_equip(src, pocket_id, 1))
|
||||
else if(place_item && place_item.mob_can_equip(src, pocket_id, 1) && !(place_item.flags & ABSTRACT))
|
||||
usr << "<span class='notice'>You try to place [place_item] into [src]'s [pocket_side] pocket.</span>"
|
||||
else
|
||||
return
|
||||
@@ -1036,10 +1036,10 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/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 || src.head || src.shoes || src.w_uniform || src.wear_suit || src.glasses || src.l_ear || src.r_ear || src.gloves)))
|
||||
if(full_body && ((src.l_hand && !(src.l_hand.flags & ABSTRACT)) || (src.r_hand && !(src.r_hand.flags & ABSTRACT)) || (src.back || src.wear_mask || src.head || src.shoes || src.w_uniform || src.wear_suit || src.glasses || src.l_ear || src.r_ear || src.gloves)))
|
||||
return 1
|
||||
|
||||
if( (src.l_hand && !src.l_hand.abstract) || (src.r_hand && !src.r_hand.abstract) )
|
||||
if((src.l_hand && !(src.l_hand.flags & ABSTRACT)) || (src.r_hand && !(src.r_hand.flags & ABSTRACT)))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
@@ -1161,14 +1161,14 @@
|
||||
var/datum/organ/internal/lungs/L = internal_organs_by_name["lungs"]
|
||||
if(!L)
|
||||
return 0
|
||||
|
||||
|
||||
return L.is_bruised()
|
||||
|
||||
/mob/living/carbon/human/proc/rupture_lung()
|
||||
var/datum/organ/internal/lungs/L = internal_organs_by_name["lungs"]
|
||||
if(!L)
|
||||
return 0
|
||||
|
||||
|
||||
if(!L.is_bruised())
|
||||
src.custom_pain("You feel a stabbing pain in your chest!", 1)
|
||||
L.damage = L.min_bruised_damage
|
||||
|
||||
@@ -897,6 +897,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
item_state = "golem"
|
||||
_color = "golem"
|
||||
has_sensor = 0
|
||||
flags = ABSTRACT
|
||||
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
canremove = 0
|
||||
|
||||
@@ -911,7 +912,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS|HEAD
|
||||
slowdown = 1.0
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
flags = ONESIZEFITSALL | STOPSPRESSUREDMAGE
|
||||
flags = ONESIZEFITSALL | STOPSPRESSUREDMAGE | ABSTRACT
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS | HEAD
|
||||
max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS | HEAD
|
||||
@@ -923,9 +924,9 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
name = "golem's feet"
|
||||
desc = "sturdy adamantine feet"
|
||||
icon_state = "golem"
|
||||
item_state = null
|
||||
item_state = "golem"
|
||||
canremove = 0
|
||||
flags = NOSLIP
|
||||
flags = NOSLIP | ABSTRACT | MASKINTERNALS | MASKCOVERSMOUTH
|
||||
slowdown = SHOES_SLOWDOWN+1
|
||||
|
||||
|
||||
@@ -937,15 +938,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
canremove = 0
|
||||
siemens_coefficient = 0
|
||||
unacidable = 1
|
||||
|
||||
/obj/item/clothing/mask/gas/golem
|
||||
name = "golem's face"
|
||||
desc = "the imposing face of an adamantine golem"
|
||||
icon_state = "golem"
|
||||
item_state = "golem"
|
||||
canremove = 0
|
||||
siemens_coefficient = 0
|
||||
unacidable = 1
|
||||
flags = ABSTRACT
|
||||
|
||||
|
||||
/obj/item/clothing/gloves/golem
|
||||
@@ -955,6 +948,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
item_state = null
|
||||
siemens_coefficient = 0
|
||||
canremove = 0
|
||||
flags = ABSTRACT
|
||||
|
||||
|
||||
/obj/item/clothing/head/space/golem
|
||||
@@ -965,7 +959,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
desc = "a golem's head"
|
||||
canremove = 0
|
||||
unacidable = 1
|
||||
flags = STOPSPRESSUREDMAGE
|
||||
flags = STOPSPRESSUREDMAGE | ABSTRACT
|
||||
heat_protection = HEAD
|
||||
max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
armor = list(melee = 80, bullet = 20, laser = 20, energy = 10, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
@@ -438,9 +438,9 @@ var/list/slot_equipment_priority = list( \
|
||||
<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><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand && !(l_hand.flags & ABSTRACT)) ? l_hand : "Nothing"]</A>
|
||||
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand && !(r_hand.flags & ABSTRACT)) ? r_hand : "Nothing"]</A>
|
||||
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back && !(back.flags & ABSTRACT)) ? 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>
|
||||
@@ -1235,7 +1235,7 @@ mob/proc/yank_out_object()
|
||||
if(jobban_isbanned(usr, "NPC"))
|
||||
usr << "<span class='warning'>You are banned from playing as NPC's.</span>"
|
||||
return
|
||||
|
||||
|
||||
if((usr in respawnable_list) && (stat==2 || istype(usr,/mob/dead/observer)))
|
||||
var/list/creatures = list("Mouse")
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
/obj/item/weapon/grab
|
||||
name = "grab"
|
||||
flags = NOBLUDGEON
|
||||
flags = NOBLUDGEON | ABSTRACT
|
||||
var/obj/screen/grab/hud = null
|
||||
var/mob/affecting = null
|
||||
var/mob/assailant = null
|
||||
@@ -12,7 +12,6 @@
|
||||
var/last_upgrade = 0
|
||||
|
||||
layer = 21
|
||||
abstract = 1
|
||||
item_state = "nothing"
|
||||
w_class = 5.0
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ proc/isorgan(A)
|
||||
if(L && L.implanted)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
proc/isnewplayer(A)
|
||||
if(istype(A, /mob/new_player))
|
||||
return 1
|
||||
@@ -161,7 +161,7 @@ proc/hasorgans(A)
|
||||
|
||||
/proc/hsl2rgb(h, s, l)
|
||||
return
|
||||
|
||||
|
||||
proc/hassensorlevel(A, var/level)
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(istype(H) && istype(H.w_uniform, /obj/item/clothing/under))
|
||||
@@ -352,10 +352,10 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
|
||||
|
||||
/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)))
|
||||
if(full_body && ((src.l_hand && !(src.l_hand.flags & ABSTRACT)) || (src.r_hand && !(src.r_hand.flags & ABSTRACT)) || (src.back || src.wear_mask)))
|
||||
return 1
|
||||
|
||||
if((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )))
|
||||
if((src.l_hand && !(src.l_hand.flags & ABSTRACT)) || (src.r_hand && !(src.r_hand.flags & ABSTRACT)))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user