Merge remote-tracking branch 'citadel/master' into mobility_flags
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
var/preferred_form = null
|
||||
|
||||
if(IsAdminGhost(src))
|
||||
has_unlimited_silicon_privilege = 1
|
||||
silicon_privileges = ALL
|
||||
|
||||
if(client.prefs.unlock_content)
|
||||
preferred_form = client.prefs.ghost_form
|
||||
|
||||
@@ -11,7 +11,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
layer = GHOST_LAYER
|
||||
stat = DEAD
|
||||
density = FALSE
|
||||
anchored = TRUE // don't get pushed around
|
||||
move_resist = INFINITY
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
see_in_dark = 100
|
||||
invisibility = INVISIBILITY_OBSERVER
|
||||
|
||||
@@ -987,3 +987,6 @@
|
||||
return TRUE
|
||||
if(isclothing(wear_mask) && (wear_mask.clothing_flags & SCAN_REAGENTS))
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/can_hold_items()
|
||||
return TRUE
|
||||
|
||||
@@ -823,9 +823,6 @@
|
||||
. += dna.species.check_weakness(weapon, attacker)
|
||||
|
||||
/mob/living/carbon/human/is_literate()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/can_hold_items()
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/update_gravity(has_gravity,override = 0)
|
||||
@@ -834,7 +831,7 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/vomit(lost_nutrition = 10, blood = 0, stun = 1, distance = 0, message = 1, toxic = 0)
|
||||
if(blood && (NOBLOOD in dna.species.species_traits))
|
||||
if(blood && dna?.species && (NOBLOOD in dna.species.species_traits))
|
||||
if(message)
|
||||
visible_message("<span class='warning'>[src] dry heaves!</span>", \
|
||||
"<span class='userdanger'>You try to throw up, but there's nothing in your stomach!</span>")
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/checkarmor(obj/item/bodypart/def_zone, d_type)
|
||||
if(!d_type)
|
||||
if(!d_type || !def_zone)
|
||||
return 0
|
||||
var/protection = 0
|
||||
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform, back, gloves, shoes, belt, s_store, glasses, ears, wear_id, wear_neck) //Everything but pockets. Pockets are l_store and r_store. (if pockets were allowed, putting something armored, gloves or hats for example, would double up on the armor)
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
put_in_hands(I)
|
||||
update_inv_hands()
|
||||
if(SLOT_IN_BACKPACK)
|
||||
if(!SEND_SIGNAL(back, COMSIG_TRY_STORAGE_INSERT, I, src, TRUE))
|
||||
if(!back || !SEND_SIGNAL(back, COMSIG_TRY_STORAGE_INSERT, I, src, TRUE))
|
||||
not_handled = TRUE
|
||||
else
|
||||
not_handled = TRUE
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
health = 500
|
||||
maxHealth = 500
|
||||
layer = BELOW_MOB_LAYER
|
||||
silicon_privileges = PRIVILEDGES_PAI
|
||||
var/datum/element/mob_holder/current_mob_holder //because only a few of their chassis can be actually held.
|
||||
|
||||
var/network = "ss13"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/mob/living/silicon
|
||||
gender = NEUTER
|
||||
has_unlimited_silicon_privilege = 1
|
||||
silicon_privileges = PRIVILEDGES_SILICON
|
||||
verb_say = "states"
|
||||
verb_ask = "queries"
|
||||
verb_exclaim = "declares"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
maxbodytemp = INFINITY
|
||||
minbodytemp = 0
|
||||
blood_volume = 0
|
||||
has_unlimited_silicon_privilege = 1
|
||||
silicon_privileges = PRIVILEDGES_BOT
|
||||
sentience_type = SENTIENCE_ARTIFICIAL
|
||||
status_flags = NONE //no default canpush
|
||||
verb_say = "states"
|
||||
@@ -194,10 +194,12 @@
|
||||
if(locked) //First emag application unlocks the bot's interface. Apply a screwdriver to use the emag again.
|
||||
locked = FALSE
|
||||
emagged = 1
|
||||
to_chat(user, "<span class='notice'>You bypass [src]'s controls.</span>")
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>You bypass [src]'s controls.</span>")
|
||||
return TRUE
|
||||
if(!open)
|
||||
to_chat(user, "<span class='warning'>You need to open maintenance panel first!</span>")
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>You need to open maintenance panel first!</span>")
|
||||
return
|
||||
emagged = 2
|
||||
remote_disabled = 1 //Manually emagging the bot locks out the AI built in panel.
|
||||
@@ -205,7 +207,8 @@
|
||||
bot_reset()
|
||||
turn_on() //The bot automatically turns on when emagged, unless recently hit with EMP.
|
||||
to_chat(src, "<span class='userdanger'>(#$*#$^^( OVERRIDE DETECTED</span>")
|
||||
log_combat(user, src, "emagged")
|
||||
if(user)
|
||||
log_combat(user, src, "emagged")
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/bot/examine(mob/user)
|
||||
|
||||
@@ -123,7 +123,8 @@
|
||||
emagged = TRUE
|
||||
if(!open)
|
||||
locked = !locked
|
||||
to_chat(user, "<span class='notice'>You [locked ? "lock" : "unlock"] [src]'s controls!</span>")
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>You [locked ? "lock" : "unlock"] [src]'s controls!</span>")
|
||||
flick("mulebot-emagged", src)
|
||||
playsound(src, "sparks", 100, FALSE)
|
||||
|
||||
@@ -180,7 +181,7 @@
|
||||
var/list/data = list()
|
||||
data["on"] = on
|
||||
data["locked"] = locked
|
||||
data["siliconUser"] = user.has_unlimited_silicon_privilege
|
||||
data["siliconUser"] = hasSiliconAccessInArea(usr)
|
||||
data["mode"] = mode ? mode_name[mode] : "Ready"
|
||||
data["modeStatus"] = ""
|
||||
switch(mode)
|
||||
@@ -205,11 +206,12 @@
|
||||
return data
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/ui_act(action, params)
|
||||
if(..() || (locked && !usr.has_unlimited_silicon_privilege))
|
||||
var/silicon_access = hasSiliconAccessInArea(usr)
|
||||
if(..() || (locked && silicon_access))
|
||||
return
|
||||
switch(action)
|
||||
if("lock")
|
||||
if(usr.has_unlimited_silicon_privilege)
|
||||
if(silicon_access)
|
||||
locked = !locked
|
||||
. = TRUE
|
||||
if("power")
|
||||
@@ -766,4 +768,3 @@
|
||||
|
||||
/obj/machinery/bot_core/mulebot
|
||||
req_access = list(ACCESS_CARGO)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
bubble_icon = "machine"
|
||||
initial_language_holder = /datum/language_holder/drone
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
has_unlimited_silicon_privilege = 1
|
||||
silicon_privileges = PRIVILEDGES_DRONE
|
||||
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
|
||||
hud_possible = list(DIAG_STAT_HUD, DIAG_HUD, ANTAG_HUD)
|
||||
unique_name = TRUE
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
// This loop will, at most, loop twice.
|
||||
for(var/atom/check in check_list)
|
||||
for(var/mob/living/M in viewers(world.view + 1, check) - src)
|
||||
if(M.client && CanAttack(M) && !M.has_unlimited_silicon_privilege)
|
||||
if(M.client && CanAttack(M) && !M.silicon_privileges)
|
||||
if(!M.eye_blind)
|
||||
return M
|
||||
for(var/obj/mecha/M in view(world.view + 1, check)) //assuming if you can see them they can see you
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
var/digitalinvis = 0 //Are they ivisible to the AI?
|
||||
var/image/digitaldisguise = null //what does the AI see instead of them?
|
||||
|
||||
var/has_unlimited_silicon_privilege = 0 // Can they interact with station electronics
|
||||
var/silicon_privileges = NONE // Can they interact with station electronics
|
||||
|
||||
var/obj/control_object //Used by admins to possess objects. All mobs should have this var
|
||||
var/atom/movable/remote_control //Calls relaymove() to whatever it is
|
||||
|
||||
@@ -406,8 +406,8 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/atom/proc/hasSiliconAccessInArea(mob/user)
|
||||
return user && (issilicon(user) || (user.siliconaccesstoggle && (get_area(src) in user.siliconaccessareas)))
|
||||
/atom/proc/hasSiliconAccessInArea(mob/user, flags = PRIVILEDGES_SILICON)
|
||||
return user.silicon_privileges & (flags) || (user.siliconaccesstoggle && (get_area(src) in user.siliconaccessareas))
|
||||
|
||||
/mob/proc/toggleSiliconAccessArea(area/area)
|
||||
if (area in siliconaccessareas)
|
||||
@@ -555,4 +555,4 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
|
||||
//Can the mob see reagents inside of containers?
|
||||
/mob/proc/can_see_reagents()
|
||||
return stat == DEAD || has_unlimited_silicon_privilege //Dead guys and silicons can always see reagents
|
||||
return stat == DEAD || silicon_privileges //Dead guys and silicons can always see reagents
|
||||
|
||||
Reference in New Issue
Block a user