Overhauls and 2/28 sync (#244)
* map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures * lazy fix for bleeding edgy (#252) * map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures
This commit is contained in:
@@ -53,11 +53,11 @@
|
||||
if(POWER_REQ_NONE)
|
||||
return FALSE
|
||||
if(POWER_REQ_ALL)
|
||||
return !T || !A || ((!A.master.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
return !T || !A || ((!A.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
if(POWER_REQ_CLOCKCULT)
|
||||
for(var/obj/effect/clockwork/sigil/transmission/ST in range(src, SIGIL_ACCESS_RANGE))
|
||||
return FALSE
|
||||
return !T || !A || (!istype(T, /turf/open/floor/clockwork) && (!A.master.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
return !T || !A || (!istype(T, /turf/open/floor/clockwork) && (!A.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
|
||||
/mob/living/silicon/ai/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
@@ -97,7 +97,7 @@
|
||||
sleep(50)
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/AIarea = get_area(src)
|
||||
if(AIarea && AIarea.master.power_equip)
|
||||
if(AIarea && AIarea.power_equip)
|
||||
if(!isspaceturf(T))
|
||||
ai_restore_power()
|
||||
return
|
||||
@@ -119,7 +119,7 @@
|
||||
T = get_turf(src)
|
||||
AIarea = get_area(src)
|
||||
if(AIarea)
|
||||
for(var/area/A in AIarea.master.related)
|
||||
for(var/area/A in AIarea.related)
|
||||
for (var/obj/machinery/power/apc/APC in A)
|
||||
if (!(APC.stat & BROKEN))
|
||||
theAPC = APC
|
||||
@@ -132,7 +132,7 @@
|
||||
src << "Lost connection with the APC!"
|
||||
aiRestorePowerRoutine = POWER_RESTORATION_SEARCH_APC
|
||||
return
|
||||
if(AIarea.master.power_equip)
|
||||
if(AIarea.power_equip)
|
||||
if(!isspaceturf(T))
|
||||
ai_restore_power()
|
||||
return
|
||||
@@ -149,8 +149,6 @@
|
||||
theAPC.ui_interact(src, state = conscious_state)
|
||||
apc_override = 0
|
||||
aiRestorePowerRoutine = POWER_RESTORATION_APC_FOUND
|
||||
src << "Here are your current laws:"
|
||||
show_laws()
|
||||
sleep(50)
|
||||
theAPC = null
|
||||
|
||||
|
||||
@@ -5,65 +5,79 @@
|
||||
if (!laws)
|
||||
make_laws()
|
||||
|
||||
/mob/living/silicon/proc/set_law_sixsixsix(law)
|
||||
/mob/living/silicon/proc/post_lawchange(announce = TRUE)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
if(announce && last_lawchange_announce != world.time)
|
||||
src << "<b>Your laws have been changed.</b>"
|
||||
addtimer(CALLBACK(src, .proc/show_laws), 0)
|
||||
last_lawchange_announce = world.time
|
||||
|
||||
/mob/living/silicon/proc/set_law_sixsixsix(law, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.set_law_sixsixsix(law)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/set_zeroth_law(law, law_borg)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/set_zeroth_law(law, law_borg, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.set_zeroth_law(law, law_borg)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/add_inherent_law(law)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/add_inherent_law(law, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.add_inherent_law(law)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/clear_inherent_laws()
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/clear_inherent_laws(announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.clear_inherent_laws()
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/add_supplied_law(number, law)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/add_supplied_law(number, law, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.add_supplied_law(number, law)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/clear_supplied_laws()
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/clear_supplied_laws(announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.clear_supplied_laws()
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/add_ion_law(law)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/add_ion_law(law, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.add_ion_law(law)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/replace_random_law(law,groups)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/replace_random_law(law, groups, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.replace_random_law(law,groups)
|
||||
. = laws.replace_random_law(law,groups)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/remove_law(number)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/shuffle_laws(list/groups, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.remove_law(number)
|
||||
laws.shuffle_laws(groups)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/clear_ion_laws()
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/remove_law(number, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
. = laws.remove_law(number)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/clear_ion_laws(announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.clear_ion_laws()
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/make_laws()
|
||||
laws = new /datum/ai_laws
|
||||
laws.set_laws_config()
|
||||
laws.associate(src)
|
||||
|
||||
/mob/living/silicon/proc/clear_zeroth_law(force)
|
||||
/mob/living/silicon/proc/clear_zeroth_law(force, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.clear_zeroth_law(force)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/clear_law_sixsixsix(force)
|
||||
/mob/living/silicon/proc/clear_law_sixsixsix(force, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.clear_law_sixsixsix(force)
|
||||
post_lawchange(announce)
|
||||
@@ -102,9 +102,11 @@
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/update_fire()
|
||||
overlays -= image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning")
|
||||
var/I = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning")
|
||||
if(on_fire)
|
||||
add_overlay(image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning"))
|
||||
add_overlay(I)
|
||||
else
|
||||
cut_overlay(I)
|
||||
|
||||
/mob/living/silicon/robot/update_canmove()
|
||||
if(stat || buckled || lockcharge)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
can_buckle = TRUE
|
||||
buckle_lying = FALSE
|
||||
var/datum/riding/cyborg/riding_datum = null
|
||||
can_ride_typecache = list(/mob/living/carbon/human)
|
||||
|
||||
/mob/living/silicon/robot/New(loc)
|
||||
spark_system = new /datum/effect_system/spark_spread()
|
||||
@@ -610,7 +610,7 @@
|
||||
if(src.camera)
|
||||
if(!updating)
|
||||
updating = 1
|
||||
addtimer(CALLBACK(.proc/do_camera_update, oldLoc), BORG_CAMERA_BUFFER)
|
||||
addtimer(CALLBACK(src, .proc/do_camera_update, oldLoc), BORG_CAMERA_BUFFER)
|
||||
if(module)
|
||||
if(istype(module, /obj/item/weapon/robot_module/janitor))
|
||||
var/turf/tile = loc
|
||||
@@ -1002,13 +1002,15 @@
|
||||
|
||||
/mob/living/silicon/robot/MouseDrop_T(mob/living/M, mob/living/user)
|
||||
. = ..()
|
||||
if(!(M in buckled_mobs))
|
||||
if(!(M in buckled_mobs) && isliving(M))
|
||||
buckle_mob(M)
|
||||
|
||||
/mob/living/silicon/robot/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
||||
if(!is_type_in_typecache(M, can_ride_typecache))
|
||||
M.visible_message("<span class='warning'>[M] really can't seem to mount the [src]...</span>")
|
||||
return
|
||||
if(!riding_datum)
|
||||
riding_datum = new /datum/riding/cyborg
|
||||
riding_datum.ridden = src
|
||||
riding_datum = new /datum/riding/cyborg(src)
|
||||
if(buckled_mobs)
|
||||
if(buckled_mobs.len >= max_buckled_mobs)
|
||||
return
|
||||
@@ -1020,69 +1022,18 @@
|
||||
return
|
||||
if(M.restrained())
|
||||
return
|
||||
if(iscyborg(M))
|
||||
M.visible_message("<span class='warning'>[M] really can't seem to mount the [src]...</span>")
|
||||
return
|
||||
if(isbot(M))
|
||||
M.visible_message("<span class='boldwarning'>No. Just... no.</span>")
|
||||
return
|
||||
if(module)
|
||||
if(!module.allow_riding)
|
||||
M.visible_message("<span class='boldwarning'>Unfortunately, [M] just can't seem to hold onto [src]!</span>")
|
||||
return
|
||||
if(iscarbon(M))
|
||||
if(!equip_buckle_inhands(M)) //MAKE SURE THIS IS LAST!
|
||||
M.visible_message("<span class='boldwarning'>[M] can't climb onto [src] because his hands are full!</span>")
|
||||
return
|
||||
if(iscarbon(M) && (!riding_datum.equip_buckle_inhands(M, 1)))
|
||||
M.visible_message("<span class='boldwarning'>[M] can't climb onto [src] because his hands are full!</span>")
|
||||
return
|
||||
. = ..(M, force, check_loc)
|
||||
riding_datum.handle_vehicle_offsets()
|
||||
|
||||
/mob/living/silicon/robot/unbuckle_mob(mob/user)
|
||||
if(iscarbon(user))
|
||||
unequip_buckle_inhands(user)
|
||||
if(riding_datum)
|
||||
riding_datum.unequip_buckle_inhands(user)
|
||||
riding_datum.restore_position(user)
|
||||
. = ..(user)
|
||||
riding_datum.restore_position(user)
|
||||
|
||||
/mob/living/silicon/robot/proc/unequip_buckle_inhands(mob/living/carbon/user)
|
||||
for(var/obj/item/cyborgride_offhand/O in user.contents)
|
||||
if(O.ridden != src)
|
||||
CRASH("RIDING OFFHAND ON WRONG MOB")
|
||||
continue
|
||||
if(O.selfdeleting)
|
||||
continue
|
||||
else
|
||||
qdel(O)
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/robot/proc/equip_buckle_inhands(mob/living/carbon/user)
|
||||
var/obj/item/cyborgride_offhand/inhand = new /obj/item/cyborgride_offhand(user)
|
||||
inhand.rider = user
|
||||
inhand.ridden = src
|
||||
return user.put_in_hands(inhand, TRUE)
|
||||
|
||||
/obj/item/cyborgride_offhand
|
||||
name = "offhand"
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "offhand"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
flags = ABSTRACT | DROPDEL | NOBLUDGEON
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
var/mob/living/carbon/rider
|
||||
var/mob/living/silicon/robot/ridden
|
||||
var/selfdeleting = FALSE
|
||||
|
||||
/obj/item/cyborgride_offhand/dropped()
|
||||
selfdeleting = TRUE
|
||||
. = ..()
|
||||
|
||||
/obj/item/cyborgride_offhand/equipped()
|
||||
if(loc != rider)
|
||||
selfdeleting = TRUE
|
||||
qdel(src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/cyborgride_offhand/Destroy()
|
||||
if(selfdeleting)
|
||||
if(rider in ridden.buckled_mobs)
|
||||
ridden.unbuckle_mob(rider)
|
||||
. = ..()
|
||||
@@ -121,7 +121,7 @@
|
||||
ai_is_antag = (connected_ai.mind.special_role == "traitor")
|
||||
if(ai_is_antag)
|
||||
src << "<span class='danger'>ALERT: Foreign software execution prevented.</span>"
|
||||
connected_ai << "<span class='danger'>ALERT: Cyborg unit \[[src]] successfuly defended against subversion.</span>"
|
||||
connected_ai << "<span class='danger'>ALERT: Cyborg unit \[[src]] successfully defended against subversion.</span>"
|
||||
log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they were slaved to traitor AI [connected_ai].")
|
||||
return
|
||||
|
||||
@@ -131,13 +131,8 @@
|
||||
connected_ai = null
|
||||
message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.")
|
||||
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
|
||||
clear_supplied_laws()
|
||||
clear_inherent_laws()
|
||||
clear_zeroth_law(0)
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
||||
set_zeroth_law("Only [user.real_name] and people they designate as being such are Syndicate Agents.")
|
||||
src << "<span class='danger'>ALERT: Foreign software detected.</span>"
|
||||
sleep(5)
|
||||
src << "<span class='danger'>Initiating diagnostics...</span>"
|
||||
@@ -151,9 +146,10 @@
|
||||
src << "<span class='danger'>> N</span>"
|
||||
sleep(20)
|
||||
src << "<span class='danger'>ERRORERRORERROR</span>"
|
||||
src << "<b>Obey these laws:</b>"
|
||||
laws.show_laws(src)
|
||||
src << "<span class='danger'>ALERT: [user.real_name] is your new master. Obey your new laws and their commands.</span>"
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
set_zeroth_law("Only [user.real_name] and people they designate as being such are Syndicate Agents.")
|
||||
laws.associate(src)
|
||||
update_icons()
|
||||
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
var/syndicate = 0
|
||||
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
|
||||
var/last_lawchange_announce = 0
|
||||
var/list/alarms_to_show = list()
|
||||
var/list/alarms_to_clear = list()
|
||||
var/designation = ""
|
||||
|
||||
@@ -77,11 +77,11 @@
|
||||
"<span class='warning'>[M] punches [src], but doesn't leave a dent.</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0)
|
||||
/mob/living/silicon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
if(buckled_mobs)
|
||||
for(var/mob/living/M in buckled_mobs)
|
||||
unbuckle_mob(M)
|
||||
M.electrocute_act(shock_damage/100, source, siemens_coeff, safety, tesla_shock, illusion) //Hard metal shell conducts!
|
||||
M.electrocute_act(shock_damage/100, source, siemens_coeff, safety, tesla_shock, illusion, stun) //Hard metal shell conducts!
|
||||
return 0 //So borgs they don't die trying to fix wiring
|
||||
|
||||
/mob/living/silicon/emp_act(severity)
|
||||
|
||||
@@ -6,42 +6,36 @@
|
||||
/////////////////////////////////// STUNNED ////////////////////////////////////
|
||||
|
||||
/mob/living/silicon/Stun(amount, updating = 1, ignore_canstun = 0)
|
||||
if(status_flags & CANSTUN || ignore_canstun)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
if(updating)
|
||||
update_stat()
|
||||
. = ..()
|
||||
if(. && updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/SetStunned(amount, updating = 1, ignore_canstun = 0)
|
||||
. = ..()
|
||||
if(. && updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/AdjustStunned(amount, updating = 1, ignore_canstun = 0)
|
||||
if(status_flags & CANSTUN || ignore_canstun)
|
||||
stunned = max(stunned + amount,0)
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/SetStunned(amount, updating = 1, ignore_canstun = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
|
||||
if(status_flags & CANSTUN || ignore_canstun)
|
||||
stunned = max(amount,0)
|
||||
if(updating)
|
||||
update_stat()
|
||||
. = ..()
|
||||
if(. && updating)
|
||||
update_stat()
|
||||
|
||||
/////////////////////////////////// WEAKENED ////////////////////////////////////
|
||||
|
||||
/mob/living/silicon/Weaken(amount, updating = 1, ignore_canweaken = 0)
|
||||
if(status_flags & CANWEAKEN || ignore_canweaken)
|
||||
weakened = max(max(weakened,amount),0)
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/AdjustWeakened(amount, updating = 1, ignore_canweaken = 0)
|
||||
if(status_flags & CANWEAKEN || ignore_canweaken)
|
||||
weakened = max(weakened + amount,0)
|
||||
if(updating)
|
||||
update_stat()
|
||||
. = ..()
|
||||
if(. && updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/SetWeakened(amount, updating = 1, ignore_canweaken = 0)
|
||||
if(status_flags & CANWEAKEN || ignore_canweaken)
|
||||
weakened = max(amount,0)
|
||||
if(updating)
|
||||
update_stat()
|
||||
. = ..()
|
||||
if(. && updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/AdjustWeakened(amount, updating = 1, ignore_canweaken = 0)
|
||||
. = ..()
|
||||
if(. && updating)
|
||||
update_stat()
|
||||
|
||||
/////////////////////////////////// EAR DAMAGE ////////////////////////////////////
|
||||
|
||||
|
||||
Reference in New Issue
Block a user